‎2010 Dec 13 1:37 PM
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
‎2010 Dec 13 5:43 PM
Keshav,
Do the screen and called sub-screen belong to different main program?
‎2010 Dec 13 5:43 PM
Keshav,
Do the screen and called sub-screen belong to different main program?
‎2010 Dec 13 6:41 PM
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.
‎2010 Dec 13 7:09 PM
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
‎2010 Dec 16 1:20 PM
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
‎2010 Dec 16 2:07 PM
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 sub1in the PAI section.
‎2010 Dec 16 2:37 PM