Batch Job Error Messages

Hi Gurus,
I have a program with rounddown quantities in deliveries notes. This program is run in background with all other programs. When we checked the batch job error log, we found out that when it gets to this Rounddown program, there are some SAP generated errors messages (examples are listed below).
This issue is there is no way to know exactly which deliveries the error is generated from and if the program actually rounddown the quantities of all the deliveries passed to it and so on, because this error messages are not specific enough (like we can see below).
This program passed this new rounddown quantity number from the internal table using a BAPI.
Is there a way to change this SAP generated error messages to be specific enough like stating which actual delivery number is been affected or even stop at the error and send an email to the user to change the delivery or something in that manner, OR is there a way we can replace this SAP generated error messages with our own messages and send email out to the user.
Error Messages:-
01/16/2008 01:40:40 Step 005 started (program ZSDSO_DELIVERY_QTY_ROUNDDOWN, variant , user ID AUTOSYSUSER
01/16/2008 01:51:35 Item 000020 belongs to delivery group 001
01/16/2008 01:52:13 Item 000020 belongs to delivery group 001
01/16/2008 01:52:15 Item 000030 belongs to delivery group 001
01/16/2008 01:52:19 Item 000020 belongs to delivery group 001
01/16/2008 01:52:29 Dynamic credit check has been exceeded                              23,984.52 USD
01/16/2008 01:52:30 Item 000020 (change quantity manually to             400 PC because of complex struct
01/16/2008 01:52:30 Item 000030 (change quantity manually to             400 PC because of complex struct
01/16/2008 01:52:30 Quantity correlation for dependent items has been carried out
01/16/2008 01:52:30 Item 000020 belongs to delivery group 008
01/16/2008 01:52:30 Item 000030 belongs to delivery group 008
01/16/2008 01:52:31 Dynamic credit check has been exceeded                              23,984.52 USD
01/16/2008 01:52:32 Delivery quantity must be entered for the item
01/16/2008 01:52:34 Dynamic credit check has been exceeded                              23,984.52 USD
01/16/2008 01:53:05 Item 000020 belongs to delivery group 001
01/16/2008 01:54:40 Dynamic credit check has been exceeded                              15,501.88 USD
01/16/2008 01:55:53 Item 000020 belongs to delivery group 001
Thanks.
Points will be awarded.

This is the Subrouting Form code.
FORM call_bapi_delivery_change TABLES p_i_lips LIKE i_lips.
  DATA: w_header_data TYPE bapiobdlvhdrchg,
        w_header_control TYPE bapiobdlvhdrctrlchg,
        w_delivery TYPE bapiobdlvhdrchg-deliv_numb.
  DATA: i_item_data TYPE STANDARD TABLE OF bapiobdlvitemchg,
        w_item_data TYPE bapiobdlvitemchg,
        i_item_control TYPE STANDARD TABLE OF bapiobdlvitemctrlchg,
        w_item_control TYPE bapiobdlvitemctrlchg,
        i_return TYPE STANDARD TABLE OF bapiret2,
        w_return TYPE bapiret2.
  LOOP AT p_i_lips INTO w_lips.
    w_item_data-deliv_numb = w_lips-vbeln.
    w_item_data-deliv_item = w_lips-posnr.
    w_item_data-material = w_lips-matnr.
    w_item_data-batch = w_lips-charg.
    w_item_data-dlv_qty = w_lips-lfimg.
    w_item_data-dlv_qty_imunit = w_lips-lfimg.
    w_item_data-fact_unit_nom = 1.
    w_item_data-fact_unit_denom = 1.
    APPEND w_item_data TO i_item_data.
    CLEAR w_item_control.
    w_item_control-deliv_numb = w_lips-vbeln.
    w_item_control-deliv_item = w_lips-posnr.
    IF w_lips-delete NE 'X'.
      w_item_control-chg_delqty = 'X'.
    ELSEIF w_lips-delete EQ 'X'.
      w_item_control-del_item = 'X'.
    ENDIF.
    APPEND w_item_control TO i_item_control.
  ENDLOOP.
  w_header_data-deliv_numb = w_lips-vbeln.
  w_header_control-deliv_numb = w_lips-vbeln.
  w_delivery = w_lips-vbeln.
  CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
    EXPORTING
      header_data               = w_header_data
      header_control            = w_header_control
      delivery                  = w_delivery
  TECHN_CONTROL             =*
    TABLES
  HEADER_PARTNER            =*
  HEADER_PARTNER_ADDR       =*
  HEADER_DEADLINES          =*
      item_data                 = i_item_data
      item_control              = i_item_control
  ITEM_SERIAL_NO            =*
  SUPPLIER_CONS_DATA        =*
  EXTENSION1                =*
  EXTENSION2                =*
      return                    = i_return
  TOKENREFERENCE            =*
  IF sy-subrc EQ 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
    w_zbdcopendn-otce706 = 'X'.
    MODIFY i_zbdcopendn FROM w_zbdcopendn TRANSPORTING otce706
    WHERE delivery EQ w_deliveries-vbeln.
  ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    DELETE i_zbdcopendn WHERE delivery EQ w_deliveries-vbeln.
   DELETE i_deliveries WHERE vbeln EQ w_lips-vbeln.*
    w_bad_delv-vbeln = w_deliveries-vbeln.
    APPEND w_bad_delv TO i_bad_delv.
  ENDIF.
ENDFORM.                    " call_bapi_delivery_change
Thanks again.

Similar Messages

  • Sending job error message to admin by email

    Hi everyone...
    Anyone knows how to send job error message to admin by email? For example, if crawler failed, an email is sent to admin with the error message. I'm thinking of building windows service which run at the background and knows when a job fail and send the error message through email to admin.
    Is there a better way?
    Cheers,
    Jefi Santoso

    hi,
    >>>Can this be achieved through BPM?
    yes you can put your transformation step
    and send step in a block and specify an exception
    branch and catch all exceptions that will
    occur during transformations and the send step
    then you can send info from the exception branch to
    any other system
    you won't be able to catch the error's name
    but you will be able to notify any thinrd party
    about the error
    more on error catching:
    http://help.sap.com/saphelp_nw04/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm
    Regards,
    michal

  • In which tables are batch input error messages logged?

    does anybody know in which table are the batch input error messages logged?
    I have to display the error messages which have occured during the transaction
    I tried to find out, but i could see only the table BDCMSGCOLL, this table has only the Batch input message number and not the message itself?
    does anybody know about the batch input error messages?

    hi,
    check the sample code below.
    messtab is of type BDCMSGCOLL.
    Call the transaction and then use T100 to get the message.
    DATA: l_mstring(480).
    call transaction using
      REFRESH messtab.
      CALL TRANSACTION tcode USING bdcdata
                       MODE   ctumode
                       UPDATE cupdate
                       MESSAGES INTO messtab.
      l_subrc = sy-subrc.
      SKIP.
      LOOP AT messtab.
        SELECT SINGLE * FROM t100 WHERE sprsl = messtab-msgspra
                                  AND   arbgb = messtab-msgid
                                  AND   msgnr = messtab-msgnr.
        IF sy-subrc = 0.
          l_mstring = t100-text.
          IF l_mstring CS '&1'.
            REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
            REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
            REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
            REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
          ELSE.
            REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
            REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
            REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
            REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
          ENDIF.
          CONDENSE l_mstring.
          WRITE: /4 messtab-msgtyp, l_mstring(250).
        ELSE.
          WRITE: /4 messtab.
        ENDIF.
      ENDLOOP.

  • An error occurred while executing batch. Error message is: There is not enough space on the disk.

    Hello all,
    I execute a T-SQL query, which will retrieve large amount of data, however, I get an error message after a few seconde.
    The error message is :
    An error occurred while executing batch. Error message is: There is not enough space on the disk.
    Who can tell me the reason and waht's the steps to solve this issue ?
    Really thanks.
    Thanks, Jed deng

    The other two posters suggested that the problem with tempdb or you data/log files. This is not the case here. The error message relates to the client-side of things. Apparently SSMS needs to store data on disk. I don't recall exactly when this happens,
    but I seem to recall that the files appear in you %TEMP% directory.
    I would suggest that your correct action is to clean up the disk. Not the least there may be a lot of junk in your %TEMP% and %TMP% directories.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Thanks Erland, I was not aware of this earlier. Now, I am able to find out one of the resons for slowness of SSMS gird. Also, I have just checked it with process monitor, SSMS is creating tmp%.tmp files..
    - Chintak (My Blog)

  • Batch Job error while running a FI Job

    Error Message:
    Language ,D is not in the System.
    Message no. TL080
    Diagnosis
    All languages known to the System are in the fields LAISO (two-character ISO code) and SPRAS (one-character SAP-internal format) in the table T002. They do not include the specified language.
    Procedure
    Enter a two-character ISO code or a one-character SAP language in table T002.
    However, I checked that D is maintianed in T002 table.
    Please let me know if any one has faced the same situation previously. The job send the email to the 3rd party system.
    Regards,
    Aruna

    Hello,
    D may be there, but you may not be having the two digit language key language expected by SAP.
    You can maintain the entries in the table directly SE16N
    &SAP_EDIT
    AND say enter. It starts in edit mode of the table.
    Maintain the entries.
    Regards,
    Ravi

  • Job Error Message "There is a job that has not yet ended"

    Hi.
    I have an Report that must starts with an Job. The Reports calls the report RFBIBL00.
    I create an entry in the Transaction OBDU and then i define a job.
    At the first run, all is ok. But when the job must run a second time, i get the error  message BD 077. There is a job that has not yet ended....
    What must I do? The both job have the status "finished"...
    Thanks
    Marcus
    Edited by: Marcus Ventur on Jun 26, 2009 11:26 AM

    Hi,
    Use this code, it may help you.
    FORM BACK_GROUND_JOB.
      W_JOBNAME = 'JOB1'.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                JOBNAME          = W_JOBNAME
           IMPORTING
                JOBCOUNT         = W_JOBCOUNT
           EXCEPTIONS
                CANT_CREATE_JOB  = 1
                INVALID_JOB_DATA = 2
                JOBNAME_MISSING  = 3
                OTHERS           = 4.
      IF SY-SUBRC NE 0.
        MESSAGE S368(00) WITH 'Error Creating Job'
        SY-SUBRC.
        EXIT.
      ENDIF.
      SUBMIT Prgoram
          VIA JOB W_JOBNAME
          NUMBER W_JOBCOUNT
          AND RETURN.
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                JOBCOUNT          = W_JOBCOUNT
                JOBNAME           = W_JOBNAME
                STRTIMMED         = 'X'  " Immediate
           EXCEPTIONS
                INVALID_STARTDATE = 1
                JOBNAME_MISSING   = 2
                JOB_CLOSE_FAILED  = 3
                JOB_NOSTEPS       = 4
                JOB_NOTEX         = 5
                LOCK_FAILED       = 6
                OTHERS            = 7.
      IF SY-SUBRC > 0.
        MESSAGE S368(00) WITH 'Closing Job Failed'
        SY-SUBRC.
        EXIT.
      ENDIF.
    ENDFORM.                    " BACK_GROUND_JOB
    Thanks
    Ravi Kanth

  • Batch split error message: Item category not defined

    Hi gurus,
    I'm trying to use the batch split in an inbound delivery but I get the error message of the subject of this thread while saving.
    Could you bring some light here please?
    Many thanks,
    Marc

    Issue found.

  • Scheduled Batch jobs error : ora-01031 insufficient privileges

    I have created a batch job that runs my database backups on a windows 2000 server. This job works perfect from the command line with the following syntax:
    coldbackup.bat PROD
    I have tried to schedule this backup to run every evening as follows:
    at 01:00 /every:M,T,W,Th,F,S C:\coldbackup.bat PROD
    The batch job does run every morning but generates an error when trying to shutdown the database. The error is ora-01031 insufficient privileges and seems to be related to the 'connect / as sysdba' command. The job has been scheduled using the local 'Administrator' user, which have been added to the ORA_DBA group.
    I have thought of one solution and that entails hard-coding the username and password into the script, but that creates a security risk.
    Can someone explain this behaviour and possible provide a good solution.
    Thank you

    Solution: Yes, I have found the solution to my problem.
    I was trying to schedule the batch job from the command line and in doing so the job was running in a 'system' user.
    When I scheduled the job from the control panel --> schedule tasks I was able to enter the 'run as' username and password.

  • Clearing/downdating stock (with batch numbers) error messages

    Hi,
    We are trying to clear down some stocks with batch numbers and have tried MB1A LT01/LT10.  However, we get the following error messages (all individual);
    Deficit of BA Unrestricted-use (Deficit of BA Unrestricted-use 56.855 KG : 4589 BP01 0088 0000199415)
    Storage unit 4000289374 is not consistent with other transfer order data
    Showing zero for stock & cannot clear transfer order
    How can we clear the stocks please?
    Thanks
    Keeley

    Deficit of BA Unrestricted-use  is a pure MM message.
    It just tells you that you have no stock of the mentioned batch 0000199415 of material 4589 in plant BP01 at storage location 0088.
    check in MMBE where or in what status your stock of this batch is, then change the fields in MB1A accordingly.

  • Batch process error message

    Hi there
    Last time i used photoshop everything was fine. and then all of a sudden none of my custom actions work with a batch process. a message keeps coming up saying
    "the command "image size" is not currently available"
    If i click continue it pops right back up saying the same but for the next process and again and again with every process in my action.
    It does this on any photo and with any custom action i have saved
    Interestingly if i just open the photo and click play on the action without going through the batch process... it works fine.. so its nothing wrong with my actual action.
    Has there been a bug introduced with a live update along the way?
    Its very very annoying as i regularly batch process 100s of photos for the web and now im having to do them 1 by 1!!
    thanks in advance for any help.
    how can i roll back an update in photoshop??

    Photoshop does not have a live update so your problem must be with something else.
    Geoff.

  • Batch session error message

    hi expert,
    when we run the batch sesion we met the below message
    Field BSEG-LZBKZ. does not exist in the screen SAPMF05A 0332 FB01 10 SAPMF05A     0332
    Transaction error the invoice didn't post to the sap . But when is checked the screen we have the value to the filed bseg-lzbkz, it's makes me confuse on this. Appreciate throw you lights on this.
    thansk in advance

    Hi,
    Please go through TCODE SHDB , do recording of the tcode  and create program from that ( by selecting the recording and clicking on PROGRAM button).
    CHECK whether the  ORDER of OK_CODES match with your  program OK_CODES.
    Thanks and regards.

  • BAtch Job Error Reson CPIC..

    Hi,
    I submitted two jobs and the status is Active.I looked in SM50 and the staus is Stopped and Reson is CPIC.Can anybody tell me what it means.The status is still Active in SM37.
    Points will be awarded.
    Thanks..

    Hi,
    CPIC users are users with type c .
    Communication 'C'
    Use the user type Communikation for dialog-free communication between systems (for RFC or CPIC service users of different applications, for example, ALE, Workflow, TMS ZBV).
    Dialog logon is not possible.
    Cheers
    VJ

  • SSMS Intermittent error - "Error message is: SqlDateTime overflow"

    SQL 2008R2(10.50.6000) Standard Edition, 64 Bit on Windows 2008R2 SP1 Enterprise.
    SSMS 10.50.4033
    From time-to-time (several times per week) I receive the following error when running a query from SSMS.
    "An error occurred while executing batch. Error message is: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."
    This happens on small single statement queries, large complex admin queries, ad hoc queries, queries that I have source controlled and tested/run many times.  I have exhaustively checked the target tables and don't find any dates out of range.
    Typically, I just rerun the query and it runs fine.
    Another error that occurs less often is
    "An error occurred while executing batch. Error message is: Non-negative number required.
    Parameter name: count"
    This is particularly confusing since I don't have a parameter named "count" which is an illegal T-SQL identifier anyway.
    The references to "SqlDateTime"  and "count" lead me to believe this is an SSMS coding error.
    Ray

    Unfortunately, without a scenario to repro the issue, it is impossible investigate. And overall, intermittent errors are horrendeously difficult to troubleshoot.
    What I would recommend is that you install SSMS 2012 SP2. You can download it for free here:
    http://www.microsoft.com/en-us/download/details.aspx?id=43351
    You can run SSMS2012 against SQL 2008 R2 without problem, and personally I find it nicer to work with.
    Not that I am sure that it will resolve the issue.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Error messages in Process chains

    Hello BI fans
    In which transaction can I maintain batch-initiated error messages from process chains.
    I am not looking for the process chain variant for messages.
    I would like to create messages only for errorness messages.
    thanks
    BEO

    Hi,
    Please check the forum before posting for this issue.
    Here You can follow below steps:
    1) right click on process type and select "create messages".
    2) choose "error" and create variant for error message
    3)write message body in "EDIT DOCUMENT" and mention email ID's in "Maintain Recipient list" tab
    4) save and schedule the chain again
    Edited by: shailesh patil on Nov 14, 2011 5:51 PM

  • Error message when trying to create any query

     
    I am trying to run a query on my sql server and get the following error message:
    "An error occurred while executing batch. Error message is: The directory name is invalid."
    how do I fix?

    With me it had indeed something todo with some temp files.
    Me and my colleague where logged on to a remote server (remote desktop connection), and on that server we were both using the sql management studio.
    Suddenly we both received the error "An error occurred while executing batch. Error message is: The directory name is invalid.".
    The solution for us was just logging out (ALL USERS) that were currently connected (with a remote desktop connection and that were working with the sql management studio) and afterwards logging back in. That solved it here.
    Regards
    Thomas

