07-11-2006 7:09 PM
Hello I have an internal table which contains all the vbeln. I need to submit all these vbeln to the program RV50SBT1 and get the second screen as out put. My code is as follow:
loop at t_vbeln.
submit rv50sbt1 with VSTEL = P_SHIP
with s_vbeln = t_vbeln-vbeln
and return.
endloop.
But I get only one vbeln when I run this..I need to get the all the vbeln ..How do I gt this..Thanks
Vicky
07-11-2006 7:17 PM
Try it like this using a range.
<b>ranges: r_vbeln for vbak-vbeln.
clear r_vbeln. refresh r_vbeln.
r_vbeln-sign = 'I'.
r_vbeln-option = 'EQ'.
loop at t_vbeln.
r_vbeln-low = t_vbeln-vbeln.
append r_vbeln.
endloop.</b>
submit rv50sbt1
with vstel = p_ship
<b> with s_vbeln in r_vbeln</b>
and return.
Regards,
Rich Heilman
07-11-2006 7:13 PM
Vicky,
I think u have given P_SHIP as a parameter. change it to Select options and append all the data to an range and submit the program using that range.
Regards,
Prakash.
07-11-2006 7:14 PM
HI,
see this one
SUBMIT... [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
<b>[WITH <sel> <criterion>]</b>
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>].
WITH SELECTION-TABLE <rspar>, dynamic transfer of values
You need an internal table <rspar> with the Dictionary structure RSPARAMS. The table then consists of the following six fields:
SELNAME (type C, length 😎 for the name of the selection criterion or parameter
KIND (type C, length 1) for the selection type (S for selection criterion, P for parameter)
SIGN, OPTION, LOW, HIGH as in a normal selection table, except that LOW and HIGH both have type C and length 45.
This table can be filled dynamically in the calling program with all of the required values for the selection screen of the called program. If the name of a selection criterion appears more than once, the system creates a multiple-line selection table for that criterion in the called program. If the name of a parameter appears more than once, the system uses the last value. Note that LOW and HIGH have type C, so that the system executes type conversions to the criteria of the called program. This is important for date fields, for example. Before your program is used in a live context, you should check it using the VIA SELECTION-SCREEN addition.
Except for WITH SELECTION-TABLE, you can use any of the above options several times and in any combination within a SUBMIT statement. In particular, you can use the WITH <sel> option several times for one single criterion <sel>. In the called program, the system appends the corresponding lines to the selection tables used. For parameters, it uses the last value specified. The only combination possible for the WITH SELECTION-TABLE option is USING SELECTION-SET.
<b>Example Program</b>
REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
DATA: int TYPE i,
rspar TYPE TABLE OF rsparams,
wa_rspar LIKE LINE OF rspar.
RANGES seltab FOR int.
WRITE: 'Select a Selection!',
/ '--------------------'.
SKIP.
FORMAT HOTSPOT COLOR 5 INVERSE ON.
WRITE: 'Selection 1',
/ 'Selection 2'.
AT LINE-SELECTION.
CASE sy-lilli.
WHEN 4.
seltab-sign = 'I'. seltab-option = 'BT'.
seltab-low = 1. seltab-high = 5.
APPEND seltab.
<b> SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH paramet eq 'Selection 1'
WITH selecto IN seltab
WITH selecto ne 3
AND RETURN.</b>
Thanks
Sudheer
07-11-2006 7:15 PM
You need to use addition WITH SELECTION-TABLE seltab.
Fill seltab like this:
Loop at t_vbeln.
WA_SELTAB-SELNAME = 'S_VBELN'.
WA_SELTAB-KIND = 'S'.
WA_SELTAB-SIGN = 'I'.
WA_SELTAB-OPTION = 'EQ'.
WA_SELTAB-LOW = t_vbeln-vbeln.
APPEND WA_SELTAB TO LT_SELTAB.
endloop.
submit rv50sbt1 WITH SELECTION-TABLE seltab.
07-11-2006 7:16 PM
Hi vicky,
loop at t_vbeln.
submit rv50sbt1 with VSTEL = P_SHIP
with s_vbeln in t_vbeln-vbeln
and return.
endloop.
reawrd if helpful.
regards,
keerthi.
07-11-2006 7:17 PM
Try it like this using a range.
<b>ranges: r_vbeln for vbak-vbeln.
clear r_vbeln. refresh r_vbeln.
r_vbeln-sign = 'I'.
r_vbeln-option = 'EQ'.
loop at t_vbeln.
r_vbeln-low = t_vbeln-vbeln.
append r_vbeln.
endloop.</b>
submit rv50sbt1
with vstel = p_ship
<b> with s_vbeln in r_vbeln</b>
and return.
Regards,
Rich Heilman