‎2010 Mar 01 4:22 PM
Hi all.
I'm using the FM: BAPI_ACC_DOCUMENT_POST to post documents simulating TCODE F-05. Is that possible?
To execute the BAPI I'm populating data into structure DOCUMENTHEADER(BAPIACHE09) and tables ACCOUNTGL(BAPIACGL09), CURRENCYAMOUNT(BAPIACCR09), and after the execution I call the BAPI_TRANSACTION_COMMIT. The BAPI returns the message: "S RW 605 Document posted successfully: BKPFF 0100082524TOGV2010 R3TVDCL010" but when i try to see the document posted through FB03 or table BKPF (using obj_key+10 as Doc. No.) I cant see it.
Does anyone know whats happening? Please i need help.
Regards.
Gregory.
‎2010 Mar 01 7:59 PM
Hi firend,
It must be any missed parameter in the import or tables...
Did you fill the DOCUMENTHEADER correctly?
And the tables ACCOUNTRECEIVABLE (Debit) and ACCOUNTPAYABLE (Credit)?
The number that you saw may be a pre-edited document, without its lines...
Regards.
‎2010 Mar 01 4:31 PM
Did you receive any "Update terminated" messages? It is recommended to analyse ST22 and SM13. In your particular message Doc No is OBJKEY(10), Company Code - OBJKEY10(4), and Fiscal year OBJKEY14(4).
‎2010 Mar 01 4:44 PM
Hi Sergey.
No, I didnt receive any termination messages. And yes I'm using obj_key(10) as the document number.
Thx.
Regards.
‎2010 Mar 01 5:07 PM
Any dumps in ST22 or not completed updates in SM13?
Also, do you try to display the document programmatically or in user dialog transaction? - I am asking this because of possible lag between return from BAPI call and actual update of the database tables.
‎2010 Mar 01 5:51 PM
No, any dumps or incomplete updates.
And yes I did try those options.
Regards.
‎2010 Mar 01 7:59 PM
Hi firend,
It must be any missed parameter in the import or tables...
Did you fill the DOCUMENTHEADER correctly?
And the tables ACCOUNTRECEIVABLE (Debit) and ACCOUNTPAYABLE (Credit)?
The number that you saw may be a pre-edited document, without its lines...
Regards.
‎2010 Mar 01 8:29 PM
Hi.
I dont fill those tables. I expected that with ACCOUNTGL and CURRENCYAMOUNT was necessarily.
If this is not a fact how must I fill the tables ACCOUNTRECEIVABLE (Debit) and ACCOUNTPAYABLE (Credit)?
Regards
‎2010 Mar 02 10:17 AM
Try passing WAIT = 'X' while calling BAPI_TRANSACTION_COMMIT FM.
Regards,
Ganga
‎2010 Mar 02 12:05 PM
‎2010 Mar 02 12:32 PM
‎2010 Mar 02 12:52 PM
HI,
Yes I've checked BKPF and BSEG tables and didnt find entries.
Regards.
Gregory.
‎2010 Mar 02 1:26 PM
Hi,
Is there any parameter called test mode in the BAPI interface? If yes, pass space to this. Check if the document is parked.(Table VBKPF)
Ideally the message is some thing like Document xxxx is posted in company code yyyy.
Read FM documentation on how to use the parameters.
Thanks,
Vinod.
‎2010 Mar 02 1:58 PM
Hi,
No, theres no test parameter in the BAPI interface. And theres no entries into the table VBKPF.
Regards.
Gregory.
‎2010 Mar 02 2:31 PM
Gregory,
BAPI_ACC_DOCUMENT_POST is equivalent to FB01. You can post the same document that you post using F-05 via FB01 also.
Are you calling this BAPI via SE37? If yes, then your data will not commit. You need to write a program to call this BAPI and then call the commit BAPI.
Another option is, in the SE37 screen, use menu option Function Module -> Test -> Test Sequences. Then enter both the bapi and the commit functions in the list and then test.
Regards,
Salai.
‎2010 Mar 02 10:48 PM
‎2010 Mar 03 3:23 PM
Hi guys, thx for ur answers.
Salai, I was trying it by using a test case, and it didnt work, but in a program it works fine.
I provided you with the corresponding points.
Regards.
Gregory.
‎2010 Mar 03 4:14 PM
‎2010 Mar 03 4:17 PM
‎2010 Apr 29 10:52 AM
Hi Gregory,
I've the same problem of Salai.
Could you tell me hoe to solve this gap?
Thanks.
Regards
Roberto
‎2010 Apr 29 2:10 PM
HI Roberto.
My problem was that I was executing the BAPI by SE37 transaction and by this via was impossible to me to call the BAPI_TRANSACTION_COMMIT after.
Doing it into a program it works fine. I mean call the BAPI and if the return table has no error messages, call the BAPI_TRANSACTION_COMMIT, and the document is populated.
Regards.
Gregory.
‎2021 May 06 7:51 AM
Hi,
It is possible to call BAPI_TRANSACTION_COMMIT in SE37 immediately after executing your required BAPI.
You just need to run these to FMs in sequence. Follow below steps:
SE37 > In Menu bar click Function Module > Execute > Test sequences > Enter the FMs/BAPIs in sequence and hit Enter.
You will be directed to first BAPI, enter the data or select from Test data directory. Once the execution is completed go to back and you will be directed to second BAPI which is BAPI_TRANSACTION_COMMIT. just execute this BAPI and you are done.