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

Issue with SUBMIT statement

Former Member
0 Likes
312

Hi All,

I have a issue with SUBMIT satement.

I have a program with one selection screen element as below: <b>Program1</b>

<b>PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME.</b>

Now in another program <b>[program2]</b> i am submitting above program[program1] as below:

V_PROG = 'PROGRAM1'.

  • Pass the data into SUBMIT statement with no file details

T_PARMS-SELNAME = 'P_FNAME'.

T_PARMS-KIND = 'P'.

T_PARMS-LOW = ''.

APPEND T_PARMS.

SUBMIT (V_PROG)

WITH SELECTION-TABLE T_PARMS

VIA JOB gv_jobname NUMBER gv_jobnum "USER puser

AND RETURN TO SAP-SPOOL

SPOOL PARAMETERS gv_params

WITHOUT SPOOL DYNPRO.

Now my issue over here is when i am submitting program1 from program2 i should skip selection screen file name should be blank in [program1] and program should proceed executing program1 without taking into consideration selection-screen.

Will my above code achives this functionality.

I cannot test as test procedure is not there to test the same.

Can any body tell me the solution for the same!

Thanks in advance.

Thanks & Regards,

Deep.

1 REPLY 1
Read only

Former Member
0 Likes
290

Deep,

Not sure if I got your question right.

Do you want program 1 to not consider the file name after you have executed program 2.

In that case, you can set P_FNAME = ''.

after

SUBMIT (V_PROG)

WITH SELECTION-TABLE T_PARMS

VIA JOB gv_jobname NUMBER gv_jobnum "USER puser

AND RETURN TO SAP-SPOOL

SPOOL PARAMETERS gv_params

WITHOUT SPOOL DYNPRO.

However, I am not sure if I got your question right. Can you help me understand better?

Ganesh