04-17-2008 11:41 AM
Hi Experts,
i have implemented a BADI (MB_MIGO_BADI) in MIGO for customer screen but the requirement is this screen has to be called only for a particular Movement type not for all the movement types.So how can i achive it?
05-07-2008 4:55 PM
i have solved my problem by my own,
by using enchancement spots
i have created a enchancement in saplmigo's include
LMIGOSMC
at
ENHANCEMENT-POINT FIELDSELECTION_01 SPOTS ES_SAPLMIGO.
and i have wrote this code
EXPORT GODEFAULT_TV-BWART from GODEFAULT_TV-BWART TO MEMORY ID 'INTERNAL'.
and the BADI i have wrote
IMPORT GODEFAULT_TV-BWART TO BWART FROM MEMORY ID 'INTERNAL'.
IF BWART = 'ZGR'.
E_CPROG = 'ZMIGO'.
E_DYNNR = '0200'.
E_HEADING = 'ROLL DETAILS'.
ENDIF.
now its working....
thanks to all for your replys.........
if any one got the same requirment then use this
Regards,
Ameen Shaik
04-17-2008 11:53 AM
Hi ameen,
Since the BADI MB_MIGO_BADI Is not a filter dependent badi so you cannot set filter for the badi.
inside the badi implementaion why dont you give the condtions like
if the movement type (bwart ) eq < your reqired movement type>
write your logic.
endif.
Regards
Kiran
04-17-2008 12:01 PM
hi kiran,
if i wrote the above logic it wont work because GODEFAULT_TV-BWART is not accesable in this badi.
04-17-2008 12:17 PM
Hi Ameen,
in Method POST_DOCUMENT under associated type TY_T_MSEG Under this in line type MSEG i am able to see the movement type field BWART..
Regards
Kiran
04-17-2008 12:59 PM
HI
KIRAN,
you are right but i need the same variable in PBO_DETAIL method so that i can write code
if BWART = ( requirement ).
E_CPROG = 'zprg'.
E_DYNNR = '0200'.
E_HEADING = 'heading'.
endif.
Regards,
Ameen
Edited by: ameen shaik on Apr 17, 2008 1:59 PM
04-17-2008 4:19 PM
Ameen,
BWART is available in the global class lcl_migo_globals used in MIGO transaction.
lcl_migo_globals=>t_cust is the table that has got BWART value.
Try accesing it by reading stack calls.
Do this way:
DATA: GW_FIELD(60) TYPE C,
L_BWART TYPE MSEG-BWART.
FIELD-SYMBOLS: <GW_BWART_VAL> TYPE MSEG-BWART.
CLEAR: GW_FIELD, L_BWART.
MOVE '(SAPLMIGO)lcl_migo_globals=>t_cust-BWART' TO GW_FIELD.
ASSIGN (GW_FIELD) TO <GW_BWART_VAL>.
IF <GW_BWART_VAL> IS ASSIGNED.
L_BWART = <GW_BWART_VAL>.
ENDIF.
This should work.However,it can be the case that bwart is not present in the table header, then try reading any row of t_cust and get bwart from that row by providing table index as t_cust[1].
G@urav.
05-07-2008 4:47 PM
i have solved my problem by my own,
by using enchancement spots
i have created a enchancement in saplmigo's include
LMIGOSMC
at
ENHANCEMENT-POINT FIELDSELECTION_01 SPOTS ES_SAPLMIGO.
and i have wrote this code
EXPORT GODEFAULT_TV-BWART from GODEFAULT_TV-BWART TO MEMORY ID 'INTERNAL'.
and the BADI i have wrote
IMPORT GODEFAULT_TV-BWART TO BWART FROM MEMORY ID 'INTERNAL'.
IF BWART = 'ZGR'.
E_CPROG = 'ZMIGO'.
E_DYNNR = '0200'.
E_HEADING = 'ROLL DETAILS'.
ENDIF.
now its working....
thanks to all for your replys.........
if any one got the same requirment then use this
Regards,
Ameen Shaik
05-07-2008 4:55 PM
i have solved my problem by my own,
by using enchancement spots
i have created a enchancement in saplmigo's include
LMIGOSMC
at
ENHANCEMENT-POINT FIELDSELECTION_01 SPOTS ES_SAPLMIGO.
and i have wrote this code
EXPORT GODEFAULT_TV-BWART from GODEFAULT_TV-BWART TO MEMORY ID 'INTERNAL'.
and the BADI i have wrote
IMPORT GODEFAULT_TV-BWART TO BWART FROM MEMORY ID 'INTERNAL'.
IF BWART = 'ZGR'.
E_CPROG = 'ZMIGO'.
E_DYNNR = '0200'.
E_HEADING = 'ROLL DETAILS'.
ENDIF.
now its working....
thanks to all for your replys.........
if any one got the same requirment then use this
Regards,
Ameen Shaik