f-28 batch input - very strange behavior

Question: Hi,

I created batch input program for F-28 transaction. It is run to post payment without matching payment amount to documents (just double click on Difference postings field). When I call transaction from the program it sometimes stops and displays screen for changing item, with info that field BSEG-XREF2 doesn't exist on screen. This is because the field is set in configuration not to be displayed for certain posting codes. In this case code 14. But code in F-28 is 15 not 14 and with 15 items are posted. I thought there is some reason in input data that sometimes it takes wrong posting code, but then I ran program several times for THE SAME input data and sometimes it ran successfuly and sometimes not ! I have no idea at all why it happens so. In my bdc I only fill in fields on first screen and second (processing open items) screen and then save. I recorded this batch in shdb. Please help!

Piter

Answer:
It looks like batch input would mark some items on the second screen regardless of the options settings. Then the amount to be posted was not equal to payment amount and system tried to create additional item on new doc to balance it to zero. And in such case error with hidden field on screen occured.

To prevent this, I added to batch action to deactivate all selected items when starting second screen. It works.

Piotr
Copyright ?2007 - 2008 www.jt77.com