1.Run Tcode se19
2.create enhancement and click on classic badi radio button
3.Enter badi name MB_MIGO_BADI and click on button create
4.
give you Implementation Name
5.
Click method of interface .it will ask you to create the enhancement implementation
6.
create button and enter Enhancement Implementation ,group etc in pop up screen appeared and ok.
7.Now select your Enhancement Implementation just created
8.
Go to
INIT method and Write code:
method IF_EX_MB_MIGO_BADI~INIT.
Data :GF_CLASS_ID type Migo_class_id value ‘MIGO_BADI_EXAMPLE1‘.
APPEND gf_class_id TO ct_init.
endmethod.
9.Go to
PBO_DETAIL method
DATA : GV_CLASS_ID TYPE MIGO_CLASS_ID.
DATA : GV_FLAG TYPE XFELD,
LV_FLAG TYPE XFELD,
GV_LN TYPE GOITEM-GLOBAL_COUNTER,
GT_EXDATA TYPE TY_T_EXTDATA.
FIELD-SYMBOLS : <FS> TYPE ANY.
DATA : VAL TYPE STRING .
VAL = ‘(SAPLMIGO)GODEFAULT_TV-BWART‘ .
ASSIGN (VAL) TO <FS>.
IF I_CLASS_ID EQ ‘MIGO_BADI_EXAMPLE1‘.
IF <FS> EQ ‘101‘ OR <FS> EQ ‘309‘ OR <FS> EQ ‘301‘.
GV_CLASS_ID = ‘MIGO_BADI_EXAMPLE1‘ ."‘MIGO_BADI_IMPLEMENTATION_CIN‘.
E_CPROG = ‘ZSAPLMIGO_SCREEN‘.
E_DYNNR = ‘0900‘.
E_HEADING = ‘Vendor Retest Date‘(010).
GV_LN = I_LINE_ID.
EXPORT E_LINE_ID FROM I_LINE_ID TO MEMORY ID ‘LNID‘.
ENDIF.
ENDIF.
10.
Go to
PAI DETAIL method
method IF_EX_MB_MIGO_BADI~PAI_DETAIL.
E_FORCE_CHANGE = ‘X‘.
endmethod.
11.
Go to
LINE_MODIFY method
DATA flag(1) TYPE c.
IF cs_goitem-mblnr IS INITIAL.
flag = ‘X‘.
ENDIF.
12.POST_DOCUMENT method
under POST_DOCUMENT method write the code for appending the value to Z table along with the values of the line item.
13.
Create a program
ZSAPLMIGO_SCREEN with the screen
0900 type sub-screen in SE80 and design the layout .
and in flow logic :
PROCESS BEFORE OUTPUT.
MODULE STATUS_0900.
*
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0900.
Now run MIGO Transaction.:
版权声明:本文为博主原创文章,未经博主允许不得转载。