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 scubscreen inputs not accessible.

kesavadas_thekkillath
Active Contributor
0 Likes
735

Hi All,

I am developing a module pool program in which i have created a screen and called as subscreen,

The screen is displaying correctly.

Now in PAI i am selecting the data this way once the execute button is clicked:


v_obj->get_data( importing pt_data = i_tbcl[] ).

But when the control enters the method the select options are getting cleared.To say exactly when it enters PAI the select options gets cleared.

I have tried all ways to analyze the problem but i am not able to solve it.

Anybody knows what is the reason ?

Keshav

1 ACCEPTED SOLUTION
Read only

tushar_shukla
Active Participant
0 Likes
698

Keshav,

Do the screen and called sub-screen belong to different main program?

6 REPLIES 6
Read only

tushar_shukla
Active Participant
0 Likes
699

Keshav,

Do the screen and called sub-screen belong to different main program?

Read only

0 Likes
698

Hi,

It belongs to the same program . I checked with some local object examples. select-option is not holding the data when it comes to PAI.

May be I am missing some thing. Later i choosed some other way and did it.

Read only

0 Likes
698

Hi Keshav,

without knowing your situation fully: Select-Options must be declared globally in the program processing the screen. If screen and sub screen belong to the same program, it is fine. The first thing in PAI will be to use a SET method to transport the select-options internal table to the class instance.

Looking at your statement

v_obj->get_data( importing pt_data = i_tbcl[] ).

I can not see where the select-options internal table is transferred to the object v_obj. If v_obj is a local class of your screens program, it should be declared as SELECT-OPTIONS only once globally in the program. Though not the best way, it should be available in all methods.

If you are in debugger in the method, then step up the call hierarchy to the calling program: If select-options is filled there, then you have probably declared it more than once.

Why don't you post the code for select-options declaration and use?

Regards,

Clemens

Read only

0 Likes
698

Hi Clemens,

Lets forget about the syntax i had written. I wrote a sample program in a procedural way like below


data:v_ebeln type ekko-ebeln.
data:i_ekko type table of ekko.

selection-screen begin of screen 300 as subscreen.
parameters : p_bukrs type ekko-bukrs.
select-options : s_ebeln for v_ebeln .
selection-screen end of screen 300 .

start-of-selection.
  call screen 100.

module user_command_0100 input.

  select * from ekko into table i_ekko
  where bukrs = p_bukrs
    and ebeln in s_ebeln.

endmodule.                 " USER_COMMAND_0100  INPUT

Flow logic


process before output.
  call subscreen sub1 including sy-repid '0300'.

process after input.
  module user_command_0100.

Here the subscreen is displayed fine. when i enter values to it and when the control reaches the select statement then s_ebeln and p_bukrs are blank.

Keshav

Read only

0 Likes
698
process before output.
  call subscreen sub1 including sy-repid '0300'.
 
process after input.
   call subscreen sub1.  " <<<<<<<<<< add this
  module user_command_0100.

You forgot the second

call subscreen sub1

in the PAI section.

Read only

0 Likes
698

Maen,

Thanks . I am forgetting everything nowadays