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: 

BAPI_ACC_DOCUMENT_POST

Former Member
0 Kudos

Hi,

Even am using BAPI BAPI_ACC_DOCUMENT_POST to post my FI doc and its working fine except some 3 problem in that

1. for some document type for eg AB it calculate some tax in BAPI the description of field is (Amount eligible for cash discount in document currency) and field name is DISC_BASE and when we c the field while posting it through fb01 or through bdc it name is bseg-skfbt , please let me some thing about it if some one can.

2. Field rstgr in bseg table am not able to field this field in BAPI so couldnt enter this field so what can be doen about this.

3. For document type zd the BAPI return error give error like document type ZD can be posted only through batch please suggest me some thing is this.

Thanks in advance.

Regards.

7 REPLIES 7

andreas_mann3
Active Contributor
0 Kudos

Hi Pawan,

1) SKFBT: Part of the invoiced amount for which cash discount is granted.

E.g. Amount net : 1000 EUR

DISC_BASE (SKFBT) = 900 EUR

Terms of payment : 14 days, 2 %

Bline date = 2005/02/18

-> so Cash discount amount net = 2 % * 900 EUR = 18 EUR

When amount is paid until 2005/03/04

3) see TA OBA7 and double click to document type , which you'll change

here's a check box "btch input only", which you can modify to test posting manual.

Hope that will help you

Andreas

Former Member
0 Kudos

Hi Andreas,

Thanks for the help for OBA7 tc yaa i have check it and make the necessary changes .

But for skfbt what my concern is while manually posting document the system automatically calculate the amount

DISC_BASE(SKFBT)( and populate it when we c the document from FB03 TC ) i want to know that what is the logic of this is there any FM to get this because in my BAPI program am not passing any value in it that means it should calculate automatically that value as it does in batch input .

If you can help me in this please send your suggestion fast

thanks in advance.

luca_catti
Explorer
0 Kudos

Hi,

did you find an answer about your problem?

I have the same problem with BAPI_ACC_DOCUMENT_POST, could you help me please?

Thank in advance,

Fabio.

Former Member
0 Kudos

"2. Field rstgr in bseg table am not able to field this field in BAPI so couldnt enter this field so what can be doen about this."

I now have this isue. Anyone know how to solve it ?

Tnks

0 Kudos

Check the user exit for this BAPI. In there you can change internal table it_accit (structure ACCIT), which contains the line items. Here the field RSTGR is available, so if you change it here it will get posted.

Reward points if helpfull.

Regards,

Bart

marcelsommer
Explorer
0 Kudos

Hi all,

did anyone find out the answer to Fabio's question? --> Why is BSEG-SKFBT not populated.

- Using transaction FB01 then BSEG-SKFBT is populated.
- Using BAPI_ACC_DOCUMENT_POST with the same data then BSEG-SKFBT is not populated.

I left the input field BAPIACCR09-DISC_BASE blank since you cannot populate a DEC field with '*'. I was assuming SAP to calculate automatically the "Amount eligible for cash discount in document currency" - but BAPI_ACC_DOCUMENT_POST does not.

0 Kudos

PS I just found the answer myself in SAPNOTE 2083799 - but it doesn't make me happy:

"In some cases, the BAPI can also automatically determine the cash discount base (if the posting is tax-relevant) and the tax (only for 0 % tax rate). Note, however, that the amounts cannot always be determined reliably. We therefore generally recommend that you transfer both the cash discount base and the tax information for the 0 % tax rate to the BAPI. This is the only way to ensure that the cash discount information and tax information are posted correctly."