2010 Jun 14 7:22 AM
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.
2010 Jun 14 11:48 AM
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
2010 Jun 14 2:01 PM
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
2010 Jul 16 5:27 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |