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 / Function Module to Retrieve AR Customer Invoices like FB03

Former Member
0 Kudos

I’m writing some code to post and retrieve AR Customer Invoices. It looks like BAPI_ACC_DOCUMENT_POST is the way to create the invoice (any way to park it?) but I’ve only found BAPI_AR_ACC_GETOPENITEMS to retrieve invoice data which does not seem like what I really want. I do want line item details but only for the invoice I’m after and it may not be open any longer. T-code FB03 is the GUI way. How do I get the invoice data throug a remote enabled BAPI or FM?

Thanks for any help,

Karl

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this BAPI or FM.

BAPI_ACC_DOCUMENT_DISPLAY

FI_DOCUMENT_LIST_DISPLAY

Regards,

Ferry Lianto

7 REPLIES 7

Former Member
0 Kudos

BAPI_INCOMINGINVOICE_CREATE Invoice Verification: Post Invoice

After the CALL of BAPI_ACC_INVOICE_RECEIPT_POST is finsihed and there are no errors, you have to call 'BAPI_TRANSACTION_COMMIT' to commit the invoice.

Please give me reward points if it is useful...

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this BAPI or FM.

BAPI_ACC_DOCUMENT_DISPLAY

FI_DOCUMENT_LIST_DISPLAY

Regards,

Ferry Lianto

0 Kudos

Thanks for your reply Ferry! I looked at BAPI_ACC_DOCUMENT_DISPLAY and FI_DOCUMENT_LIST_DISPLAY but I want to retrieve the data programmatically so I can evaluate the information in code instead of displaying it. There may not be SAPGUI where the program is being run.

0 Kudos

Hi Karl

What you really need to do?

The BAPI BAPI_ACC_DOCUMENT_POST should return the number of the document is created, so u can do a select on BKPF and BSEG table in order to return the informations.

Max

0 Kudos

Ferry: Thanks again for the follow-up. BAPI_ACC_DOCUMENT_CHECK will verify data before a post is attempted but I do not think it will retrieve information on a document.

Max: I want to retrieve line item detail of a Customer Invoice so I can compare the data against a remittance for example. I believe RFC_READ_TABLE on BKPF and BSEG is the way to go. I was hoping that it was nicely wrapped up in a BAPI or FM but this will work. Thanks!

0 Kudos

Hi,

fm RFC_READ_TABLE have a limitation of length. The output length is restrictied to 512.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check this BAPI BAPI_ACC_DOCUMENT_CHECK.

Regards,

Ferry Lianto