Application Development 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: 

how to set flag in badi HRPAD00INFTY

Former Member
0 Kudos
539

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.

1 ACCEPTED SOLUTION

former_member209703
Active Contributor
0 Kudos
170

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.

3 REPLIES 3

former_member209703
Active Contributor
0 Kudos
171

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.

Former Member
0 Kudos
170

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".

0 Kudos
170

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.