2008 Dec 30 6:16 PM
Hi All,
I have couple of fields in my screen,based on the entries made on these two fields i will have have to
update my database table with the same entries.
Please help as how my PAI should be..
Thanks,
Rahul
2008 Dec 30 6:38 PM
declare the fields of the same type in your abap program that serves as the interface between screen and ABAP prog. In PAI module, move the data from screen fields to these fields defined in prog. then INSERT or UPDATE statement may be used to update the DB table.
Hi All,
I have couple of fields in my screen,based on the entries made on these two fields i will have have to
update my database table with the same entries.
Please help as how my PAI should be..
Thanks,
Rahul
2008 Dec 30 6:38 PM
declare the fields of the same type in your abap program that serves as the interface between screen and ABAP prog. In PAI module, move the data from screen fields to these fields defined in prog. then INSERT or UPDATE statement may be used to update the DB table.
2008 Dec 30 6:41 PM
Hi Abhilasha,
Thank you for your reply.
could u please help me with a sample code.
and is there any thing else to be done?
Thanks,
R
2008 Dec 30 7:04 PM
UPDATE zoutput_c FROM wa_zoutput_c.write update and insert in editor and hit F1 and you will get more data...
This is the first thing you need to do.. and if you have any issues then post a thread on it... Thanks.
2008 Dec 30 7:23 PM
if its standard SAP tbl, pls. try to use any FM or BAPI to update the DB table....try to avoide to use INSERT or UPDATE.
thanq
Edited by: SAP ABAPer on Dec 30, 2008 8:25 PM
2008 Dec 30 7:02 PM
Hi Rahul,
Pl see
Data: screen_input1, "these are the field names defined as well on screen
screen_input2, "screen field name where data would come after entering on to screen
input1,
input 2.
in PAI module
input1 = screen_input1. "trf the data to the field reqd by you.
input2 = screen_input2.
UPDATE <database table name>
SET field1 = input1
field2 = input2
WHERE condition to select the right record for updation.
2008 Dec 31 9:55 AM
Hi,
You can use MODIFY command also rather than insert or update.
Declare thye screen fields name same as table filed name.Use work area rather than internal tabel with heaer line .In PAI just write these two line
MOVE_CORRESPONDING wa to dbtable.
MODIFY dbtable. OR MODIFY dbtable FROM wa.
Pooja
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |