2006 Jul 11 6:42 AM
This is regarding screen painter area..
I have created a Z-table.
Also created a screen where i am having input box.
After entering text in the input box, i will click "SAVE" push button.
When i click "SAVE" push button, the Text entered in the screen input box should be saved in that z-table.
How to do it...??
Can anybody explain me with ABAP code...???
Thanks
Pavan
2006 Jul 11 6:45 AM
TABLES: ztable.
DATA: ok_code like sy-ucomm.
DATA: screen_field(50).
CASE ok_code.
WHEN 'SAVE'.
ztable-text = screen_field.
INSERT ztable.
ENDCASE.
Regards,
Wasim Ahmed
This is regarding screen painter area..
I have created a Z-table.
Also created a screen where i am having input box.
After entering text in the input box, i will click "SAVE" push button.
When i click "SAVE" push button, the Text entered in the screen input box should be saved in that z-table.
How to do it...??
Can anybody explain me with ABAP code...???
Thanks
Pavan
2006 Jul 11 6:45 AM
u have to use INSERT / MODIFY / UPDATE Commmands.
Regards
Prabhu
2006 Jul 11 6:45 AM
TABLES: ztable.
DATA: ok_code like sy-ucomm.
DATA: screen_field(50).
CASE ok_code.
WHEN 'SAVE'.
ztable-text = screen_field.
INSERT ztable.
ENDCASE.
Regards,
Wasim Ahmed
2006 Jul 11 6:47 AM
I have used the same in my Program.its working fine.I can able tio save
When cicking the save Button,
Give code as "Insert table "
2006 Jul 11 6:47 AM
Hai,
You can use Insert dbtab fro work area, or modify.
It will insert a new record in the database table.
Regards,
Umasankar
2006 Jul 11 6:48 AM
Hi,
You can try follwong logic.
tables : ztable.
data wa_ztable like line of ztable.
Case sy-ucomm.
when 'SAVE'.
clear wa_ztable.
wa_ztable-field1 = screenfield1.
wa_ztable-field2 = screenfield2.
wa_ztable-field3 = screenfield3.
modify ztable from wa_ztable.
endcase.
If it is simple database insertion,
you can always use Table Maintainance provided by SAP.
So that the code will be automatically generated and you dont have to worry.
Regards,
Shashank
2006 Jul 11 6:52 AM
Hi,
you should use modify statement for your requirement. If you want to insert records to a data dictionary table, just use insert command. To know more about these 2 commands, press F1 while it is highlighted.
Regards!
P.S. Please award points for useful answers.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |