Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Submit with selection table seltab

Former Member
0 Likes
8,828

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

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,792

Yes, just get rid of the VIA SELECTION-SCREEN part of the SUBMIT statement. I assume that you are using this.

Regards,

Rich Heilman

Read only

0 Likes
1,792

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

Read only

0 Likes
1,792

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

Read only

0 Likes
1,792

can you post the code?

Regards,

Rich Heilman

Read only

0 Likes
1,792

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.

Read only

0 Likes
1,792

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

Read only

0 Likes
1,792

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

Read only

Former Member
0 Likes
1,792

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.