cancel
Showing results for 
Search instead for 
Did you mean: 

REG Global Definitions

Former Member
0 Kudos

Hi all

What is the difference between writing the code in Global data initilisation and CODE program lines??

Please

Regards

karthik

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

thnx

Former Member
0 Kudos

Hi

Initialization is just like event Initiallization in reports. ie the code written in this will be exected before the first screen of the program run is displayed. Generally , we use this for declarations, assigning initial values. or if the initial values need some calculations, we dothem here.

So it is accordin to our requirement we slect it.

Rewards if useful

cheers

Vamshi

Former Member
0 Kudos

Hi

We can write the code in intialisation as well as program lines.

We can write the code (Select queries in the intialization), then

there is no need of driver program. Then in the intialisation tab we need to specify the output parameters.

We an write the code in the program lines also,

there we need to specify the input parameters and output parameters. The input parameters which we specify are the parameters declared inthe smartform itself.We can create program lines in the window only

The data which we give in the GLOBAL DATA of the smartform can be used in each and every node of the smartform.

thnx

With regards

Sravani

Plz reward if useful......

Former Member
0 Kudos

hi both of u thnx for youur hlep.

i am not able to assign points , eventhough i am assignig its not taking, i ll do it later.,

Regards

Karthik

Former Member
0 Kudos

Hi,

The initialization tab is to initialize the values of Variables or even internal tables.Normally its not sujjested to write code in initialization, but u can try population internal tables thr without a print program attached to smartform.

What all values that we want to initialize should be put in input parameters and we should have the same values in output parameters since we are initializing/changing the values for that variables.

Those values can be accessed anywhere in smartform.

When we create 'CODE Lines" also we can see input and out put parameters there, but here in input parameters what all tables or varaibles that we are using inside the code line should be put and in output parameters we should put what all valuse we want to output from that code

for Example:-

Suppose i have a work area "w_final"

and I want to set value for a flag variable "w_flag" taking condition of that work area then I should put "w_final" in INPUT Section and "w_flag" in Output parameter section.

Code -> ON CHANGE OF w_final-mtart.

w_flag ='X'.

endon.

Try one example creating varibale and assighn some values to that.

Program LInes:

the program lines in smartforms are use in the same way as we use ABAP editor...the only thing whatever variables or internal tables u are using in that program lines u need to mention thta in imput and output above...

if u want a particular variable or internal table to be used in future define that in output...else u define it in input....

see the thread

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ccab6730-0501-0010-ee84-de050a6c...

Regards,

Shiva Kumar

Former Member
0 Kudos

CODE program lines: only to that particular window

code in Global data; for all window..

if it is usefull plz Reward

Regards

Anbu