05-12-2015 4:49 AM
Hi Experts,
I have created a custom tab in PO header by using ME_GUI_PO_CUST.I can see my fields on the PO header.But data entered in this screen is not getting saved.I am getting message like 'NO data changed'.
I have implemented the following methods of ME_GUI_PO_CUST.
SUBSCRIBE
MAP_DYNPRO_FIELDS
TRANSPORT_FROM_MODEL
TRANSPORT_TO_DYNP
TRANSPORT_FROM_DYNP
TRANSPORT_TO_MODEL
Still I am not able to save the data to ekko table.
Kindly anyone advise how to save the data to ekko table.
Do I need to implement any method of ME_PROCESS_PO_CUST?
Thanks & Regards,
Anusha
05-12-2015 5:56 AM
Hi,
Check this class CL_EXM_IM_ME_GUI_PO_CUST which has sample Implementation for the said BADI.
Also check if the implemented methods are being called in the debugger and the BADI implementation is Active.
Hope this helps.
05-12-2015 6:32 AM
05-12-2015 6:56 AM
How did you code your call of get/set_data method in the TRANSPORT_TO_MODEL method of the BAdI, it is the point where data changed in your screen is sent back to purchase order?
Regards,
Raymond
05-12-2015 7:05 AM
Hi Everyone,
Thank you for your replies.
DATA: l_header TYPE REF TO if_purchase_order_mm,
ls_mepoheader TYPE mepoheader,
ls_customer TYPE CI_EKKODB,
l_po_header_handle TYPE REF TO cl_po_header_handle_mm.
*--------------------------------------------------------------------*
* data have to be transported to business logic
*--------------------------------------------------------------------*
CASE im_name.
WHEN subscreen1.
* is it an item? im_model can be header or item.
mmpur_dynamic_cast l_header im_model.
CHECK NOT l_header IS INITIAL.
ls_mepoheader = l_header->get_data( ).
* standard fields changed?
IF dynp_data_pbo-zauto_send NE dynp_data_pai-zauto_send .
* update standard fields
ls_mepoheader-zauto_send = dynp_data_pai-zauto_send.
CALL METHOD l_header->set_data
EXPORTING
im_data = ls_mepoheader.
CALL METHOD l_header->set_changed( ).
ENDIF.
WHEN OTHERS.
ENDCASE.
05-12-2015 7:52 AM
In the SUBSCRIBE method did you actually associate subscreen1 (constants defined in sample implementation class?) with im_element HEADER?
Also, why do you compare dynp_data_pai-zauto_send with dynp_data_pbo-zauto_send and not directly with ls_mepoheader-zauto_send ?
Regards,
Raymond
05-12-2015 8:34 AM
I have associated the subscreen1 in subscribe method.I have checked the data is clearing before coming to transport_to_model method.
Thanks,
Anusha.B
05-12-2015 8:37 AM
So where, during PAI of screen, did you save/store dynp_data_pai, in a function group in an attibute of implementing class ?
Regards,
Raymond
05-12-2015 8:42 AM
I clicked on save in me22n but it is not saved.dynp_data_pai is the attribute of implemented class.
Regards,
Anusha
05-12-2015 8:55 AM
05-12-2015 8:57 AM
05-12-2015 9:02 AM
I have created the 2 FM's in the function grp.I have called these FM'S inside the BADI. Do I need to call these function modules in screen flow logic?
Regards,
Anusha.B
05-12-2015 9:20 AM
In a "classic" solution (be it exit or BAPI) you have two FM in the FG of the dynpro, one called before PBO and one after PAI, that exchange data beween implementing class and function group. In the PAI of the screen you store the data in the global data of function, group (TOP include) where the post-PAI FM will get acces to it.
-> So in debug, insure the screen data is saved, that the FM are called in correct sequence and data correctly exchanged between implementing class and container program of the dynpro.
Regards,
Raymond
05-13-2015 4:19 AM
Hi ,
Along with the FM's one for PAI and PBI.DO i need to create any other function module to stop clearing of the data.
Thanks,
Anusha
09-10-2015 8:02 AM
09-10-2015 7:48 AM