‎2007 Sep 13 9:57 AM
hi friends,
i have 2 fields for editing in alv output.when user enter some value in fields
then i save that value in ztable.
my problem is same value get updated in both field what is the problem?
IF r_ucomm = '&DATA_SAVE'.
READ TABLE final INDEX rs_selfield-tabindex.
UPDATE zstatus SET cform = rs_selfield-value
WHERE vbeln = final-vbeln.
UPDATE zstatus SET remark = rs_selfield-value
WHERE vbeln = final-vbeln.
MESSAGE i000(su) WITH 'saved'.
clear rs_selfield-value.
thanks.
‎2007 Sep 13 10:21 AM
Hi Sonu,
It is very clear that your code will update the same value in both the field.
Before the two update statement you are reading the table with one specified index now in the rs_selfield-value you will get the value which corresponds to that index and you are updating the table with this value!!!!,hope you got the mistake.
reward if helpful.
shibu
‎2007 Sep 13 10:40 AM
tnx for reply .
can u correct my mistake .what i have correct .plz suggest me solution.
thanx
‎2007 Sep 13 10:27 AM
Hi,
Problem with this statement
UPDATE zstatus SET cform = rs_selfield-value
WHERE vbeln = final-vbeln.
UPDATE zstatus SET remark = rs_selfield-value
WHERE vbeln = final-vbeln.
Here rs_selfield-value has same value which is assigned to cform and remark.so u r getting same value...
Regards,
Nagaraj
‎2007 Sep 13 10:49 AM
Check the below methods this will be use full to you
IF grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = grid.
ENDIF.
*To get back the user entered data on the grid
IF NOT grid IS INITIAL.
CALL METHOD grid->check_changed_data.
ENDIF.
Check the method this will update the same data user entered on the grid in the same table
this will automatically get back the user enterd data to the table