Skip to Content
author's profile photo Former Member
Former Member

Catching Information message in Program called using SUBMIT

Hello All,

I am calling a report program using below

SUBMIT program EXPORTING LIST TO MEMORY

AND RETURN.

the program called is having one inforamtion message and is coming out after this message appears on screen. I want to capute this information message and need to display in my main program.

Please let me know how capture this type of messages in SUBMIT.

Thanks in advance.

Regards,

Ganesh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2011 at 05:51 AM

    Hi Ganesh,

    i think it is not possible, don't display messages in called program. pass back to the calling program.

    Regards,

    Surya

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Ganesh,

      I dont know whether this will help you or not.

      If instead of submitting the program if you create a background job for the submitted program.

      Here you can catch the messages also using function module BP_JOBLOG_READ.

      Try and let me know if it helped you.

      Thanks,

      Anmol.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2011 at 06:25 AM

    Hi,

    I don't think it is possible to transfer messages from called program back to the calling program using SUBMIT.

    But yes, same can be done using CALL TRANSACTION. You need to use a BDC method of calling transaction.

    
      CALL TRANSACTION 'VA03' USING BDCDATA
                              OPTIONS FROM GT_OPTIONS
                              MESSAGES INTO GT_MESSAGE[].
    
      LOOP AT GT_MESSAGE[].
        CALL FUNCTION 'MESSAGE_TEXT_BUILD'
          EXPORTING
            MSGID               = GT_MESSAGE-MSGID
            MSGNR               = GT_MESSAGE-MSGNR
            MSGV1               = GT_MESSAGE-MSGV1
            MSGV2               = GT_MESSAGE-MSGV2
            MSGV3               = GT_MESSAGE-MSGV3
            MSGV4               = GT_MESSAGE-MSGV4
          IMPORTING
            MESSAGE_TEXT_OUTPUT = MESSAGE
          EXCEPTIONS                                            "#EC *
            OTHERS              = 4.
      ENDLOOP.
    
    

    Here, the internal table GT_MESSAGE[] will contain all messages related to your called program which you can display in your calling program.

    Regards,

    Danish.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2011 at 07:07 AM

    Hi Ganesh,

    If your called program triggers an information message, it will be displayed when you submit that program... I don't really understand your issue... If you want to store that message without displaying it on your main program, without changing the called program, and without using call transaction, If afraid you're going to be stuck...

    Kr,

    m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2011 at 08:42 AM

    The tip given by Anmol is probably the only work-around for this...

    You will have to use a submit to sap-spool:

    SUBMIT zcalled-prog TO SAP-SPOOL
                           SPOOL PARAMETERS print_parameters
                           WITHOUT SPOOL DYNPRO
                           VIA JOB name NUMBER number
                           AND RETURN.
    

    Use FM BP_JOB_READ to get you spool-id from job step, BP_JOBLOG_READ to get your triggered messages and RSPO_RETURN_ABAP_SPOOLJOB to get your output list...

    Kr,

    m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2011 at 07:27 AM

    Thanks for the help.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.