‎2007 Feb 01 12:28 PM
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
‎2007 Feb 01 12:48 PM
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.
‎2007 Feb 01 12:33 PM
<Deleted>
Sorry....follow Erwan's suggestion
Regards,
ravi
Message was edited by:
Ravi Kanth Talagana
‎2007 Feb 01 12:34 PM
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
‎2007 Feb 01 12:46 PM
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
‎2007 Feb 01 12:48 PM
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.
‎2007 Feb 01 12:53 PM
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
‎2007 Feb 01 12:51 PM
Rahul,
i want to display only calling report output list. what u have suggested will works for it?
‎2007 Feb 01 12:59 PM
Hi Praneet,
Ya it will display only the list of the program in which u r calling another program.
‎2007 Feb 01 1:01 PM
Hi Praneet,
Ya it will display only the list of the program which is calling another program in it.
‎2007 Feb 01 1:35 PM
Hi Erwan,
i can use those 3 FMs...but what is the variant in job_submit?
where can i use my SUBMIT?
Regards,
Pra
‎2007 Feb 01 1:39 PM
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
‎2007 Feb 01 1:48 PM
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