08-21-2007 5:02 AM
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.
08-21-2007 5:14 AM
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
08-21-2007 5:25 AM
Iam posting transactional data from flat file into an internal table. and i have to upload this data to FB01 transaction thru this BAPI.
08-21-2007 5:39 AM
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.