‎2006 Jul 14 9:19 PM
Hi,
data :SELTAB TYPE TABLE OF RSPARAMS.
Im using
submit zprog using selection-table seltab.
But My selection screen of zprog is still visible and
im able to change the values of the 'zprog'.
Is it possible to skip the entire selection screen and just pass value from the program where i use submit zprog.
My requirement is i should be able to edit values of the calling program 'zprog'. How we do i do this?
The above submit statement doesnt work.
Thanks,
Anita
‎2006 Jul 14 9:21 PM
‎2006 Jul 14 9:23 PM
Im not using VIA SELECTION-SCREEN part of the SUBMIT statement. But still my selection screen is called and im able to edit the calling program's selection screen values.
Regards,
Anita
‎2006 Jul 14 9:26 PM
See this sample program. Notice the commented out VIA SELECTION-SCREEN. If you run this, it will go directly to the list output.
report zrich_0002 .
data: iSEL TYPE TABLE OF RSPARAMS.
data: xsel type rsparams.
xsel-SELNAME = 'MATNR'.
xsel-KIND = 'S'.
xsel-SIGN = 'I'.
xsel-OPTION = 'EQ'.
xsel-LOW = '000000000040000692'.
append xsel to isel.
xsel-SELNAME = 'MATNR'.
xsel-KIND = 'S'.
xsel-SIGN = 'I'.
xsel-OPTION = 'EQ'.
xsel-LOW = '000000000040000693'.
append xsel to isel.
xsel-SELNAME = 'WERKS'.
xsel-KIND = 'S'.
xsel-SIGN = 'I'.
xsel-OPTION = 'EQ'.
xsel-LOW = '0008'.
append xsel to isel.
xsel-SELNAME = 'BUDAT'.
xsel-KIND = 'S'.
xsel-SIGN = 'I'.
xsel-OPTION = 'EQ'.
xsel-LOW = sy-datum.
append xsel to isel.
submit RM07DOCS
* via selection-screen
with selection-table isel
and return.
Regards,
Rich Heilman
‎2006 Jul 14 9:27 PM
‎2006 Jul 14 11:05 PM
DATA: SELTAB TYPE TABLE OF RSPARAMS,
SELTAB_WA LIKE LINE OF SELTAB.
MOVE: 'RLDNR' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
'Y8' TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'RRCTY' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_RRCTY TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'RVERS' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
'002' TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'RCOMP' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_RCOMP TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'LOGSYS' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_LOGSYS TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'RYEAR' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_RYEAR TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'POPER' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_POPER TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'RACCT' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_RACCT TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'TT' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_TT TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'SI' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_SI TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'PSI' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_PSI TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'TEST' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_TEST TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'LISTE' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_LISTE TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
SUBMIT RGUDEL00 WITH SELECTION-TABLE SELTAB and
return.
IF SY-SUBRC EQ 0.
Message S047 - PROGRAM EXECUTED SUCCESSFULLY!!
MESSAGE S047(ZMSG).
Regards,
Anita
ENDIF.
‎2006 Jul 15 2:07 AM
I have tested your program. I'm assuming that its not executing because its waiting for values. In my system(46c) the parameters are not named as you have here. For example, notice the values in BOLD. These are the parameter names is the SUBMITed program. You must specify the correct names of the fields in order for them to be passed correctly.
MOVE: <b>'P_RLDNR'</b> TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
'Y8' TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
MOVE: <b>'P_RRCTY'</b> TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'EQ' TO SELTAB_WA-OPTION,
P_RRCTY TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.Also, in my system it is stopping at a warning message on the selection screen. You may not be able to get around this.
Regards,
Rich Heilman
‎2006 Jul 17 3:33 PM
Hi Rich,
Thank you. I just have to make sure i pass the correct names and the usage of No-Extensions and No-intervals for the same parameter were confusing me a bit, as to how to pass values to the calling progam. Im with 4.6C only and now it works for me.
My Learning goes below:-
Values are seen only after INITIALIZATION and if there are any default values in the submitted program , those are over written with values from the program where we use submit program.
Thanks,
Anita
‎2014 Nov 03 11:18 AM
Hi Anitha Babu,
Please try the code below:
wa_rsparams-selname = 'S_ZDAT'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'BT'.
wa_rsparams-low = s_zdat-low.
wa_rsparams-high = s_zdat-high.
APPEND wa_rsparams TO gt_rsparams.
CLEAR wa_rsparams.
SUBMIT <Report_Name> WITH s_entcod = s_entcod
WITH s_relate = s_relate
WITH r_entity = 'X'
WITH SELECTION-TABLE gt_rsparams
AND RETURN.