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: 

ABAP-FI(reg. BAPI_ACC_DOCUMENT_POST )

former_member187570
Participant
0 Kudos

Hi,

When we post through normal F-02 with 50 posting key to GL account, tax is calculated with negative amount and is shown in BSET. But when we do this through BAPI_ACC_DOCUMENT_POST, the negative amount is not posted to BSET.

Thanks,

Sourya.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

While populating the structure "currencyamount" you have to pass negative amount for the records related to posting key '50'.

Regards

Vinod

5 REPLIES 5

Former Member
0 Kudos

In BAPI_ACC_DOCUMENT_POST you cannot populate reversal Code in the BAPI header.

You can either use BDC or RFBIBL00

0 Kudos

Hi,

But how to use BDC for this requirement.

Thanks,

Sourya Prakash.

0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

While populating the structure "currencyamount" you have to pass negative amount for the records related to posting key '50'.

Regards

Vinod

0 Kudos

I think here is meant: structure BBTAX

e.g.:


  IF   GSTEUER-BSCHL = '40'.
    GSTEUER-BSCHL = '50'.
  ELSE.
    GSTEUER-BSCHL = '40'.
  ENDIF.
  GSTEUER-WRBTR = GSTEUER-WRBTR * -1.
  COLLECT GSTEUER.

  LOOP AT GSTEUER.

    ZBTAX = BBTAX.                     "Initialization
    MOVE: GSTEUER-MWSKZ TO ZBTAX-MWSKZ.
    IF GSTEUER-WRBTR < 0.
      MOVE '50' TO ZBTAX-BSCHL.
    ELSE.
      MOVE '40' TO ZBTAX-BSCHL.
    ENDIF.
    WRITE  GSTEUER-WRBTR TO  ZBTAX-FWSTE NO-SIGN CURRENCY XBKPF-WAERS.
    TRANSFER ZBTAX TO OUT.

-> please read program docu to rfbibl00

A.