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: 

Implement BADI MRM_MRKO_HDAT_MODIFY

Former Member
0 Kudos

Hi,

While trying to make a consignment settlement (Transaction MRKO) I get the message "For document type RE, an entry is required in field Reference".

Based on my analysis I would have to implement the BADI MRM_MRKO_HDAT_MODIFY to solve this problem.

Could you please guide me through how could the badi be implemented and what code I must put in this implementation? I must not make any changes to the customization.

Regards,

K

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi keethu,

Documentation is provided for the BADI, check it. As it is having single method, you can just place ur code as per the requirement.

--> put a condition before ur code, so that it will work only for Trasaction MRKO.

--

Reddy

Edited by: V.V.Reddy on May 11, 2010 9:32 AM

4 REPLIES 4

uwe_schieferstein
Active Contributor
0 Kudos

Hello Keethu

Within report RMVKON00 (tcode MRKO) the routine BADI_HEADERDATA_MODIFY triggers the BAdI:


*&---------------------------------------------------------------------*
*&      Form  BADI_HEADERDATA_MODIFY
*&---------------------------------------------------------------------*
*  in this BAdI the vendor and the invoice type can be changed
*----------------------------------------------------------------------*
FORM badi_headerdata_modify TABLES   it_rkwa  TYPE typ_tab_rkwa
                            USING    i_bukrs  LIKE bkpf-bukrs
                            CHANGING x_blart  LIKE t169f-blart
                                     x_lifnr  LIKE rkwa-lifnr
                                     x_fehler TYPE c
                                     s_msg    TYPE typ_msg.

  CALL FUNCTION 'MRMBADI_MRKO_HDAT_MODIFY'
    EXPORTING
      i_bukrs    = i_bukrs
      i_lifnr    = x_lifnr
      i_blart    = x_blart
      ti_rkwa    = it_rkwa[]
    IMPORTING
      e_lifnr    = x_lifnr
      e_blart    = x_blart
    EXCEPTIONS
      badi_error = 01.
...

The signature of this function module (which call an active BAdI implementation) you can see already how the single method of this BAdI works:

- based on your input (company code, vendor, document type and Consignment Withdrawals) you may change either the vendor, the document type or both.

Based on the functional requirements you can easily implement the logic for the BAdI method.

Regards

Uwe

Former Member
0 Kudos

Hi keethu,

Documentation is provided for the BADI, check it. As it is having single method, you can just place ur code as per the requirement.

--> put a condition before ur code, so that it will work only for Trasaction MRKO.

--

Reddy

Edited by: V.V.Reddy on May 11, 2010 9:32 AM

Former Member
0 Kudos

Thanks Uwe and VV Reddy for your inputs.

But my requirement is to force populate the reference field in invoice during consignment settlement. I do not want to change the vendor or the document type. I guess I am looking at the wrong BADI. Could you please guide which BADI would serve my purpose?

Thanks,

K

Former Member
0 Kudos

I have used the user exit RMVKON00 and it serves my purpose. Thanks again for your help.