I have to test some programs and want to clear values in tables to check the behavior of a program when dealing with initial values.
I using this code:
parameters: p_pernr type pa0105-pernr,
p_val type pa0105-usrid.
data: ls_pa0105 type pa0105.
select single * from pa0105 into ls_pa0105
where subty = '0001'
and pernr = p_pernr.
if sy-subrc = 0.
if p_val is initial.
ls_pa0105-usrid = p_val.
modify pa0105 from ls_pa0105.
This works if I put a value in p_val but it does nothing if I leave p_val initial.
Even if I clear the field, when I execute the modify, nothing has change in the table.
Thanks for any help.