‎2006 Oct 03 1:59 PM
I have created to text box ie empno & empname and also i have created a table zemp.
so when i click the save button it has to go & update in the zemp table .
on the click of save what is the code i have to write.
thanks
regards
Alfred
‎2006 Oct 03 2:01 PM
Just Assign the values to the Z Table field as ZTEMP-EMPNO = emp no from the screen
EMPNAME = from screen at the FORM INPUT UNDER THE OK_CODE for SAVE
MODIFY ZTEMP.
Message was edited by: Vara Prasad Kunathi
‎2006 Oct 03 2:01 PM
Just Assign the values to the Z Table field as ZTEMP-EMPNO = emp no from the screen
EMPNAME = from screen at the FORM INPUT UNDER THE OK_CODE for SAVE
MODIFY ZTEMP.
Message was edited by: Vara Prasad Kunathi
‎2006 Oct 03 2:03 PM
Hi on click on save button write the following code
When'SAVE'.
insert values of <itab> into zemp. "for insertingrecords
update zemp from itab "for update.
see the proper syntax and what fileds u want to update.
Regards
Manas Ranjan panda
‎2006 Oct 03 2:03 PM
I really depends on how your program is written and what the fields are that you are updating. Assuming that there is no relationship between your screen fields and the fields of your db, then I would suggest something like this.
data: wa_zemp type zemp.
wa_zemp-empno = empno.
wa_zemp-empname = empname.
insert zemp from wa_zemp.Regards,
Rich Heilman
‎2006 Oct 03 2:05 PM
Hi Alfred,
Instead of text box, you can have normal input fields on your screens.
in your pai section.
module user_command.
case sy-ucomm.
zemp-empno = v_empno.
zemp-empname = V_emp_name.
modify zemp.
endcase.
endmodule.
‎2006 Oct 03 2:15 PM
Fill the data to <workarea> from the screen fields.
and then use the INSERT command to update the database table from the workarea.
Thanks
eswar
‎2006 Oct 03 2:27 PM
iit gives the error message as Field "V_EMPNO" is unknown. It is neither in one of the specified
tables nor defined by a "DATA" statement. "DATA" statement.
in the text box i have given the name as v_empno only
but still then it gives the error message , where would i have gone wrong.
thanks
alfred
‎2006 Oct 03 2:32 PM
hi
Along with the text field on the screen, you also need to declare a variable in module pool program like
data : v_empno type zemp-empno.
Regards,
Richa