Hi,
I developed an automated collection system program in one of our clients simulating FBE1 (Payment Advice Creation) and F-28 (Posting of Incoming Payments) transaction codes. Upon posting, we encountered an error in PRD server wherein, for some of the posted items, the STATUS field in our custom table was not successfully updated. We tried to reverse the clearing document and debug the program. Upon posting, we were able to successfully update the status. We could not simulate the error in QAS since all the postings in QAS were successful and all status' relating to these postings were updated as well. We tried posting multiple times and the program seems to be working fine. In PRD, this behavior is just random and there is no specific pattern as to how the error occured. Provided below is the code I used for updating custom table ZFIACSF28. The STATUS field should be equal to '4' once the posting is successful. We are not sure if this is a database related issue. 7 users are authorized to do the postings in PRD and they are using the same user account.
CODE:
CALL TRANSACTION 'F-28' USING gt_bdcdata
MODE 'E'
UPDATE 'S'
MESSAGES INTO gt_messtab.
READ TABLE gt_messtab INTO wa_messtab WITH KEY msgtyp = 'S'
msgnr = '312'.
IF sy-subrc EQ 0.
update status for items cleared bearing the same OR Number*
UPDATE zfiacsf28 SET status = '4'
zsapdocument = wa_messtab-msgv1(10)
zruntime = sy-uzeit
zrundate = sy-datum
WHERE zor = gv_zor
AND customer = gv_customer.
COMMIT WORK.
ENDIF.