Skip to Content

ME22N BADI: ME_PROCESS_PO_CUST - not getting current data

Hi,

Im using the BADI ME_PROCESS_PO_CUST, in method post I'm using the following code.

CALL METHOD im_header->get_data

RECEIVING

re_data = ls_ekko.

In this ls_ekko str inco1 and inco2 is not getting the screen values.

For example. In ME21N, I've entered the value INCO1 = DDP and inco2 = test.

but while runtime(I've seen in debugging mode) it gets the value INCO1 = EXW and INCO2 = test1234.

How to correct it?

Thank in advance.

Vallamuthu M

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Sep 30, 2013 at 09:58 AM

    GET_DATA should give correct values (I just tested on one of my system) are you sure you don't use GET_PREVIOUS_DATA or GET_PERSISTENT_DATA or the work area of a previous call ?.

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 09:34 AM

    This badi has been implemented in our system and the first call in method POST is:

    DATA: lrec_ekko TYPE mepoheader.
    CLEAR: lrec_ekko.


    **** Getting the Header data ********************************

    CALL METHOD im_header->get_data
    RECEIVING
    re_data = lrec_ekko.

    And it works correct. Maybe you implicitly have to clear the structure like is done in this code.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2013 at 10:46 AM

    Hello Madheswaran,

    Try to use the below code before getting the header data.

    data:l_i_items TYPE purchase_order_items,

    im_header TYPE REF TO if_purchase_order_mm,

    l_struct_mepoheader TYPE mepoheader.

    * Getting the Header details.

    im_header = im_item->get_header( ).

    * Getting the Current Items from the Header.

    l_i_items = im_header->get_items( ).

    And then get the header data

    * Get the header data.

    CALL METHOD IM_HEADER->GET_DATA

    RECEIVING

    RE_DATA = l_struct_mepoheader.

    It is working for me in this way..

    Hope it helps for you as well.

    Regards,

    Prema

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 11:15 AM

    Hi,

    If I manually enter the data then it takes correctly.

    Regards,

    Vallamuthu M

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.