Problem solve Get help with specific problems with your technologies, process and projects.

Warning: UPDATE open SQL statement in 4.7

Migrating ABAP programs from previous versions such as 4.6c to 4.7? Then read this!

Migrating ABAP programs from previous versions such as 4.6c to 4.7? Then you need to be aware of the difference...

of UPDATE open SQL statement in 4.7 with regards to commas (",") in the SET parameters. I found out that there is a big difference between 4.6c and 4.7 in terms of UPDATE open SQL statement. For example, the code below will run in 4.6c by updating only the record which matched the WHERE condition:

  UPDATE zzt_intf_cntl SET: zlast_in_seq = w_header+13(6),
                            usnam        = sy-uname,
                            upddt        = sy-datum
                      WHERE zsrc_sys     = w_intf_cntl_rec-zsrc_sys
                        AND zint_func    = w_intf_cntl_rec-zint_func.


However, this same statement when run in 4.7 will update ALL records in the table regardless of what is in the WHERE clause, i.e., it is ignoring the WHERE clause. In order to solve this problem, the "commas" should be removed. For example:

  UPDATE zzt_intf_cntl SET: zlast_in_seq = w_header+13(6)
                            usnam        = sy-uname
                            upddt        = sy-datum
                      WHERE zsrc_sys     = w_intf_cntl_rec-zsrc_sys
                        AND zint_func    = w_intf_cntl_rec-zint_func.


This was last published in February 2003

Dig Deeper on SAP ABAP

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close