‎2010 Sep 21 6:56 AM
Hi,
I am trying to implement parallel processing and am facing a problem where in the Function Module contains the statement :
submit (iv_repid) to sap-spool
with selection-table it_rspar_tmp
spool parameters iv_print_parameters
without spool dynpro
via job iv_name
number iv_number
and return.I call the Function Module as such :
CALL FUNCTION 'YFM_OTC_ZSD_ORDER'
STARTING NEW TASK v_task_name
DESTINATION 'NONE'
PERFORMING receive_results ON END OF TASK
EXPORTING
iv_repid = lv_repid
iv_print_parameters = v_print_parameters
iv_name = v_name
iv_number = v_number
TABLES
it_rspar_tmp = t_rspar_tmp[]
EXCEPTIONS
communication_failure = 1
OTHERS = 2.But I keep getting the error Output Device "" unknown.
Kindly advise.
Thanks.
‎2010 Sep 21 7:19 AM
Hi,
From the documentation for the SUBMIT statement,
If a basic list is created in the program accessed, you should create a spool request with explicit print parameters by specifying TO SAP-SPOOL. Otherwise the VIA JOB addition implicitly creates a spool request that derives its print parameters from standard values, some of which are taken from the user defaults, and which are not necessarily consistent.
Check the print parameters that you pass to the submit statement. You could use get_print_parameters function module to get the parameters.
Hope it helps.
Sujay
‎2010 Sep 21 8:05 AM
I need the output of a report to be generated in the spool and then I am retreiving it later on from the spool and displaying ti along with another ALV in my current program.
I have called the Job Open and Job Close function modules. Between these 2 FM calls, I have written the code for the parallel processing.
CALL FUNCTION 'YFM_OTC_ZSD_ORDER'
STARTING NEW TASK v_task_name
DESTINATION 'NONE'
PERFORMING receive_results ON END OF TASK
EXPORTING
iv_repid = lv_repid
iv_print_parameters = v_print_parameters
iv_name = v_name
iv_number = v_number
TABLES
it_rspar_tmp = t_rspar_tmp[]
EXCEPTIONS
communication_failure = 1
OTHERS = 2.After this, I retrieve the data from Function Module : RSPO_RETURN_SPOOLJOB.
All the above steps work while I am in debugging mode.At the RFC call, it opens a new session and i execute the session completely, return to the main program execution, and then execute to the end , and I get the desired output.
But in debug mode, if i reach the RFC, a new session opens.I do not execute the FM, instead if i go back to the main program and execute it directly, i can replicate the error : Output device "" unknown.
So i guess it has got something to do with the Submit statment in the RFC.
Any assistance would be great !
Thanks !!
‎2010 Sep 21 7:30 AM
Hi,
To achive parallel processing you need to use
IN BACKGROUND TASK
AS SEPARATE UNIT
just check this llink [http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPparallelprocessingusingRFC]
Regards
Bikas