01-17-2008 7:30 AM
Hi all there,
I wanted to add some fields in satndard tcode me21
guide me
Regards
Shashi
01-17-2008 7:43 AM
Hi,
You should use two BAdi's:
ME_GUI_PO_CUST
ME_PROCESS_PO_CUST
For sample implementation look at transaction SE18,
menu Jump to->Sample code->Display.
For ME_GUI_PO_CUST you should at least implement methods:
IF_EX_ME_GUI_PO_CUST~SUBSCRIBE,
IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS.
For ME_PROCESS_PO_CUST you should at least implement method:
IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM.
Example codes:
You must create your own function group with subscreen (see documentation)
in this example FM name is ZIT_MM_PO_ENH
ZIT_MM_PO_ENH_EXTRAFLDS name of the structure containg field ZZUNSPSC
method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE.
data: ls_subscriber LIKE LINE OF re_subscribers.
check im_application = 'PO'.
check im_element = 'ITEM'.
clear re_subscribers[].
ls_subscriber-name = subscreen1.
ls_subscriber-dynpro = '0100'.
ls_subscriber-program = 'SAPLZIT_MM_PO_ENH'.
ls_subscriber-struct_name = 'ZIT_MM_PO_ENH_EXTRAFLDS'.
ls_subscriber-label = 'Descripton'.
ls_subscriber-position = 15.
ls_subscriber-height = 8.
APPEND ls_subscriber TO re_subscribers.
endmethod.
method IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS.
field-symbols: <mapping> like line of ch_mapping.
loop at ch_mapping assigning <mapping>.
case <mapping>-fieldname.
when 'ZZUNSPSC'. <mapping>-metafield = '90000100'.
endcase.
endloop.
endmethod.
method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM.
data: ls_fieldselection like line of ch_fieldselection.
read table ch_fieldselection with key metafield = '90000100'
into ls_fieldselection.
if sy-subrc = 0.
ls_fieldselection-fieldstatus = '*'.
modify ch_fieldselection from ls_fieldselection index sy-tabix.
endif.
endmethod.
Thanks,
Nagaraju.
01-17-2008 7:43 AM
Hi,
You should use two BAdi's:
ME_GUI_PO_CUST
ME_PROCESS_PO_CUST
For sample implementation look at transaction SE18,
menu Jump to->Sample code->Display.
For ME_GUI_PO_CUST you should at least implement methods:
IF_EX_ME_GUI_PO_CUST~SUBSCRIBE,
IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS.
For ME_PROCESS_PO_CUST you should at least implement method:
IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM.
Example codes:
You must create your own function group with subscreen (see documentation)
in this example FM name is ZIT_MM_PO_ENH
ZIT_MM_PO_ENH_EXTRAFLDS name of the structure containg field ZZUNSPSC
method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE.
data: ls_subscriber LIKE LINE OF re_subscribers.
check im_application = 'PO'.
check im_element = 'ITEM'.
clear re_subscribers[].
ls_subscriber-name = subscreen1.
ls_subscriber-dynpro = '0100'.
ls_subscriber-program = 'SAPLZIT_MM_PO_ENH'.
ls_subscriber-struct_name = 'ZIT_MM_PO_ENH_EXTRAFLDS'.
ls_subscriber-label = 'Descripton'.
ls_subscriber-position = 15.
ls_subscriber-height = 8.
APPEND ls_subscriber TO re_subscribers.
endmethod.
method IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS.
field-symbols: <mapping> like line of ch_mapping.
loop at ch_mapping assigning <mapping>.
case <mapping>-fieldname.
when 'ZZUNSPSC'. <mapping>-metafield = '90000100'.
endcase.
endloop.
endmethod.
method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM.
data: ls_fieldselection like line of ch_fieldselection.
read table ch_fieldselection with key metafield = '90000100'
into ls_fieldselection.
if sy-subrc = 0.
ls_fieldselection-fieldstatus = '*'.
modify ch_fieldselection from ls_fieldselection index sy-tabix.
endif.
endmethod.
Thanks,
Nagaraju.
01-17-2008 7:47 AM
Hi,
Check if any screen exit is avialable for the transaction. If so you can do it with the screen exits.
Regards,
Renjith Michael.