Submit program RHGRENZ0
Hi All,
I am getting a Run time error in case of data issue while using Submit Program RHGRENZ0(to delimit the objects ) in production server.
I would like to use TRY/ENDTRY and use catch cx_root exception.
Will that Catch the Data issue in future.
I could not reproduce similar scenario in development.
Can Anyone suggest me.
Thank you
Edited by: Kumar B on Oct 20, 2009 7:44 PM
Hi ,
I am still getting Run time error even if I use TRY/ENDTRY block.
Now I could create the error scenario.
Actually I use Submit Program RHGRENZ0 in my custom program to delimit the positions.
Now i have a position say '10000000'
10/09/2009 12/31/9999 A 008 Holder P 00032411 ???
10/07/2009 10/15/2009 A 008 Holder P 00053245 TEST EMP
It has 2 holders .But the Employee 32411 No more exist.
In that case I get the Error message
"10/21/2009 20:12:11 Personnel number 00032411 does not exist 5A 054 E"
Thus the Job fails.
I just want to continue the job with other records instead of job failing for sake of one record.
Is there any chance that Submit Program errors can be diverted rather than giving the Error out.
Note : Here I am giving you a scenario.In actual this case might not occur,As we are checking of any A008 relation exists beyond delimtation date and eliminating such scenario.So My actual need is to avoid run time error in case of this kind of scenarios
Edited by: Kumar B on Oct 21, 2009 2:30 PM
Similar Messages
-
SUBMIT program VIA JOB and SET/GET parameter
Hi All
I need to pass the content of a variable from the program 'A' to program 'B'.
Program A uses JOB_OPEN , SUBMIT program VIA JOB jobname NUMBER jobnumber AND return, JOB_CLOSE.
I tried to use import/export memory but it didn't work. Then I am trying to use set/get parameters but it also did not work.
Program A is going to run in any server and program B will run in the central instance (it is determined in the FM JOB_CLOSE, parameter target_server).
Program does not have selection-screen.
Is it possible use set/get parameter with submit via job?
Could you please advise?
Thanks in advance.
João GaiaHere a simple code
*Submit report as job(i.e. in background)
data: jobname like tbtcjob-jobname value
'TRANSFER DATA'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1 value 'X'.
* 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
SUBMIT zreport and return
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"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.
"error processing
endif.
Then... for import/export of a variable, you can use Import Memory and Export Memory function.
Like this:
REPORT A:
IF NOT it_dlist_out IS INITIAL.
EXPORT it_dlist_out TO MEMORY ID 'TEST1234'.
ELSE.
* Clearing memory
FREE MEMORY ID 'TEST1234'.
ENDIF.
REPORT B:
IMPORT it_dlist_out TO lt_dlist_out FROM MEMORY ID 'TEST1234'.
Edited by: spantaleoni on Jan 11, 2011 3:21 PM
Edited by: spantaleoni on Jan 11, 2011 3:23 PM -
Using SUBMIT program command in Background
Hi,
I am submitting the program in Background using Submit<program> command.
Job is getting released but not fininishing(not executing the program) in ECC6.0.
Same program is working in fine in 4.5b.
Please let me know if any one faces this situation. Its very urgent.
Expecting the reply from you soon..
Thanks
Regards,
Raj AHi,
perhaps you or your admin have configured to less batch-workprocess or they are all configured only for A-class jobs.
Try to start the job as A-Class job. If the program is executed, then ask your administrator to configure more batch workprocess that are not reserved for A-class jobs.
Regards,
Stefan -
Hi all,
The following is the issue in submit program:
I am calling two programs /PBS/RIQMEL20 ( /pbs/iw59 ) and /PBS/RIAUFK20 ( /pbs/iw39 ) using submit programs in my z program.
I have created a layout /ZDEL56 for both programs. If I run submit program for /PBS/RIAUFK20 ( /pbs/iw39 ) I am getting the o/p in desired format ( As specified in the layout ).
How ever for program /PBS/RIQMEL20 ( /pbs/iw59 ) submit program is giving an error saying that layout is not found.
There is no difference b/w these two programs except that submitting program name is different.
The txn /pbs/iw59 when executed in background is giving the desired result. But when I try using submit program it is failing.
Can you please tell what mite be the problem?
Following is the sample piece of code.
submit /PBS/RIQMEL20
with pbs_apar EQ '1'
WITH VARIANT EQ '/ZDEL56'
Pointers will be highly appreciated.
Thanks,
Shiva.Hi,
In this case you need to use another internal table which is of type S_VBELN . Ex : it_vbeln.
In that you have to append the record
wa_vbeln-sign = 'I'
wa_vbeln-option = 'EQ'
wa_vbeln-low = w_inv.
append wa_vbeln to it_vbeln.
now use this
submit B VIA SELECTION-SCREEN
with P_DAYS = '4'
with P_KALSM = 'ZATCIN'
with S_VBELN = it_vbeln.
Now the new record will be appended with the values which are passing,. SO u wil have two rows in the S_VBELN.
Regards,
Venkatesh. -
Submit program B and return to program A selection screen
Dear all,
I have program A with selection screen and this program display listing.
In program A, when user choose the option to display another report listing in selection screen, then in program A, will have submit program B with ... and return
May I know how can make the program B after showing the listing go back to program A selection screen and not continue to display program A report listing?
Thanks
RgdsLike this
REPORT z_a.
PARAMETERS: pa_a(10) TYPE c,
pa_callb AS CHECKBOX.
IF pa_callb = 'X'.
SUBMIT z_b WITH pa_b = pa_a
AND RETURN.
EXIT.
ENDIF.
WRITE: / 'Here is program A, the parameter value is: ',pa_a .
REPORT Z_B.
PARAMETERS pa_b(10) type c.
write: / 'Here is program B, the parameter value passed from A is: ',pa_b .
Regards
Marcin -
I m having 2 programs separately.
in the first program i m calling the second program via submit .
If i use submit program & return means the control comes back to first program form second one .
But wat i need is i want to get values from the second program to first program through Internal table
Is this possible..
If yes maens can any one help me to solve this.
Thanks in advance.
Kalpanashri RajendranHi Kalpanashri,
You can use EXPORT and IMPORT statement.
Please check this sample code.
Program A :
SELECT-OPTIONS: S_BELNR FOR BKPF-BELNR.
EXPORT S_BELNR TO MEMORY ID 'ZXC9'.
Program B :
DATA: BEGIN OF S_BELNR OCCURS 10.
INCLUDE STRUCTURE STRUC1.
DATA: LOW LIKE BKPF-BELNR,
HIGH LIKE BKPF-BELNR.
DATA: END OF S_BELNR.
IMPORT S_BELNR FROM MEMORY ID 'ZXC9'.
For EXPORT: http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/export01.htm
For IMPORT: http://www.geocities.com/siliconvalley/campus/6345/import01.htm
Hope this will help.
Regards,
Ferry Lianto -
How to get variant of SUBMIT program to the main program.
Hi!
In my ZFRFI00R_PRINT_DOCUMENTS program i am using
SUBMIT zfrfi01r_alv_fi_document
using SELECTION-SET sp_vari
with p_comp = gw_bkpf_key-bukrs
with p_year = gw_bkpf_key-gjahr
with p_doc = gw_bkpf_key-belnr
and return.
So in the main program i created one layout field to get the what are all the layouts in the SUBMIT program.
I am using FMs 'REUSE_ALV_VARIANT_DEFAULT_GET' , 'REUSE_ALV_VARIANT_F4' to get default layout from the SUBMIT program.
It is not showing the layouts which are in the SUBMIT program when i press F4 in the layouy input field in the selection screen of the main program.
Can anyone help in this regard?
Thank you in advance for ur help.
Regards,
RajHi,
IN the disvariant parameter are you populating the correct program name..meaning the submitted program name..
Thanks,
Naren -
Problem with the selection screen in submit program
Hi Friends,
i am facing the problem wih the selection screen in submit program. in my Module pool program i am using the submit program statement, When i execute the program , The module program display the submit program selections creen.
I have implemented the code same as below.
submit ztest with tknum =p_tknum and return.
Can you pleaes help me how to avoid the submit program selection screen.
Thanks,
CharanHi Charan,
You have to give the selection screen values when you submit a job.
Press F1 on submit and you will see more details.
Here is an example from ABAP Documentation.
Program accessed
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.
Calling program
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.
Regards,
Jovito. -
How to use Submit program of RAIMCOPY for a specific TCode - IM34
Hi Experts,
I have to use submit program RAIMCOPY. but the program intend used in differnt Tcodes (IM27,IM27_Close,IM27_REPEAT,IM34,IM44,IM54,IM64).
I used the following code but it is some other selection instead of IM34.
SUBMIT RAIMCOPY VIA SELECTION-SCREEN with PA_PRNAM = gv_improg
WITH PA_GJAHR = gv_appyear
with SO_VERSN-LOW = 'G00'
with P_XVOVR = 'X'
and RETURN.
Please help me to write a submit program RAIMCOPY for only IM34.
Regards,
Thulasiram.Yes at start of report (events LOAD-OF-PROGRAM and INITIALIZATION) the variant / parameters are not yet transfered to program, they are only passed just before the AT SELECTION-SCREEN OUTPUT, so that could have been nice ... before OSS note 927693 - Report variants used incorrectly in program RAIMCOPY which triggers now an error if sy-tcode <> pa_tcode in interactive mode ...
So either you look for an implicit enhancement option to force again pa_tcode to required value (e.g. stored in memory) and disable effect of the OSS note (*) /or/ you replace the SUBMIT statement with a CALL TRANSACTION with a small BDC data.
Regards,
Raymond
(*) SAP did that for transaction IMCAOV, 1023920 - IMCAOV: Unberechtigter Abbruch 00368 -
Command 'SUBMIT program ' program is hardcoded
Hi All,
Any idea if we can use ABAP command (SUBMIT <program> with Variant) <program> as variable instead of hardcoding program name?
I tried But I found only in command 'SUBMIT program ' program is hardcoded i.e. can not be variable.
Can any one please guide if we can use program name as variable in SUBMIT ABAP statement?
submit ZTEST2 and return
using selection-set 'TESTV'
user SY-UNAME
via job JOBNAME
number JOBCOUNT.
regardsHello,
Please use
submit (lh_prog) and return
using selection-set 'TESTV'
user SY-UNAME
via job JOBNAME
number JOBCOUNT.
where lh_prog is a variable type chracter... -
Call Transaction / Submit Program
Hello All,
I have two ABAP reports : Report A & Report B.
Report A has selection screen similar to Report B, where report A needs to send data to selection screen of Report B.
Report B should be processed displaying its list display & should return its control back to Report B.
This can be easily achieved by using SUBMIT program(Report B) with values from Report A.
But my report B is made to run only via a TCode(ZEXECUTE) & hence when i submit program it is not executed
as sy-tcode value in such case comes as SE38 .
Further , Call Transaction (ZEXECUTE) using bdc_tab helps in passing the TCode & respective selection screen values
correctly to Report B , but i am not able to see the outputs of the same.
Please Note : I am not authorized to do any changes in Report B , so whatever i can try is from Report A itself.
Kindly Help,
SudeepHI Suhas ,
Firstly thanks for replying.
1) Do you mean there is a hardcoding in Report B to check the t-code?
Yes.
2) What is the display mode you're using when doing via CALL TRANSACTION?
Currently i am passing it as "A" , but still not able to get any output.
Report A provides report B all the required values along with 'BDC_OKCODE' '=ONLI'
for executing the same. The report gets processed , but i am not able to see any list display.
Thanks,
Sudeep -
How can i know if submir program is finished
Hello experts,
I have a program that use SAP program in submit mode:
SUBMIT RSBDC_PROTOCOL
WITH SESSION = 'MB_MI01' " Session name
WITH FROM_DAT = SY-DATUM
WITH TO_DAT = SY-DATUM
WITH USER = SY-UNAME
WITH QUEUE_ID = ' '
WITH COUNTOLG = 0
AND RETURN.
the problem is that i need to create log for the batch inputs that created by this submit program, but i dont know when it's done.
so now i got partial log.
Regards,
Ronen Ravansari.Hello David,
first of all thank you for your quick response.
I thoght about the parallel run.
lets say that i'll wrap the command
SUBMIT RSBDC_PROTOCOL
via selection-screen
WITH SESSION = 'MB_MI01' " Session name
WITH FROM_DAT = SY-DATUM
WITH TO_DAT = SY-DATUM
WITH USER = SY-UNAME
WITH QUEUE_ID = ' '
WITH COUNTOLG = 0
AND RETURN.
with RFC function.
I wonder if the submit program will return to the function before it's done?
if it is, so ther is no gain here.
Regards,
Ronen. -
Submit program for function pool
Dear Experts,
i am using submit program for a standard report
submit SAPLRHPA_REPORTING
with APPSELECT_HISTO eq 'X'
and return.
it's going to dump how to use function pool programs in submit statements.
You attempted to start the ABAP/4 program "SAPLRHPA_REPORTING" with SUBMIT, but
attributes specify this program as type "F" instead of "1". You can
only start programs of type 1 with SUBMIT.
Thanks and Regards,
Thirukumaran. RHi
As per my knoweldge i think you cant submit the fuction pool using by submit.
Alternate way is call the function module which is within the function pool .
Or if you want to execute a particular routine within a function pool you can use as below
PERFORM Routine_name(saplrhpa_reporting)
USING parameters.
Hope this answer helps you
Cheers.
J. -
Dear Experts,
In the below code i'm getting all the pernr values from pb4000 table based on the selection criteria and using submit program rpapl005 i'm passing values to the pernr manually but i need to pass the values from internal tables automatically how to solve my issue is there any other way to solve this problem.
Thanks in Advance.
Thanks and Regards,
Thiru. R
*& Report ZREPORT_N
REPORT ZREPORT_N.
*& Report ZREPORT
tables : pb4000.
select-options s_date for pb4000-begda.
data : begin of wa,
pernr type pb4000-pernr,
begda type pb4000-begda,
apsta type pb4000-apsta,
end of wa,
it like table of wa.
select pernr
from pb4000 into table it where
begda in s_date AND APSTA eq '7'.
LOOP AT IT INTO WA.
WRITE : / WA-PERNR.
ENDLOOP.
SUBMIT RPAPL005
WITH PAPAPLNO-LOW EQ 40
WITH PAPAPLNO-LOW EQ 109
WITH PAPAPLNO-LOW EQ 408
WITH PAPAPLNO-LOW EQ 413
WITH PAPAPLNO-LOW EQ 1
WITH PAPAPSTA-LOW EQ 7
AND RETURN.
instead of passing values for PAPAPLNO-LOW manully i want to pass the values from internal table it.
Can any try to solve my issue.Hi,
Use this:
data: rsparams_tab type table of rsparams.
rsparams_wa type rsparams.
Loop at it.
rsparams_wa-selname = 'PAPAPLNO'.
rsparams_wa-kind = 'S'.
rsparams_wa-sign = 'I'.
rsparams_wa-option = 'EQ'.
rsparams_wa-low = "I don't know which field from table IT you want to pass, so pick one you want
append rsparams_wa to rsparams_tab.
endloop.
SUBMIT RPAPL005 WITH SELECTION-TABLE rsparams_tab AND RETURN.
Hope it will help you
Marcin -
How To Skip Report of Submit Program
Hello All,
I am submitting a Report program from a Program and should return to the calling program after processing.
I have used SUBMIT program WITH Parameters
AND RETURN .
with this syntax, report of the submit program is displayed first, followed by the report of main program. I do not want the list of submit program to be displayed. How can I skip the same? Please advice.
Thanks in advance,
Pallavi.Hi Pallavi,
Use SUBMIT Program EXPORTING LIST TO MEMORY
AND RETURN.
To use this data of the submitted report follow below process.
Than once you return to ur main program CALL FUNCTION 'LIST_FROM_MEMORY'
than to conver this list to text format CALL FUNCTION 'LIST_TO_ASCI'
Finally dont forget to use CALL FUNCTION 'LIST_FREE_MEMORY'.
Regards,
Ganesh.
Edited by: Ganesh Lathi on Oct 4, 2011 1:45 PM
Maybe you are looking for
-
IPad won't play or delete some songs
I need some help. I have an iPad 4 running iOS 6.1. I had some music on it which I had downloaded from the iTunes music store (iCloud). Everything was fine until today. I had just downloaded a song from iTunes (iCloud) and I noticed the music app
-
Item in transfer process ( Really Urgent)
Hi All, I am working on extended classic scenario and the problem is that after the Shopping cart is approved,the line item has the status "Item in transfer Process". When I check the SC in t-code BBP_PD,I get the status as: 000000001 I1111 Item in T
-
Load Balancing, Tomcat, and SharePoint
I'm a new BusinessObjects customer and am working on getting all of the hardware in place for a new install. The initial plan is to have two BOE servers, and two tomcat virtual servers, with a hardware based load balancer (F5 BIG-IP Switch: Local Tr
-
Community inquiry solicitation: Code improvement suggestions
AS the title of this thread implies, I am interested in improving the way I program. While continuing to work on a project, I found myself reaching back to old entry-level tricks learned early on to posit a solution to a problem. however, I am intere
-
How do I make the finder "Run"? I upgraded from 10.2 to 10.3.4 using full install discs. The Finder bar appeared but kept blinking on and off, and the finder wasn't available by the curser...I launched Safari and software updated to 10.3.9 (takes qui