Maybe you are looking for

  • I have a lacie drive attached to my airport but it will not mount

    I have an Aiport Extreme and I just purchased a Lacie 2d Quadra drive to attach to it. However, it will not mount. I have tried to power it off and on, replaced the USB cable but it will not wake up. The blue light will flicker for a moment then go d

  • TS1292 i lost my apple gift card. how do i find the redeem code

    trying to download a prepurchased album but dont have my redeem code. is there a wY TO DOWNLOAD WITHOUT IT OR A WAY TO FIND OUT MY REDEEM CODE WITHOUT HAVING THE CARD ANYMORE

  • PDF different size

    I just joined Adobe PDF online conversion and converted my first file. It is a 6" x 9" Word document but the resulting pdf is 8 1/2 a 11" which makes my margins much larger than they should be. Why is this, and how can I get a 6 x 9 pdf. Thanks for a

  • Running multiple oracle versions on the same server...

    Hi, I have a server that is currently running oracle rdbms 10.2.0.3 on linux Itanium platform and the database that is currently on that server uses oracle ASM for it's files. We have a need to also run a oracle rdbms 10.1.0.3 on the same sever and I

  • Radiogroup properties

    Hi, has somebody tried to change radiogroup properties, its look. For example, how to change radiogroup values font size and its placing inside one item, by default it is strongly vertical, but I need, for example,--> o o o o o o Thanks! Karina.