‎2007 Jun 21 1:29 PM
Hi,
I have problem with update, why this simple part of program doesn't work?
UPDATE zvratka_prijemky
SET spz = 'test'
WHERE mblnr_101 = '5000084938'
AND zeile_101 = '0001'.
write SY-SUBRC.
sy-subrc returns 4.
thanks.
‎2007 Jun 21 1:54 PM
Hello,
Always use MODFY statement.
Do like this.
data: wa like zvratka_prijemky.
select single * from zvratka_prijemky into wa where mblnr_101 = '5000084938'
AND zeile_101 = '0001'.
if sy-subrc = 0.
wa-spz = 'test'.
modify zvratka_prijemky from wa.
endif.Hope this solve ur issue.
Vasanth
‎2007 Jun 21 1:38 PM
Hello,
Are u passing values to all the key feields of the Z table . Check this.
UPDATE zvratka_prijemky
SET spz = 'test'
WHERE mblnr_101 = '5000084938'
AND zeile_101 = '0001'.
commit work and wait. " Check here
Vasanth
‎2007 Jun 21 1:50 PM
Hi
sy-subrc returns 0 but the value still doesn't appear in table.
‎2007 Jun 21 1:54 PM
Hello,
Always use MODFY statement.
Do like this.
data: wa like zvratka_prijemky.
select single * from zvratka_prijemky into wa where mblnr_101 = '5000084938'
AND zeile_101 = '0001'.
if sy-subrc = 0.
wa-spz = 'test'.
modify zvratka_prijemky from wa.
endif.Hope this solve ur issue.
Vasanth
‎2007 Jun 21 2:08 PM