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 submit statement ?

Former Member
0 Likes
1,257

hi friends..

i have one report program (for eg zpgm1) from that i call another program (for eg zpgm2) by using submit statement.

in zpgm1 i have only one radio button

in zpgn2 i have one parameter with obligatory.

the issue is

while executing from zpgm1 it will call the zpgm2 but it show error message like "parameter is required field" because its an mandatory field.

i don't want that message while submit ..

can you plz..

thanx in advance

1 ACCEPTED SOLUTION
Read only

varma_narayana
Active Contributor
0 Likes
803

Hi..

This error is bcoz you are not displaying the Selection screen of Called Report.

You can use this statement if you want to Display the Selection screen while the Report is Called.

<b> SUBMIT ZREP2 VIA SELECTION-SCREEN.</b>

Otherwise you can Pass the Value to The Mandatory PARAMETER field while Calling the Report using:

<b> SUBMIT ZREP2 WITH P_FIELD = '<VALUE>'.</b>

<b>You can select one of These two based on ur Req</b>

<b>Reward if Helpful</b>

5 REPLIES 5
Read only

Former Member
0 Likes
803

submit statement moves the control directly to the start-of-selection in the called program..

how i overcome tis issue

Read only

varma_narayana
Active Contributor
0 Likes
804

Hi..

This error is bcoz you are not displaying the Selection screen of Called Report.

You can use this statement if you want to Display the Selection screen while the Report is Called.

<b> SUBMIT ZREP2 VIA SELECTION-SCREEN.</b>

Otherwise you can Pass the Value to The Mandatory PARAMETER field while Calling the Report using:

<b> SUBMIT ZREP2 WITH P_FIELD = '<VALUE>'.</b>

<b>You can select one of These two based on ur Req</b>

<b>Reward if Helpful</b>

Read only

0 Likes
803

HI naraya varma..

my issue is now solved...

thanks lot..

i will give 10 points

Read only

Former Member
0 Likes
803

try this if it works.

in the zpgm2 , instead of making the parameter as OBLIGATORY , do a validation on that field

eg

<b>instead of this</b>

parameters : p_matnr like mara-matnr <b>obligatory</b>.

<b>use this</b>

parameters : p_matnr like mara-matnr.

at selection-screen.

if p_matnr is initial.
  message e001(ZE) with 'Matnr is mandatory field'.
endif.

Read only

Former Member
0 Likes
803

WRITE THIS CODE IN ZPGM1. I think that you know what material no. to put in the selection screen of the ZPGM2... right? Substitute 's' in the code with that Material No.

submit ZPGM2 using selection-screen 1000

with p_matnr eq 's'

and return.

Award points if useful, get back in case of query...

Cheers!!!