Catching message errors after submit

Is there any way to catch message after submitting report?
I mean any type of message, i.e. E,S,I and so on. And if it's possible, I need to suppress them. Maybe this can work with help of the system calls?

HI Vitaly,
You can try the 'SUBMIT VIA JOB' option and then read the job log and/or spool for any messages. Here is a rough code.
  DATA: l_jobcount LIKE tbtcjob-jobcount.
  CALL FUNCTION 'JOB_OPEN'
       EXPORTING
            jobname          = 'MYTESTJOB'
       IMPORTING
            jobcount         = l_jobcount
       EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
            INTO i_return_messages-message.
    i_return_messages-type = 'E'.
    APPEND i_return_messages.
    CLEAR i_return_messages.
    EXIT.
  ENDIF.
  SUBMIT zbwm_sap_to_dsc_enr_rel_notice
    WITH p_relno = release_nbr
    USER sy-uname VIA JOB 'MYTESTJOB'
  NUMBER l_jobcount AND RETURN.
  CALL FUNCTION 'JOB_CLOSE'
       EXPORTING
            jobcount             = l_jobcount
            jobname              = 'MYTESTJOB'
            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 'I' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
            INTO i_return_messages-message.
    i_return_messages-type = 'E'.
    APPEND i_return_messages.
    CLEAR i_return_messages.
  ENDIF.
After this, you will have to check if the job has completed or not(in a loop). To do that you can call the function module SHOW_JOBSTATE. This will tell the status of the job. Once the job status is 'FINISHED' or 'ABORTED', you can then call another function module BP_JOBLOG_READ to read the job log.
But again, you will have parse through the text to identify the message type, number, message text etc.

