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

module pool

Former Member
0 Likes
629

Hi everybody,

I have created two screens.In first screen i am accepting a customer number.

Now I have to retrive details of the customer in second screen.I have desined the fields what i want in the second screen.

Now how two link up these two screens and retrive the data

With Regards,

Srikanth.M

5 REPLIES 5
Read only

Former Member
0 Likes
602

Hi,

declare a structure tkna1 like KNA1, which hold s asingle record of Customer

In the first screen attributes give the next screen number.

Hope you kept a button on the first screen like 'NEXT'.

In the PAI of the 1st scrren write the code such that

if sy-ucomm = 'NEXT'.

select single * from kna1 into tkna1 where kunnr = kna1-kunnr.(screen field on 1st screen).

endif.

in the PBO of 2nd screen move these structrue tkna1 records to the screen fields on 2nd screen.

reward points

regards,

Anji

Read only

former_member196299
Active Contributor
0 Likes
602

hi,

Try doing like this :

Write a select querry and select the values you want to display .Do it in the

PAI of the 1st screen .

Catch the ok_code value for goin to the next screen .

in the case you go to the next screen ,

in PBO of the 2nd screen fill the screen field values wht you have got from the select querry ...

here is a sample logic .

1st screen

PBO 1

PAI 1

module at-user command

case sy-ucomm.

when " Next_page "

write the select querry and get the values into an itab whr condn .

endcase.

2nd screen

PBO 2

simply move the values to the screen fields ...

like ...

scr-field1 = itab-fielld1.

scr-field2 = itab-field2.

PAI2

Thats it ...and ur problem is solved ..

Reward if helpful !

Thanks

Ranjita

Read only

Former Member
0 Likes
602

Hi

In first screen PBO when u click on 2nd screen write code like this:

Case sy-ucomm.

when 'Second'.

select kunnr name1 land1 from kna1 into table it_kna1

where kunnr = kna1-kunnr(This is the first screen field name).

if sy-subrc = 0.

set screen 200.

endif.

In the 2nd screen PBO write the code like this.

loop at it_kna1.

kna1-kunnr = it_kna1-kunnr.

kna1-land1 = it_kna1-land1.

kna1-name1 = it_kna1-name1.

endloop.

Regards

Haritha.

Read only

Former Member
0 Likes
602

hi,

in the first screen u have selected some fields n s,c n activated also then go back n in the flow logic write the code.

as.

case sy-ucomm.

select field name from table name where condition.

end select.

when 'enter'. enter is the push button u have taken ...

dynn = 0300;

tb-activetab = 'input'.

endcase.

then again go to thirs subscreen n select some more fields n write the code in flow logic as

case sy-ucomm.

when ' back'.

dynnr = '0200'.

tb-activetab = 'input'.

endcase.

then s,c,actiavte...n u should save chaeck n activate all the screen s u have created too.first the normal screen then the subscreen u have taken.......other wise u wont get the output......

if u feel this has helped u then dont forget to reward with points.

with regards,

madhuri.

Read only

Former Member
0 Likes
602

Hi Srikanth,

In the main program of the module pool screens, declare the customer number and the relavent fields for the data to be displayed. Now use these fields to design the module pool screens. The fields defined in the main program acts as global variables and can be used in all the screens. Please let me know if I have answered ur query or not.