Hi Anand -
Here are details
Create a implit enahcnement at the end of this function module MEPOBADI_FS_ITEM (just before ENDFUNCTION). Let me know if you need help on implicit enhancemnt.
1. declare data
DATA: , w_header TYPE mepoheader,
w_item TYPE mepoitem ,
w_fieldselection TYPE mmpur_fs.
CONSTANTS: mmmfd_dpc_type TYPE mmpur_metafield VALUE 781,
2 . check header data
IF im_header IS NOT INITIAL.
CALL METHOD im_header->get_data
RECEIVING
re_data = w_header.
ENDIF.
* Check the header for w_header-FRGKE
Here you can take the document type from w_header
3. . check if im_item is not inintial. then take the item data
CALL METHOD im_item->get_data
RECEIVING
re_data = w_item.
Here you can check plant from w_item.
if your condition match.
4. LOOP AT ch_fieldselection INTO w_fieldselection
WHERE metafield = mmmfd_dpc_type
w_fieldselection-fieldstatus = '*' .
MODIFY ch_fieldselection FROM w_fieldselection.
CLEAR w_fieldselection.
ENDLOOP.
Hope it helps.
Let us know, in case any further help.
Regards,
Atul Mohanty