Application Development and Automation 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: 
Read only

BAPI_ACC_DOCUMENT_POST posted documents not found

Former Member
0 Likes
5,869

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,915

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.

20 REPLIES 20
Read only

sergey_korolev
Active Contributor
0 Likes
3,915

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).

Read only

0 Likes
3,915

Hi Sergey.

No, I didnt receive any termination messages. And yes I'm using obj_key(10) as the document number.

Thx.

Regards.

Read only

0 Likes
3,915

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.

Read only

0 Likes
3,915

No, any dumps or incomplete updates.

And yes I did try those options.

Regards.

Read only

Former Member
0 Likes
3,916

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.

Read only

0 Likes
3,915

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

Read only

0 Likes
3,915

Try passing WAIT = 'X' while calling BAPI_TRANSACTION_COMMIT FM.

Regards,

Ganga

Read only

0 Likes
3,915

I already did this, Ganga. Thx

Regards.

Gregory

Read only

0 Likes
3,915

Hi,

did u checked in BSEG table

cheers

s.janagar

Read only

0 Likes
3,915

HI,

Yes I've checked BKPF and BSEG tables and didnt find entries.

Regards.

Gregory.

Read only

0 Likes
3,915

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.

Read only

0 Likes
3,915

Hi,

No, theres no test parameter in the BAPI interface. And theres no entries into the table VBKPF.

Regards.

Gregory.

Read only

0 Likes
3,915

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.

Read only

0 Likes
3,915

hi

check oss#884246 note

regards,darek

Read only

0 Likes
3,915

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.

Read only

0 Likes
3,915

Gregory, let us know if the problem is resolved.

Salai.

Read only

0 Likes
3,915

Yes Salai, problem solved. Thx.

Regards.

Gregory.

Read only

0 Likes
3,915

Hi Gregory,

I've the same problem of Salai.

Could you tell me hoe to solve this gap?

Thanks.

Regards

Roberto

Read only

0 Likes
3,915

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.

Read only

0 Likes
3,915

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.