11-22-2007 7:09 PM
Hello All!
I have activated a BADi for validation in transaction FF_5. I need to make some process on it and it's necessary to get a value from <b>FF_5/Do not post</b> field.
Question: How can I pass the value from this field to BAdi?
I tried by GET Parameter and import commands but were unsuccesfull.
Thanks in advance,
Michel
11-22-2007 8:43 PM
Hello Michel
Assuming that you are using BAdI FEB_BADI you may try the following coding:
METHOD if_ex_feb_badi~change_posting_data.
* define local data
DATA:
ld_prog1(50) TYPE c VALUE '(RFEBKA00)PA_TEST',
ld_prog2(50) TYPE c VALUE '(RFEBKA30)PA_TEST',
ld_prog3(50) TYPE c VALUE '(RFEBBU00)TESTL'.
FIELD-SYMBOLS:
<ld_test> TYPE ANY.
ASSIGN (ld_prog1) TO <ld_test>.
IF ( <ld_test> IS NOT ASSIGNED ).
ASSIGN (ld_prog2) TO <ld_test>.
ENDIF.
IF ( <ld_test> IS NOT ASSIGNED ).
ASSIGN (ld_prog3) TO <ld_test>.
ENDIF.
check ( <ld_test> is assigned ).
IF ( <ld_test> = 'X' ).
MESSAGE 'Testrun -> do not post' TYPE 'I'.
ELSE.
MESSAGE 'No test -> do post' TYPE 'I'.
ENDIF.
ENDMETHOD.
In order to check which report eventually is used for selecting the data go into the debugging mode and push the button CALLS. There you will see all reports, classes etc. that have been called thus far.
The technique shown above was taken from:
<a href="http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8">SAP User Exits and the People Who Love Them</a>
Regards
Uwe
11-22-2007 8:43 PM
Hello Michel
Assuming that you are using BAdI FEB_BADI you may try the following coding:
METHOD if_ex_feb_badi~change_posting_data.
* define local data
DATA:
ld_prog1(50) TYPE c VALUE '(RFEBKA00)PA_TEST',
ld_prog2(50) TYPE c VALUE '(RFEBKA30)PA_TEST',
ld_prog3(50) TYPE c VALUE '(RFEBBU00)TESTL'.
FIELD-SYMBOLS:
<ld_test> TYPE ANY.
ASSIGN (ld_prog1) TO <ld_test>.
IF ( <ld_test> IS NOT ASSIGNED ).
ASSIGN (ld_prog2) TO <ld_test>.
ENDIF.
IF ( <ld_test> IS NOT ASSIGNED ).
ASSIGN (ld_prog3) TO <ld_test>.
ENDIF.
check ( <ld_test> is assigned ).
IF ( <ld_test> = 'X' ).
MESSAGE 'Testrun -> do not post' TYPE 'I'.
ELSE.
MESSAGE 'No test -> do post' TYPE 'I'.
ENDIF.
ENDMETHOD.
In order to check which report eventually is used for selecting the data go into the debugging mode and push the button CALLS. There you will see all reports, classes etc. that have been called thus far.
The technique shown above was taken from:
<a href="http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8">SAP User Exits and the People Who Love Them</a>
Regards
Uwe