‎2007 Sep 13 10:48 AM
hi,
i have a requirement where in i need to pass values which is declared under selectoption in calling program screen to called program screen which is of type parameter in called program.
It has to accept range of values from calling program and populate one by one to called program .As in called program that particular variable is of type parameter
can u please help me in this..surely points will be rewarded
‎2007 Sep 13 10:52 AM
Hi!
In you caller program write this coding:
SUBMIT z_called_program
WITH s_called IN s_caller
p_called = p_caller
AND RETURN.
Regards
Tamá
‎2007 Sep 13 11:06 AM
hi,
i tried this code..
it is not populating s_matnr-low the value to the standard screen which contains p_matnr of type parameter.
whenever i give range as 10 to 17.
it should give screen variant as 10 for matnr in called program.
‎2007 Sep 13 11:36 AM
Hi!
Try like this:
SUBMIT z_called
WITH p_matnr = s_matnr-low
AND RETURN.
It has to work.
Regards
Tamá
‎2007 Sep 13 10:55 AM
Hi Vinutha..
Here Calling program has a Select-option For Eg S_MATNR.
Called program has a PARAMETER For Eg P_MATNR.
To Call the Report with Selection criteria.
In the Calling program....
Loop at S_MATNR.
SUBMIT <REPORT>
WITH P_MATNR = S_MATNR-LOW.
ENDLOOP.
Reward if Helpful.
‎2007 Sep 13 10:57 AM
There are a number of ways to do this - do a F1 on Submit - but here is one approach.
Firstly build your parameters/select-options:
wa_params-selname = P_PARAM.
wa_params-kind = P_KIND.
wa_params-sign = P_SIGN.
wa_params-option = P_OPTION.
wa_params-low = P_LOW.
wa_params-high = P_HIGH.
APPEND wa_params TO itab_params.Then call you program passing in your selection table:
SUBMIT [program name] AND RETURN
WITH SELECTION-TABLE itab_params
VIA SELECTION-SCREEN.
‎2007 Sep 15 1:11 PM
hi vinutha,
after the select-options in this calling program.
You have to create a variant first for the calling program.
use the SUBMIT statement linking the called program and the variant used in this program.
then validate the selection screen with the IF condition and a message class.
OR
there is a FUNCTION module, where we can give only multiple single value instead of ranges in the select-options.
I will give you the exact code by monday, since I am not in the desk now.
be in touch