‎2009 Feb 10 10:40 AM
hello!!!
i have created a screen with a lot of drop down list boxes and input-output fields...
this screen has details about projects which the user can create...
i want the user to be able to create a new project and insert all the info about that project(fields)
into the table through that screen...
all the values in the list box are fetched from transparant table...
i have been able to retrieve values from table to the screen fields but it is other way round,
i.e from screen to the table...
plz help me... how do i do this???
‎2009 Feb 10 11:05 AM
Hi
There is a one to one mapping between the screen fields and the fields in your program having same name.
for eg: if you have an i/o box TEXT on screen and in program you have: DATA TEXT(10), then both will contain same data.
Now to store the data the user enters on the screen into your ztable, you must declare fields with same name as your screen fields in your code.
Now in PAI write a module.
Process After Input.
module store_details.
DATA: itab type table of urztable with header line,
NAME(10),
TEXT(10). "Declare all your screen fields appropriately
MODULE STORE_DETAILS INPUT.
itab-field1 = NAME.
itab-field2 = TEXT.
.
.
INSERT URZTBLE FROM ITAB. "store in your ztable
ENDMODULE.
Hope this helps
Regards,
Jayanthi.K
‎2009 Feb 10 10:45 AM
Hi aarti,
In the PAI of screen.
module save_data.
LSitBO1-filename = 'XXX' .
update data to dtabase.
if you explain little bit more i can give u the correct solution
Thanks
‎2009 Feb 10 10:45 AM
HI,
check the screen fields whether they are initial or not and then insert them into database table.
check the code.
parameters:
p_name type char20.
if p_name is not initial.
insert into dbtab from p_name.
endif.This will definitely work.
thanks
sarvesh
‎2009 Feb 10 10:47 AM
hi
Are u unable to transport values from screen to table or table to screen ?
‎2009 Feb 10 10:52 AM
Hi,
In PBO of the screen just read all relevant data (table with projects) and in PAI in turn update it (db table with new entries) if such were created. In this case you will synchronize db changes with the screen (redisplaying all the table again in PBO after new were added in PAI).
Regards
Marcin
‎2009 Feb 10 10:56 AM
Hi,
Get the details from the screen fields, store it in a workarea and use
insert into table values wa. "wa is workareaYou can refer to this sample code.
wa_shop-zshop_id = return_no.
wa_shop-zuser_id = id.
wa_shop-zmat = zmat.
wa_shop-zorder = order_quan.
INSERT INTO zshop_info VALUES wa_shop.Here the values from the screen field are populated into the table.
Hope this helps.
Regards,
Deepthi.
Edited by: Deepthi S on Feb 10, 2009 4:28 PM
‎2009 Feb 10 11:05 AM
Hi
There is a one to one mapping between the screen fields and the fields in your program having same name.
for eg: if you have an i/o box TEXT on screen and in program you have: DATA TEXT(10), then both will contain same data.
Now to store the data the user enters on the screen into your ztable, you must declare fields with same name as your screen fields in your code.
Now in PAI write a module.
Process After Input.
module store_details.
DATA: itab type table of urztable with header line,
NAME(10),
TEXT(10). "Declare all your screen fields appropriately
MODULE STORE_DETAILS INPUT.
itab-field1 = NAME.
itab-field2 = TEXT.
.
.
INSERT URZTBLE FROM ITAB. "store in your ztable
ENDMODULE.
Hope this helps
Regards,
Jayanthi.K
‎2009 Feb 10 11:06 AM
hello,
look, i have 3 input output fields and 3 dropdown list boxes on a screen,
the first i/p o/p field is project_id, thats the primary key of table zproject_details(a transparant table)
when i enter the rest of the fields and even select values from list boxes, and then say
save(push button) i want all these records to insert into the table zproject_details...
my project is to store all info details of project in table and to display it.
have i made myself clear???
thx