Question:
Dear Friends
I am using a function module to create a purchase order in my program.I have the condition to test any error record before updating in to database.If the error record is available(vendor or material error),function modules throws the error.Which i will get in the return parameter.
But for the correct records,I have not commited to the database,still i correct other records.After correcting all records,I commit all the records to the database at a time.But the number generation for the po is different.
If any error is present previously,po is not created for the error records,but po created for the correct records but not committed to the database.After correcting all the records,I am commiting to the database,but the number generated is entirely different.Some field in this bapi,keeping track of this number,eventhough the number generated before not committed.
Can anybody give me idea how to reset this number?Is there any transaction available?
with thanks and regards
R.Annamalai
Answer:
"Correct error records"...by user interaction from screen, do you mean? Are the uncommitted BAPI call still available to be commited after displaying screen? (I doubt)
How are the P/O numbers if all the entry data correct?
It might be better to rollback all the BAPI calls when displaying error-correction, then call them again, check all are successful, then commit all.
T.Yamagiwa