Similar Messages

  • Catching an error in SUBMIT Statement

    Hi,
    I am using SUBMIT (REPORT) and RETURN.
    How to catch an error when there is one in the  REPORT Program that i am calling.

    hi
    Calling Programs
    If you need to program an extensive application, one single program can become very complex. To make the program easier to read, it is often a good idea to divide the required functions among several programs.
    As well as using external modularization, in which you store procedures in special non-executable ABAP programs like function groups, you can also call independent programs from within an ABAP program.
    The following ABAP statements allow you to start an executable program or transaction. You can either exit the calling program, or have the system return to it when the called program finishes running.
    Executable Program
    Transaction
    Call without return
    SUBMIT
    LEAVE TO TRANSACTION
    Call with return
    SUBMIT AND RETURN
    CALL TRANSACTION
    You can use these statements in any ABAP program. For example, while processing a user action in the output list of an executable program, you might call a transaction whose initial screen is filled with data from the selected list line.
    The event LOAD-OF-PROGRAM is triggered each time a program is called. If a corresponding event block is defined in the framework program, it is executed once before the first other processing block is executed.
    An interesting remark at this point is that each execution of an executable program actually has a SUBMIT statement as its source. When you enter the program name in a transaction like SE38 or SA38 and choose Execute, a SUBMIT statement occurs in the transaction. Technically speaking, therefore, executable programs have the attribute of being able to be called using SUBMIT, although their principal characteristic from a useru2019s point of view is that they are started in the foreground.
    Memory Organization in Program Calls
    The first ABAP program in a session on the application server opens its own internal session (roll area) within the main session. All externally-called procedures run in the same internal session as the calling program, that is, the main program and working data of the procedure are loaded into the same memory area in the internal session.
    When you call an executable program or a transaction, the system opens a new internal session for each program. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack. The system can open up to 9 further internal sessions in external program calls.
    As well as executable programs and transactions, dialog modules also open a new internal session. Dialog modules were previously used for modularizing screen sequences.
    Program Calls and SAP LUWs
    An SAP LUW is a logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW. There are various bundling techniques that you can use to ensure that all of the database updates belonging to an SAP LUW are made in the same single database LUW.
    Externally-called procedures do not open a new SAP LUW.
    However, when you start a new executable program or transaction, a new SAP LUW starts. Database updates belonging to these programs are collected in their own database LUW. If the new program does not return control to the calling program, the SAP LUW of the old program concludes when the new program is called. If, on the other hand, the new program does return control to the calling program, the new SAP LUW runs parallel to the SAP LUW of the calling program.
    No new SAP LUW is opened when you call a dialog module. Bundling techniques in a dialog module add the database updates to the database LUW of the calling program. You may sometimes need to call a transaction that runs in the same SAP LUW as the calling program. One technique for doing this is to use the existing transaction as a dialog module. To do this, you need to create a new dialog module with the same main program and initial screen as the transaction. Transactions that are used both as transactions and as dialog modules must be programmed to obey certain rules. For further information, refer to Calling Screen Sequences.
    The fact that an external program shares (or does not share) the SAP LUW with its caller has special consequences if the program calls update-task functions or uses COMMIT WORK. For further information, refer to Special LUW Considerations.
    syntax:
    SUBMIT REPORT01     VIA SELECTION-SCREEN     USING SELECTION-SET 'VARIANT1'     USING SELECTION-SETS OF PROGRAM 'REPORT00'     AND RETURN.

  • How to register a students edition to get a licence number, as the respective adobe webpage form shows a error after submit?

    We have all relevant documents and information to show to adobe that this students edition of lightroom for my daughter is valid and that she could get a license number to make it usable after the 30 days test period.
    But when we try to submit the relevant adobe web form including copy of her students license of the University we face an error message indicating that the target page could not be found.
    At least up to now we have found no way to contact adobe fro this topic. Just chat is offered.
    Is there someone who could help us?
    Regards from Germany

    You had probably best tried to use the chat option. I'm wondering if maybe the website you are trying to access is not available in Germany. That's only a guess.

  • Error message when doing SUBMIT

    Hello there,
    i am just working on BSP pages that call ABAP Reports with "Submit" and display the Results within the BSP.
    My Problem now is that some reports may come up with an Error message (type 'E') that stops the report and the processing of the BSP Page. The page displays then a "500 internal SAP Error".
    I found a good weblog here: /people/mark.finnern/blog/2003/09/16/bsp-in-depth-message-statement-handling but also to encapsulate the Submit by a function call does not help here. The page stops when calling the submit.
    Is it somehow possible to prevent the BSP-Page from terminating and catch the error message from the Report? I can not modify the Reports that are called.
    Thanks for any help,
    Stefan
    6.20 SP49

    Hi Stefan,
    If your report returns the error message or message id, you could pass this on as an export parameter in your wrapping function back to your BSP event.
    To display the error message on the same BSP page, include the following code in the event where err_msg is the error message from your report passed on to the function:
    page->messages->add_message(
    condition = 'REPORTERROR'
    message = err_msg
    severity = page->messages->CO_SEVERITY_ERROR ).
    In the layout of the BSP page include the following code where you want the error message to be displayed:
    <font color="red"><%= page->messages->assert_message( 'REPORTERROR' ) %></font>
    Make sure the condition has exactly the same name in the event and the layout.
    Additionally you could also use the SY-SUBRC after your SUBMIT statement and display a generic message for an internal error if the SUBMIT statement itself fails.
    Regards,
    Rohini.

  • Passing Messages after Submit in Input Schedules

    All,
    I have a scenario where I would like to send messages to the user after they submit data from Input Schedule. This is very similiar to how we receive error messages when we submit entries to a parent node. My scenario is this: When users submit data, I always write data to a particular version and run thru from BADI logic for validations. If it passes the validation, I move the data to a final version or else, I would like to display the messages due to which the data is not posted to final version. Currently, I have a BADI written in default logic. Whenever I write messages to ET_MESSAGES, it appends it to the log and I do not see it on the screen. I tried raise exception using CX_UJR_EXCEPTION, but the text id is 32 characters so it displays only the first error message. In my case, if I reject 10 entries, I would like to provide info on all these 10 entries.
    Ideally, I would like to write entries similiar to ET_ERROR_RECORDS (table) in UJR_WRITE_BACK but I do not see a similiar logic for UJ_CUSTOM_LOGIC. Has anyone done this before? Any input is appreciated.
    Thanks in advance.

    This is because excel still stores the values internally in the original format. It just formats the data for the display. So you need to enter the data value correctly in the cells.
    The other alternate would be to have the numbers sent from another evdre where number are multiplied by 1000 from the input cells.
    Hope this helps.
    Badrish

  • Catch any error message (dumps) in B2B and show own text

    Hi, all
    How we can catch any error messages (dumps) in the B2B?
    How we can show own text like this 'Site under construction. Please visit later...after 1 hour... '
    Denis

    Option 1(dirty approach): modify your runtimeexception jsp
    Option 2(better approach): on your load balancer (like F5 or SAP web dispatcher) configure such that all HTTP500 response codes are redirected to a hub page which has your custom text or images
    pradeep

  • Catch message from submit abap report

    I would like to catch message from submit abap report.
    Example in abap program
    REPORT  zprog00.
    PARAMETERS p_test TYPE i DEFAULT 2.
    START-OF-SELECTION.
      IF p_test > 1.
        MESSAGE e000(38) WITH 'More than one'.
      ENDIF.
    and in Function module
      SUBMIT zprog00
              WITH p_test EQ '3'
              EXPORTING LIST TO MEMORY
              AND RETURN.
    <--- In this step I would like to catch error message from Program zprog00*
    Thank

    Hi,
    try this:
      DATA LIST_OBJ TYPE TABLE OF ABAPLIST.
      DATA LIST_ASC TYPE TABLE OF CHAR255.
      SUBMIT ZTEST EXPORTING LIST TO MEMORY AND RETURN.
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          LISTOBJECT = LIST_OBJ
        EXCEPTIONS
          NOT_FOUND  = 1
          OTHERS     = 2.
      CALL FUNCTION 'LIST_TO_ASCI'
        TABLES
          LISTASCI           = LIST_ASC
          LISTOBJECT         = LIST_OBJ
        EXCEPTIONS
          EMPTY_LIST         = 1
          LIST_INDEX_INVALID = 2
          OTHERS             = 3.
    and have a look into list_asc.
    Regards, Dieter

  • HT1937 I tried to update software on my Iphone 3 from Itunes after i managed to sync phone to laptop but then i had a message (error 1015) after completing saying itunes has detected an iphone in recovery mode, i am now unable to do anything with my phone

    I tried to update software on my Iphone 3 from Itunes after i managed to sync phone to laptop but then i had a message (error 1015) after completing saying itunes has detected an iphone in recovery mode, i am now unable to do anything with my phone, please help!!

    You generally get that error code on a jailbroken phone ?
    If it is Jailbroken then I am afraid you will get no help here.

  • "Adobe Illustrator cs5 quit unexpectedly" error message. After I upgratded my imac to Mavericks I can't open Illustrater CS5. Help pls.

    "Adobe Illustrator cs5 quit unexpectedly" error message.
    After I upgrated my imac from Snow Leopard to Mavericks I can't open Illustrator CS5. (No problem with PS)
    Every opening attemp crashes. May this be possible because of third party plug-ins. (eg. Esko Artwork)
    Help pls.
    Thank you.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
    SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the name of the crashed application or process. For example, if iTunes crashed, you would enter "iTunes" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, select
    DIAGNOSTIC AND USAGE INFORMATION ▹ User Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of crash reports. The name of each report starts with the name of the process, and ends with ".crash". Select the most recent report related to the process in question. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    ☞ If you don't see any reports listed, but you know there was a crash, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    ☞ Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • I try to open the program after installing it and I recieve and error message: Error: 213:11

    HELP! I try to open the program after installing it and I receive and error message: Error: 213:11

    This issue is covered under document: https://helpx.adobe.com/creative-suite/kb/error-store-does-not-allow.html
    This error occurs when the SLStore Folder is set to read-only. To resolve it, remove the read-only check from the SLStore folder (Windows) or give it read/write access (Mac OS). step in the link above.

  • Getting error message -050 after downloading 11.1

    Getting error message -050 after downloading 11.1, radio and match do not work.

    What is the version of your OHS. Are you referring to 11gR2 webgate for OHS ?

  • I tried to submit an interactive PDF form,  but received a message: Error opening URL to submit the

    I tried to submit an interactive PDF form,  but received a message: Error opening URL to submit the form. My form is created in InDesign cs6 and exported to interactive PDF with text fields. any one has some tips to deal wiith this?

    Did you get this resolved? I am doing the same thing, passing in a url to the submitForm method via cURL. I am submitting as FDF, and specifying the #FDF at end of URL.
    Currently working against a localhost url, which is allowed and trusted in acrobat to rule out the enhanced security of the reader.
    Any ideas?

  • Hi this message appears after 2 hours downloading Mavericks : an error occurred while extracting files from the package "mzps4135638417199433253.pkg"

    Hi this message appears after 2 hours downloading Mavericks in App Store :
    an error occurred while extracting files from the package "mzps4135638417199433253.pkg"
    Same with "CMD + R"
    Help...

    It sounds to me like your Internal Hard Drive is failing.
    I recommend you buy a new one, that is a good candidate for replacing the old one, but install it in an External enclosure and Install a fresh Mac OS X on it from the DVD. You can boot your Mac from any attached drive.
    The new System can be used to get some work done, check your emails, and takes the pressure off resolving this immediately. You can also attempt to salvage files off the old drive if needed.
    Once things seem to be working, then move the new drive inside the computer. Failures at this point may be due to bad cable, which has been a problem in some of these MacBooks.
    Use security erase, write Zeroes, one pass, to re-write every block on the old drive. Any block discovered to be bad will be replaced with spares the drive holds in reserve for this purpose. If more than 10 blocks are pared on one pass, "Initialization Failed!" will be the result. Although you can try the erase again, there is some question whether you want to trust this drive with your precious data.

  • Error  message 16 after install

    I have error message 16 after installing Photoshop CC and LR 5. I've tried uninstalling and re-installing. I have a MacPro running Mavericks. Any ideas?

    well, it was worth a try...Any other suggestions?  It still isn't working.

  • There was an error after each try of posting new message. Sorry for multi copies.

    There was an error after each try of posting new message. Sorry for multi copies of question about put blob to OS

    There was an error after each try of posting new message. Sorry for multi copies of question about put blob to OS

Maybe you are looking for

  • Attachments in Work Manager 6.0

    Attachments in Work Manager 6.0 work out of the box as far as allowing a user to attach a document, upload and download the document. However, we're not seeing any connection between attachments in WM and the SAP GUI. Attachments added to a Work Orde

  • Format Error in displaying date in WD

    Hi All: I create a simple Type of type date in my dictionary and a context value attribute that is bind it to the value property of an InputField. The problem is that when the application is running, appears the date Navigator and I select a date but

  • Images overlap with text when after creating pdf: InDesign CS

    Good morning, I am using bot InDesign CS and CS2, and I am having a problem as the following: After creating the pdf, images overlap with one another, or the text overlap behind the images so on. First, I would like to mention the overlapped images h

  • Question Mark on Thumbnail images in galleries

    When I post my photo gallery from iPhoto through iWeb onto my mac site, all the thumbnail images appear with a question mark over it. This just happened with my last posting and has affected all my past galleries as well. Does anyone know what causes

  • My iphone contacts won't sinc to icloud

    No matter how I try, I cannot get my contacts on my iphone to sinc with my icloud account.  Help!