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: 

How to validate data before sending to bapi_acc_document_post.........

Former Member
0 Kudos

Hi all,

Currently iam doing journal voucher upload using BAPI(bapi_acc_document_post). I want to know how we will validate the data before passing to BAPI. So that i can find the incorrect records and correct them and again call the BAPI.

Thanks in advance,

Regards,

Krishna.

3 REPLIES 3

alejandro_bindi
Active Contributor
0 Kudos

What is your source of data for sending to the BAPI?

Your question is too general, validations depend on what you need to do...

Regards

0 Kudos

Iam posting transactional data from flat file into an internal table. and i have to upload this data to FB01 transaction thru this BAPI.

0 Kudos

Ok, first thing you must know is the flat file structure, and the mapping of that file to the BAPI structures fields, including any conversions you may need (for example, converting date format).

Once you have that, you just call the BAPI with loaded structures.

In case it returns an error, you solve accordingly. Sometimes a required BAPI structure is not loaded so you must define a default. Sometimes there's a specific validation that is requested by the functional person. And sometimes, there's an error in the source data, that must be corrected in there (so the file is correct and the program is executed again).

To know which structures and fields must be loaded to succesfully execute the BAPI, check it's documentation.

Regards.

Please reward points if helpful.