cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in Global Variable

Former Member
0 Kudos

Hi Gurus,

Can we declare an array as a Global Variable?

I have a requirement where I need to pass all the values of one of my output field structure into another output field.I think I can achieve this by decalring an array as a Global variable.Can anyone help me with this.How do i achieve this?

Thanks in advance.

Regards,

Swathi

Accepted Solutions (0)

Answers (2)

Answers (2)

siddhesh_pathak4
Contributor
0 Kudos

Verify the link,

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2483] [original link is broken] [original link is broken] [original link is broken];

In this instead of string you may use the string array like,

String[] strArray;

strArray = new String[8] ;

Edited by: Siddhesh Pathak on Mar 12, 2009 8:09 AM

prateek
Active Contributor
0 Kudos

You take an array and store the entire data into that array. While setting the value to the global variable, pass this entire array as an object.

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

I have tried doing that...but getting some error.

In the Global Variable i have declared : String[] s;

Can you please tell me as to what do I write in the Initialization section?