Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE

Hi Experts,

Pls. clarify me the following,

Am working with BADI - MB_DOCUMENT_BADI (IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE),

So, I wanna to populate xmseg-sgtxt with my_value.

but, am getting an error saying that,

the xmseg can not/allowed be changed??

so,

1) is it really, not allowed to change it?

2) how to get done my requirement (with this badi)

3) if all r importing parmaters, like XMKPF; XMSEG, then wht is the use of this BADI?

actually, earlier i worked with BADI, which does hv the Exporting parametres?

thanq.

Tags:
replied

Hi,

Please try this.

DATA: T_XMKPF  TYPE STANDARD TABLE OF MKPF,
      WA_XMKPF TYPE MKPF,
      T_XLIPS  TYPE STANDARD TABLE OF LIPS,
      WA_XLIPS TYPE LIPS. 

FIELD-SYMBOLS: <XMKPF> TYPE ANY TABLE,
               <XLIPS> TYPE ANY TABLE.
 
ASSIGN ('(SAPMM07M)XMKPF[]')  TO <XMKPF>. 
ASSIGN ('(SAPMM07M)X_LIPS[]') TO <XLIPS>.
 
T_XMKPF[] = <XMKPF>[].
T_XLIPS[] = <XLIPS>[].

READ TABLE T_XLIPS INDEX 1 INTO WA_XLIPS.

IF SY-SUBRC = 0.
  LOOP AT T_XMKPF INTO WA_XMKPF.
    WA_MKPF-XBLNR = WA_XLIPS-VBELN.  
    MODIFY T_XMKPF FROM WA_XMKPF.
  ENDLOOP.
ENDIF.

UNASSIGN <XMKPF>.
UNASSIGN <XLIPS>.

Are you using transaction MB01?

Regards,

Ferry Lianto

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question