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

general abap(reports)

Former Member
0 Likes
725

hai abapers,

i wants information about flag = 'x' and flag = ' '.

i wants information about flag , what is the use.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
708

Hi Raja Ram,

If you want to know whether a variable is used for the first time.

then you use a variable like FLAG ( it is not necessary to use the variable name as FLAG you can use something like FIRST_TIME or CRITICAL or whatever you like )

then in the program

if FLAG is initial.

--do something and set the FLAG = 'X' or any other value like A,B ,C and so on

next time the program doen't execute this part

endif.

Hope this is clear to you.

Regards

Ramchander Rao.K

hai abapers,

i wants information about flag = 'x' and flag = ' '.

i wants information about flag , what is the use.

4 REPLIES 4
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
708

Hi,

general use to set the flag based on csome condition or may be input parameters .

Rgds,

Sandeep

Read only

Former Member
0 Likes
709

Hi Raja Ram,

If you want to know whether a variable is used for the first time.

then you use a variable like FLAG ( it is not necessary to use the variable name as FLAG you can use something like FIRST_TIME or CRITICAL or whatever you like )

then in the program

if FLAG is initial.

--do something and set the FLAG = 'X' or any other value like A,B ,C and so on

next time the program doen't execute this part

endif.

Hope this is clear to you.

Regards

Ramchander Rao.K

Read only

Former Member
0 Likes
708

hey flag is nothing but the variable u defined.

Flag is a single character variable u use for checking .

Ex: ur If condition succeeded and if that is succeeded u want to do some action later in the program.

then u move flag = 'X'.

so when u want to do some action then check IF flag = 'X'. then the action will be proceeded.

flag = ' ' means flag variable is cleared.

Regards,

Ajay

Read only

Former Member
0 Likes
708

A variable to set depending on the success or failure of condition or expression.