Skip to Content

Tip: Post Down Payment Request [F-47] via BAPI and BADI

Hi guys,

Just a tip about this posting where I was having some doubts why the post was not going through the BADI.

If the post is a Down payment request or a Noted item, you must complement the BAPI_ACC_DOCUMENT_POST using:

    WHEN ‘DP’.

      ls_bapiache09obj_type = ‘BKPFF’.

      ls_extension2structure = space.

      ls_extension2valuepart1 = ‘BUS_ACT’.

      ls_extension2valuepart2 = ‘RFST’.

Implement the BADI_ACC_DOCUMENT:

The BADI_ACC_DOCUMENT has to have the following filter:

And the Method CHANGE should be like:

METHOD if_ex_acc_document~change.

  FIELD-SYMBOLS <accit> TYPE accit.

  DATA ls_extension2    TYPE bapiparex.

  IF c_extension2 IS NOT INITIAL.

    READ TABLE c_extension2 INDEX 1 INTO ls_extension2.

    IF ls_extension2valuepart1 = ‘BUS_ACT’ AND ls_extension2valuepart2 = ‘RFST’.

      c_acchdglvor = ‘RFST’.

      LOOP AT c_accit ASSIGNING <accit>.

        <accit>bstat = ‘S’.

      ENDLOOP.

    ENDIF.

  ENDIF.

ENDMETHOD.

3 Comments
You must be Logged on to comment or reply to a post.
  • Could you possibly add some more “story” to this blog? I’m sure others are also curious where did this requirement come from, what is the business setting, how did you arrive at this solution, etc. As helpful as they might be, plain code samples usually don’t qualify as blogs…

     

    Thank you.

  • Let me try simulating the scenario, actually when we need to post the accounting document i.e. vendor down payment (advance payment), and that too through BAPI_ACC_DOCUMENT_POST, it does not allow us to post it, as it always has only a vendor line item which is credit. I am also having the same requirement but this is also not working…

    This vendor payment document is related to Purchase Order and is posted through TCode ME2DP.

    Please some one update if solution for this is available.

     

    Thanks,

    Rahul Magdum