Skip to Content
avatar image
Former Member

me22n/me21n replicate Header detail to the line item

Dear Experts,

While running the ME21N/ME22N, I want to replicate the following header data to the line items which are available on the the invoice tab ;

1. DP Category

2.Down Payment %

3. DP Date

when user updates the Header DP category,Down Payment %,DP Date or when click the check event

i have tried me_process_po_cust(BADI) &

1. EXIT_SAPMM06E_007 Export Data to Customer Subscreen for Purchasing Document Header (PAI)

but couldn't find solution yet

Please suggest.

123.png (89.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 24, 2018 at 01:10 PM




    " Get Line Data
    DATA: mepoitem TYPE mepoitem,
    mepoitem_ref TYPE mepoitem.
    mepoitem = im_item->get_data( ).

    " Get Header Data

    data : ls_hdr type ref to IF_PURCHASE_ORDER_MM.

    data : l_hdrdata type MEPOHEADER.

    ls_hdr = im_item->get_header( ).
    l_hdrdata = ls_hdr->get_data( ).

    IF l_hdrdata-DPTYP = 'M'.
    mepoitem-DPTYP = l_hdrdata-DPTYP.
    mepoitem-DPPCT = l_hdrdata-DPPCT.
    mepoitem-DPDAT = l_hdrdata-DPDAT.

    im_item->set_data( mepoitem ).


    Add comment
    10|10000 characters needed characters exceeded