Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Data is not getting saved from the custom tab in PO header

former_member569532
Participant
0 Kudos
673


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

15 REPLIES 15

Former Member
0 Kudos
158

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.

Former Member
0 Kudos
158

Hi Anu..

Plz check..

thanks,

P.Ravi

raymond_giuseppi
Active Contributor
0 Kudos
158

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

0 Kudos
158

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.

0 Kudos
158

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

0 Kudos
158

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

0 Kudos
158

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

0 Kudos
158

I clicked on save in me22n but it is not saved.dynp_data_pai is the attribute of implemented class.

Regards,

Anusha

0 Kudos
158

So in the PAI of the subscreen you have updated this attribute ?

0 Kudos
158

Yes

0 Kudos
158

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

0 Kudos
158

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

0 Kudos
158

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

0 Kudos
158

Hi Anu,

What code you are writing in the FM?

Regards,

KS

former_member198834
Participant
0 Kudos
158

This message was moderated.