Not getiing spool if zprogram excutes in background which calls a submit
Dear All,
I have two programs with same selection screen , one is a z one and the other a standard one .
i am calling the standard program from my z program using Submit with some restriction value in the selection screen of the standard program.
Everything is OK , now the thing is i am not getting a spool in SM37 when i execute the z report (which calls the standards program with submit) in background .
I want in the one spool like i am getting if i execute the standard program manually in background.
Regards
Hi Try this way..
now it creates two spools...
**** Subroutine to get the print parameters
PERFORM get_print_parameters.
CONCATENATE 'QU'
sy-datum+4(4)
sy-uzeit INTO
wa_pri_params-plist.
* Submit report in background and creating spool
SUBMIT <Reportname> USING SELECTION-SET p_var
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_pri_params AND RETURN.
COMMIT WORK AND WAIT.
* To fetch the spool number from TSP01 table
IF sy-subrc EQ 0.
SELECT rqident
FROM tsp01
INTO p_spool
* UP TO 1 ROWS
WHERE rq2name = wa_pri_params-plist.
ENDSELECT.
ENDIF.
FORM get_print_parameters .
* Function Module to get the print parameters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'BC01' "'LP01'
list_name = 'TEST'
list_text = 'SUBMIT ... TO SAP-SPOOL'
immediately = ' '
line_size = '2000'
no_dialog = 'X'
IMPORTING
out_parameters = wa_pri_params
valid = w_valid
*** Begin of insert PJ051810
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc <> 0.
WRITE : 'Invalid Printer assigned'.
ENDIF.
*** End of insert PJ051810
ENDFORM. " GET_PRINT_PARAMETERS
Prabhudas
Similar Messages
-
Wrapper program when run in background not generating SPOOL
I have created Program A which calls internally Program B or C based on the condition. When I run the program B or C independently in Background it generates the spool on completion. But When I run the program A in Background, Spool is not getting generated.
My requirement is that Spool should be generated when Program A is executed in Background.
Below is the code of program A:
PROGRAM A.
IF p_cons = 'X'.
*-->Detailed Details of Interim or Final Settlement
SUBMIT B WITH p_vtnr EQ p_vtnr
WITH p_setqty EQ p_setqty
WITH p_test EQ p_test
WITH s_abrdat IN s_abrdat
WITH r2 EQ r2
WITH r1 EQ r1
AND RETURN.
ELSE.
*-->Summary Details of Interim or Final Settlement
SUBMIT C WITH p_vtnr EQ p_vtnr
WITH p_setqty EQ p_setqty
WITH p_test EQ p_test
WITH s_abrdat IN s_abrdat
WITH r2 EQ r2
WITH r1 EQ r1
AND RETURN.
ENDIF.
Please guide me on this.
Regards,
NaveenHi Naveen,
Check this
Submit report to job
submit ztest via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return. -
Report in background not create spool when no data found
Hello ,
I created simple rapport that should run in background. When I execute background job (sm37) I noticed that the spool exists only
for when the some data is found. When data is not found for any reason I do not have spool , and I need one saying
'records passed 0'. I am not sure what I can do about it. I saw insome programs that is possible but I cannot find how it was done. Please advice .
KrstoHi,
You might be checking if the Final Internal table has data in it or not (May be in END-OF-SELECTION). If you are not do have check on this and simple code a write statement like below.
IF IT_FINAL IS NOT INITIAL.
CREATING A SPOOL.
ELSE.
WRITE : / 'Records Passed are 0'.
ENDIF.
Let me know if you need any further help on this.
Regards,
SRinivas -
Spool empty when run in background
We are running a report in background which is emailed to various recipients. Although this program run successfully in foreground it cancels in background. On the selection screen the user has the option to display a standard report or an ALV report. We have tested both and ALV works fine. The standard report fails.
We have a spool number but it is empty for this scenario. The result is the following code fails:
V_RQIDENT = P_SPONO.
SUBMIT RSPOLST2 EXPORTING LIST TO MEMORY AND RETURN
WITH RQIDENT = V_RQIDENT.
PERFORM GET_LIST_FROM_MEMORY.
FORM GET_LIST_FROM_MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LISTOBJECT.
ENDFORM.
When I comment out the code which creates the recipient list for emailing then the spool is fine. The spool contains ther required list if 1. ALV report and 2. Standard report with no mail recipient data created.
Any suggestions will be appreciated.
Thanks,
JillVinod,
We eventually solved the problem as follows:
Adding the if logic since ALV worked, then for standard report call the function LIST_TO_MEMORY to write the list to memory.
If list = 'X'. "ALV report - existing code works
SUBMIT RSPOLST2 ...
else.
call function 'LIST_TO_MEMORY'
exporting
list_index = sy-lsind.
endif.
call function 'LIST_FROM_MEMORY'
tables
listobject = listobject -
Batch Job not Generating Spool No
Hi Experts,
We had a custom program where we are printing multiple invoice in a single go i.e all invoices for a particular sales office are printed in a single spool request. for foreground execution it is running fine. But after creating variant of it on selection screen & submitting the program to Batch job it is not creating spool no when the job is finished what could be the reason.?
Also i would like to tell you that we are asking user to give a invoice no range on the selection screen.
Edited by: priyeshosi on Jan 4, 2012 5:03 PMHi priyeshosi ,
If you use function modules start with GUI_* or WS_* in your report , then you can't generate the spool.
reason for this, Please check this link,
http://www.sap-img.com/ab004.htm
Regards,
Selva M -
Data is not exported by the FD : GUI_DOWNLOAD in background.
Hi all,
Data is not Exported by the program scheduled in background by the FD "GUI_DOWNLOAD"
its only exporting into the excel sheet and notepad in foreground.
Plase me out how should I follow the process.
Thanks & Regards,
RajeevYou can write data to Application server in background. For path of file on Application server see TCode AL11
e.g.
file = '/tmp'. "Path
concatenate file '/itab.txt' into file.
open dataset file for output in text mode.
if SY-SUBRC = 0.
write : / 'File opened on application server' .
else.
write : / 'Unable to open file on application server'.
endif.
loop at itab.
transfer itab to file.
endloop.
if SY-SUBRC = 0.
write : / 'Data transfer to file on application server complete.' .
else.
write : / 'Unable to transfer data to file on application server.'.
endif.
close dataset file.
if SY-SUBRC = 0.
write : / 'File closed on application server' .
else.
write : / 'Unable to close file on application server'.
endif. -
My Gallery shows a wallpaper of my pictures when i select "my gallery" I do not want this type of wallpaper or background. Is there a way to show something other than whats in your gallery?
From your homescreen, select settings, wallpaper and select any picture you want from the downloaded wallpapers or a picture from your device.
-
Hi All,
I created a new job in SM36. When I am running that job it's not producing spool.
How can I produce spool for a particular job?
Thanks,
ABAny ideas will really appreciated.....
-
Quality lot not getiing generated
Hi
If QUALITY PLAN is assigned to any material then it should appear in QA32 that is quality lot must be created.The problem is such that during starting of new period i.e. every month starting Inspection lot is not getting genrated for already asssigned Quality Plan materials.The problem gets normal after 4 -5 days after the month start.
Please suggest any solution
Regards
Pallab
+91 9960331816,PuneHi Anup,
The thing is like that we generally maintain qulaity plan to any inprocess/incomming material.Now for the entire month the in process material after productuion order confirmation will get appear in QA32 then results recording is done then UD.
Now in the starting of every mionth when new periods opens for couple of days the in process material give errors that inspection plan is not maintained.Where as these are those materials which responded Ok in the last month with inspection
plan maintained.Also after couple days of starting of the month things become normal
Regards
Pallab
+91 9960331816(Pune) -
PS CC - I have a B/W background which I flattened - Then, change to RGB and add an RGB color graphic - print out makes background a greenish color - Can't figure out how to adjust.
Thanks,
DaveIf the grayscale looks ok on screen, you are probably not setting up your print correctly. What OS? What printer?
-
My Iphone 5 voice speaker is not working.I'm not able to hear the voice of the person calling.But when I put my iphone 5 on speaker mode, things seem ok.Please provide me some suggestions.
Hello rizvijunaid,
Thank you for providing the details of the issue you are experiencing with calls on your iPhone. I recommend following the steps in the article below for the issue you described:
iPhone: Receiver and call audio quality issues
http://support.apple.com/kb/ts5196
Thank you for using Apple Support Communities.
Best,
Sheila M. -
Sbi mobile banking is not working in iphone4. i can't make video call to other than iphone4
sbi mobile banking is not working in iphone4. i can't make video call to other than iphone4
What troubleshooting steps have you tried? Have you tried resetting the iPhone? or restoring it?
-
I bought new i phone 5 3 days back, after that asked for new update which is 6.1.4, after updating my iphone i am not able to use cellular data services. I called up data provider, they says its the problem with new software update. There is no option add APN. Now when i switch to safari its showing you are not subscribed for cellular data. But I am able to use data on other phone.
Will you please help me in this regard?
Another issue, since i bought my new iphone there is dust inside back main camera.
Your advises are highly appreciated.Hey Shaiju isac,
I'd take a look at the following article, it'll guide you though steps to you troubleshoot cellular data issues on your iPhone:
iPhone: Troubleshooting a cellular data connection
http://support.apple.com/kb/ts3780
Cheers,
David -
I have a problem with my iphone 4. My 3G always stays activated but I lose my network signal. The bars all get lost and I'm not able to receive / send sms, mms or phone calls. Could you guys please help me fix this problem? Ios 5.1.1
I haven't gotten a new sim card because the problem has been presenting itself in various cards not only mine. So far, all I've done is reset my network settings.
Last night, I turned off the 3G tab and it had all the signal bars. Today, I did the network reset and it's working apparently. But like I said before, previously the bars just disappear and the iphone only has the 3G activated. -
Hi! My phone speaker is not working, so I cant hear people when they call me. I bought my iphone 4s con February 2013 in the Grand Central (NYC - USA) Apple Store. I would like to know if I can take it to an Apple Store in Spain so they can fix it or change it. Or I need to find a way to take it to the US, where I bought it.
Thanks!!!You will need to return the phone to the US. iPhone warranty is only good in the country of purchase, with the exception of the EU.
Maybe you are looking for
-
How do I view a FUNCTION within a Package Body
I can see the FUNCTION being executed within the Package... FUNCTION Stop_Refresh_AsBilled RETURN Number; And within Oracle SQL Developer and using the Connection and "Packages" part of the Schema, I see the Function Name. However, when I <Double-Cli
-
I've been hearing ads when listening to iTunes Radio on my laptop (Windows 7, iTunes 12.0.1.26). I subscribe to iTunes Match. With one of the iTunes updates, the ads came back for some reason. Is there an option that I'm missing to turn off the ads
-
I miss the export to encore /w no menu we had in CS3.
Hi all, I don't know why adobe can't just leave well enough alone... They have moved exporting to Encore into the Dynamic links menu option in Permiere CS4 and there appears to be no way to select direct to disc with no menu or be able to alter setti
-
Need a function equivalent to PERCENTILE_CONT for Oracle 8i
I have been using PERCENTILE_CONT in Oracle 9i to find median and quantiles. Now, I need to run similar queries on a different database that is only Oracle 8i. Is there an equivalent function that I can use to give Quantiles?
-
Why user-MYPOP is invalid?
I create a user named "MYPOP" when I logon OEMC with "SYS/change_on_install", and create certain table in it, but when I run"exp userid=MYPOP/123456 ..." it pop up"ORA-01017: invalid username/password". Should I add certain roles/privilege to this us