‎2007 Jul 20 12:38 PM
Please tell me what is a flag , and its purpose and how it is used.
Thanks in advance.
‎2007 Jul 20 12:41 PM
Hi hemal,
1. Flag is nothing but a variable of just one character.
It can have value X or space
to denote Yes or no
True of false.
2. eg.
data : foundflag type c.
If some condition is true.
foundflag = 'X'.
endif.
if foundflag = 'X'.
*----- code.
endif.
regards,
amit m.
‎2007 Jul 20 12:41 PM
Hi,
FLAG is a Single charecter field which we will declare the ABAP code .
DATA: FLAG. " a Single Charecter field.
Lets say you want to check a YES or NO situvation, then this will be very usefull, you can check this FLAG is X or SPACE, based on this we can write the Program
Regards
Sudheer
‎2007 Jul 20 12:42 PM
Hi...
Flag is nothing but a variable to Store values like TRUE or FALSE.
Generally we use a SINGLE CHAR field as a FLAG (' ' for False and 'X' for True)
Data : v_flag type c.
IF v_flag = 'X'.
ENDIF.
<b>reward if helpful.</b>
‎2007 Jul 20 12:43 PM
Hi Hema,
Flag is just a temporary variable which stores value X or space..
Depending on the value of a flag you can perform some code...
‎2007 Jul 20 12:44 PM
Hi,
FLag could be a single character variable of type C. You can use flag for any purpose if you want to store some sort of counter. Flag is not mandatory for call transaction. Flag is generally a temp variable defined withn the program to check the status if its TRUE or FLASE.
you declare like this.
data : flag(1) type c.
check this link for more info...
<b>Reward points</b>
regards