Skip errors at SUBMIT statement
Hello gurus,
I have a very simple problem, which i cannot solve it! i hope you ll help me.
All i want is to call a programm (report) or a transaction in a loop statement, and when an error occurs, i want to log it somewhere and go to the next line. How is this possible in ABAP?
Thanks in advance!
Hi!
Errors are in place so that the transaction will not continue. What's the use in continuing if you have errors in data? (",)
With CALL TRANSACTION, you get to log all messages encountered by the call transaction statement.
You could also use SUBMIT (program) ... AND RETURN statement but I think this will only give you the last error message that terminated the call through SY-SUBRC check.
Also, if you are using LOOP statement to process a lot of transaction like
LOOP AT itab INTO wa.
CALL TRANSACTION...
IF sy-subrc IS INITIAL.
"Transaction ended most probably successfully.
ENDIF.
"Check the iMessageTab for the messages encountered
ENDLOOP.
The next line of the internal table itab gets processed anyway regardless if the previous call was successful or not.
Edited by: Michael.Sumaya on Feb 2, 2012 9:32 AM
Similar Messages
-
Catching an error in SUBMIT Statement
Hi,
I am using SUBMIT (REPORT) and RETURN.
How to catch an error when there is one in the REPORT Program that i am calling.hi
Calling Programs
If you need to program an extensive application, one single program can become very complex. To make the program easier to read, it is often a good idea to divide the required functions among several programs.
As well as using external modularization, in which you store procedures in special non-executable ABAP programs like function groups, you can also call independent programs from within an ABAP program.
The following ABAP statements allow you to start an executable program or transaction. You can either exit the calling program, or have the system return to it when the called program finishes running.
Executable Program
Transaction
Call without return
SUBMIT
LEAVE TO TRANSACTION
Call with return
SUBMIT AND RETURN
CALL TRANSACTION
You can use these statements in any ABAP program. For example, while processing a user action in the output list of an executable program, you might call a transaction whose initial screen is filled with data from the selected list line.
The event LOAD-OF-PROGRAM is triggered each time a program is called. If a corresponding event block is defined in the framework program, it is executed once before the first other processing block is executed.
An interesting remark at this point is that each execution of an executable program actually has a SUBMIT statement as its source. When you enter the program name in a transaction like SE38 or SA38 and choose Execute, a SUBMIT statement occurs in the transaction. Technically speaking, therefore, executable programs have the attribute of being able to be called using SUBMIT, although their principal characteristic from a useru2019s point of view is that they are started in the foreground.
Memory Organization in Program Calls
The first ABAP program in a session on the application server opens its own internal session (roll area) within the main session. All externally-called procedures run in the same internal session as the calling program, that is, the main program and working data of the procedure are loaded into the same memory area in the internal session.
When you call an executable program or a transaction, the system opens a new internal session for each program. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack. The system can open up to 9 further internal sessions in external program calls.
As well as executable programs and transactions, dialog modules also open a new internal session. Dialog modules were previously used for modularizing screen sequences.
Program Calls and SAP LUWs
An SAP LUW is a logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW. There are various bundling techniques that you can use to ensure that all of the database updates belonging to an SAP LUW are made in the same single database LUW.
Externally-called procedures do not open a new SAP LUW.
However, when you start a new executable program or transaction, a new SAP LUW starts. Database updates belonging to these programs are collected in their own database LUW. If the new program does not return control to the calling program, the SAP LUW of the old program concludes when the new program is called. If, on the other hand, the new program does return control to the calling program, the new SAP LUW runs parallel to the SAP LUW of the calling program.
No new SAP LUW is opened when you call a dialog module. Bundling techniques in a dialog module add the database updates to the database LUW of the calling program. You may sometimes need to call a transaction that runs in the same SAP LUW as the calling program. One technique for doing this is to use the existing transaction as a dialog module. To do this, you need to create a new dialog module with the same main program and initial screen as the transaction. Transactions that are used both as transactions and as dialog modules must be programmed to obey certain rules. For further information, refer to Calling Screen Sequences.
The fact that an external program shares (or does not share) the SAP LUW with its caller has special consequences if the program calls update-task functions or uses COMMIT WORK. For further information, refer to Special LUW Considerations.
syntax:
SUBMIT REPORT01 VIA SELECTION-SCREEN USING SELECTION-SET 'VARIANT1' USING SELECTION-SETS OF PROGRAM 'REPORT00' AND RETURN. -
Skip Error message in submit report
Hello Gurus,
I am using SUBMIT <REPORT> command inside a loop of my calling report. For one record the SUBMIT <report> is throwing an eror message due to which my report is getting stopped by displaying the error message.
My requirement is to skip the record if there is any error in SUBMIT <report> and process rest of the records.
Please help me out.Hi,
Vasanth's idea regarding doing a CALL FUNCTION IN BACKGRUOND TASK does work, unless you need to get back some information from the SUBMIT, as export parameters can't be set when using IN BACKGRUOND TASK.
As i need to get data from the SUBMIT, i'll keep looking for other alternatives, so other ideas are still welcome...
Regards,
mr.
Hi Manuel,
Try calling report in background task like below:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = c_name "this name can be any name defined in constants(you do not have to create a job name anywhere in system or SM36)
IMPORTING
jobcount = w_number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
*" Job opened successfully
IF sy-subrc EQ c_0.
*" Call program to process IDoc
SUBMIT ZSubmit WITH <any value> " e.g. p_field1 EQ <value>
VIA JOB c_name NUMBER w_number
AND RETURN.
[Note: In ZSubmit report you can send the data to calling program through ABAP memory i.e. Use EXPORT parameter to export data
Ex: constants: c_memory(7) type c value 'MEMORY1'.
At the end of ZSubmit report, before returning to the calling program write below statement:
EXPORT i_message TO MEMORY ID c_memory1.]
*" Successful processing of IDoc
IF sy-subrc EQ c_0.
"Here you can import data from ZSubmit report
import i_message from memory id c_memory1.
After retrieving the data, free the memory otherwise it will affect the performance of your report:
Free memory id c_memory1.
*" Close the job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_number
jobname = c_name
strtimmed = c_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
OTHERS = 8.
ENDIF.
ENDIF.
Hope this helps!
Regards,
Saba -
How to skip the alv list when submit a report by SUBMIT statement?
Dear Experts,
I have to submit a report(RMVKON00) for a special request in my add-on program, I use the following statment:
SUBMIT RMVKON00
AND RETURN EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = ABAPLIST_TAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
CALL FUNCTION 'LIST_TO_ASCI'
* EXPORTING
* LIST_INDEX = -1
* WITH_LINE_BREAK = ' '
TABLES
LISTASCI = LISTASCI_TAB[]
LISTOBJECT = ABAPLIST_TAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3
But it still display the alv list , and I must click button 'BACK' ,then it return my add on program.
I hope to skip the alv list (does not display the alv list ) .
Would you like to help me?
Thanks and Best Regards,
Colin.
Edited by: Colin on Jan 8, 2010 10:09 AMHi Colin,
I dont think you would be able to skip the ALV output using SUBMIT. However try changing the value of sy-lsind after the submit statement.
SUBMIT RMVKON00
AND RETURN EXPORTING LIST TO MEMORY.
sy-lsind = sy-lsind - 1.
If that doesnt work then try using JOB_START JOB_SUBMIT, JOB_CLOSE...
Thanks,
Best regards,
Prashant -
Connection CLosed Error due to submit statement.
Hi friends,
I have a Method which calls this function
CALL FUNCTION 'Z_SLOT_TRIGGER_PRODUCTS'
EXPORTING
iv_rspar = lt_rspar
iv_variant = lv_variant.
The Function module Z_slot_trigger_prouducts has a form in which there is a submit statement
Submit the slotting transaction to background & process the transaction immediatly
SUBMIT z_slot_products
USING SELECTION-SET gv_variant
WITH SELECTION-TABLE p_lt_rspar_tmp
AND RETURN.
During the debuging i see that when it reaches this submit statement it is giving an error as below in the inbound queue:
ThISend: bad tm type / connection closed (no data)
Can anyone please help me with this error. Thanks in advance.Check the documentation of the submit statement:
When the SUBMIT statement is executed, the system runs an authorization check for the authorization group specified in the program attributes. -
Executing SUBMIT statement in background
Hello Experts,
Is it possibe in executing SUBMIT statement in backgound? If yes can anyone provide example code?
Also in terms of performance tuning how does SUBMIT fares against CALL TRANSACTION? Which is much better in terms of performance.
Appreciate your answers. Thanks!Hi
There's no difference for the performance:
if a transaction is assigned to a report (so no dialog program, module pool), it's better to use the SUBMIT if it needs to transfer the value on SELECTION-SCREEN. It can't do it by CALL TRANSACTION.
DATA: VA_JOBNAME LIKE TBTCO-JOBNAME,
VN_JOBCOUNT LIKE TBTCO-JOBCOUNT.
* Open job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = VA_JOBNAME
IMPORTING
JOBCOUNT = VN_JOBCOUNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
CASE SY-SUBRC.
WHEN 0.
WHEN OTHERS.
MESSAGE E208(00) WITH 'Error.
ENDCASE.
* Call report
SUBMIT <REPORT> USER SY-UNAME
VIA JOB VA_JOBNAME NUMBER VN_JOBCOUNT
WITH ..................................
AND RETURN.
* Close job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = VN_JOBCOUNT
JOBNAME = VA_JOBNAME
STRTIMMED = 'X' " start immediatly
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.
Max -
Problem in submit statement ?
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 advancetry 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. -
Submit statement in ABAP program
Hi All,
I am using two submit statements in my program for two different reports. When i run the program i get the output screens of the two reports at the ouptut. Is there any way i can hide the user seeing the output screens of the two programs and display only the output screen of my program. If you have any clues please post it.
Thanks & Regards,
Rahul RathiYou can call executable programs from other ABAP programs using the following statement:
SUBMIT <rep>|(<field>) [AND RETURN] [<options>].
You can either specify the name of the program you want to call statically by entering the program name in the code of the calling program, or dynamically by specifying the name of a field (in parentheses) containing the name of the program. If the system cannot find the specified executable program when trying to execute the SUBMIT statement, a runtime error occurs.
If you omit the AND RETURN addition, all data and list levels of the calling program (the entire internal session) are deleted. After the called executable program has finished, control returns to the level from which you started the calling program.
If you use AND RETURN, the system stores the data of the calling executable program and returns to the calling after processing the called program. The system resumes executing the calling program at the statement following the call.
The SUBMIT statement has a set of additions <options> for passing data to the called program and specifying various other processing options. Some of them are described in the following sections:
Have a look at below link. It will help you.
http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm
Best Regards,
Vibha
*Please mark all the helpful answers -
Create spool for background jobs which uses submit statement
Hi Gurus,
I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.
Thanks in advance, <REMOVED BY MODERATOR>
Regards,
Srinivas.
Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PMhi check this link ...
Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
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
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=backgroundsubmit&adv=false&sortby=cm_rnd_rankvalue
sy-subrc Meaning
0 Background task scheduled successfully.
4 Scheduling cancelled by user on the selection screen.
8 Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
12 Error in internal number assignment.
regards,
venkat.
Edited by: venkat appikonda on Mar 18, 2008 6:32 PM -
Problem using Submit statement
Dear Experts,
I am trying to use submit statement in a report for transaction ML85. I have used the below code.
submit RMSRVF00 with FRGCO = 'S1'
with FRGGR = 'S1'
with listu = 'ENTRY_REL'
with ebeln = '4500000309'
AND RETURN.
But when I execute the report the values which I set are not filled and the screens opens with error message as '' Fill in all required entry fields". I am passing values for fields Releasecode - FRGCO, Release group - FRGGR, Purchase Order - EBELN, Scope of list - LISTU.
Please tell me why this message is coming and values are not set for fields.
KR,
Bharathhai,
try like this
SUBMIT ZVENDOR_REPORT_NEW1 USING SELECTION-SCREEN '100'
WITH SELECTION-TABLE TB_OUTPUT
WITH P_DATE = SY-DATUM
WITH S_ERDAT BETWEEN '01.01.2008' AND '01.06.2008'
AND RETURN.
or you can go in this way using type pools:
TYPE-POOLS RSDS.
DATA: TRANGE TYPE RSDS_TRANGE,
TRANGE_LINE LIKE LINE OF TRANGE,
TRANGE_FRANGE_T_LINE LIKE LINE OF TRANGE_LINE-FRANGE_T,
TRANGE_FRANGE_T_SELOPT_T_LINE LIKE LINE OF TRANGE_FRANGE_T_LINE-SELOPT_T,
TEXPR TYPE RSDS_TEXPR.
TRANGE_LINE-TABLENAME = 'TB_OUTPUT'.
TRANGE_FRANGE_T_LINE-FIELDNAME = 'S_ERDAT'.
TRANGE_FRANGE_T_SELOPT_T_LINE-SIGN = 'I'.
TRANGE_FRANGE_T_SELOPT_T_LINE-OPTION = 'BT'.
TRANGE_FRANGE_T_SELOPT_T_LINE-LOW = '01.01.2008'.
TRANGE_FRANGE_T_SELOPT_T_LINE-HIGH = '01.06.2008'.
APPEND TRANGE_FRANGE_T_SELOPT_T_LINE TO TRANGE_FRANGE_T_LINE-SELOPT_T.
TRANGE_FRANGE_T_SELOPT_T_LINE-SIGN = 'I'.
TRANGE_FRANGE_T_SELOPT_T_LINE-OPTION = 'NE'.
TRANGE_FRANGE_T_SELOPT_T_LINE-LOW = SY-DATUM.
APPEND TRANGE_FRANGE_T_SELOPT_T_LINE TO TRANGE_FRANGE_T_LINE-SELOPT_T.
APPEND TRANGE_FRANGE_T_LINE TO TRANGE_LINE-FRANGE_T.
APPEND TRANGE_LINE TO TRANGE.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
FIELD_RANGES = TRANGE
IMPORTING
EXPRESSIONS = TEXPR.
SUBMIT ZVENDOR_REPORT_NEW1 VIA SELECTION-SCREEN
WITH SELECTION-TABLE TB_OUTPUT
WITH FREE SELECTIONS TEXPR AND RETURN. -
A question About SUBMIT statement
Hi,
By SUBMIT statement, i can trigger another report. If the called report runs into dump, how can i detech/catch the dump in the calling report? I tested. It seems impossible to catch the dump. The calling report will also dump.
My question is, if the called report runs into dump, how to detect the dump and avoid dump in calling report?
Thanks in advance,
Best Regards, Johnney.hi
you can catch this kind of error or exeption from the respective report
then pass this error or exeception to the calling report
go through the example I am giving , ti have done it like this only
SUBMIT zgurep03 AND RETURN WITH SELECTION-TABLE li_seltab .
then in the called reprot
*Check ledger
SELECT SINGLE * FROM t881 WHERE rldnr = p_rldnr.
IF sy-subrc NE 0.
SET CURSOR FIELD 'P_RLDNR'.
MESSAGE e448 WITH p_rldnr
MESSAGE e446 INTO lv_text .
lv_type = 'E'.
Capturing the error messages.
EXPORT lv_text TO MEMORY ID 'TX'(004).
EXPORT lv_type TO MEMORY ID 'TP'(005).
in calling report
IMPORT gv_type1 TO gv_type FROM MEMORY ID 'TP'.
IMPORT gv_text1 TO gv_text FROM MEMORY ID 'TX'.
preparing error message in the callge report for the calling report
PERFORM prepare_message
USING sy-msgid
lv_msgno
lv_msgv1
lv_msgv2
lv_msgv3
lv_msgv4
CHANGING gv_text.
preparing error message
FORM prepare_message USING p_sy_msgid
p_sy_msgno
p_sy_msgv1
p_sy_msgv2
p_sy_msgv3
p_sy_msgv4
CHANGING p_gv_text.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = p_sy_msgid
lang = 'EN'
no = p_sy_msgno
v1 = p_sy_msgv1
v2 = p_sy_msgv2
v3 = p_sy_msgv3
v4 = p_sy_msgv4
IMPORTING
msg = gv_text
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
I guess this will solve your problem
Regards
Prashant -
I AM USING SUBMIT FOR IDOC TRANSACTION WE05 , THE STATEMENT IS BELOW
SUBMIT rseidoc2 WITH SELECTION-TABLE seltab
VIA SELECTION-SCREEN
WITH docnum IN r_doc AND RETURN.
the problem is that when i go directly to weo5 and enter any idoc it is showing me the output but when i go through
submit statement it is giving me error 'NO IDOC FOUND' . please suggestELSEIF rs_selfield-fieldname = 'DOCNUM'.
READ TABLE lit_final INTO ls_final WITH KEY docnum = rs_selfield-value.
IF sy-subrc = 0. "if succesful
* SET PARAMETER ID 'DCN' FIELD rs_selfield-value.
seltab_wa-selname = 'CREDAT'.
seltab_wa-kind = 'S'.
seltab_wa-sign = 'I'.
seltab_wa-option = 'EQ'.
seltab_wa-low = space.
seltab_wa-high = space.
APPEND seltab_wa TO seltab.
CLEAR seltab_wa.
r_doc-sign = 'I'.
r_doc-option = 'BT'.
r_doc-low = rs_selfield-value.
APPEND r_doc.
CLEAR seltab_wa.
SUBMIT rseidoc2 WITH SELECTION-TABLE seltab
VIA SELECTION-SCREEN
WITH docnum IN r_doc AND RETURN.
ENDIF. -
hi
I want to execute program RIMODGEN ( CFM1 transaction ) with some values filled in MA_MATNR
But this program is not able to execute the program with SUBMIT statement and return & close the job, please tell me whats the problem with this....
Points for all helpful answers
* Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
* Insert process into job
* CALL TRANSACTION
SUBMIT cfm1 with MA_MATNR in MA_MATNR
WITH I_MODID = 'TEST_RAJ'
WITH I_LOGSYS = 'D41030'
with I_APPL = 'TEST_RAJ'
user sy-uname
via job jobname
number jobcount
and RETURN.
if sy-subrc > 0.
message e200(zz) with 'RIMODGEN call failed'. "error processing
endif.
* Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
MESSAGE i200(zz) with 'Done !!'. "error processing
stop.
endif.Rob and I were pointing out that you have the transaction name in the SUBMIT statement in your code that you posted above, so if you are not currently using the program name in your program, make sure that you are. Also, you may want to use the extension " to sap-spool without spool dynpro" of the SUBMIT statement, the ouput will then go to the spool. Here is an example program where I am creating a background job .
report zrich_0004 .
data: sdate type sy-datum,
stime type sy-uzeit,
l_valid,
ls_params like pri_params,
l_jobcount like tbtcjob-jobcount,
l_jobname like tbtcjob-jobname.
start-of-selection.
* Get Print Parameters
call function 'GET_PRINT_PARAMETERS'
exporting
no_dialog = 'X'
importing
valid = l_valid
out_parameters = ls_params.
* Open Job
l_jobname = 'ZRICH_0005'.
call function 'JOB_OPEN'
exporting
jobname = l_jobname
importing
jobcount = l_jobcount.
* Submit report to job
submit zrich_0005
via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return.
* Kick job off 30 seconds from now.
sdate = sy-datum.
stime = sy-uzeit + 30.
* Schedule and close job.
call function 'JOB_CLOSE'
exporting
jobcount = l_jobcount
jobname = l_jobname
sdlstrtdt = sdate
sdlstrttm = stime
* strtimmed = 'X'
Regards,
Rich Heilman . -
How to export to memory using submit statement?
hi friends,
There is a standard report RPTQTA10.
After executing this report using submit statement i want get the result from the QTTRANS itable of RPTQTA10 to our local itab of BSP.
After this from local itab of BSP i want display some fields of local itba.
Any solutions plz....
Regards,
shankar.hi,
thanks for ur reply.
but i am getting error like this in IE.
Note
The following error text was processed in the system IT3 : Exception condition "CNTL_ERROR" raised.
The error occurred on the application server itcsvr_IT3_01 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Form: CONSTRUCTOR of program CL_GUI_CUSTOM_CONTAINER=======CP
Form: PBO of program SAPLSLVC_FULLSCREEN
Module: PBO of program SAPLSLVC_FULLSCREEN
Function: REUSE_ALV_GRID_DISPLAY of program SAPLSLVC_FULLSCREEN
Form: DISPLAY_LIST of program RPTQTA10
END-OF-SELECTION of program RPTQTA10
And my BSP code is like this in OnInitialization event.
SUBMIT rptqta10
WITH PNPPERNR-LOW = w_pernr
EXPORTING LIST TO MEMORY AND RETURN.
data: field(25).
field-symbols: <fs_tab> type STANDARD table.
field = '(RPTQTA10)QTTRANS[]'.
assign (field) to <fs_tab>.
MOVE <FS_TAB>[] TO it_qttrans[].
Here it_qttrans is local itab of BSP.
Regards,
Shankar. -
Need information about SUBMIT statement
Hi,
I am submitting program1 in program2 by using SUBMIT keyword.My requirement is want to pass selection screen.
parameters of program2 to program1 without using variant bcz that parameter
values are not constant.
Thanks for ur information in advance..
hari...hI
<b>SUBMIT - selscreen_parameters</b>
USING-SELECTION-SET supplies all the selection screen components by means of a Variante variant. If you specify USING-SELECTION-SETS OF PROGRAM , you can use a variant from a different program; if you specify WITH SELECTION-TABLE, values for several selection screen components are transferred as the content of an internal table rspar; WITH sel value supplies individual selection screen components sel with values value. The addition WITH FREE SELECTIONS allows you to transfer dynamic selections to the selection screen for a logical database.
<b>... USING SELECTION-SET variant</b>
If you specify this edition, the parameters and selection criteria for the selection screen are supplied with values from a variant. For variant, you must specify a character-like data object that contains the name of a variant for the program accessed when the statement is executed. If the variant does not exist, the system sends an error message. If the variant belongs to a different selection screen, it is ignored.
You can create and manage variants for every program in which selection screens are defined, either in the ABAP Workbench or during execution of the program by choosing Goto - Variants on a selection screen.
<b>... USING SELECTION-SETS OF PROGRAM prog</b>
If you specify this addition, the variants of the program prog are used in the program accessed. For prog, you must specify a character-like data object that contains the name of a program when the statement is executed. The addition has the following effect:
If a variant variant is specified with USING SELECTION-SET, the system searches for this variant in the program prog.
If the selection screen is displayed with VIA SELECTION-SCREEN, all the functions that can be accessed by means of the menu path Goto - Variants affect the variants of the program prog. However, these functions are only active if prog is an executable program.
The program prog should contain a selection screen that has the same parameters and selection criteria as the selection screen used in the program accessed.
<b>... WITH SELECTION-TABLE rspar</b>
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 8),
KIND (length 1),
SIGN (length 1),
OPTION (length 2),
LOW (length 45),
HIGH (length 45).
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
<b>... WITH sel1 value1 WITH sel2 value2 ...</b>
This addition supplies values to individual parameters or selection criteria sel for the selection screen. For sel, you must specify the name of a parameter or selection criterion directly. Parameters are supplied with single values and selection criteria with selection tables that overwrite values already specified in the program accessed. The selection table to be transferred is compiled from all the WITH sel additions that address the same selection criterion sel. You can specify the following statements for value:
{EQ|NE|CP|NP|GT|GE|LT|LE} dobj [SIGN sign]
Transfer of a single value.
The operators before dobj correspond to the values specified for column OPTION for selection tables. For dobj, you must specify a data object whose data type can be converted to the data type of the selection screen component sel. For sign, you can specify a character-like field that must contain 'I' or 'E'. The standard value is 'I'.
If sel is a selection criterion, the system appends a line in the selection table to be transferred, placing the operator in column OPTION, the content of dobj in column LOW, and the content of sign in column SIGN.
If sel is a parameter, it is set to the value of dobj in the program accessed. The operator and the value of sign are not taken into account.
[NOT] BETWEEN dobj1 AND dobj2 [SIGN sign]
Transfer of an interval.
In this case, sel must be a selection criterion. For dobj, you must specify data objects whose data type can be converted to that of the columns LOW and HIGH for the selection criterion sel. For sign, you can specify a character-like field that must contain 'I' or 'E'. The standard value is 'I'.
A line is appended in the selection table to be transferred. If NOT is specified, the value 'NB' is placed in column OPTION; otherwise, the value entered is 'BT'. The content of the data objects dobj and sign is placed in the columns LOW, HIGH, and SIGN.
IN rtab
Transfer of a ranges table.
In this case, sel must be a selection criterion. For rtab, you must specify an internal table that has the same structure as the selection table for selection criterion sel. You can create a table like this using the addition RANGE OF to the statements TYPES and DATA.
The lines in table rtab are appended to the selection table to be transferred.
You can also use = or INCL instead of the operator EQ.
You can specify the addition WITH sel value more than once, and you can also specify the same selection screen component more than once.
<b>Example</b> The program report1 has a stand-alone selection screen with the screen number 1100. In the program report2, an internal table with row type RSPARAMS and a ranges table are filled for this selection screen. These are transferred at SUBMIT together with a single condition.
<b>Program accessed</b>
REPORT report1.
DATA text(10) TYPE c.
SELECTION-SCREEN BEGIN OF SCREEN 1100.
SELECT-OPTIONS: selcrit1 FOR text,
selcrit2 FOR text.
SELECTION-SCREEN END OF SCREEN 1100.
<b>Calling program</b>
REPORT report2.
DATA: text(10) TYPE c,
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.
<b>Result</b>
After report1 has been accessed by report2, the selection tables for the selection criteria selcrit1 and selcrit2 in the program accessed contain the following entries:
SIGN OPTION LOW HIGH
selcrit1 I EQ ABAP
selcrit2 I BT H K
selcrit2 E EQ H
selcrit2 E EQ K
<b>... WITH FREE SELECTIONS texpr</b>
This addition supplies values to the dynamic selections for the selection screen for a logical database. The program accessed must be linked to a logical database that supports dynamic selections. texpr must be an internal table of the type RSDS_TEXPR from type group RSDS.
In texpr, the selections for the dynamic selections are specified in an internal format (stack formula). You can use the function modules FREE_SELECTIONS_INIT, FREE_SELECTIONS_DIALOG, and FREE_SELECTIONS_RANGE_2_EX from the function group SSEL to fill texpr in the calling program. While the first two function modules execute a user dialog, you can transfer ranges tables to FREE_SELECTIONS_RANGE_2_EX for each node in the dynamic selection in an internal table of the type RSDS_TRANGE. These are then converted to a table of the row type RSDS_TEXPR. If the calling program contains a selection screen with the same dynamic selections, you can transfer its content beforehand to a table of the type RSDS_TRANGE using the function module RS_REFRESH_FROM_DYNAMICAL_SEL.
The lines in the internal table type RSDS_TRANGE contain a flat component TABLENAME for each node and a table-like component FRANGE_T of the type RSDS_FRANGE_T for the fields in the node. The lines in RSDS_FRANGE_T contain a flat component FIELDNAME for each field and a table-like component SELOPT_T of the row type RSDSSELOPT from the ABAP Dictionary. RSDSSELOPT contains the four components SIGN, OPTION, LOW, and HIGH and can include the ranges table.
<b>Example</b> Program report1 is linked to the logical database F1S, which supports dynamic selections for the node SPFLI. Program report2 enters conditions in a nested internal table of the type rsds_trange with selection conditions for field CONNID in node SPFLI; this is then converted to a table of the type rsds_texpr, which is transferred at SUBMIT.
<b>Program accessed</b>
REPORT report1.
NODES: spfli, sflight, sbook.
<b>Calling program</b>
REPORT report2.
TYPE-POOLS rsds.
DATA: trange TYPE rsds_trange,
trange_line
LIKE LINE OF trange,
trange_frange_t_line
LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line
LIKE LINE OF trange_frange_t_line-selopt_t,
texpr TYPE rsds_texpr.
trange_line-tablename = 'SPFLI'.
trange_frange_t_line-fieldname = 'CONNID'.
trange_frange_t_selopt_t_line-sign = 'I'.
trange_frange_t_selopt_t_line-option = 'BT'.
trange_frange_t_selopt_t_line-low = '0200'.
trange_frange_t_selopt_t_line-high = '0800'.
APPEND trange_frange_t_selopt_t_line
TO trange_frange_t_line-selopt_t.
trange_frange_t_selopt_t_line-sign = 'I'.
trange_frange_t_selopt_t_line-option = 'NE'.
trange_frange_t_selopt_t_line-low = '0400'.
APPEND trange_frange_t_selopt_t_line
TO trange_frange_t_line-selopt_t.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
SUBMIT report1 VIA SELECTION-SCREEN
WITH FREE SELECTIONS texpr.
<b>SUBMIT - selscreen_options</b>
... [USING SELECTION-SCREEN dynnr]
[VIA SELECTION-SCREEN]
[selscreen_parameters] ... .
1. ... USING SELECTION-SCREEN dynnr
2. ... VIA SELECTION-SCREEN
The addition USING SELECTION-SCREEN specifies the selection screen, VIA SELECTION-SCREEN specifies whether it is displayed. The additions selscreen_parameters provide values for the parameters, selection criteria, and the free selection of the called selection screen.
The values are transferred to the selection screen between the events INITIALIZATION and AT SELECTION-SCREEN OUTPUT The following hierarchy applies for transferring values:
First, the variant of the addition USING SELECTION-SET is transferred, which sets all parameters and selection criteria to the values of the variant. The values previously set in the called program are overwritten.
The values are then transferred to the table of the addition WITH SELECTION-TABLE. All parameters and selection criteria specified there are overwritten accordingly.
Finally, the values of the additions WITH sel value are transferred. All parameters and selection criteria are overwritten accordingly. If the addition WITH sel value is used more than once for the same parameter, this is overwritten with the last specified value. If the addition WITH sel value is used more than once for the same selection criterion, a selection table with the corresponding number of lines is transferred.
Providing values for free selections is independent of this hierarchy.
The options for parameter transfer enable a selection screen to be viewed as a parameter interface of an executable program. This applies particularly for background selection screen processing and for parameters and selection criteria that are defined without screen elements using the addition NO-DISPLAY.
The additions selscreen_parameters only work the first time the called program is executed. If a selection screen is displayed in the called program, the runtime environment calls the program again after it is finished, thereby replacing the values specified in selscreen_parameters with the previous input values.
<b>... USING SELECTION-SCREEN dynnr</b>
This addition specifies which selection screen is called. dynnr is a data object that must contain the screen number of a selection screen defined in the called program when the SUBMIT statement is called.
If the addition USING SELECTION-SCREEN is omitted or the screen number 1000 is entered, the standard selection screen is called. If no standard selection screen is defined in the called program, no selection screen is called.
If a screen number that is not 1000 is entered in the addition USING SELECTION-SCREEN, the corresponding independent selection screen is called. If no selection screen with this screen number is defined in the called program, this leads to an untreatable exception.
<b>... VIA SELECTION-SCREEN</b>
If this addition is specified, the selection screen is displayed on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are triggered without the selection screen being displayed.
<b>Reward if usefull</b>
Maybe you are looking for
-
Good day! Can anyone help me about this error I have been making a Java program that will create a XML file. C:\Users\XMLCreator.java:18: package com.sun.org.apache.xml.internal.serialize does not exist import com.sun.org.apache.xml.internal.serializ
-
Ipad Volume not working on IOS 6.1.3
After updating my Ipad 2 to IOS 6.1.3 volume is not working at all, i set it up and inmediatly goes down. Already tried the home left control, and also the lock side switch to lock and not to mute. any idea how to solve it.. I have nos sound at all
-
Hierarchy (Parent-Child) drill-down report
Good morning, I use Crystal Reports v12.3.0.601 & backend is Oracle - And I am a beginner. Attached JPG details my question/ problem - Thank you for your time. Regards, Sridhar Lam
-
To use the form variables in a workflow
How can we use the form variables in the workflow..How will we refer the variables?Simply referring by name not working.
-
Is there a way restore the system before I re-installed my start up disc
I wish apple care would told me to back up my entourage mail, I have a lot of important email, and addressees in entourage Mail. I need to go back to the old version and retrieve that information. I was having problem with the spinning wheel, and cou