04-22-2008 11:54 AM
Hello,
I am trying to code a program using the the ABAP/4 Editor. I want a program that reads input from a user and updates a table in the database. Can you please assist me with the correct coding that I am suppose to use.
04-22-2008 12:05 PM
hi,
do this way ...
tables : mara.
parameters : p_matnr like mara-matnr,
start-of-selection.
select single * from mara into mara
where matnr = p_matnr.
if sy-subrc = 0.
wa_mara-lvorm = 'X'.
modify mara from wa_mara transporting lvorm.
endif.
Regards,
Santosh
04-22-2008 12:28 PM
Hello,
I am not sure, maybe my question wasnt clear enough, let me elaborate:-
Lets say I have a table called ZPMS_PARTNERS, the table doesn't contain any data and I want to have a program that allows the user to insert the partner's name, the partner's address and the partner's contact details. After the user has entered this data, I want the program to take the data entered by the user and then modify the table ZPMS_PARTNERS.
Please help.
04-22-2008 12:42 PM
Hi,
First your question is not in a transparanet way. As per my under stand that you can mention that Update statement in the user exit then that table can be updated when ever realted information will be change.
Regards,
Kumar..
04-23-2008 5:37 AM
Hi,
To insert the data into the table ZPMS_PARTNERS,
You need to create module pool program.
where you will have all the table fields has input fields.
think there are 3 fields .
field1 input filed(give the name gt_tab-field1)
field2 input field(give the name gt_tab-field2)
field3 input field(give the name gt_tab-field3)
save exit
make save and exit as pushbuttons .
after entering the data into the input fields ,press save button.
PAI
module after 100.
Process after input.
case sy-ucomm.
when 'SAVE'.
Insert ztable from table gt_tab
endcase.
04-22-2008 8:30 PM
Create a Function Module?Program with input parameters that you need and update the Ztable (sample coding as Santosh gave).