2014 Jul 24 10:56 AM
Hi,
I am adding new tab with few fields at header level in MIGO. The data entered in new tab need to be updated in Header Table MKPF.
To achive this, I had appended a 'Z' struture in MKPF for new required field and used these field while creating subscreen. I had also implement the BADI (MB_MIGO_BADI) to add new tab at header level. I can see the new tab along with the fields added.
But i am not able to update the data from these new fields in corresponding fields database table MKPF.
The 'POST_DOCUMENT' method has nonly import parameter of MKPF which cannot be modified.
plz let me know possible way out to update the zfields in table MKPF.
Thanks & Regards,
Manu B
2014 Jul 24 11:21 AM
2021 Jul 26 6:25 PM
Update MKPF table's Field after click on Post button in MIGO screen :-
1) Open this Include "LMIGOKD1" in SE38:-
2) Create below Enhancement Spot copy from Create button :-
* MB_CREATE_GOODS_MOVEMENT
ENHANCEMENT-SECTION document_operation_02 SPOTS es_saplmigo.
CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
EXPORTING
ctcod = l_tcode
imkpf = ls_imkpf
xallp = abap_true
xallr = abap_true
xallb = abap_true
IMPORTING
emkpf = ls_emkpf
es_mkpf = ls_xmkpf
TABLES
emseg = lt_emseg
imseg = lt_imseg
et_mseg = lt_xmseg.
END-ENHANCEMENT-SECTION.
3) Set data in ls_imkpf this Structure like this :-
ls_imkpf-GTS_CUSREF_NO = 'Sample Text'.
Thanks & Regards
Harshit Varshney