Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in screen painter

Former Member
0 Likes
1,440

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???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,158

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

7 REPLIES 7
Read only

tarangini_katta
Active Contributor
0 Likes
1,158

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

Read only

Former Member
0 Likes
1,158

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

Read only

rejish_balakrishnan
Contributor
0 Likes
1,158

hi

Are u unable to transport values from screen to table or table to screen ?

Read only

MarcinPciak
Active Contributor
0 Likes
1,158

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

Read only

Former Member
0 Likes
1,158

Hi,

Get the details from the screen fields, store it in a workarea and use

insert into table values wa. "wa is workarea

You 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

Read only

Former Member
0 Likes
1,159

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

Read only

Former Member
0 Likes
1,158

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