Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

datatable inconsistency in Quality

Former Member
0 Likes
555

hi experts,

I am trying to update table crmd_orderadm_h using FM 'CRM_ORDERADM_H_UPDATE_DU' in dev(client 200) its successfully doing the changes,it uses the statement UPDATE crmd_orderadm_h FROM TABLE it_records_to_update.

But in Quality when we are trying to update the same it returns sy-subrc = 4.

I am not sure why is it failing to update,since there is no changes in table level.

I have also checked the documentation ,and it says that it will return 4 if a primary key value doesnt exists or if the change would lead to a double entry in a unique secondary key.But in my case the internal table is empty so it should return a sy-subrc =0.

please let me know how do i resolve this issue.

hi experts,

I am trying to update table crmd_orderadm_h using FM 'CRM_ORDERADM_H_UPDATE_DU' in dev(client 200) its successfully doing the changes,it uses the statement UPDATE crmd_orderadm_h FROM TABLE it_records_to_update.

But in Quality when we are trying to update the same it returns sy-subrc = 4.

I am not sure why is it failing to update,since there is no changes in table level.

I have also checked the documentation ,and it says that it will return 4 if a primary key value doesnt exists or if the change would lead to a double entry in a unique secondary key.But in my case the internal table is empty so it should return a sy-subrc =0.

please let me know how do i resolve this issue.

3 REPLIES 3
Read only

Former Member
0 Likes
509

Hey ,

I think it has nothing to do with your code , its a data error.

Please read the documentation for update and see are all the records that your are passing to update are all correct and should get updated by update.

Hope this is helpful.

Regards,

Uma Dave

Read only

ravi_lanjewar
Contributor
0 Likes
509

Hi,

1) Check wethere entry exit in table which is modifying or not, if not exit it will return sy-subrc eq 4

2) Check where condition value exactly match the database records

3) Write update with client specified


    update table_name client specified
       set fields1 = value1
       where mandt = sy-mandt
           and  fields = check_value.

Rgds

Ravi Lanjewar

Read only

Former Member
0 Likes
509

ok