cancel
Showing results for 
Search instead for 
Did you mean: 

container in advanced UDF

Former Member
0 Kudos

Hi,

could you please tell me the use of Container in advanced UDF ?? Preferrably with examples

thanks

kumar

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Kumar,

In case of global container lemme give you an example. In target node let say i'm having a field <b>Profit center</b> where let say GLCode=24. To get this value I need to do DB Lookup, consider if there are some 100 records , each records is having Profit center field, so is it necessary for me to DB lookup 100 times. Absoultely not , so what I can do I will create UDF for DB Lookup and the resulting value I will assign as Global container variable and assign to root node of the target structure. So for each profit center node I can get the value for Global container variable and assign. Its just an example.

Best regards,

raj.

Former Member
0 Kudos

Hi Kumar ,

You use Global container variable to store the values for one or more variable which you can use latter at many places in that mapping program .

For example refer the following blog .

/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

Thanks ,

Suvarna

Award pts if it helps you .

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Container Allows you to access the runtime variables inside a UDF.

Ex: you want to write trace Statement,

AbstractTrace trace = container.getTrace()

More examples in this link,

http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm

Regards

Bhavesh

justin_santhanam
Active Contributor
0 Kudos