2011 Oct 21 10:27 AM
hi,
i am unable to set flag in badi HRPAD00INFTY. when ever my z screen call by this method flag value is zero. anyone know how to set the flag .
method IF_EX_HRPAD00INFTY~IN_UPDATE .
if flag is initial.
Call transaction 'ZHR_EMPDTL1'.
flag = 'X'.
endif.
endmethod.
2011 Oct 21 10:59 AM
Hi
It's not working becasue flag is a local variable, so whenever you enter this method it resets again its value.
You could use IMPORT/EXPORT approach as long as the process occurs in the same session.
method IF_EX_HRPAD00INFTY~IN_UPDATE .
data flag type c.
import flag to flag from memory ID 'ZFLAG'.
if flag is initial.
Call transaction 'ZHR_EMPDTL1'.
flag = 'X'.
EXPORT FLAG TO FLAG TO MEMORY ID 'ZFLAG'.
endif.
2011 Oct 21 10:59 AM
Hi
It's not working becasue flag is a local variable, so whenever you enter this method it resets again its value.
You could use IMPORT/EXPORT approach as long as the process occurs in the same session.
method IF_EX_HRPAD00INFTY~IN_UPDATE .
data flag type c.
import flag to flag from memory ID 'ZFLAG'.
if flag is initial.
Call transaction 'ZHR_EMPDTL1'.
flag = 'X'.
EXPORT FLAG TO FLAG TO MEMORY ID 'ZFLAG'.
endif.
2011 Oct 21 11:11 AM
when i set this code....
data flag type c.
import flag to flag from memory ID 'ZFLAG'.
if flag is initial.
Call transaction 'ZHR_EMPDTL1'.
flag = 'X'.
EXPORT FLAG TO FLAG TO MEMORY ID 'ZFLAG'.
there is error....
"= field" or "FROM field" expected after "TO".
2011 Oct 21 11:29 AM
Sorry
Corrected
import flag to flag from memory ID 'ZFLAG'.
if flag is initial.
flag = 'X'.
EXPORT FLAG from FLAG TO MEMORY ID 'ZFLAG'.
endif.