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: 

Filter for MB_MIGO_BADI

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

0 Kudos

hi kiran,

if i wrote the above logic it wont work because GODEFAULT_TV-BWART is not accesable in this badi.

0 Kudos

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

0 Kudos

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

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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