‎2008 Mar 14 6:58 AM
Hi,
I am trying to update a DB table for a single column with the below stmt:
PERFORM enqueue_table USING l_subrc
'PA9100'.
UPDATE pa9100 SET z_nca_required = c_yes
WHERE pernr EQ wa_emp_tab-pernr AND
endda EQ c_date.
IF SY-SUBRC EQ 0.
PERFORM dequeue_table USING 'PA9100'.
COMMIT WORK.
ELSE.
PERFORM dequeue_table USING 'PA9100'.
MESSAGE i016 WITH text-010.
ENDIF.
But its showing sy-subrc = 4.
Please reply.
Regards,
Binay.
‎2008 Mar 14 7:16 AM
Hi Shankar,
Sy-subrc is coming 4 because no line was updated.
Check with the where condition wheter any entry exsist or not.
‎2008 Mar 14 7:06 AM
Hi,
Check the reason for sy-subrc = 4.
No line was updated because either no line could be selected or the change would have generated lines with primary keys that already existed.
May be no data exist satisfying the condition.
‎2008 Mar 14 7:16 AM
Hi Shankar,
Sy-subrc is coming 4 because no line was updated.
Check with the where condition wheter any entry exsist or not.
‎2008 Mar 14 7:36 AM
‎2008 Mar 14 7:38 AM
Check if the table was enqueued first ...
check l_subrc ...
Also it's not recommended to update Infotypes directly ..
Instead use FM's ..
use : HR_INFOTYPE_OPERATION.