Skip to Content
author's profile photo Former Member
Former Member

Error in updating custom database table using UPDATE SET Command

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Dec 08, 2011 at 07:47 AM

    Hi,

    the issue may be caused by calling the transaction by mode 'E' .

    Please check, if there is also an issue calling the transaction in mode 'N' .

    Some messages may be lost, if the transcaction enters the error mode in dialogue.

    What about the fields ZRUNTIME and ZRUNDATE ? Are they updated, or is update failing on these fields, too?

    Regards,

    Klaus

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 08, 2011 at 08:39 AM

    Hi,

    it's not possible that status isn't updated in zfiacsf28 while date and time are updated there, because it's hard coded.

    There must be other programs that also change your table zfiacsf28 and maybe clear those fields. Maybe the key fields zor and customer cannot provide duplicate access, what is the meaning of field zor ?

    Please check the where used list of table zfiacsf28 to find other update programs.

    Regards,

    Klaus

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2011 at 03:22 PM

    You may be getting deadlocks at the database level. If multiple users can concurrently update the table, you should be locking the table rows you will be updating.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.