Spool not getting created in batch job
Hello experts,
We have a requirement of printing BA00, BA01 and LD00 from different application.
We have done same code for all BA00, BA01, and LD00.
Normally the code is working fine except in few cases, when batch job is created but spool is not created.
DATA: job_name TYPE tbtcjob-jobname,
number TYPE tbtcjob-jobcount,
print_parameters TYPE pri_params,
wv_pripar TYPE pri_params,
wv_arcpar TYPE arc_params,
wv_val TYPE c VALUE 'X',
wv_false TYPE c VALUE 'X',
gv_mandt TYPE tsp01-rqclient,
gv_user TYPE tsp01-rqowner.
CLEAR: gv_mandt, gv_user, number.
gv_mandt = sy-mandt.
gv_user = sy-uname.
job_name = 'DELIVERY_PRINTING'.
CLEAR: range1.
range1-sign = 'I'.
range1-option = 'EQ'.
range1-low = 'LD00'.
CLEAR: range1-high.
APPEND range1 TO range.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = job_name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT sd70av2a WITH rg_kschl IN range
WITH rg_vbeln IN deli_tab
TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB job_name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = job_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.
WAIT UP TO 10 SECONDS.
** to give the data to the printer***
* CLEAR gv_rqident.
SELECT SINGLE listident INTO gv_listident FROM tbtcp
WHERE jobname = job_name
AND jobcount = number.
IF sy-subrc = 0.
MOVE gv_listident to gv_rqident.
CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
EXPORTING
spool_request_id = gv_rqident.
ENDIF.
The same code is for all the output BA00, BA01 and LD00.
The issue is that for few batch jobs (which is created in the above code) , spool is not getting created.
Thanks and Regards,
Paritosh Pandey
Hi,
The code starting from WAIT UP TO 10 SECONDS. - not only does it look attrocious, is error prone (if no free process for executing batch job is available for 10 seconds, or if the job runs for more than 10 seconds, what will happen...?), but seems utterly unnecessary... Is there any reason immediate spool output can not be handled by simply setting PRINT_PARAMETERS-PRIMM = 'X'?
cheers,
Janis
Edit in:
Ok, i just read Document in spool but not printed... Do not use an output device relying on frontend access methods to do printing from background processing. Frontend is not available during background processing, period. To my knowledge there is no easy, clean solution to this problem other than defining and assigning, per user, output devices not relying on frontend printing. What if the dialog user has logged off by the time batch job finishes..? May the spool remain unprinted?
Has the SAP Basis refused to define output devices (I have hard time believing this...)? Well, tell them one time to stop being silly and if they do not cooperate, tell the owner of the requirement that it can not be implemented due to uncooperative Basis then... and that the users will have to keep going to SP01 and manualy start the output!
Message was edited by: Jānis B
Similar Messages
-
Duplicate deliveries getting created by batch job against STO
Hi Experts,
I am facing one issue where duplicate deliveries are getting created by batch job against Intercopmany STO.
Scenario is PO having one line item with ordered qty of 8000kg.
Through batch job, two deliveries got created on same day for PO line item.
One delivery got created for 8000kg and another delivery has got created for 7000Kg. So user has deleted second delivery of 7000kg.
Next day again the delivery got created for 8000kg for the same PO line item through batch job.
I am wondering how the duplicate deliveries are getting created by batch job for PO even though it has no open items.
All deliveries got created through batch job only as cross checked the user name in delivery.
Kindly help to fix the issue.Hi Amit
I assume you are talking about outbound deliveries. In this case it would be worth checking the customer master record for the receiving plant. In the sales area data there is a shipping tab which contains several settings used to control delivery creation for customers.
It is possible to control how the system behaves when you have a stock shortage and restrict the number of partial deliveries. This might help you control this situation and might be the cause.
Regards
Robyn -
Spool list is not getting created for background job
I am creating background job using JOB_OPEN and then submitting my z-report using submit statement and then closing job using JOB_CLOSE. for this job is getting creating in sm37 and also gets finished but it does not create spool list showing output.
Any idea how to do this?
Thanks in advance.DATA: lv_jobname TYPE tbtcjob-jobname,
lv_jobcount TYPE tbtcjob-jobcount,
lv_variant TYPE variant,
wa_var_desc TYPE varid,
wa_var_text TYPE varit,
it_var_text TYPE TABLE OF varit,
it_var_contents TYPE TABLE OF rsparams.
REFRESH: it_var_contents, it_var_text.
CLEAR: wa_var_desc, wa_var_text.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-cprog
TABLES
selection_table = it_var_contents
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CONCATENATE sy-datum sy-timlo INTO lv_variant.
wa_var_desc-mandt = sy-mandt.
wa_var_desc-report = sy-cprog.
wa_var_desc-variant = lv_variant.
wa_var_desc-transport = 'F'.
wa_var_desc-environmnt = 'B'.
wa_var_desc-version = '1'.
wa_var_desc-protected = 'X'.
wa_var_text-mandt = sy-mandt.
wa_var_text-langu = sy-langu.
wa_var_text-report = sy-cprog.
wa_var_text-variant = lv_variant.
lv_jobname = lv_variant.
CONCATENATE 'Batch Job Variant -'(006)
sy-uname INTO wa_var_text-vtext.
APPEND wa_var_text TO it_var_text.
Create the varaint for the back ground job.
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report = sy-cprog
curr_variant = lv_variant
vari_desc = wa_var_desc
TABLES
vari_contents = it_var_contents
vari_text = it_var_text
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_exists = 7
variant_locked = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Open the job.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_jobname
IMPORTING
jobcount = lv_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
submitt the job in background mode.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobcount = lv_jobcount
jobname = lv_jobname
report = sy-repid
variant = lv_variant
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
close the job.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_jobcount
jobname = lv_jobname
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
invalid_target = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Hope this will be helpful.. -
Spool not getting created , have a look into my code plz
Dear all
Plz help me in tracking the error
"Spool req 0 doesnt exist"
SELECT SINGLE * FROM ZPLH WHERE VBELN = SSORD
AND POSNR = ITNO.
IF SY-SUBRC EQ 0.
DATA : v_jobcount LIKE tbtcjob-jobcount,
ZTEST LIKE TBTCJOB-JOBNAME.
*-- run in the background
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = 'ZTEST'
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
*-- submit the program in the background
SUBMIT ZPP_REP_ENCLOSURE_PACKLIST3
WITH JOBNO = SSORD
WITH LINENO = ITNO
USER sy-uname
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
DESTINATION 'LOHP'
IMMEDIATELY 'X'
KEEP IN SPOOL 'X'
VIA JOB 'ZTEST' NUMBER v_jobcount AND RETURN.
IF SY-SUBRC = 0.
* Job scheduled successfully
ENDIF.
IF SY-SUBRC = 4.
*Job scheduling terminated by user
ENDIF.
IF SY-SUBRC = 8.
*Error in job scheduling (JOB_SUBMIT)
ENDIF.
IF SY-SUBRC = 12.
*Error in internal number assignment .
ENDIF.
*-- close the job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = v_jobcount
jobname = ZTEST
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.
MESSAGE ID sy-msgid TYPE 'W' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID =
EVENTPARM =
EXTERNAL_PROGRAM_ACTIVE =
JOBCOUNT = v_jobcount
JOBNAME = ZTEST
STEPCOUNT =
EXCEPTIONS
NO_RUNTIME_INFO = 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.
clear tbtcp.
select single listident from tbtcp
into tbtcp-listident
where jobname = ZTEST
and jobcount = v_jobcount
and stepcount = step.
IF SY-SUBRC EQ 0.
move tbtcp-listident to spool_id.
ENDIF.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = SPOOL_ID
NO_DIALOG = ''
DST_DEVICE = 'LOHP' "E_DEVTYPE
PDF_DESTINATION = 'LOHP'
IMPORTING
PDF_BYTECOUNT = BTC
PDF_SPOOLID =
LIST_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
PDF = T_SPOOL_2_PDF
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
TEXT02 = ITNO.
MESSAGE I014(ZQOTBANK) WITH TEXT02.
ENDIF.Hi Moni,
If I look at your program flow, it is as follows:
1. Open Job.
2. Submit Z program via job and create spool.
3. Close job.
4. Get job runtime info.
5. select from tbtcp for spool id.
6. call function to convert the spool to PDF.
I see some problems in your code. First at step 4. Get job runtime does not return you the status of the job that you just submitted. You need to use the function module BP_JOB_STATUS_GET to the status of your job. Only if it is 'F', you can go to step 5.
Other problem is in step 5 where even if you don't get a spool id, you are proceeding with the step 6. I think you are not getting a spool id and that is the reason why you are getting that error message with spool id as 0.
Change your flow as follows.
1. Open Job.
2. Submit Z program via job and create spool.
3. Close job.
4. DO.
call function BP_JOB_STATUS_GET.
IF job status = 'F'.
*-- job has finished
EXIT.
ENDIF.
ENDDO.
5. select from tbtcp for spool id.
6. call function to convert the spool to PDF.
Also, make note of Anand's comment about the variable ZTEST and the job name 'ZTEST'.
Hope this helps.
Srinivas -
Routine not getting called during Batch job posting of Shipment costs
Hi,
We have a routine created and attached to the condition type in the condition base type of shipment cost procedure.When the shipment cost is created by running a batch job (VI06) , the value posted is the initial value determined withourt routine.
The routine is getting activated only when we go in u201CCondition tabu201D in shipment cost.
Because of this, correct values are getting calculated only when we click on u201Ccondition tabu201D,& getting wrong value in initial screen, which is not possible in batch job.
Need your views / suggestions to fix this issue.We need to use batch job and enable rouitne before batch job posts the cost to the Service PO.
Thanks in advance.
Regards,
Ameya K.Modified the routine program
-
Help needed in creating a batch job for delivery
Hi gurus
Can somebody tell me the process of creating a batch job ..for creation of delivery.. is this the same process to create the batch jobs for invoices also?
thankyou
bjhello jaya ,gsl
thankyou very much for ur help .. I have tried creating a variant .. in vl10batch.. and ive assigned it a scheduled time .. i craeted a open order.. and when the scheduled time has arrived and is over,i went to the order and still i dont see any delivery doc created .. and in sm37 its shows that the job is finished ..i even tried sm36 .. of creating a job for the variant.that ive craeted in vl10batch .and then assigning the job in sm37.. i can see the job that ive created in sm37 it is changing its status from released to finished .. as per the scheduled time but the delivery is not created .. i tried vf06 for a billing variant.. and went to sm36 craeted a job for the variant..using the program name.. and next to sm37 i can see the created job in the spool also..but somehow it is not creating the billing doc also..
can u help me to find where it actually went wrong with me ?
thanksalot in advance.. -
How to create a batch job through coding
Hi Experts,
How to create a batch job through coding?
Regards
SarojHi, below is the code.
***Create Variant for the job
***Get the dynamic variant name
DATA: variant_name TYPE varid-variant value 'test'.
DATA: vari_desc LIKE varid,
vari_contents LIKE rsparams OCCURS 0 WITH HEADER LINE,
vari_text LIKE varit OCCURS 0 WITH HEADER LINE.
CLEAR: vari_desc,vari_contents,vari_text.
REFRESH: vari_contents[], vari_text[].
vari_desc-mandt = sy-mandt.
vari_desc-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
vari_desc-variant = variant_name.
vari_desc-transport = 'F'.
vari_desc-environmnt = 'A'.
vari_desc-version = 1.
vari_desc-mlangu = sy-langu.
***Varint Text
vari_text-mandt = sy-mandt.
vari_text-langu = sy-langu.
vari_text-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
vari_text-variant = variant_name.
CONCATENATE 'job' 'Background' INTO vari_text-vtext SEPARATED BY space.
APPEND vari_text.
***Partner
IF ( p_partner-low IS NOT INITIAL ).
vari_contents-selname = 'PARTNER'.
vari_contents-kind = 'S'.
vari_contents-sign = 'I'.
IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS INITIAL ) ).
vari_contents-option = 'EQ'.
vari_contents-low = p_partner-low.
ENDIF.
IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS NOT INITIAL ) ).
vari_contents-option = 'BT'.
vari_contents-low = p_partner-low.
vari_contents-high = p_partner-high.
ENDIF.
APPEND vari_contents.
ENDIF.
***Contract Account
IF ( p_cont_acct-low IS NOT INITIAL ).
vari_contents-selname = 'CA_ACC'.
vari_contents-kind = 'S'.
vari_contents-sign = 'I'.
IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS INITIAL ) ).
vari_contents-option = 'EQ'.
vari_contents-low = p_cont_acct-low.
ENDIF.
IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS NOT INITIAL ) ).
vari_contents-option = 'BT'.
vari_contents-low = p_cont_acct-low.
vari_contents-high = p_cont_acct-high.
ENDIF.
APPEND vari_contents.
ENDIF.
***Contract Object
IF ( p_cont_obj-low IS NOT INITIAL ).
vari_contents-selname = 'CO_OBJ'.
vari_contents-kind = 'S'.
vari_contents-sign = 'I'.
IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS INITIAL ) ).
vari_contents-option = 'EQ'.
vari_contents-low = p_cont_obj-low.
ENDIF.
IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS NOT INITIAL ) ).
vari_contents-option = 'BT'.
vari_contents-low = p_cont_obj-low.
vari_contents-high = p_cont_obj-high.
ENDIF.
APPEND vari_contents.
ENDIF.
***Account Category
IF ( p_ctra_acc_category IS NOT INITIAL ).
vari_contents-selname = 'P_CAT'.
vari_contents-kind = 'P'.
vari_contents-low = p_ctra_acc_category.
APPEND vari_contents.
ENDIF.
***filed_freq_to_change_from
IF ( p_filed_freq_to_change_from IS NOT INITIAL ).
vari_contents-selname = 'P_TO_CH'.
vari_contents-kind = 'P'.
vari_contents-low = p_filed_freq_to_change_from.
APPEND vari_contents.
ENDIF.
***req_filed_freq_change
IF ( p_req_filed_freq_change IS NOT INITIAL ).
vari_contents-selname = 'P_CHANGE'.
vari_contents-kind = 'P'.
vari_contents-low = p_req_filed_freq_change.
APPEND vari_contents.
ENDIF.
***Test Run p_tstrun
vari_contents-selname = 'P_TSTRUN'.
vari_contents-kind = 'P'.
vari_contents-low = p_test_run.
APPEND vari_contents.
***Update Filing Frequency Checkbox
vari_contents-selname = 'P_FIL_FR'.
vari_contents-kind = 'P'.
vari_contents-low = p_update_filing_frequency.
APPEND vari_contents.
***Update Incoming Payment Channel Checkbox
vari_contents-selname = 'P_PAY_CH'.
vari_contents-kind = 'P'.
vari_contents-low = p_update_payment_channel.
APPEND vari_contents.
***Update Filing Channel Checkbox
vari_contents-selname = 'P_FIL_CH'.
vari_contents-kind = 'P'.
vari_contents-low = p_update_filing_channel.
APPEND vari_contents.
***Use Current Filing Period Checkbox
vari_contents-selname = 'P_CU_PER'.
vari_contents-kind = 'P'.
vari_contents-low = use_curr_per.
APPEND vari_contents.
****Create Variant thru Function Module
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
curr_variant = variant_name
vari_desc = vari_desc
TABLES
vari_contents = vari_contents
vari_text = vari_text.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
****Prepare all the date for scheduling job
***Get the print parameters
DATA: params LIKE pri_params.
CLEAR params.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
mode = 'CURRENT'
no_dialog = 'X'
IMPORTING
out_parameters = params.
params-paart = 'X_65_255'."'X_PAPER'.
***Open The scheduling job
DATA: job LIKE tbtcjob-jobname,
jobcount LIKE tbtcjob-jobcount.
CLEAR: job,jobcount.
job = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = job
IMPORTING
jobcount = jobcount
EXCEPTIONS
OTHERS = 4.
***Job Submit
DATA: authcknam LIKE tbtcjob-authcknam.
CLEAR: authcknam.
authcknam = sy-uname.
params-primm = space.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = authcknam
jobcount = jobcount
jobname = job
priparams = params
report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
variant = variant_name.
***JOB_CLOSE
DATA: sdlstrttm TYPE tbtcjob-sdlstrttm,
released LIKE btch0000-char1.
sdlstrttm = p_job_start_time + 30.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
sdlstrtdt = p_job_start_date
sdlstrttm = sdlstrttm
jobcount = jobcount
jobname = job
IMPORTING
job_was_released = released.
Regs
Manas -
How to create a batch-job dynamically?
Hello,
I would like to create a batch-job from within my abap code.
Therefore I want to determine a abap-report to be executed every X-Hours.
Do you have some sample code for creating a batch job?
I need to do it in abap because I want to create a TN to trigger the code creating the job.
So the user interaction will be minimal to start a periodic batch job.
thanks.Hi Daniel,
select options could be stored by export/import to/from database:
DESCRIBE TABLE t_vkpos LINES n.
READ TABLE t_vkpos INDEX n.
lastmaxvbeln = t_vkpos-vbeln.
PERFORM get_varimemkey USING p_vari CHANGING vkposmemkey.
EXPORT lastmaxvbeln TO DATABASE indx(zk) ID vkposmemkey.
IF NOT sy-subrc IS INITIAL.
PERFORM get_varimemkey USING p_vari CHANGING vkposmemkey.
IMPORT lastmaxvbeln FROM DATABASE indx(zk) ID vkposmemkey.
IF sy-subrc IS INITIAL.
ls_vbeln-sign = 'I'.
ls_vbeln-option = 'GT'.
ls_vbeln-low = lastmaxvbeln.
APPEND ls_vbeln.
ENDIF
FORM get_varimemkey USING vari TYPE raldb_vari
CHANGING memkey TYPE char22.
IF vari IS INITIAL.
RAISE get_varimemkey_unexepected.
ENDIF.
CONCATENATE 'Z_VKPOS_' vari INTO memkey.
ENDFORM. "
regards
Walter Habich -
How to create a batch job in IW41
Dear all,
I would like to create a print program batch job on the following scenario with the use of RSNAST00.
We have created an output type in which when it is triggered by backflush (i.e. GI-261) via IW41 transaction, a PO will be created automatically in the background from this output type.
Now for testing purpose, we would like to use to use program RSNAST00 to schedule the creation or triggering of this output.
May I know how to do this?
I know in VF04, I can click the variant,HOWEVER in IW41, the menu does not allow variant creation?
Without variant creation, I cannot go to SM36 to create a batch job.
thanks
tuffHi,
Check the link:
http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/30237989-0901-0010-70a4-944691eb5e52 [original link is broken]
Make sure the CCMS agent installation is in place as per the Monitoring setup guide.
Follow the link Central auto reactions for configuring alert mails.
Regards,
Srikishan -
SRM PR is not getting created in ECC backend
Hello Experts,
We are running SRM 7.0 with SRM-MDM Catalog, we are using SRM for shopping. We do have PI 7.11 running in the Environment as well.
We are on ECC 6.0 with Ehp 4.0
Purchase Order:
However we can see the PO creating successfully using PI.
Question, in the SRM table (BBP_FUNCTION_MAP), we see the object type: BUS2012 for ERP 4.0 has adapter name: /SAPSRM/CL_SOA_ADPT_PO_CRT_ERP for when creating PO. Please see teh screen shot.
is this the reason that we need PI?
Purchase Requisition:
PR Creation is not working:
PR is not getting created in the ERP, PR uses Object type: BUS2105, Adpater CL_BBP_BS_ADAPTER_RQ_CRT_470 for ERP 4.0 System type, can you please tell me if the adapter is correct for ERP 4.0 system type?
I also have a question to ask:
1) Where did you see that PR/PO was send to PI System (PI1)? My understanding is that since ERP amd SRM are 2 ABAP Systems, why we cannot send the PR/PO directly to ERP system from SRM? Why do we need a middleware(PI) in between for this process? We should be able to USE BAPI function to do it correct?
Please advice.
Thanks
Kumaryes, i could see a PR number with all this additional details as below.
Table BBP_PDBEI
CLIENT 453 Client
GUID 4CAEFA58EB9D005CE1008000AC1C2031 Globally Unique identifier
BE_LOG_SYSTEM QA1400 Logical System of Logistics Backend
BE_OBJ_ITEM Follow-On Object Item in Back-End System
BE_OBJECT_TYPE BUS2105 Follow-On Document Object Type in Back-End System
BE_OBJECT_ID 2000000167 Follow-On Document Object ID in Back-End System
BE_REFOBJ_TYPE Reference Object Type in Back-End System
BE_REFOBJ Reference Object in Back-End System
BE_REFOBJ_ITEM Reference Object Item in Back-End System
BE_REFOBJ_SBITM Reference Object Sub-Position in Backend System
BE_REFOBJ_TYPE2 Reference Object Type in Back-End System
BE_REFOBJ2 Reference Object in Back-End System
BE_REFOBJ_ITEM2 Reference Object Item in Back-End System
BE_REFOBJ_FYEAR2 0000 Reference Document Object - Fiscal Year in Back-End System
BE_STGE_LOC Storage location
BE_PLANT 2016 Plant
BE_BATCH Batch Number
BE_VAL_TYPE Valuation type
BE_MOVE_REAS 0000 Reason for Movement
BE_EXPERYDATE 00000000 Shelf Life Expiration Date
BE_PUR_GROUP 206 Purchasing group
BE_PUR_ORG 2000 Purchasing organization
BE_CO_CODE 2000 Company Code
BE_DOC_TYPE CLRQ Purchase Requisition Document Type
BE_ACCREQUIRED Account Assignment for Logical Backend Required
BE_SP_STK_IND Key for Special Stock Section
BE_INFO_REC Number of purchasing info record
BE_MOVE_TYPE 201 Movement type (inventory management)
BE_PACKNO 0000000000 Package number
BE_INTROW 0000000000 Internal line number for limits
BE_ITEM_TEXT Short Text of a Service Purchase Order Item
BE_PO_PRICE 1 Price from Backend
BE_UNLOAD_PT 200 Unloading Point in Backend
BE_DEL_IND Deletion Indicator in Backend Documents
BE_TRACKING_NO Requirement Tracking Number
BE_COND_TYPE Condition Key
BE_COND_STEP 000 Level Number
BE_COND_COUNTER 00 Condition counter -
Class is not appearing in "Java Batch Job Class Search" when trying to add.
Hi,
I have oracle CC&B 2.3.1, with SDK 2.2.0.12. I am trying to create new java batch job class by copying an existing one and modifying it to be used with new Batch Control .
Steps are as follows:
1-Created file by copying the exiting file
CreateLatePaymentChargesProcess.java ; and only changing the name of the class:
public class CmCreateLatePaymentChargesProcess
extends CmCreateLatePaymentChargesProcess_Gen
File location :
D:\spl\ccb231\applycm\ssgc_patch\java\source\cm\ CmCreateLatePaymentChargesProcess.java
D:\spl\ccb231\applycm\ssgc_patch\java\source\cm\ CmCreateLatePaymentChargesProcess_Gen.java
2-Run ApplyCm build successfully , which generated these files:
D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\ CmCreateLatePaymentChargesProcess.class
D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\ CmCreateLatePaymentChargesProcess_Gen$1.class
D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen$ThreadParameters.class
D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen$ToDoProperties.class
D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen.class
D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$JobParameters.class
D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen.class
All the above classes are part of CM.jar file
ContextManagedObjects.xml ; contains these information
<com.splwg.shared.environ.ContextManagedObjectData>;
<domainPackages/>
<lookupFieldClasses class="tree-map">
<no-comparator/>
</lookupFieldClasses>
<cobolAlgorithmInterfaceExtensions class="tree-map">
<no-comparator/>
</cobolAlgorithmInterfaceExtensions>
</com.splwg.shared.environ.ContextManagedObjectData>;
packageMetaInfo.xml was not created
Still the class is not appearing in "Java Batch Job Class Search" when trying to add a new program name referencing this java class.
I tried restarting the Tomcat application server, still not appearing.
Where did I go wrong about it?
Thanks
Edited by: cc&amp;amp;b-user on Jul 29, 2011 12:39 AM
Edited by: ccb-user on Aug 2, 2011 9:28 PM
Edited by: ccb-user on Aug 7, 2011 11:36 PMHi,
Did you copying the base file CreateLatePaymentChargesProcess.java?
I also create a new batch job which copying the CreateLatePaymentChargesProcess batch code the only difference in getBills() method query and inner class CreateLatePaymentChargesProcessWorker extend CmCreateLatePaymentChargesProcessWorker_Gen, instead of CreateLatePaymentChargesProcessWorker_Gen.
The batch is working fine in my end.
Thanks,
Atul Singh. -
Integration with EWM-Inspection lot not getting created
Hi,
Inspection lot not getting created after GR is done.
The scenario is Storage location is connected to external warehouse management,so after the GR is done in the legacy system via interface it is updated in ECC.so while checking the material document inpection lot is not created.
Can anyone please tell me the necesaary check points and integeration steps between WM and QM in this case .
Thanks in advance.......Hi,
Since you didn't say much, I assume you are creating stock into ECC via LSMW using 561 movement. Now to get inspection lot for these batches/ docs, you need to activate inspection type 05.
Go to material master QM view, assign and activate inspection type 05.
Additionally, create a respective inspection plan/ task list for the material(s) to carry out RR and get the consistent inspection lots.
ntn -
Integration with QM-Inspection lot not getting creating
Hi ,
Inspection lot is not getting created after GR is posted.
Scenario:Storage location is connected to external warehouse management.
Can anyone please explain the necessary check points and Integration steps needed to be followed for inspection lot creation.Hi,
Since you didn't say much, I assume you are creating stock into ECC via LSMW using 561 movement. Now to get inspection lot for these batches/ docs, you need to activate inspection type 05.
Go to material master QM view, assign and activate inspection type 05.
Additionally, create a respective inspection plan/ task list for the material(s) to carry out RR and get the consistent inspection lots.
ntn -
Creating a Batch Job for Executing Later
Hi Experts!
I was wondering if there was a way to create a batch job, but to have it executed at a later time, since we do not have an exact date and time we need these jobs executed. My goal is to create 12 batch jobs (1 for each month), but have them excuted, when I need them too, when I choose it. Is this even possible?. I tried looking through SM36/SM37, but could not find anything on it. Please advise and thanks in advance!
WCHi Will,
The standard job scheduler will not do this (SM36/7). You do not mention what release you are using, but SAP Central Job Scheduling with Redwood does provide the ability to create jobs with boolean conditions like you describe (plus much, much more). See the Service Marketplace http://service.sap.com/job-scheduling or the SDN page https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/abb91c2a-0b01-0010-6ca6-9f0f62268454. [original link is broken]
Best Regards,
Matt -
Excise invoice should not get created without PGI
Hi,
I have a scenario where the billing document is being generated by the customer without PGI after creation of outbound delivery for exports. (This is as per customer's requirement - Copy control maintained in VTFL for the same - copying requirements 11 )
This creates a situation - excise invoice can be created without PGI - which creates problems for customer. This should not happen.
Customer wants a check during the excise invoice creation - excise invoice should not get created if PGI has not been done.
Kindly advise as to how this can be done.
Regards,
T SaravananDear Saravanan
Two options are there
- in your existing routine itself, you can specify the control in such a way that unless the preceding document is PGId
- apply excise user exits like J_1I7_USEREXIT_EXCISE_BEF_SAVE to achieve the requirement.
thanks
G. Lakshmipathi
Maybe you are looking for
-
Hi, May i know if it is possible payment terms with Decimal percentages like 42.67% Intial payment 32.98% second payment and so on. i know cash discount is possible with decimal percentages. But i would like to know if this also works Thanks in advan
-
Conference link with login and password included
Hi, I have been trying to find a way to make Adobe Connect send meeting invitation e-mails with login and password included in the link - unfortunately to no avail. Does anyone know, if it's at all possible to do it and if so, how it's done? I'm stil
-
ITunes Rating Stars Not Solid.
I've noticed from time-to-time that my rating stars seem to be hollow and no longer solid. What does this happen?
-
Create JTree Menu Using file system
I want to create a Dynamic tree menu by using the folder structure on my harddisk like I have a "A" folder as a root on C drive and in "A" folder we have a "B" and "C" folder and in "B" folder there are 2 folders like "B1" and "B2" and in "C" , "C1"
-
I just upgraded from PS CS4 to CS5. Everything okay except I can't access my third-party plug-ins in CS5 that I was using in CS4. Any suggestions about how to load them in CS5.