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

small problem with SUBMIT

Former Member
0 Likes
1,246

Hi

while using submit statement called program list output is getting displayed.

How can i skip this? and i want to display only calling list output.

This is the sample code which i wrote.

SUBMIT RVPKMASS96

WITH dd_vbeln in s_vbeln

WITH p_dateto = sy-datum

WITH p_savex = 'X'

WITH p_test = 'X'

AND RETURN.

can anyone suggest??

Regards

praneet

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,188

Hi Praneet,

From ur doubt it seems that u want to run the report in background. U can have a look at the following code.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

JOBNAME = JOBNAME1

IMPORTING

JOBCOUNT = JOBCOUNT1

EXCEPTIONS

CANT_CREATE_JOB = 1

INVALID_JOB_DATA = 2

JOBNAME_MISSING = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ELSE.

SUBMIT RHALEINI

WITH SELECTION-TABLE RSPAR_TAB1

WITH PCHOTYPE EQ 'P'

WITH PCHPLVAR EQ '01'

WITH PCHZTR_D EQ 'X'

WITH RCVPRN EQ S_PART

VIA JOB JOBNAME1 NUMBER JOBCOUNT1

AND RETURN.

IF SY-SUBRC EQ 0.

WRITE / TEXT-A00.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

JOBCOUNT = JOBCOUNT1

JOBNAME = JOBNAME1

STRTIMMED = 'X'

EXCEPTIONS

CANT_START_IMMEDIATE = 1

INVALID_STARTDATE = 2

JOBNAME_MISSING = 3

JOB_CLOSE_FAILED = 4

JOB_NOSTEPS = 5

JOB_NOTEX = 6

LOCK_FAILED = 7

INVALID_TARGET = 8

OTHERS = 9.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

11 REPLIES 11
Read only

Former Member
0 Likes
1,188

<Deleted>

Sorry....follow Erwan's suggestion

Regards,

ravi

Message was edited by:

Ravi Kanth Talagana

Read only

Former Member
0 Likes
1,188

Can you try :

SUBMIT RVPKMASS96  VIA SELECTION-SCREEN
                             AND RETURN
WITH dd_vbeln in s_vbeln
WITH p_dateto = sy-datum
WITH p_savex = 'X'
WITH p_test = 'X'.

Check also the ADD of "EXPORTING LIST TO MEMORY

"

Erwan

Read only

Former Member
0 Likes
1,188

Hi Erwan,

If i use VIA SELECTION-SCREEN it is displaying selection-screen of calling program and i dont want to display selection-screen and list output.

I can't use exporting list to memory,,,as i am getting data from another method.

please suggest any other logic

regards

praneet

Read only

Former Member
0 Likes
1,189

Hi Praneet,

From ur doubt it seems that u want to run the report in background. U can have a look at the following code.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

JOBNAME = JOBNAME1

IMPORTING

JOBCOUNT = JOBCOUNT1

EXCEPTIONS

CANT_CREATE_JOB = 1

INVALID_JOB_DATA = 2

JOBNAME_MISSING = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ELSE.

SUBMIT RHALEINI

WITH SELECTION-TABLE RSPAR_TAB1

WITH PCHOTYPE EQ 'P'

WITH PCHPLVAR EQ '01'

WITH PCHZTR_D EQ 'X'

WITH RCVPRN EQ S_PART

VIA JOB JOBNAME1 NUMBER JOBCOUNT1

AND RETURN.

IF SY-SUBRC EQ 0.

WRITE / TEXT-A00.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

JOBCOUNT = JOBCOUNT1

JOBNAME = JOBNAME1

STRTIMMED = 'X'

EXCEPTIONS

CANT_START_IMMEDIATE = 1

INVALID_STARTDATE = 2

JOBNAME_MISSING = 3

JOB_CLOSE_FAILED = 4

JOB_NOSTEPS = 5

JOB_NOTEX = 6

LOCK_FAILED = 7

INVALID_TARGET = 8

OTHERS = 9.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

0 Likes
1,188

I suggest you to use the following FM

It enable to display your output list and to submit your programm :

1- JOB_OPEN

2- JOB_SUBMIT

3- JOB_CLOSE


   CALL FUNCTION 'JOB_OPEN'
        EXPORTING
             JOBNAME          = 'JOB01'
        IMPORTING
             JOBCOUNT         = WVL_JOBCOUNT
        EXCEPTIONS
             CANT_CREATE_JOB  = 1
             INVALID_JOB_DATA = 2
             JOBNAME_MISSING  = 3
             OTHERS           = 4.

   CLEAR WT_LISTETAPE.   REFRESH WT_LISTETAPE.
   WT_LISTETAPE-PROGNAME = 'RMMPS000'.
   WT_LISTETAPE-VARIANT =  'PULL_FLOW_FP'.
   WT_LISTETAPE-USERNAME = SY-UNAME.
   APPEND WT_LISTETAPE.
   CALL FUNCTION 'JOB_SUBMIT'
          EXPORTING
             AUTHCKNAM                   = WT_LISTETAPE-USERNAME
             JOBCOUNT                    = WVL_JOBCOUNT
             JOBNAME                     = 'JOB01'
             PRIPARAMS                   = WT_LISTETAPE-PRIPARAMS
             REPORT                      = WT_LISTETAPE-PROGNAME
             VARIANT                     = WT_LISTETAPE-VARIANT
*      IMPORTING
*           STEP_NUMBER                 =
          EXCEPTIONS
             BAD_PRIPARAMS               = 1
             BAD_XPGFLAGS                = 2
             INVALID_JOBDATA             = 3
             JOBNAME_MISSING             = 4
             JOB_NOTEX                   = 5
             JOB_SUBMIT_FAILED           = 6
             LOCK_FAILED                 = 7
             PROGRAM_MISSING             = 8
             PROG_ABAP_AND_EXTPG_SET     = 9
             OTHERS                      = 10.


   CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
             JOBCOUNT                    = WVL_JOBCOUNT
             JOBNAME                     = 'JOB01'
             STRTIMMED                   = 'X'
             START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
        EXCEPTIONS
             CANT_START_IMMEDIATE        = 1
             INVALID_STARTDATE           = 2
             JOBNAME_MISSING             = 3
             JOB_CLOSE_FAILED            = 4
             JOB_NOSTEPS                 = 5
             JOB_NOTEX                   = 6
             LOCK_FAILED                 = 7
             OTHERS                      = 8.

Erwan

Read only

Former Member
0 Likes
1,188

Rahul,

i want to display only calling report output list. what u have suggested will works for it?

Read only

Former Member
0 Likes
1,188

Hi Praneet,

Ya it will display only the list of the program in which u r calling another program.

Read only

Former Member
0 Likes
1,188

Hi Praneet,

Ya it will display only the list of the program which is calling another program in it.

Read only

Former Member
0 Likes
1,188

Hi Erwan,

i can use those 3 FMs...but what is the variant in job_submit?

where can i use my SUBMIT?

Regards,

Pra

Read only

0 Likes
1,188

hey u can do the submit with the submit stmt only

as below

SUBMIT {rep|(name)} [selscreen_options]

[ list_options ]

[ job_options]

[AND RETURN].

in the job options u have to pass this.

... [USER user] VIA JOB job NUMBER n.

hope it helps

santhosh

Read only

0 Likes
1,188

This is the Variant of the prog R.... you are using, you can also use parameters instead of variant.

Using these FM's, you submit the program R.... with the parameters you want without disturbing your online program

Erwan