MDVP only working as background job
Hello,
I was working on the ATP check when i discovered the only way to actually perform this check correctly was to execute it as a background job. When executing online, the stock is just not committed (even with full confirmation logic set on in the MRP group).
It only works fine from the planned order.
Isn't it possible to run MDVP online ??
Any enlightements on this topic appreciated.
Olivier
Hi,
You can run the availability check in background with program RLD05000. You have to create variant and schedule this program in batch from SM36 transaction, Out out you can check in spool.
If helps rewards your points.
Regards
TAJUDDIN
Similar Messages
-
MDVP only working as a background job
Hello,
I was working on the ATP check when i discovered the only way to actually perform this check correctly was to execute it as a background job. When executing online, the stock is just not committed (even with full confirmation logic set on in the MRP group).
It only works fine from the planned order.
Isn't it possible to run MDVP online ??
Any enlightements on this topic appreciated.
OlivierHi,
You can run the availability check in background with program RLD05000. You have to create variant and schedule this program in batch from SM36 transaction, Out out you can check in spool.
If helps rewards your points.
Regards
TAJUDDIN -
Program works but background job for that program fails....
I have a requirement where I have to collect the details of the purchase order and put the details in XML file format and FTP the XML file to an external third party FTP Server.
To realize this I developed a report program which follows following logic.
1) First I collected the PO details by calling the BAPI BAPI_PO_GETDETAIL1.
2) Then using the following link "/people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
I converted these PO details to the XML file format that the third party people accept.
In the code I used u201CCALL METHOD cl_gui_frontend_services=>gui_downloadu201D and in this process first the XML file is generated and is getting stored on my deskytop.
3) Then I called HTTP_SCRAMBLE, FTP_CONNECT, FTP_COMMAND , FTP_DISCONNECT and RFC_CONNECTION_CLOSE.
This works perfectly well and each time I execute the report the file is getting FTPu2019ed to the third party FTP server.
Now I tried to schedule a batch job for this and the batch job fails with follwing errors
02/25/2009 15:08:47 Error in Control Framework
Message Class = FES
Message Number = 022
Message Type = E
02/25/2009 15:08:47 Job cancelled after system exception ERROR_MESSAGE
Message Class = 00
Message Number = 564
Message Type = A
Can some one tell me what is going wrong. My report works perfect in front end but fails if I try to schedule a background job for it in SM36.
Can you please tell me whatz going wrong with batch job? Any Help is highly appreciated.
Regards,
JEssica SAmRobert...Thanks for the reply...
I am using follwing code
l_xml_size = l_ostream->get_num_written_raw( ).
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = FILEPATH
filetype = 'BIN'
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Now what changes should i make..where should i store my XML file then instead of my desktop?
and whih Function Module should i Use.. -
Will BDC work in Background job
I have written the BDC program and i want to scheduled the program in Background job in the late night and see the result of processed records as a ALV report.Is it possible to run BDC as Background job..........
TYPE-POOLS: SLIS.
DATA : PRDAT(8).
DATA : WF_ORG(30).
DATA PERNR TYPE STANDARD TABLE OF KOMV_INDEX
WITH HEADER LINE INITIAL SIZE 50.
DATA MOD VALUE 'N'. "E
DATA: MASK(64) VALUE
',Tab Delimited Text Files(.txt),.txt,All Files(.),..'.
DATA: WF_DATE1(10) TYPE C,
WF_TIME(10) TYPE C.
DATA: AUART LIKE VBAK-AUART . "VALUE 'ZQT'.
DATA: WF_SNO TYPE I .
DATA XTP LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
Internal table for reading file
DATA: BEGIN OF XFILE OCCURS 0,
RESWK LIKE EKKO-RESWK,
EKORG LIKE EKKO-EKORG,
EKGRP LIKE EKKO-EKGRP,
BUKRS LIKE EKKO-BUKRS,
MATNR LIKE EKPO-MATNR,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
RECPLT LIKE EKPO-WERKS,
BWTAR LIKE EKPO-BWTAR,
END OF XFILE.
Invalid customers listing file
*data: xout_err like xout occurs 0 with header line.
DATA: BEGIN OF XOUT_ERR OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
WERKS LIKE VBAP-WERKS, "Plant
END OF XOUT_ERR.
Internal Table for Error in file
DATA: BEGIN OF XERR OCCURS 0,
INDEX LIKE SY-TABIX,
MSG(132),
END OF XERR.
DATA: BEGIN OF BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
DATA BEGIN OF MSGCOLL OCCURS 10.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA END OF MSGCOLL.
Internal table for writing final report
DATA: BEGIN OF XOUT OCCURS 0,
SERIAL_NO TYPE I,
RECPLT LIKE EKPO-WERKS,
MATNR LIKE EKPO-MATNR,
KBETR LIKE KOMV-KBETR,
KPEIN LIKE KOMV-KPEIN,
KMEIN LIKE KOMV-KMEIN,
MAKTX LIKE MAKT-MAKTX,
REMARKS(30),
DATE(10) TYPE C,
END OF XOUT.
*****Structures For ALV**********************************************
DATA : L_VARIANT LIKE DISVARIANT,
WF_VARIANT LIKE DISVARIANT.
DATA: WF_REPORT LIKE SY-REPID.
DATA: WF_EVENTS TYPE SLIS_T_EVENT .
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: GT_FIELDCATALL TYPE SLIS_T_FIELDCAT_ALV.
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: G_REPID LIKE SY-REPID.
DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV .
DATA: GS_LAYOUTALL TYPE SLIS_LAYOUT_ALV.
DATA: GT_EVENTS TYPE SLIS_T_EVENT.
DATA: GT_EVENTSALL TYPE SLIS_T_EVENT.
DATA: GS_KEYINFO TYPE SLIS_KEYINFO_ALV.
DATA: G_TABNAME_HEADER TYPE SLIS_TABNAME.
DATA: G_TABNAME_ITEM TYPE SLIS_TABNAME.
DATA ST_SORT TYPE SLIS_SORTINFO_ALV .
DATA: S_LIST_TOPOFPAGE TYPE SLIS_LISTHEADER.
DATA: IST_LIST_TOPOFPAGE TYPE SLIS_T_LISTHEADER .
DATA: WF_EVENT TYPE SLIS_ALV_EVENT.
CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
*****Selection Screen************************************************
***Selection Screen
SELECTION-SCREEN SKIP 3.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: FILENAME LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
*******Initialization Events******************************************
INITIALIZATION.
Read the column heading from textpool
REFRESH XTP.
READ TEXTPOOL SY-REPID INTO XTP LANGUAGE SY-LANGU.
*******AT SELECTION SCREEN Events*************************************
AT SELECTION-SCREEN .
WF_REPORT = SY-REPID.
L_VARIANT = WF_REPORT.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = FILENAME.
*******Start Of Selection Events**************************************
START-OF-SELECTION.
WF_SNO = 1.
WF_REPORT = SY-REPID.
WRITE SY-DATUM TO WF_DATE1.
WRITE SY-UZEIT TO WF_TIME.
Upload the file into XFILE
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'DAT'
TABLES
DATA_TAB = XFILE
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
GUI_REFUSE_FILETRANSFER = 8
OTHERS = 9.
LOOP AT XFILE.
REFRESH PERNR.
CLEAR PERNR.
PERFORM CALL_ME21N.
IMPORT PERNR FROM MEMORY ID 'PERNR'.
FREE MEMORY ID 'PERNR'.
READ TABLE PERNR WITH KEY KSCHL = 'ZASV'.
IF SY-SUBRC = 0.
XOUT-KBETR = PERNR-KBETR.
XOUT-KPEIN = PERNR-KPEIN.
XOUT-KMEIN = PERNR-KMEIN.
XOUT-RECPLT = XFILE-RECPLT.
XOUT-MATNR = XFILE-MATNR.
XOUT-SERIAL_NO = WF_SNO.
XOUT-DATE = WF_DATE1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = XOUT-MATNR
IMPORTING
OUTPUT = XOUT-MATNR
SELECT SINGLE MAKTX INTO XOUT-MAKTX FROM MAKT
WHERE MATNR = XOUT-MATNR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
*INPUT = XOUT-MATNR
IMPORTING
OUTPUT = XOUT-MATNR .
CLEAR PERNR.
APPEND XOUT.
ELSE.
XOUT-KBETR = ''.
XOUT-KPEIN = ''.
XOUT-KMEIN = ''.
XOUT-RECPLT = XFILE-RECPLT.
XOUT-MATNR = XFILE-MATNR.
XOUT-SERIAL_NO = WF_SNO.
XOUT-REMARKS = 'ERROR'.
XOUT-DATE = WF_DATE1.
APPEND XOUT.
ENDIF.
CLEAR XFILE.
WF_SNO = WF_SNO + 1.
ENDLOOP.
DELETE XOUT WHERE MATNR = ''.
PERFORM WRITE_OUTPUT.
*& Form CALL_ME21N
FORM CALL_ME21N.
DATA : DATE(10).
REFRESH BDCDATA.
CLEAR BDCDATA.
CLEAR DATE.
CONCATENATE SY-DATUM6(2) SY-DATUM4(2)
SY-DATUM+0(4) INTO PRDAT.
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=MEDOCTYPE'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MEPO_TOPLINE-BSART'.
PERFORM BDC_FIELD USING 'MEPO_TOPLINE-BSART'
'UB'.
PERFORM BDC_FIELD USING 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
PRDAT.
PERFORM BDC_FIELD USING 'DYN_6000-LIST'
' 1'.
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MEPO_TOPLINE-SUPERFIELD'.
PERFORM BDC_FIELD USING 'MEPO_TOPLINE-BSART'
'UB'.
PERFORM BDC_FIELD USING 'MEPO_TOPLINE-SUPERFIELD'
XFILE-RESWK.
PERFORM BDC_FIELD USING 'MEPO_TOPLINE-BEDAT'
PRDAT.
PERFORM BDC_FIELD USING 'MEPO1222-EKORG'
'1000'.
XFILE-EKORG.
PERFORM BDC_FIELD USING 'MEPO1222-EKGRP'
'STO'.
PERFORM BDC_FIELD USING 'MEPO1222-BUKRS'
'1000'.
XFILE-BUKRS.
PERFORM BDC_FIELD USING 'DYN_6000-LIST'
' 1'
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=MEV4001BUTTON'.
*perform bdc_field using 'BDC_CURSOR'
'MEPO_TOPLINE-SUPERFIELD'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
*perform bdc_field using 'MEPO1222-EKORG'
'1000'.
*perform bdc_field using 'MEPO1222-EKGRP'
'STO'.
*perform bdc_field using 'MEPO1222-BUKRS'
'1000'.
*perform bdc_field using 'DYN_6000-LIST'
' 1'
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
*perform bdc_field using 'MEPO1222-EKORG'
'1000'.
*perform bdc_field using 'MEPO1222-EKGRP'
'STO'.
*perform bdc_field using 'MEPO1222-BUKRS'
'1000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MEPO1211-MEINS(01)'.
PERFORM BDC_FIELD USING 'MEPO1211-EMATN(01)'
'3000'.
XFILE-MATNR.
WF_ORG = XFILE-MENGE.
CONDENSE WF_ORG .
PERFORM BDC_FIELD USING 'MEPO1211-MENGE(01)'
WF_ORG.
PERFORM BDC_FIELD USING 'MEPO1211-MEINS(01)'
'l'.
XFILE-MEINS.
PERFORM BDC_FIELD USING 'MEPO1211-NAME1(01)'
'4102'.
XFILE-RECPLT.
*perform bdc_field using 'DYN_6000-LIST'
' 1'
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
*perform bdc_field using 'MEPO1222-EKORG'
'1000'.
*perform bdc_field using 'MEPO1222-EKGRP'
'STO'.
*perform bdc_field using 'MEPO1222-BUKRS'
'1000'.
*perform bdc_field using 'BDC_CURSOR'
'MEPO1211-NAME1(01)'.
*perform bdc_field using 'MEPO1211-NAME1(01)'
'4102'.
*perform bdc_field using 'DYN_6000-LIST'
' 1'
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
*perform bdc_field using 'MEPO1222-EKORG'
'1000'.
*perform bdc_field using 'MEPO1222-EKGRP'
'STO'.
*perform bdc_field using 'MEPO1222-BUKRS'
'1000'.
*perform bdc_field using 'DYN_6000-LIST'
' 1'
*perform bdc_field using 'BDC_CURSOR'
'MEPO1313-BWTAR'.
*perform bdc_field using 'MEPO1313-UEBTO'
'10.0'.
*perform bdc_field using 'MEPO1313-MAHN1'
'10'.
*perform bdc_field using 'MEPO1313-MAHN2'
'20'.
*perform bdc_field using 'MEPO1313-MAHN3'
'30'.
PERFORM BDC_FIELD USING 'MEPO1313-BWTAR'
'OWN_D'.
XFILE-BWTAR.
*perform bdc_field using 'MEPO1313-IPRKZ'
'D'.
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=TABIDT8'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
*perform bdc_field using 'MEPO1222-EKORG'
'1000'.
*perform bdc_field using 'MEPO1222-EKGRP'
'STO'.
*perform bdc_field using 'MEPO1222-BUKRS'
'1000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MEPO1211-EEIND(01)'.
*perform bdc_field using 'DYN_6000-LIST'
' 1'.
*perform bdc_field using 'MEPO1313-UEBTO'
'10.0'.
*perform bdc_field using 'MEPO1313-MAHN1'
'10'.
*perform bdc_field using 'MEPO1313-MAHN2'
'20'.
*perform bdc_field using 'MEPO1313-MAHN3'
'30'.
PERFORM BDC_FIELD USING 'MEPO1313-BWTAR'
'OWN_D'.
XFILE-BWTAR.
*perform bdc_field using 'MEPO1313-IPRKZ'
'D'.
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=V69A_KONY'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
*perform bdc_field using 'DYN_6000-LIST'
' 1'.
*perform bdc_field using 'BDC_CURSOR'
'KOMV-KSCHL(01)'.
PERFORM BDC_DYNPRO USING 'SAPMSSY0' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'05/04'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=PICK'.
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=MESAVE'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
PERFORM BDC_FIELD USING 'DYN_6000-LIST'
' 1'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KOMV-KSCHL(01)'.
PERFORM BDC_DYNPRO USING 'SAPLSPO2' '0101'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=CANC'.
PERFORM BDC_DYNPRO USING 'SAPLMEGUI' '0014'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=MELEAV'.
*perform bdc_field using 'MEPO_TOPLINE-BSART'
'UB'.
*perform bdc_field using 'MEPO_TOPLINE-SUPERFIELD'
'2100 EOL RMT'.
*perform bdc_field using 'MEPO_TOPLINE-BEDAT'
'25.07.2007'.
PERFORM BDC_FIELD USING 'DYN_6000-LIST'
' 1'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KOMV-KSCHL(01)'.
PERFORM BDC_DYNPRO USING 'SAPLSPO1' '0100'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=NO'.
CALL TRANSACTION 'ME21N' USING BDCDATA MODE MOD
MESSAGES INTO MSGCOLL.
ENDFORM. " CALL_VA21
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. " BDC_DYNPRO
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM. " BDC_FIELD
FORM FIELDCAT_INIT USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA POS TYPE I VALUE 0.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'SERIAL_NO'.
LS_FIELDCAT-SELTEXT_M = 'Sr No'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '4'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = ' RECPLT'.
LS_FIELDCAT-SELTEXT_M = 'RECEVIENG PLANT'.
LS_FIELDCAT-HOTSPOT = 'X'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-SELTEXT_M = 'Material Code'.
LS_FIELDCAT-HOTSPOT = 'X'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'MAKTX'.
LS_FIELDCAT-SELTEXT_M = 'Mat Description'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'KBETR'.
LS_FIELDCAT-SELTEXT_M = 'GAQ'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'KPEIN'.
LS_FIELDCAT-SELTEXT_M = 'Per'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'KMEIN'.
LS_FIELDCAT-SELTEXT_M = 'UNit'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'DATE'.
LS_FIELDCAT-SELTEXT_M = 'DATE'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-TABNAME = 'XOUT'.
LS_FIELDCAT-FIELDNAME = 'REMARKS'.
LS_FIELDCAT-SELTEXT_M = 'REMARKS'.
LS_FIELDCAT-EMPHASIZE = 'C410'.
LS_FIELDCAT-OUTPUTLEN = '15'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
ENDFORM. " fieldcat_init
*& Form layout
FORM LAYOUT .
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT-ZEBRA = 'X'.
ENDFORM. "layout
**& Form write_alv_grid
FORM WRITE_ALV_GRID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = WF_REPORT
I_BACKGROUND_ID = 'ESSARLOGO'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_SORT = IT_SORT
I_SAVE = 'A'
IS_VARIANT = WF_VARIANT
IT_EVENTS = WF_EVENTS
TABLES
T_OUTTAB = XOUT
EXCEPTIONS
PROGRAM_ERROR = 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.
ENDFORM. " write_alv_grid
*& Form top-of-page
FORM TOP_OF_PAGE.
***This function for heading
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IST_LIST_TOPOFPAGE.
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM. "heading
**& Form write_output
FORM WRITE_OUTPUT .
***To get the events
PERFORM CREATE_EVENT USING WF_EVENTS.
***Heading for grid
PERFORM WRITE_TOPOFPAGE USING IST_LIST_TOPOFPAGE .
PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
PERFORM LAYOUT.
***Display the ALV
PERFORM WRITE_ALV_GRID.
ENDFORM. " write_output
*& Form write_topofpage
FORM WRITE_TOPOFPAGE USING L_IT_LIST_TOPOFPAGE
TYPE SLIS_T_LISTHEADER.
CLEAR S_LIST_TOPOFPAGE.
S_LIST_TOPOFPAGE-TYP = 'H'.
S_LIST_TOPOFPAGE-INFO = TEXT-012 .
APPEND S_LIST_TOPOFPAGE TO L_IT_LIST_TOPOFPAGE.
CLEAR S_LIST_TOPOFPAGE.
S_LIST_TOPOFPAGE-TYP = 'S'.
S_LIST_TOPOFPAGE-KEY = TEXT-013 .
S_LIST_TOPOFPAGE-INFO = SY-UNAME.
APPEND S_LIST_TOPOFPAGE TO L_IT_LIST_TOPOFPAGE.
S_LIST_TOPOFPAGE-KEY = TEXT-014 .
S_LIST_TOPOFPAGE-INFO = WF_DATE1 .
APPEND S_LIST_TOPOFPAGE TO L_IT_LIST_TOPOFPAGE.
S_LIST_TOPOFPAGE-KEY = TEXT-015 .
S_LIST_TOPOFPAGE-INFO = WF_TIME .
APPEND S_LIST_TOPOFPAGE TO L_IT_LIST_TOPOFPAGE.
ENDFORM. " write_topofpage
*& Form CREATE_EVENT
FORM CREATE_EVENT USING L_EVENTS TYPE SLIS_T_EVENT.
*This Function is to get the events
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = WF_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
READ TABLE WF_EVENTS INTO WF_EVENT WITH KEY NAME =
SLIS_EV_TOP_OF_PAGE.
IF SY-SUBRC = 0.
MOVE FORMNAME_TOP_OF_PAGE TO WF_EVENT-FORM.
APPEND WF_EVENT TO WF_EVENTS.
ENDIF.
ENDFORM. " eventsENDFORM. " events .
iam manually scheduled program in the Background
through menu -
> program -
> F9. -
BDC is not working as background job
Dear Expert,
I have developed a program which contain BDC of FB75 with mode 'E' . I have Schedule this program as background by FM 'JOB OPEN' , Submit statement and 'JOB CLOSE'. My problem is when i run this program as background BDC is not working.
What is the solution of this problem?
Thanks
AvadheshHi Avadhesh,
if FB75 is doing a commit work, then, your batch job will finish with error at the time of BDC execution.
Try to add the option parameter type CTU_PARAMS to the CALL TRANSACTION with field RACOMMIT = 'X'.
DATA opt TYPE ctu_params.
opt-RACOMMIT = 'X'.
CALL TRANSACTION 'FB75' USING bdcdata_tab OPTIONS FROM opt.
Regards. -
Background job not run properly
Hi,
When an infopackage is triggred through process chain in BI a background job will be exeuted at R/3 to fetch data from R/3.
But the bakground job did not execute properly hat is it did not fetch any data but ot finished.
But when the infopackage is executed manually the background job fetches the data from R/3.
Why the job is not fetching data when triggered through process chain.
Please help me to sole this issue.
Regards,
IndhuHi Induja,
In your case, you will have to debug the background job that is activated through BI. Check if proper data is coming from BI.
You can only debug a background job if it is created under your user id. Thus, to debug the job you first have to own it and then debug by selecting it and either typing 'JDBG' in the command field or through menus available on the top.
Job overview transaction code - SM37.
Hopefully the issue is in Development/Test/Quality system and not in Production.
Hope that helps!.
Regards,
Saba -
How to identify what are all the events are created in background jobs?
Hi all,
how to identify what are all the events are created for background jobs. And what events gets triggered for a particular job.
thanxs
harithaHi Haritha,
JOB is a program which starts to a determined point of time and executes some standard programs in the system. JOBs can be planed to a determined point of time on the regular basis (every night, for example) or to some discret time moments. So, the JOB can be planed and then will be started automatically without the manual start.
Realtime programs are understood in the most cases as actual program execution which is started by somebody to the actual moment of time.
Typically per JOBs some special processes will be started that should be executed automatically and regularly: for example, IDOC application, some correction reports, statistic updates etc.
Standard jobs are those background jobs that should be run regularly in a production SAP System These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
Use
As of Release 4.6C, the Job Definition transaction ( sm36 ) provides a list of important standard jobs, which you can schedule, monitor, and edit.
Standard jobs are those background jobs that should be run regularly in a production SAP System. These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
for more information you can go thru the following thread:
http://help.sap.com/saphelp_nw70/helpdata/en/24/b884388b81ea55e10000009b38f842/frameset.htm
About Events:
Events have meaning only in the background processing system. You can use events only to start background jobs.
Triggering an event notifies the background processing system that a named condition has been reached. The background processing system reacts by starting any jobs that were waiting for the event.
Types of Events:
There are two types of events:
1.)System events are defined by SAP. These events are triggered automatically when such system changes as the activation of a new operation mode take place.
2.)User events are events that you define yourself. You must trigger these events yourself from ABAP or from external programs. You could, for example, signal the arrival of external data to be read into the SAP system by using an external program to trigger a background processing event.The event scheduler processes an event if the event is defined in the system.
For example, if a system (System 1) receives an event from another system (System 2), the event scheduler of System 1 processes the event only if it is defined in System 1. That event does not need to be defined in System 2 (the sending system).
You define an event by assigning a name (EVENTID) to it. When defining an event, you do not define the event arguments.
for more information you can go thru the following thread:
http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e2a543b11d1898e0000e8322d00/frameset.htm
When you schedule the process chain or infopackages the jobs associated with it run in the background mode. In case you want to create a job for a specific activity you can do so in SM36. You would be creating jobs that would get executed in any one of the options:
1. Immediate
2. Date & Time
3. After event.
4. After job.
5. At Operation mode.
In case you want to view the job logs go to sm37.
Also Pls check DB02 for database performance and ST03 for workload .
Analyse u will have an idea ,
*pls assign points,if info is useful**
Regards
CSM reddy
null -
Background job SWFSLSDLEX cannot be scheduled (error )"
Hi All ,
i got the following error ,
when i try to customize the SWU3 " Schedule background job for dead line monitoring ".
The error is :
"Work item -: Background job SWFSLSDLEX cannot be scheduled (error )"
And the Error log says :
Refer to your workflow system administrator.
The specified error number should indicate possible reasons for the error. It is possible that the system is in an inconsistent state. The scheduled start of the specified background job must be compared with the minimum date/time of all work items in table SWWDHMIN. It may be necessary to delete the scheduled background job by hand and reschedule it by calling report RSWWDHEX.
Apparently i dont see any table SWWDHMIN.
Thanks!
Richard AThe issue is solved by adding start profile and instance profile to operation modes.
Many thanks to my BASIS Guys for solving it !
Richard A -
CCMS Monitor to Pager for Failed Background Jobs
Hello Experts,
I am currently leveraging Central CCMS monitoring to alert us via email whenever a background job fails in production using the MTE Class R3BPServerSpecAbortedJobs.
I am trying to find a way that I can tweak the monitor to alert me ONLY when specific background jobs fail.
We want this alert to notify the oncall pager only when a handful of critical jobs fail. Does anyone know how I can delimit this MTE?
For example, we will be creating jobs that begin with Z_ALERT* that I will tie to an auto-react method that will email a pager.
Thanks in advance.
BillHi Sundara.
From following link, you can download step by step setup information.
So please check following documents.
http://www.service.sap.com/bpm
=>Media Library=>Technical Information
=>1. Business Process Monitoring - Setup Roadmap
=>2. Setup Guide - Business Process Monitoring
Before you start setup, I recommend you to check
SAP Notes 521820 to ensure whether you already fulfill
prerequestions.
Basically what you have to do is following.
1. Describe your business process under following area.
(T-CD DSWP =>Solution Landscape =>Solution landscape maintenance)
2. Setup BPMon session.
(T-CD DSWP =>Operation Setup => Solution Monitoring =>
Business Process Monitoring)
in BPMon session, select job monitoring. And define background
job that you want to monitor.
In BPMon job monitoring, you can monitor, cancel, delay, duration,
unexpected parallelization, also job log and so on.
I hope this information help you.
Best Regards
Keiji Mishima -
TEXT_CONVERT_XLS_TO_SAP in background job schedule giving error
Hi Experts,
I used TEXT_CONVERT_XLS_TO_SAP to upload excel data. it is working fine in forground.
As large volume of data is there, I sheduled it in back ground using SM 36/ SM37.
data is not getting uploaded. I closed the excel file...still it is not getting uploaded. internal table contains no data.
Can any one help me on this....
Regards,
apuriHi kiran,
he function modulw which u r using is GUI function module.
Gui function module will not work in background jobs.
Thanks, -
Frequency of CC background Jobs
Hi,
I am just wondering what is standard practice with regard to the frequency of which background jobs are scheduled in the production CC
1) Upload static text
2) Upload authorization objects
3) Refresh Informer Reports
Also there is a backend sync for mitigation and rules- I have tried to run these but the destination system field does not contain any values. I have searched for information on what these background jobs but cannot find any doucmentation.
If anybody has advice on CC background jobs I would be grateful.
Thanks,We are running CC 5.1 and after the initial setup we only run three background jobs on the weekends. We do a user, role and profile incremential analysis. We also do a weekly batch risk analysis and then we do a weekly management report to populate the graphs in the mamagement report section.
Dave -
How can i create background jobs and link them to the Event so that they will be triggered? I have no clue on this, can anyone explain in a detailed manner with the Transaction codes for each.
Thanks in advance.Hi laitha,
JOB is a program which starts to a determined point of time and executes some standard programs in the system. JOBs can be planed to a determined point of time on the regular basis (every night, for example) or to some discret time moments. So, the JOB can be planed and then will be started automatically without the manual start.
Realtime programs are understood in the most cases as actual program execution which is started by somebody to the actual moment of time.
Typically per JOBs some special processes will be started that should be executed automatically and regularly: for example, IDOC application, some correction reports, statistic updates etc.
Standard jobs are those background jobs that should be run regularly in a production SAP System These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
Use
As of Release 4.6C, the Job Definition transaction ( sm36 ) provides a list of important standard jobs, which you can schedule, monitor, and edit.
Standard jobs are those background jobs that should be run regularly in a production SAP System. These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
for more information you can go thru the following thread:
http://help.sap.com/saphelp_nw70/helpdata/en/24/b884388b81ea55e10000009b38f842/frameset.htm
About Events:
Events have meaning only in the background processing system. You can use events only to start background jobs.
Triggering an event notifies the background processing system that a named condition has been reached. The background processing system reacts by starting any jobs that were waiting for the event.
Types of Events:
There are two types of events:
1.)System events are defined by SAP. These events are triggered automatically when such system changes as the activation of a new operation mode take place.
2.)User events are events that you define yourself. You must trigger these events yourself from ABAP or from external programs. You could, for example, signal the arrival of external data to be read into the SAP system by using an external program to trigger a background processing event.The event scheduler processes an event if the event is defined in the system.
For example, if a system (System 1) receives an event from another system (System 2), the event scheduler of System 1 processes the event only if it is defined in System 1. That event does not need to be defined in System 2 (the sending system).
You define an event by assigning a name (EVENTID) to it. When defining an event, you do not define the event arguments.
for more information you can go thru the following thread:
http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e2a543b11d1898e0000e8322d00/frameset.htm
When you schedule the process chain or infopackages the jobs associated with it run in the background mode. In case you want to create a job for a specific activity you can do so in SM36. You would be creating jobs that would get executed in any one of the options:
1. Immediate
2. Date & Time
3. After event.
4. After job.
5. At Operation mode.
In case you want to view the job logs go to sm37.
_List of Background Jobs_
BIREQU - Load of a Request/Reconstruction of a request
BI_AGGR4 - Aggregates activation
BI_BTCH - Any batch job like ABAP program run in background
BI_DELR - Deletion of request
BI_HIER - Hierarchy loading/activation
BI_ODSA - ODS activation
BI_PROCESS_ABAP - ABAP program in process chain
BI_PROCESS_LOADING - Data Loading in process chain using nfopackage
BI_PROCESS_ODSACTIVAT - ODS actiavation in Process chain
BI_PROCESS_TRIGGER - Trigger job for process chain
BI_PSAD - probably PSA deletion
BI_STAT - Building statistics
BI_STRU - Change run job
BI_WRITE_PROT_TO_APPLLOG - Application log job
RANATL_ACCT_CACHE_WARMUP
Use tcode SM62 to create User events.
Use tcode SM64 to trigger the event.
Wizards for Event Creation :pls chk this link
http://help.sap.com/saphelp_erp2005vp/helpdata/en/f7/d1c20a02d511d3a6550060087a79ea/frameset.htm
*pls assign points,if info is useful**
Regards
CSM reddy -
ALV List only 80 Columns when runinning as background job
Hello Guys,
I have a Problem with an ALV List.
We use the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY for a Document Journal.
When I run it in foreground it works fine. But when I view the spool in background the list makes a break at excactly 80 signs, but the line size should be about 120.
In the report the Line-Size is set correctly, even the print parameters seem to be ok. We are running it with X_65_255.
I saw that there are some SAP Notes to this topic, but on our release (SAP_BASIS 700) the notes are already implemented.
Has anyone a solution to this topic?
Thanks and regards
RolandTry this.
[ALV List only 80 Columns when running in background job|https://forums.sdn.sap.com/click.jspa?searchID=25735042&messageID=5686003] -
Schedule background job for working days
Hi,
I would like to schedule a background job, but only runs on working days (from Monday to Friday), I am wondering whether it is possible to run as mentioned or not?
Kindly advise!
Thanks!!
br,
hyhi
F9 - > click date/time, after the at operation mode tab, there is an arrow mark, click it, in taht mention your factory calendar id (which includes public holidays and specify from which workday it should start, time), then check and come back to the main screen, check periodic job, click the periodic values tab, in that specify it as daily...will solve your requirement
if helpful, reward
Sathish. R -
HOw to find out a report name when you know only the name of background job
Hi experts ,
my question is i need to find out teh report name for which i knew only the background job name of the report .
thanx
Venky.Go to tcode SM37->Give job name and execute->choose tool bar button STEPS (Disply Steps list) ->Then you will get program or command
Maybe you are looking for
-
WRT54g V6 connecting router to hotspot wifi instead of dsl or cable
I hope someone on here can assist me. I have a wrt54g V6 and I also have free wifi internet through our town. What I would like to be able to do is connect my router to the free wifi and then use my router to connect my laptops, desktop to the intern
-
Part Paid Invoice Missing From Payment Wizard / Outgoing Payments
Hi, Having a bit of an issue with a purchase invoice on SAP B1. In brief: The invoice was posted fine, then they paid 3 invoices but the total was short. The user allocated payment manually using outgoing payments to the 3 invoices, but partially pai
-
My Macbook Pro just shuts off.....not very happy
I got my 17" MBP a week ago Saturday. Everything was fine for almost a week. Friday it shut odwn on me three times. I called Apple Care and they walked me through a series of steps that supposedly would take care of the problem: remove the battery, p
-
Mac Pro 2,1 10.6.8 won't boot
Hi All, Here I am with a very strange problem. My macpro suddenly don't start correnctly. It starts, the apple logo appears and the wheel start to run. At the certain point the whell stops and the mac restart. I've already: - Detached the power line
-
Private printing on canon IR2200-3300
I have a printer canon ir3300, the printer use private key for user groups, i configured local printer in SAP, but when try printing not required the key and not printing.I print with aplications non SAP without problems. thanks.