02-13-2007 8:02 AM
Hi,
I want the field value to be edited on the list once the report is generated and Once it is Edited it has to be update into the Database table.
Can anybody tell me how can i code for this.
Regards,
Sri.
02-13-2007 8:05 AM
HI Sridhar,
You have set some of the fields in the list as ediatble using the statement
write var input on.
Then when the user enters the data in the input enabled field, then you can use the statement READ LINE <line number> FIELD VALUE var.
then you can update the z table using the update/modify or insert commands.
Regards,
Ravi
02-13-2007 8:05 AM
HI Sridhar,
You have set some of the fields in the list as ediatble using the statement
write var input on.
Then when the user enters the data in the input enabled field, then you can use the statement READ LINE <line number> FIELD VALUE var.
then you can update the z table using the update/modify or insert commands.
Regards,
Ravi
02-13-2007 8:23 AM
Hi Ravi,
If you dont mind can you please send any sample code for this?
Regards,
Sri.
02-13-2007 8:08 AM
02-13-2007 8:09 AM
Hi
U have to use the events and own stauts to do that:
START-OF-SELECTION.
SET PF-STATUS 'MY_GUI'.
WRITE <VAR> INPUT ON.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SAVE'.
READ LINE <N> FIELD VALUE <VAR> INTO <VAR1>.
IF SY-SUBRC = 0.
Z<TABLE>-<FIELD> = 'VAR1'.
MODIFY Z<TABLE>.
ENDIF.
WHEN OTHERS.
ENDCASE.
<N> is number of the line of the page where the variable <VAR> was written.
Max