Skip to Content
0
Apr 02, 2007 at 07:46 AM

me_gui_po_cust for header fields

957 Views

HI ALL,

I have created a tab "CUSTTAB" in ME21n header with 2 additional fileds i.e: zzfields1 & zzfield2 i have also appended them in structure ci_ekkodb of table ekko. I have used BADI'S : ME_GUI_PO_CUST & ME_PROCESS_PO_CUST.

I can see the tab & both the additional fields but the data for these additional fields is not getting saved in ekko table.

When i implemented this badi for LINEITEM the data was getting saved in ekpo table:the method 'IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODE' of me_gui_po_cust incase of line item was:

method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL.

data: l_item type ref to if_purchase_order_item_mm,

ls_mepoitem type mepoitem,

ls_customer type zmepo_badi_examp.

----


  • system asks to transport data from the business logic into the view

----


case im_name.

when subscreen1.

  • is it an item? im_model can be header or item.

mmpur_dynamic_cast l_item im_model.

check not l_item is initial.

  • transport standard fields

ls_mepoitem = l_item->get_data( ).

  • transport customer fields

  • call function 'ZMEPOBADIEX_GET_DATA'

  • exporting

  • im_ebeln = ls_mepoitem-ebeln

  • im_ebelp = ls_mepoitem-ebelp

  • importing

  • ex_data = ls_customer.

  • store info for later use

move-corresponding ls_mepoitem to dynp_data_pbo.

  • move ls_mepoitem-ZFIELD1 to dynp_data_pbo-ZFIELD1.

*

  • move ls_mepoitem-ZFIELD2 to dynp_data_pbo-ZFIELD2.

*

  • move-CORRESPONDING ls_customer to dynp_data_pbo.

  • move ls_customer-badi_bsgru to dynp_data_pbo-badi_bsgru.

  • move ls_customer-badi_afnam to dynp_data_pbo-badi_afnam.

when others.

  • ...

endcase.

endmethod.

can ny1 tell wat changes shud i make in the above code so dat it works for header fields .

rgds

points 'll b rewarded