‎2011 Sep 15 12:34 PM
Hi Experts,
I have two reports.
First report has Select options as well as Parameters.
From Second Report i 'm passing set of values for select option and need to get back the results in the second Report.
But i'm getting only one value(which is the first value in the select option) in the second report.
Find the below code which i have used.
loop at s_matnr1.
seltab_wa-low = s_matnr1-low.
append seltab_wa to seltab.
endloop.
seltab_wa-selname = 'S_WERKS'.
seltab_wa-sign = 'I'.
seltab_wa-option = 'EQ'.
seltab_wa-low = wa_plant-werks.
append seltab_wa to seltab.
SUBMIT sdrqcr21 "VIA JOB jobname number jobcount AND RETURN
WITH SELECTION-TABLE seltab via selection-screen " IN s_matnr1
with P_INSERT EQ 'X'
WITH p_compar EQ ''
WITH p_lock EQ 'X'
WITH p_posins EQ 'X'
user sy-uname
via job jobname
number jobcount
and return.
i need all the values in the seltab should be executed rather than first value.
<removed by moderator>
Thanks in advance dudes
Regards,
Annamalai
Edited by: Thomas Zloch on Sep 15, 2011 1:48 PM
‎2011 Sep 15 12:57 PM
Hello,
You're missing the KIND definition while populating the SELECION-TABLE
Read the F1 documentation you should be able to figure out the cause of your error.
BR,
Suhas
‎2011 Sep 15 1:11 PM
Suhas,
yes i will try with KIND = 'S'.
let you know for sure.
Regards,
Annamalai
‎2011 Sep 15 1:15 PM
Suhas,
i tried with KIND definition also..
still it returns first Material only.
Regards,
Annamalai.
‎2011 Sep 15 1:01 PM
add all the selection screen fields to SELTAB, that way you added to S_WERKS as below.
seltab_wa-selname = 'S_WERKS'.
seltab_wa-sign = 'I'.
seltab_wa-option = 'EQ'.
seltab_wa-low = wa_plant-werks.
append seltab_wa to seltab.
‎2011 Sep 15 1:40 PM
Poorna,
I have added all the selection screen fields in the seltab.
but it didnt help.
Regards,
Annamalai.
‎2011 Sep 15 1:03 PM
Hi ,
Verify your code with the below code if there are any thing missing please add that or chnage .
*Code used to populate 'select-options' & execute report
DATA: seltab type table of rsparams,
seltab_wa like line of seltab.
seltab_wa-selname = 'PNPPERNR'.
seltab_wa-sign = 'I'.
seltab_wa-option = 'EQ'.
* load each personnel number accessed from the structure into
* parameters to be used in the report
loop at pnppernr.
seltab_wa-low = pnppernr-low.
append seltab_wa to seltab.
endloop.
SUBMIT z_report_sample with selection-table seltab
via selection-screen.
‎2011 Sep 15 1:47 PM
‎2011 Sep 15 1:48 PM
hi,
Are you able to see all the plants?
Also I think you can solve very easily by debugging .
Just icheck f you have all the materials in the seltab at SUBMIT if not then definitely your code is incorrect in populating selection values.
Rhea.
‎2011 Sep 15 3:31 PM
Rhea,
In debugging i can see all the plants as well as range of materials,
once it reaches selection screen of another report ,values are sitting in correct place.
for example
s_matnr has 7 material , plant has 1 plant
if i execute that report
1 plant 1 material is showing as result.
but i want 1 plant 7 materials as the output.
Regards,
Annamalai.
‎2011 Sep 15 3:40 PM
Hello,
loop at s_matnr1.
seltab_wa-low = s_matnr1-low.
append seltab_wa to seltab.
endloop.As already pointed out by Doug you're missing the SELNAME!
BR,
Suhas
‎2011 Sep 15 3:49 PM
Suhas,
I have added selname before that...
sorry i missed that part of code since my main problem is with
submit and return statement.
Regards,
annamalai
‎2011 Sep 15 4:04 PM
hi,
Did you run the report directly to see that there nothing wrong with the report ? I mean are you getting all the materials in o/p?
Rhea.
‎2011 Sep 15 5:09 PM
Rhea,
My Requirement was like that..
i will schedule job based on the output...
If i get solution for the above mentioned code,
i can solve rest of the problem.
Regards,
Annamalai.
‎2011 Sep 21 8:32 AM
Hi buddies,
At last my problem got resolved.
I have used Conversion exit for the Material number (S_MATNR) before submit and return statement.
it works fine.
Thank you so much for your reply
Regards,
Annamalai.