cancel
Showing results for 
Search instead for 
Did you mean: 

Populating array of values in GlobalContainer.

justin_santhanam
Active Contributor
0 Kudos

Dear Friends,

I have a doubt in excecuting the GlobalContainer in UDF. It will be great if you guys help me out in solving it.

I'm passing some array of values into UDF.After doing some validations I need to set these values in array of Global Container.Later in other UDF I've to retrieve the array of values from the Global Container.

Can you guys shed some light on what logic needs to be done ?

Best regards,

raj.

Accepted Solutions (0)

Answers (1)

Answers (1)

henrique_pinto
Active Contributor
0 Kudos

Use Java Sections instead of GlobalContainer.

Check this link: http://help.sap.com/saphelp_nw2004s/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm

on the java sections part.

Basically you define the global variable in the Global Variables section. For example:

List list = null;

Then in initalization section, you initialize the global variable:

list = new Vector();

Then you could have your UDFs filling and later reading the variable (just read/write the <i>list</i> variable).

In the Cleanup section, you can do for example:

list.clear();

Regards,

Henrique.

justin_santhanam
Active Contributor
0 Kudos

Henrique,

Thanks for the reply. So you mean its not possible for me to use the same in GlobalContainer in the mapping part.

Best regards,

raj.

henrique_pinto
Active Contributor
0 Kudos

Not that it is not possible, it is just that using Java Sections is way easier than using GlobalContainer. But hey, the choice is up to u.

Regards,

Henrique.