BAPI Jobs
Unfortunately our system has many BAPI jobs. Basically these are queries created over infocubes/odses and run in the bacground to create tables. (The table becomes a generic data source to load another cube.) These BAPIs are created via transaction RSCRM_BAPI. There are hundreds of them, many of them are not documented.
So when one of these BAPIs fail due to the fact that the underelying query brought no data (the process is designed to make the BAPI job fail so that we know no data is coming in), all we can see is a job such as 466910990B39009C000000000A1D8020 with a cancelled status on SM37.
So my question is is there a way to find the query that is run behind the scenes. Since this is a job, I am going to see if there is a job table with the information I am looking for.
Your help is appreciated.
Hi,
In Se37-check the RSCRMBW_MON_STATUS_DISPLAY FM, check the code and execute and go to details why it has been cancelled.
Hope this helps.
Thanks,Ramoji.
Similar Messages
-
BAPI job log messages are disabled
Can not view messages in a BAPI in the job log?
the bapi is .
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = lw_poheader
poheaderx = lw_poheaderx
IMPORTING
exppurchaseorder = lv_ebeln
expheader = lw_expheader
TABLES
return = lt_poreturn
poitem = lt_poitem
poitemx = lt_poitemx
poaccount = lt_poaccount
poaccountx = lt_poaccountx
poservices = lt_poservices.
the report is run in beckground and the register of the job appear to me all the messages of type E, W, S, I return that returns the structure of the BAPI. I am interested only messages type S, E.
Help
Edited by: francesco aiello on Jan 20, 2010 9:38 AM
Edited by: francesco aiello on Jan 20, 2010 9:47 AM -
Adding BAPI jobs in Process Chain
Hi All,
I want to add BAPIs in process chain in BW 3.5.Can anybody help me in this???????Hi,
There will be no impact on the work processes but the main concern here is for all jobs that run in dialog/fore ground there will be some specific time limit defined...so if a job/process crosses that limit it'll go to ABAP dump....
At a max there'll be no timelimit for the bkgd processes so a job can run for a long time without any interruption...
To know the time limit for foreground processes u can chk wit ur BASIS team or use Tcode- RZ11...
Now If any of the job in ur process chain takes long time it may go thru dump, so it depends on the step howmuch it is taking....(Eg: Attribute change runs take long time sometimes)
rgds, -
How is BI_REQD* job triggered ???
Hi all,
can any one help on this.
In our BW system, BW triggers a job whose name begins wih
BIREQU* after each successful master data load . After this job another job which begins with BI_REQD*(which runs the program RSDELREQ1 ) is triggered and the whole data is deleted.so how can i stop this job from triggering ?
i am an abap developer, and this is an urgernt requrirement,can any one quickly help me on this?
Regards
Durga KHi,
BI_REQ is triggered normaly when an load is triggered. Its for Src sys extraction (for flat file, DataMart, & BAPI -> job runs in SAP BW). In your case it may be because you have given the deletion of data from targets in the InfoPackage level.
Check RSA1 > InfoPackage > Data targets tab > 7 th column (Delete entire contents of data targets).
This may not be the exact issue. Just try it out.
Also if this is a part of chain check if there is a process to delete data after this load.
Thanks,
JituK -
Job Creation via BAPI using BackgroundJob
Hello,
I'm working on Access and I'm submitting a JOB in SAP; till we were in release 4.7 my database worked but after the relase change I'm not able to us it again.
When I call my function in order to do "AddABAPStep" the system give me a Run-time error '4701'
"Non-BAPI methods with export parameters are currently not supported"
Hereafter the instruction that doesn't work :
oJobrun.AddABAPStep ExternalUserName:=pMUsrUser, JobName:=Jname, Jobcount:=Jcount, AbapProgramName:=xabap, AbapVariantName:=xvar, Return:=oReturn
Is there someone that is able to help me ?
Thank you in advance
Guido Chiappa
Edited by: Guido Chiappa on Jul 14, 2011 11:31 AMHi,
May help you:----
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/edab9790-0201-0010-479a-98fcc7ebc7bd?quicklink=index&overridelayout=true
Regards,
Suman -
BAPI for Scheduling a background job
Hi all,
is there any bapi for scheduling a background job?
i mean can we do background job using bapi
If not how can we create a bapi for scheduling a background job.
Thanks & Regards,
AzharHi,
Use following BAPIs for scheduling a job in background
BAPI_XBP_JOB_OPEN - This BAPI solves the first step in scheduling a job in the R/3 background processing system. You can create the job with this method.
Using additional BAPI calls BAPI_XBP_JOB_ADD_ABAP_STEP and BAPI_XBP_JOB_ADD_EXT_STEP, you can add job steps to the job.
With the BAPI call BAPI_XBP_JOB_CLOSE, you can finish defining the job and transfer it to the background processing system with the status Scheduled without start date.
You have execute the job with the BAPI calls BAPI_XBP_JOB_START_IMMEDIATELY or BAPI_XBP_JOB_START_ASAP.
I hope it would help you.
Regards,
Venkatram -
Function Module or BAPI to update a job's parameters like Spool retention
Hi All,
Anyones knows any BAPI or Function Module through with we can update a job's parameters like Spool retention period or Spool request title or some other printer settings.
Thanks in Advance.
Regards,
ShailendraHi,
BAPI_XBP_JOB_HEADER_MODIFY -
Simultaneous background jobs using the same BAPI issue
I scheduled 2 simultaneous background jobs on a custom program using the same BAPI (closing PM orders).
Run 1 to CLSD orders created on year 2001
Run 2 to CLSD orders created on year 2000
What happened was while run 1 was still active, run 2 encountered a dump and was cancelled.
Upon checking in ST22, dump was generated in CO_ZV_CONSISTENCY_CHECK.
Also, Run 2's dump happened when it encountered a data inconsistency for an order number being processed for Run 1.
Since the BAPI is being accessed at the same time by the two jobs, Is it possible that the commit work on run 1 could affect the processing for the Run 2, hence the data inconsistency?
Is this a buffer issue?
Additionally, no dump is encountered when Run 1 or Run 2 is run by itself.
I also encountered this issue before for creating Project and WBS using BAPI, but the solution we came up with was not to do parallel runs to avoid the error as this was a one time upload only.If the second job is dependent on the 1st job, then use following logic which will let you know the status of 1st job. Once 1st job is completed, call JOB_OPEN of 2nd job.
ENDLESS loop till 1st job is completed
DO.
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 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.
To Display the status text as per the status type
CASE wa_jobhead-status.
WHEN 'S'. WRITE: / text-006. "'Scheduled'.
WHEN 'R'. WRITE: / text-007. "'Released'.
WHEN 'F'. WRITE: / text-008. "'Completed'.
WHEN 'A'. WRITE: / text-009. "'Cancelled'.
WHEN OTHERS.
ENDCASE.
IF wa_jobhead-status = 'F'.
exit.
ENDIF.
ENDDO.
PERFORM OPEN_2nd_JOb. -
BAP Log/Error Report in case of Background Job
Hi Friends,
I have to develop one program where I am creating purchase orders using BAPI. This Program would be scheduled in background
hence the Error/log report can not be seen .I have been told to use SAP Application Log for getting the Error Report.
How this can be achieved using SAP Application log functionality. Any Help would be appreciated.
Thanks>
TANGO18 wrote:
> I have to develop one program where I am creating purchase orders using BAPI. This Program would be scheduled in
> background hence the Error/log report can not be seen .
Incorrect. How are you displaying your error / log report ?
Even if you use simple WRITE statements to display the log, the details would be there in the corresponding spool generated.
BR,
Suhas -
Job Selection via BAPI using BackgroundJob
Hi to all,
I'm using "Set oJobList = oBAPICtrl.GetSAPObject("BackgroundJob")" to receive the list of job from SAP to my Access database.
Someone have already used it ?
I'm not able to understand how set selection parameter.
Set oJobSelectParam = oBAPICtrl.DimAs(oJobList, "Select", "JobSelectParam") give me a message "Error 0"
and so ...
oJobSelectParam.Value("JOBNAME") = "UNIVERSE"
oJobSelectParam.Value("USERNAME") = "COKKA00M15"
have no impact on parameter "oJobSelectParam".
Please help me.
Thank's in advanceHi,
May help you:----
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/edab9790-0201-0010-479a-98fcc7ebc7bd?quicklink=index&overridelayout=true
Regards,
Suman -
REPORT ZIND_BACKGROUND_JOB MESSAGE-ID zsd
NO STANDARD PAGE HEADING
LINE-SIZE 160.
Tables
TABLES: mara,mvke.
Data Definitions.
TYPES: BEGIN OF ty_mat,
matnr TYPE mara-matnr,
vkorg TYPE mvke-vkorg, " Sales Org
vtweg TYPE mvke-vtweg, " Dist. Channel
prdha TYPE mara-prdha, " Prod Hierarchy
err(60) TYPE C,
END OF ty_mat.
DATA: gt_matnr TYPE STANDARD TABLE OF ty_mat WITH HEADER LINE,
gt_matnr_err TYPE STANDARD TABLE OF ty_mat WITH HEADER LINE.
DATA: gs_matnr_err TYPE ty_mat.
DATA: lv_file_name TYPE string,
lv_message(200) TYPE c.
DATA : JN(8) TYPE C,
val(1) .
DATA: PRIPAR TYPE PRI_PARAMS,
ARCPAR TYPE ARC_PARAMS.
For BAPI
DATA: headdata TYPE bapimathead,
clientdata TYPE bapi_mara,
clientdatax TYPE bapi_marax,
return TYPE bapiret2,
salesdata TYPE bapi_mvke,
salesdatax TYPE bapi_mvkex.
DATA: ret TYPE STANDARD TABLE OF bapi_matreturn2 WITH HEADER LINE.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b001 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
s_vkorg FOR mvke-vkorg OBLIGATORY,
s_vtweg FOR mvke-vtweg OBLIGATORY,
s_matkl FOR mara-matkl.
SELECTION-SCREEN END OF BLOCK b001.
SELECTION-SCREEN BEGIN OF BLOCK b002 WITH FRAME TITLE text-002.
PARAMETERS: p_err TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b002.
SELECTION-SCREEN BEGIN OF BLOCK b003 WITH FRAME TITLE text-003.
PARAMETERS: P_FORE RADIOBUTTON GROUP rad,
P_BACK RADIOBUTTON GROUP rad.
SELECTION-SCREEN: END OF BLOCK b003.
PARAMETERS : P_JOB LIKE TBTCJOB-JOBNAME.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_err.
PERFORM get_filename USING 'Output - Error File'
CHANGING p_err.
AT SELECTION-SCREEN ON BLOCK B003.
IF P_BACK = 'X' AND P_JOB NE SPACE.
PERFORM PRINTER_GET.
PERFORM JOB_OPEN.
PERFORM JOB_SUMBIT.
PERFORM JOB_CLOSE.
STOP.
ELSEIF P_JOB = SPACE AND P_BACK = 'X' .
MESSAGE 'Enter The Job Name' type 'I'.
ENDIF.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM 100_collect_dbrecs.
PERFORM 200_process_dbrecs.
END-OF-SELECTION.
*& TOP-OF-PAGE.
TOP-OF-PAGE.
WRITE: 40 'Material Product Hierarchy Update Report'.
ULINE (115).
*SKIP.
WRITE: /'MATERIAL'.
WRITE: /.
ULINE (115).
*& Form 100_collect_dbrecs
FORM 100_collect_dbrecs .
SELECT maramatnr mvkevkorg mvkevtweg maraprdha
INTO CORRESPONDING FIELDS OF TABLE gt_matnr
FROM mara INNER JOIN mvke
ON maramatnr = mvkematnr
WHERE mara~matnr IN s_matnr
AND mara~prdha NE space
AND mara~matkl IN s_matkl
AND mara~lvorm EQ space
AND mvke~vkorg IN s_vkorg
AND mvke~vtweg IN s_vtweg
AND mvke~prodh EQ space.
ENDFORM. " 100_collect_dbrecs
*& Form 200_process_dbrecs
FORM 200_process_dbrecs.
IF gt_matnr[] IS INITIAL.
MESSAGE s000 WITH 'No Materials Processed.'.
ELSE.
LOOP AT gt_matnr.
CLEAR: headdata,
clientdata,
clientdatax,
return,
salesdata ,
salesdatax,
ret.
REFRESH: ret.
Filling Material.
MOVE: gt_matnr-matnr TO headdata-material,
'X' TO headdata-sales_view.
Sales Org
MOVE: gt_matnr-vkorg TO salesdata-sales_org,
gt_matnr-vkorg TO salesdatax-sales_org.
*Dist Channel
MOVE: gt_matnr-vtweg TO salesdata-distr_chan,
gt_matnr-vtweg TO salesdatax-distr_chan.
*Prod Hierarchy
MOVE: gt_matnr-prdha TO salesdata-prod_hier,
'X' TO salesdatax-prod_hier.
PERFORM 220_bapi_call.
CLEAR: gt_matnr.
ENDLOOP.
Download Error Files
IF gt_matnr_err[] IS INITIAL.
no errors to be downloaded
ELSE.
Error File being downloaded.
lv_file_name = p_err.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_file_name
filetype = 'ASC'
TABLES
data_tab = gt_matnr_err
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 99.
IF sy-subrc = 0.
WRITE: /05 'Error File Download - Successful.'.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " 200_process_dbrecs
*& Form 220_BAPI_CALL
FORM 220_bapi_call .
DATA: lv_message(60) TYPE c.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = headdata
clientdata = clientdata
clientdatax = clientdatax
salesdata = salesdata
salesdatax = salesdatax
IMPORTING
return = return
TABLES
returnmessages = ret.
IF sy-subrc EQ 0.
MOVE : return-message TO lv_message.
IF return-type EQ 'E'.
WRITE: / gt_matnr-matnr,
'Change Failed -', lv_message.
MOVE-CORRESPONDING gt_matnr TO gs_matnr_err.
APPEND gs_matnr_err to gt_matnr_err. CLEAR gs_matnr_err.
ELSE.
WRITE: / gt_matnr-matnr,
'Change Successful -', lv_message, ' for ', gt_matnr-vkorg,' ', gt_matnr-vtweg.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
COMMIT WORK.
ENDIF.
ENDIF.
ENDFORM. " 220_BAPI_CALL
*& Form get_filename
Call up a dialog window to retrieve the filename
--> P_FILETITLE Dialog file title
<-- P_FILENAME FIle name retrieved
FORM get_filename USING p_filetitle TYPE c
CHANGING p_filename TYPE localfile.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ' '
def_path = ' '
mask = ',.,..'
mode = 'O'
title = p_filetitle
IMPORTING
filename = p_filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
ENDFORM. " get_filename
*& Form JOB_OPEN
BACK GROUND JOB ASSIGNING JOB NAME AND IMPORTING JOB NUMBER
form JOB_OPEN .
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
jobname = P_JOB
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
JOBCLASS =
IMPORTING
JOBCOUNT = JN
CHANGING
RET =
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
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
endform. " JOB_OPEN
*& Form JOB_SUMBIT
SUBMITTING THE JOB
form JOB_SUMBIT .
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = SY-UNAME
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = JN
jobname = P_JOB
LANGUAGE = SY-LANGU
PRIPARAMS = pripar
REPORT = SY-REPID
VARIANT = ' '
IMPORTING
STEP_NUMBER =
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
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
submit ZIND_BACKGROUND_JOB
via job p_JOB
number JN
to sap-spool without spool dynpro
spool parameters PRIPAR
and return.
*SUBMIT ZIND_BACKGROUND_JOB AND RETURN
*USER SY-UNAME " User for runtime authorizations
*VIA JOB p_JOB NUMBER JN
*" Job name and job number
*" from JOB_OPEN
*TO SAP-SPOOL " Print and archiving options from
*" GET_PRINT_PARAMETERS
*" Both sets of options come from
*" GET_PRINT_PARAMETERS
*SPOOL PARAMETERS PRIPAR
*ARCHIVE PARAMETERS ARCPAR
*WITHOUT SPOOL DYNPRO.
**End of Content Area
endform. " JOB_SUMBIT
*& Form JOB_CLOSE
text
form JOB_CLOSE .
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
jobcount = JN
jobname = P_JOB
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
STRTIMMED = 'X'
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED =
CHANGING
RET =
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
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
endform. " JOB_CLOSE
*& Form PRINTER_GET
text
form PRINTER_GET .
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
DESTINATION = 'LOCL'
IMMEDIATELY = ''
NO_DIALOG = 'X'
IMPORTING
out_archive_parameters = arcpar
OUT_PARAMETERS = PRIPAR
valid = val
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 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.
endform. " PRINTER_GET
<b>Actually this prog schedules a job and i can see it in SM37, but when i try to release it error i get is step is not defined properly....
What can be the possible causes of the errors.
here in my prog i have two parameters which is obligatory (VTWEG and VKORG).
Iam not submitting this parameter in the background jb, how to do this???
is it necessary for it to be scheduled in background.
Pls help me ASAP.</b>
Title was edited by:
Alvaro Tejada GalindoHi Naveen,
You are trying to submit the same program in background. You need to create 2 programs for that..
Create a program : ZBCKGD & inside it use FM JOB_SUBMIT & Pass program name as ZIND_BACKGROUND_JOB.
Export the selection criteria from ZBCKGD to ZIND_BACKGROUND_JOB.
Refer:/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job
form JOB_SUMBIT .
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = SY-UNAME
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = JN
jobname = P_JOB
LANGUAGE = SY-LANGU
PRIPARAMS = pripar
<b>REPORT = 'ZIND_BACKGROUND_JOB'</b>
VARIANT = ' '
IMPORTING
STEP_NUMBER =
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 -
Dump in BAPI while fetching data
Hi all,
I m getting a short dump (: ' No more storage space available for extending an internal table.') in my vendor trial balance report . The place of short dump is the BAPI which im using to fetch opening balance i.e BAPI_AP_ACC_GETKEYDATEBALANCE.
Please find below the screen shot of the dump.
Kindl suggest the possible solutions.
Short text
No more storage space available for extending an internal table.
What happened?
You attempted to extend an internal table, but the required space was
not available.
Error analysis
The internal table "\FUNCTION-POOL=3008\DATA=XLINEITEMS[]" could not be further
extended. To enable
error handling, the table had to be delete before this log was written.
As a result, the table is displayed further down or, if you branch to
the ABAP Debugger, with 0 rows.
At the time of the termination, the following data was determined for
the relevant internal table:
Memory location: "Session memory"
Row width: 2122
Number of rows: 2757476
Allocated rows: 2757476
Newly requested rows: 4 (in 1 blocks)
How to correct the error
The amount of storage space (in bytes) filled at termination time was:
Roll area...................... 6216720
Extended memory (EM)........... 4005681840
Assigned memory (HEAP)......... 1998959040
Short area..................... " "
Paging area.................... 24576
Maximum address space.......... 18446743890435787967
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"TSV_TNEW_PAGE_ALLOC_FAILED" " "
"SAPL3008" or "L3008U05"
"BAPI_AP_ACC_GETKEYDATEBALANCE"
Information on where terminated
Termination occurred in the ABAP program "SAPL3008" - in
"BAPI_AP_ACC_GETKEYDATEBALANCE".
The main program was "ZIBFI_VEND_TB_H1 ".
In the source code you have the termination point in line 48
of the (Include) program "L3008U05".
The program "SAPL3008" was started as a background job.
Job Name....... "ZIBFI_VEND_TB_H1"
Job Initiator.. 108735
Job Number..... 11490500
Line number:
44 PERFORM READ_KONTO USING VENDOR
45 COMPANYCODE RETURN.
46 CHECK RETURN IS INITIAL.
47
>>>>> SELECT * FROM BSIK APPENDING CORRESPONDING FIELDS OF TABLE XLINEITEMS
49 WHERE BUDAT <= KEYDATE
50 AND BUKRS EQ COMPANYCODE
51 AND LIFNR EQ VENDOR
52 AND BSTAT IN BSTAT.Only 2 ways for this:
a) reduce the no of records
b) ask your basis team to increase the session memory
Regards,
Nikhil -
Experts,
I need a BAPI for list of Sales order against which the invoice has not been generated. I need to pass date and bapi shall return list of sales order that are not invoiced.
Thanks
HarshHi Frederic
Sure it does.
Actually I want to send data from SAP to some .net application. I thought using BAPI would make the job easier.
Anyways thanks.
Regards
Harsh -
How to avoid use of function module in case of background jobs?
Hi ,
I am working a file tranfer interface .Functionality is to extract file either apllication or presentation server , and process the file through bapi , send the result in their respective server. This program should run through batch jobs in background mode.
I am using following function module :
SUBST_GET_FILE_LIS : Get the file list from application server
TMP_GUI_DIRECTORY_LIST_FILES : Get the file list from presentation server
GUI_UPLOad : to extract file data from presentation server
GUI_downLOAD : to download data to presentation server
in case of background job these function modules will not work.... so how to resolve this issue...
what are the methods we can apply?
Thanks & Regards
SandeepHi,
This FM is used to get list of files from Application server (will work in Background). This cannot be used to list files from presentation server. There is no way , by which you can process presentation server files in background mode.
Regards
Vinod -
Create Background Job after data saved in module
Hello,
I have a program that has a start selection screen with material group, you enter your data, execute. When it has finished you get a ALV of sales order with items where you can make changes to dates and other details and save. I would like to add a save in background option. Is this possible? I assume it would be difficult because of the container.. it uses a bapi to save sale orders...
The employees run this job which takes a little while.. at the end of the day.. they go home and of course SAP has timed out. If they can run it in the background then no problem....
Thanks,
AJwell, you can pass the data from the same to an other program and submit it in background.
Just create a job.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = gv_jobname
IMPORTING
jobcount = gv_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
* no error required
ENDIF.
submit your program with job name and job count.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = gv_jobcount
jobname = gv_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
OTHERS = 8.
IF sy-subrc <> 0.
Maybe you are looking for
-
How do you change default page size in pdf?
I purchased CREATE solely to create a pdf file from a scanned document. I created the PDF but the default page size is 30.15 x 20.83 INCHES. I cannot seem to change the page size. I called support services 4 times (talking with Sakthivel, Shashank, M
-
When i connect my ipod to my windows xp computer it recognizes it and shows it in itunes. My ipod is set to manual and when I try to sync my list or just one song it will say its syncing until my iPod just disconects. Even thought my ipod has stopped
-
New problem of '' Replace with after effect composition ''
Hi i'm a new user of adobe premiere pro , and i have really a big problem on it and i tired of searching about solution but with out any result , the whole problem is when i select a footage and right-clicking from the premiere timeline , the option
-
Z10 BBM cannot sycn with other BB
I have a BB group and in it there are about 5 z10 users and 10 other BB made. The group did not face any problem of users cannot see their own messages or incorrect time show in the thread. About 3 weeks ago, one new user with BB Bold added in, howev
-
Testing of applications / updates before deployment or within an OSD image
Hi I know this might not be the best place to ask for this, but since this is also related to Sccm, here i go... I guess Windows Updates and new applications are the two most common examples where an issue might break critical applications and you wo