Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

system field name required...

Former Member
0 Likes
1,549

Hi,

which system field is activated first in a program, and we can use that system field as a flag variable inside our program.

With Regards,

M.S.Amirtharaj Vijay.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,521

Hi,

can you explain excatly why you need the first field that gets updated.

only then somebody can help you.

then you tell me which field gets updated the first.

Hi,

which system field is activated first in a program, and we can use that system field as a flag variable inside our program.

With Regards,

M.S.Amirtharaj Vijay.

12 REPLIES 12
Read only

Former Member
0 Likes
1,521

Hi,

could you through some light on why you need to set flag, depending on your requirement you can set flag using any system field

that fits into the criteria.

well i guess the system field that gets updated should be SY-REPID.

Read only

0 Likes
1,521

what is the name of the system field that is set when a program is loaded ( mean to say load of program event while executing )

for execution.

Read only

0 Likes
1,521

Hi

Put the break-point in various event which you have in your program and check SY strtucture value in debugg. There are many fields which get updated.

Regards

Sachin

Read only

0 Likes
1,521

Hi Sachin,

Thanks for your reply,

i used run time debugger ( /h ), and i typed syst its a structure its activating so may fields but i need to fine which one is activated at the first itself.

WIth Regards,

M.S.Amirtharaj Vijay.

Read only

0 Likes
1,521

Hi Jain,

Thanks for your reply,

Its not SY-REPID.

With Regards,

M.S.Amirtharaj Vijay.

Read only

Former Member
0 Likes
1,522

Hi,

can you explain excatly why you need the first field that gets updated.

only then somebody can help you.

then you tell me which field gets updated the first.

Read only

0 Likes
1,521

HI,

Am having a scenario, they wont allow me to create a variable to fine weather the program is executed at the first time or not . But if the program is executed first i want to do some processes , that's why i need the system field name.

With Regards,

M.S.Amirtharaj Vijay.

Read only

0 Likes
1,521

System field name(s) probably give you precisely nothing, I think, since the SYST (which doesn't contain REPID, but rather CPROG) will be populated with values last set by the user until replaced by your program. Once you have ability to look at SYST in Load-of-program (first event) or initialization(2nd event), SYST will have been populated.

Why don't you declare of variable of type BOOLEAN, set to false by default, and in initialization set it to true. But this might not work, because an executable (type 1) program reprocesses initialization and at selection-screen output events before returning to selection screen after every execution cycle. You need logic to decide whether or not you have done the updates needed, perhaps an entry in table TVARVC or something similar.

Read only

0 Likes
1,521

Hi,

I think creating entry in TVARC is the best solution for your query.

Thanks,

Anmol.

Read only

0 Likes
1,521

Why don't you code in event [LOAD-OF-PROGRAM |http://help.sap.com/abapdocu_70/en/ABAPLOAD-OF-PROGRAM.htm], this event is

triggered by the ABAP-runtime environment when an executable program, a module pool, a function group or a sub-routine pool is loaded in the internal session.

Regards,

Raymond

Read only

0 Likes
1,521

Hi,

Thanks for your help.

With Regards ,

M.S.Amirtharaj Vijay

Read only

deepak_dhamat
Active Contributor
0 Likes
1,521

hi ,

it is

SY-REPID

there are all system fields which gets activated but when program gets initiated

they store there respective valuse such as

sy-repid = name of program

sy-tabix which will have value 1 as soon as you start debugging .

regards

Deepak.

Edited by: Deepak Dhamat on Oct 19, 2010 11:46 AM