Dout in Submit statement in print program....
Hi all,
In my print program, after printing my forms i need to call another print program. For this im using SUBMIT statement.
I hope my print program goes to an update task. So when it encounters a function module or submit statement it coming out of the print program.
The same logic is working fine when i click 'PRINT PREVIEW' button in the shop papers list of IW32 Transaction. But the control comes out of the program when i go through the PRINT button in the IW32 transaction.
Im not sure whether the control is coming out cuz of any update task.
So please help on this. It's urgent.
Thanks,
karthik
SUBMIT always starts new LUW. Not sure if I understand the rest of your "doubt"... You might want to read a bit more on the LUW concept and also check the ABAP documentation on SUBMIT.
http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm
Similar Messages
-
Problem with Submit statement into print program for delivery
Hi all,
i got a problem with the SUBMIT statement that i put into a print program associated to a delivery output message.
If i print the message by VL02N or VL71, everything works.
But if i associate the output with RV56ABST, the SUBMIT instruction isn't accepted and i get the message
"Processor ABAP: POSTING_ILLEGAL_STATEMENT"
There is any solution to this situation?
Why i cannot use the SUBMIT statement in this case?Hi Simone,
you could try to do the operation in a separate task (call a function in starting new task). This will decouple your current process from the new task.
Cheers,
Stefan. -
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 -
Dout in Submit Statement....
Hi all,
In my print program, after printing my forms i need to call another print program. For this im using SUBMIT statement.
I hope my print program goes to an update task. So when it encounters a function module or submit statement its coming out of the print program.
The same logic is working fine when i click 'PRINT PREVIEW' button in the shop papers list of IW32 Transaction. But the control comes out of the program when i go through the PRINT button in the IW32 transaction.
Im not sure whether the control is coming out cuz of any update task.
So please help on this. It's urgent.
Thanks,
karthikSUBMIT always starts new LUW. Not sure if I understand the rest of your "doubt"... You might want to read a bit more on the LUW concept and also check the ABAP documentation on SUBMIT.
http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm -
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 -
Hi,
I want to use BAPI Function Module and Submit Statement in a program. How i can use this, Please help me since this is very urgent.
Regards
KrishnaHi Deepu,
try this code
REPORT report2.
DATA: text TYPE c LENGTH 10,
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 "here you can use the 2 tables.
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
hope this solves your problem..
Thanks! -
Customer Statement using SAP Script and Standard print program RFKORD10
Using sap script and standard print program RFKORD10 I need to create a customer statement where the main window will be as follows
Invoice # InvoiceDate CustomerPO Debit Amt Credit Amt Total
6 7 8 9 10 11
6 7 8 9 10 11
Totals 12 13 14
Where company code BKORM-KUKRS
Invoice BSID-BELNR
Invoice date BSID-BLDAT
Customer PO VBKD-BSTKD
For each document number selected there will be one to many records in VBRP. For each invoice item in VBRP:
u2022 Select BSTKD from VBKD where
o VBELN = VBRP-VGBEL and
o POSNR = VBRP-VGPOS
u2022 If no hits then select BSTKD from VBKD where
o VBELN = VBRP-VGBEL
If there is more than one PO per invoice then list them in the Customer PO field without repeating the other fields.PO shouldnu2019t come more than once per invoice.
Debit Amt if BSEG-SHKZG = S then WRBTR ELSE 0
Credit Amt if BSEG-SHKZG = H then WRBTR ELSE 0
Total Debit Amt u2013 Credit Amt
Totals Subtotals
It will be of great help if some one can help me with the script and the alterations required in standard print program RFKORD10
Points will b rewarded for sure.
Thanks.Hi Suganya,
The custom form is getting displayed properly. But the requirement is to have it as an editable PDF. So the functional team is working on configuring the settings of PDF forms with customers email address.
But for right now, i customized the standard form F140_ACC_STAT_01 and standard print program RFKORD10_PDF and did the configuration. It is getting displayed (I tested only with the transaction FBL5N - customer open line items..)
Please let me know any further details on this.
Poornima -
Customer statement print print program problem.
Hi All,
I am trying to trigger the customet statement from transaction F.27.
I was configure the correspondence in OB 77 and attache dteh print program RFKORD11. a nd tatche dteh form and print program in
OB96 for specific company code and excuted from f.27 and its working fine.
But my concern is, i have lot of new date to to show on form from logistics so thats why i was trying to
copy the standard program 'RFKORD11' into ZFKORD11 and assigned it to correspondesce as per the above steps.
but when i execute the F.27, But it looking the standard program 'ZFKORD11' only instead of my custom program.
My question:
1. Can we attached Z-program to execute the customer stattement from F.27?
if yes please give me the details. and it wil help me lot..
Correct ans give reward points..
Thanks,.F.27 is a standard transaction code that triggers the t-code SA39 (not available for users to run, use SA38) which runs the program RFKORK00. It is not advisable to change the standard code pointers.
You may try creating a new t-code that runs your program. -
Adding customer field to selection screen of RFKORD11 - Customer Statement Printing Program:
Hello,
We are required to add an important customer field to selection screen of customer
statement printing program: RFKORD11 for our South African branch.
Please advise us regarding this matter,
is there a proper user-exit or a repair is needed?
Kind Regards.Enhancement
text
F050S001
FIDCMT, FIDCC1,
FIDCC2: Edit user-defined IDoc segment
F050S002
FIDCC1: Change
IDoc/do not send
F050S003
FIDCC2: Change
IDoc/do not send
F050S004
FIDCMT, FIDCC1,
FIDCC2: Change outbound IDoc/do not send
F050S005
FIDCMT, FIDCC1,
FIDCC2 Inbound IDoc: Change FI document
F050S006
FI Outgoing IDoc:
Reset Clearing in FI Document
F050S007
FIDCCH Outbound:
Influence on IDoc for Document Change
F180A001
Balance Sheet
Adjustment
FARC0001
Enhancements within
archiving (FI)
FARC0002
Additional Checks for
Archiving MM Vendor Master Data
FEDI0001
Function exits for
EDI in FI
FICT0001
Exits for
inter-company transactions
RFAVIS01
Customer Exit for
Changing Payment Advice Segment Text
RFBVX001
Enhancement for bank
directory transfer (Austria)
RFEPOS00
Line item display:
Checking of selection conditions
SAPLBANK
User exit: Bank data
SAPLF040
WF: Preliminary
posting (authorized for release)
SAPLF051
Workflow for FI
(pre-capture, release for payment)
SAPLFCPD
One-time account data
or different payee in booking
SAPLSSRV
User exit: Bank
account numbers
RFKORIEX
Automatic
correspondence
please check which one is better . -
Program RFKORD10 - Print program: Account Statement -- Changing Key dates
Hi Experts,
Greetings, I need help in program <b>RFKORD10 - Print program: Account Statement.</b> I have a requirement to copy in zprogram. The main purpose is the key dates in acct statement should be based on BSEG-ZFBDT. Is there any option on how to change this in functional side. Because I read the program documentation like this
You can extend this list of selectable fields in order to meet your
requirements. To do so, you can use a repair correction to import fields
from tables BKPF and BSEG, that are not yet in table RF140W, into table
RF140WZZ. When doing so, you must take care to use the field names and
data elements from the standard tables, as the fields in table RF140WZZ
are supplied using the names from the documents.
Is there anyone know how to use this "Repair Correction"
Thanks
Please help...Hi Sridhar
thanks for the reply, I am a developer and i figure it out on how solve this problem. I wanna know if there is anyway to solve this in functional side, without copying the standard program. Like what i've said it is indicated in the documentation that it can be change. anyway thanks again.... -
Printing using SUBMIT statement
Hi
I have a problem in printing using SUBMIT.
I have three printers identified to print certain orders using submit statement.
the list of printers is given in a drop down and once the user selects a printer from the list, i have to generate a spool for the corresponding printer. But this is not happening. The spool is generated for the user's default printer defined in SU50. I have my submit statement below:
SUBMIT zppprbsel WITH aufnr EQ p_wa_batch_res_process_order
WITH werks EQ c_1201 "'1201'
WITH relvn EQ c_0 "'00000000'
WITH relbs EQ c_0 "'00000000'
WITH orig EQ ' '
WITH nach EQ c_x "'X'
TO SAP-SPOOL
*SPOOL PARAMETERS l_dest
WITHOUT SPOOL DYNPRO
WITH DESTINATION = l_dest
WITH IMMEDIATELY = SPACE
WITH KEEP_IN_SPOOL = 'X'
VIA JOB v_job_name
NUMBER v_job_cnt
AND RETURN.
here my l_dest has one of the three printers that the user selects.
when i change my default printer to one of the three printers the spool is generated fine. A spool always generated for the default printer of the user?Hi,
Before the SUBMIT get the PRINT PARAMETER by using the FM --> GET_PRINT_PARAMETERS
IMPORTING
out_parameters = print_parameters
print_parameters-pdest = 'LOCL'. " Change the Destination before passsing the PRINT_PARAMETER to SUBMIT.
Then pass the print_parameters from the FM to the SUBMIT
SUBMIT zppprbsel WITH aufnr EQ p_wa_batch_res_process_order
WITH werks EQ c_1201 "'1201'
WITH relvn EQ c_0 "'00000000'
WITH relbs EQ c_0 "'00000000'
WITH orig EQ ' '
WITH nach EQ c_x "'X'
TO SAP-SPOOL
SPOOL PARAMETERS print_parameters "Pass here
WITHOUT SPOOL DYNPRO
WITH DESTINATION = l_dest
WITH IMMEDIATELY = SPACE
WITH KEEP_IN_SPOOL = 'X'
VIA JOB v_job_name
NUMBER v_job_cnt
AND RETURN.
Regards,
Madhukar Shetty -
I reinstalled acrobat 8 on my computer but when I try to print to a pdf it states that the program isn't activated. I tried to install and reinstall it but it still doesn't work. It shows that it is activated. I tried to deactivate and reactivate but that doesn't help either. Everything else seems to work.
Hi tspcat,
What operating system are you using, and what version? You may be running into a compatibility issue between your older version of Acrobat and the OS that you're running.
Please let us know a bit more about your setup, so we can get to the bottom of this printing issue.
Thanks,
Sara -
Problem in spool generation using SUBMIT statement
Hi Experts,
I am facing a problem in getting the spool no using the SUBMIT statemet.I am exporting an internal table with some data and then importing the same in another dummy program to get the ALV list output.This dummy program is called using the SUBMIT TO SAP-SPOOL statement.
The code is as follows:
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
The trouble is the submit statement is not calling the dummy program in this case.What can be the problem here and how can it be resolved.In my dummy program I am simply using the exported table to convert into list display so as to get a spool no. for it.
My objective is to get the spool no. for this sothat I can convert this spool to PDF.
Thanks and Regards
Abhishek
Edited by: abhishek singh on Oct 27, 2009 9:26 PM
Edited by: abhishek singh on Oct 27, 2009 9:27 PM
Edited by: abhishek singh on Oct 27, 2009 9:29 PM
Edited by: Rob Burbank on Oct 27, 2009 4:41 PMHi Experts ,
I am posting the code again:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_name
IMPORTING
jobcount = lv_number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
archive_mode = gc_spool_print "For print = '1'
no_dialog = abap_true
IMPORTING
out_parameters = lv_print_parameters
valid = lv_valid_flag
EXPORT fui_fin_split TO MEMORY ID 'CUSTOMER'.
SUBMIT zvrr9333_dummy TO SAP-SPOOL
SPOOL PARAMETERS lv_print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB lv_name NUMBER lv_number
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_number
jobname = lv_name
strtimmed = abap_true "Immediate Start
MESSAGE 'Spool not created'(e15) TYPE gc_success.
ENDIF.
SELECT jobname
jobcount
stepcount
listident
FROM tbtcp
INTO TABLE gi_spool
WHERE jobname EQ fuv_name
AND jobcount EQ fuv_number.
IF sy-subrc EQ 0.
READ TABLE gi_spool INTO lw_spool INDEX 1.
fcv_spoolno = lw_spool-listident.
ENDIF.
SELECT jobname
jobcount
stepcount
listident
FROM tbtcp
INTO TABLE gi_spool
WHERE jobname EQ fuv_name
AND jobcount EQ fuv_number.
IF sy-subrc EQ 0.
READ TABLE gi_spool INTO lw_spool INDEX 1.
fcv_spoolno = lw_spool-listident.
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 . -
Calling another program in the print program through FORM ENTRY
Hi All,
Have a requirement that I need to submit the program with variant to a print program.
But it is giving dump "Statement "SUBMIT" is not allowed in this form" while executing through VF04.
I have tried by using CALL FUNCTION "func" in update task .Inside the "func" in I have coded the logic of
submit program using selection-set VARIANT.
Even then while executing through VF04 got the dump "DYNPRO_SEND_IN_BACKGROUND" and "POSTING_ILLEGAL_STATEMENT ".
Kindly advise to resolve the issue.Hi,
PLease make sure that u r using both smartforms and report..
Once the function called the report program, whether control back to the print program..
Using debugger please check..
put a break-point in your program and find where that dump is arised..
whether u want report only or smartform only...
If the same problem arises again,
Paste your report program code inside the print program instead of using SUBMIT..
let me know what the issue u r facing
regards
vijay
Maybe you are looking for
-
I use an external hard drive to store all of my iTunes data. Recently, I was getting worried that it may crash, so I bought a new hard drive. While making the switch, I decided it was time to clean everything up and start fresh. So.... What I've be
-
Late 2013 MacBook Pro Yosemite Video Flicker
I have three of the same computer and have only noticed this problem on one of them, the screen seems to flicker black during normal operations. I am not moving the unit at all, the screen lid is staying open, so I do not think it is the video cable
-
I have myriad issues with syncing my iPad, iPhone, a subscribed calendar and two Macs; I get duplications galore, and I CANNOT get my iPhone and #1 Mac to sync, period. The "Replace information on this iPhone" option also fails to get me to a common
-
My iPhone 4 randomly shut down and won't turn back on.
My iPhone randomly shut down whenever I got a phone call twice in maybe 5 minutes. Now it wont turn on no matter how many times I plug it in or use the home and lock button. Is there anything I can do? After the first time it just turned back on but
-
Adobe won't open a file that Adobe reader will....
I have a file created by a third party (scanned) that opens fine in Acrobat Reader but doesn't open in Acrobat 10.0.3. This is on Windows 7. The PDF cproducre is Pixel Translations (PIXPDF Ver.7.5.48) and the version is 1.1 (Acrobat 2.x). There are a