2010 Sep 27 11:17 AM
Hi All,
I am working on BADI implementation for the MB_DOCUMENT_BADI.
In the implementation, i ineed to change the document type (ZMKPF-BLART) value.
If use the code like follow, the system is giving syntax error as 'The structure XMKPF can not be modified'.
data: wa_xmkpf like line of xmkpf.
data: xmseg like line of xmseg.
read table xmkpf into wa_xmkpf index 1.
if wa_xmkpf-bwart = '102'.
read table XMSEG into WA_XMSEG into wa_xmseg.
if sy-subrc = 0.
wa_xmseg-blart = 'RT'.
modify xmseg from wa_mseg.
endif.
endif.
Is there any other logic, so as to make the zmseg-blart = 'RT'...??
Regards
Pavan
2010 Sep 27 11:29 AM
In this BADI, the XMSEG structure can not be changed. It can be used for other programs only..
2010 Sep 27 11:30 AM
Dont use modify statements in BADI for changing data in standard transactions.