project BLF > class BTranslation > method DataLoadNewByParent
Description
Load all translations of a list of business objects.
Parameters
ipParentObjectIds | input | longchar | Comma separated list of object identity values. |
tTransString | output | temp-table | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/btranslation.p)
/* ================================================================= */
/* Load the data into the class tables. */
/* ================================================================= */
empty temp-table tTransString.
viObjectTotal = num-entries (ipParentObjectIds).
do viObjectCount = 1 to viObjectTotal:
if vcFreeform = ""
then vcFreeform = "for each TranslationString where TranslationString.ParentObject_ID = "
+ entry(viObjectCount,ipParentObjectIds).
else vcFreeform = vcFreeform + " or TranslationString.ParentObject_ID = "
+ entry(viObjectCount,ipParentObjectIds).
if viObjectCount = viObjectTotal
or (viObjectCount mod 100) = 0
then do:
<M-53 run DataLoad
(input '' (icRowids),
input '' (icPkeys),
input '' (icObjectIds),
input vcFreeform (icFreeform),
input yes (ilKeepPrevious),
output viFcReturnSuper (oiReturnStatus)) in BTranslation>
if viFcReturnSuper = -4
then viFcReturnSuper = 0.
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
vcFreeform = "".
end.
end.
/* ================================================================= */
/* Prepare the data to return */
/* ================================================================= */
do viObjectCount = 1 to viObjectTotal:
viObjectID = integer (entry(viObjectCount,ipParentObjectIds)).
for each tTranslationString where
tTranslationString.ParentObject_ID = viObjectID
on error undo, throw:
create tTransString.
assign tTransString.tiParentObject_ID = tTranslationString.ParentObject_ID
tTransString.tcLngCode = tTranslationString.tcLngCode
tTransString.tcTranslationStringText = tTranslationString.TranslationStringText
tTransString.tc_Rowid = tTranslationString.tc_Rowid.
release tTransString.
end.
end.