Application Development and Automation 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: 
Read only

MB_DOCUMENT_BADI - MB_DOCUMENT_BEFORE_UPDATE Facing problem while update

Former Member
0 Likes
1,008

Hi,

I am facing problem whille updating below mentioned badi.

*MB_DOCUMENT_BADI - MB_DOCUMENT_BEFORE_UPDATE*

loop at xmseg into wa_mseg.

wa_mseg-lifnr = '156236'.

modify xmseg from wa_mseg transporting lifnr.

endloop.

Facing below error : The field "XMSEG" cannot be changed. -

Thanks in advance. Pls. goude.

Regards,

DP

2 REPLIES 2
Read only

Former Member
0 Likes
596

Hi,

The method MB_DOCUMENT_BEFORE_UPDATE of BADI MB_DOCUMENT_BADI has no exporting or changing parameters. All the parameters are importing parameters and are for reference only.

Only those parameters can be changed which are either exporting or changing.

That is the reason why you are getting the error message.

Hope this helps.

Regards,

Abhisek.

Read only

mvoros
Active Contributor
0 Likes
596

Hi,

I just want to add that you can't use this BADI to update MSEG table. It is explained in BADI documentation why it is not possible to use it for this purpose. It has serious consequences for the consistency of your data.

Cheers