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

Problem in using SUBMIT command

Former Member
0 Likes
940

Hi,

My requirement is that i am entering data on the selection screen of REPORT1 and all the selection screen values should be passed on to the selection screen of REPORT2 on execution of REPORT1.

Selection screen of REPORT1 is copy of REPORT2 with one parameter added on it.

I am using SUBMIT REPORT2 VIA SELECTION-SCREEN in REPORT1 but the selection screen values that i am entering on the REPORT1 is not getting passed to selection screen of REPORT2.

Can you please help in resolving the problem..

Mukesh

7 REPLIES 7
Read only

Former Member
0 Likes
901

Hi,

In the REPORT2 after the selection screen declaration,pass the values from selection screen of REPORT1 to selection screen fields of REPORT2.Or export the values from REPORT1 to memory Id and import them in REPORT2.

Read only

former_member195383
Active Contributor
0 Likes
901

HI...

In a similar requirement I have taken help of export import statements.....

all the values u require in report2 ...u can export the same to a memory id in report1 itself...and then in report2 u can import the same..

Hope this helps....

Regards

Rudra

Read only

Former Member
0 Likes
901

The best way is to export your report1 selectionscreen parameters to memory id and then import it to report1 .

You can also play with

initalsation of the report2

Hope it helps

Thanks

Read only

Former Member
0 Likes
901

Hey Mukesh,

The syntax goes like :

Submit via selection-screen with selection table.

Have you specified the with selection table part?

Regards,

Ravi

Read only

Former Member
0 Likes
901

Hi Mukesh

Greetings for the day.

try like folllowing. ...i have used this.. .its working very fine..

submit ZV039_STOCK_CONS

with s_spart in s_spart

with p_spmon eq p_spmon

and return.

here u can send the required parameters or select-options.

only u have to take care that if one field is delfined by parametere then it shoul b by parameter only in the called report......the same applies for select-options also.

cheers

reward points if found helpful.

Read only

Former Member
0 Likes
901

hi mukesh,

try this with submit using selection-screen

with selection-table.

REPORT report1.

DATA text TYPE c LENGTH 10.

SELECTION-SCREEN BEGIN OF SCREEN 1100.

SELECT-OPTIONS: selcrit1 FOR text,

selcrit2 FOR text.

SELECTION-SCREEN END OF SCREEN 1100.

REPORT report2.

DATA: text TYPE c LENGTH 10,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

...

rspar_line-selname = 'SELCRIT1'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

hope this will heplps you.

regards,

srilatha

Read only

Former Member
0 Likes
901

HI,

THIS IS MY FIRST PROGRAM AND I'M CALLING THE SAME PROGRAM.

SAMPLE CODE.

PARAMETERS: P_KUNNR LIKE KNA1-KUNNR OBLIGATORY,

MONYR LIKE MCS0-SPMON DEFAULT SY-DATUM OBLIGATORY.

SELECT-OPTIONS: S_WERKS FOR VBRP-WERKS,

S_MATNR FOR MARA-MATNR.

DATA: SELTAB TYPE TABLE OF RSPARAMS,

SELTAB_WA LIKE LINE OF SELTAB.

MOVE: 'P_KUNNR' TO SELTAB_WA-SELNAME,

'P' TO SELTAB_WA-KIND,

P_KUNNR TO SELTAB_WA-LOW.

APPEND SELTAB_WA TO SELTAB.

CLEAR SELTAB_WA.

MOVE: 'MONYR' TO SELTAB_WA-SELNAME,

'P' TO SELTAB_WA-KIND,

MONYR TO SELTAB_WA-LOW.

APPEND SELTAB_WA TO SELTAB.

CLEAR SELTAB_WA.

MOVE: 'S_WERKS' TO SELTAB_WA-SELNAME,

'S' TO SELTAB_WA-KIND,

'I' TO SELTAB_WA-SIGN,

'BT' TO SELTAB_WA-OPTION,

S_WERKS-LOW TO SELTAB_WA-LOW,

S_WERKS-HIGH TO SELTAB_WA-HIGH.

APPEND SELTAB_WA TO SELTAB.

CLEAR SELTAB_WA.

MOVE: 'S_MATNR' TO SELTAB_WA-SELNAME,

'S' TO SELTAB_WA-KIND,

'I' TO SELTAB_WA-SIGN,

'BT' TO SELTAB_WA-OPTION,

S_MATNR-LOW TO SELTAB_WA-LOW,

S_MATNR-HIGH TO SELTAB_WA-HIGH.

APPEND SELTAB_WA TO SELTAB.

CLEAR SELTAB_WA.

SUBMIT 'PROGRAM NAME' VIA SELECTION-SCREEN WITH SELECTION-TABLE SELTAB.

THANKS,

ARUNPRASAD.P

Edited by: arunprasad palaniswamy on Jun 18, 2008 7:30 AM