Skip to Content
author's profile photo Former Member
Former Member

BAPI for Vendor Out Going Payment Tcode(F-53)

Dear Friends,

could any one please let me know is there any BAPI for Vendor Out Going Payment Tcode(F-53)



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 10:49 AM

    Hello Vijaya,

    There are two options:-

    1) You can use bapi-BAPI_ACC_DOCUMENT_POST to post a vendor document posting, and enter the amount and transaction keys. but this will not clear the Vendor invoice items,

    You can do clearing by a seperate program

    2) You can write a BDC program for F-53 to perform the clearing of the items during the posting. There is not specific BAPI which can perform this function.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 03:45 PM

    Hi Vijaya,

    Alternatively, you could use FM POSTING_INTERFACE_CLEARING to post the payment document and clear the vendor. Before you should call to FM POSTING_INTERFACE_START.

    Note that in POSTING_INTERFACE_CLEARING you must set the parameter i_auglv to 'AUSGZAHL', which means outgoing payment (Check table T041A).

    Sample Code:

    SELECT * FROM bseg INTO TABLE xbseg

    WHERE bukrs = i_bukrs

    AND belnr = i_belnr

    AND gjahr = i_gjahr.

    CHECK sy-subrc EQ 0.

    LOOP AT t_bseg.

    CHECK NOT t_bseg-rfzei IS INITIAL.

    READ TABLE xbseg WITH KEY bukrs = t_bseg-bukrs

    belnr = t_bseg-belnr

    gjahr = t_bseg-gjahr

    buzei = t_bseg-buzei.

    CHECK sy-subrc IS INITIAL.

    xbseg-rfzei = t_bseg-rfzei.

    MODIFY xbseg INDEX sy-tabix.


    SELECT SINGLE * FROM bkpf WHERE bukrs = i_bukrs

    AND belnr = i_belnr

    AND gjahr = i_gjahr.

    CHECK sy-subrc EQ 0.

    * ------ Posting interface start ---------------------------------------


    EXPORTING i_function = fipi-function

    i_group = fipi-group

    i_holddate = fipi-holddate

    i_keep = space

    i_mode = fipi-mode

    i_update = fipi-update

    i_user = fipi-user.

    CLEAR ftclear.

    ftclear-agkoa = 'D'.

    * Lesen der abgerechneten Kreditkartenforderungsposition

    LOOP AT xbseg WHERE koart EQ 'S'


    AND rfzei = i_rfzei.

    * Posten ist eine Rechnung

    IF xbseg-shkzg = 'S'.

    lc_shkzg = 'H'.

    lc_bschl = t041a-bssha.

    * Posten ist eine Gutschrift


    lc_shkzg = 'S'.

    lc_bschl = t041a-bssso.




    CHECK sy-subrc EQ 0.

    LOOP AT xbseg WHERE rfzei = i_rfzei

    AND koart = 'D'

    AND shkzg = lc_shkzg.

    ftclear-agkon = xbseg-kunnr.

    ftclear-agbuk = xbseg-bukrs.

    ftclear-xnops = 'X'.

    ftclear-agums = ' '.

    ftclear-selfd = 'BELNR'.

    ftclear-selvon = xbseg-belnr.

    ftclear-selvon+10 = xbseg-gjahr.

    ftclear-selvon+14 = xbseg-buzei. "BELNR/GJAHR/BUZEI

    CONDENSE ftclear-selvon NO-GAPS.

    APPEND ftclear.

    fb05-wrbtr = xbseg-wrbtr.


    ftpost-stype = 'K'.

    ftpost-count = '1'.

    WRITE i_bldat TO fvalue DD/MM/YYYY.

    PERFORM ftpost_field USING: 'BKPF-BLDAT' fvalue,

    'BKPF-BLART' i_blart,

    'BKPF-BUKRS' i_bukrs.

    WRITE i_budat TO fvalue DD/MM/YYYY.

    IF bkpf-bktxt IS INITIAL.

    bkpf-bktxt(10) = text-001.

    bkpf-bktxt+15(10) = i_ccbtc.


    PERFORM ftpost_field USING: 'BKPF-BUDAT' fvalue,

    'BKPF-WAERS' bkpf-waers,

    'BKPF-XBLNR' bkpf-xblnr,

    'BKPF-BKTXT' bkpf-bktxt.

    ftpost-count = 0.

    * ------ Sachkontenzeile lesen -----------------------------------------

    LOOP AT xbseg WHERE koart = 'S'

    AND rfzei = i_rfzei.



    CHECK sy-subrc eq 0.

    ftpost-stype = 'P'.

    ftpost-count = '1'.


    EXPORTING i_bukrs = i_bukrs

    IMPORTING e_t001 = t001.

    SELECT SINGLE * FROM tccaa WHERE ktopl = t001-ktopl

    AND hkont_v = xbseg-hkont.

    IF sy-subrc NE 0 or

    tccaa-hkont_n IS INITIAL.

    MESSAGE e032 WITH t001-ktopl xbseg-hkont.


    * ------ Habenbuchung auf Verrechnungskonto ----------------------------

    WRITE fb05-wrbtr TO fvalue CURRENCY bkpf-waers.

    CONDENSE fvalue NO-GAPS.

    PERFORM ftpost_field USING: 'BSEG-HKONT' tccaa-hkont_n,

    'BSEG-SGTXT' xbseg-sgtxt,

    'BSEG-ZUONR' xbseg-zuonr,




    'BSEG-BSCHL' lc_bschl,

    'BSEG-WRBTR' fvalue.

    * ------ CALL FB05 -----------------------------------------------------


    EXPORTING i_auglv = fipi-auglv

    i_tcode = fipi-tcode

    IMPORTING e_subrc = subrc

    e_msgid = msgid

    e_msgty = msgty

    e_msgno = msgno

    e_msgv1 = msgv1

    e_msgv2 = msgv2

    e_msgv3 = msgv3

    e_msgv4 = msgv4

    TABLES t_ftpost = ftpost

    t_ftclear = ftclear

    t_fttax = fttax

    t_blntab = xblntab.

    * ------ Meldung und Ende ----------------------------------------------

    fb05-subrc = subrc.

    MESSAGE ID msgid TYPE msgty NUMBER msgno

    WITH msgv1 msgv2 msgv3 msgv4.

    PERFORM msgtab_append.


    REFRESH: ftpost, ftclear.

    CLEAR: ftpost, ftclear.

    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.