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

How to capture dialog message in back ground.

Hi Experts ,

My program is executing in background...i'm not able to capture the error message when it is running in background.

But in foreground it is displaying the error message as in dialog box ..because my coding is triggering in PBO Module.

But in background i didnt get that error message.

My Code is as follows..

if subrc eq 0

sum condition.

else.

Message e066(Z01)

endif.

Message class Z01 is defined.

Please advice. Its very urgent becoz ,,my object is in quality testing phase.

Thanx & Regds

Venky.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2008 at 06:10 AM

    hello peravalli-

    The message parameter indicates there all system messages issued during a CALL TRANSACTION are written into the internal table <itab>. The internal table must have the structure of BDCMSGCOLL.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      In Baground mode system will not issue error message.

      It will store the error messages in error structure.

      you need to capture error and should display on the list screen.

      Create internal table referenceing structure 'BDCMSGCOLL'.

      capture the error message.

      call transaction .....

      If sy-subrc is not initial.

      Move bdcmsgcoll to itab.

      append itab.

      Endif.

      Loop the itab.

      If itab-msgtyp eq 'E'.

      write: / itab-MSGV1, itab-msgv2, itab-msgv3, itab-msgv4.

      Endif.

      Regards,

      Kishore

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2008 at 06:15 AM

    use call transaction <x> using itab1 MESSAGES INTO itab 2.

    itab2 should have structure of BDCMSGCOLL

    plz reward if useful

    vivek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2008 at 06:22 AM

    Hi,

    If you are doing a BDC program then you must define one internal table type BDCMSGCALL, which returns all kinds of messages in the internal table after CALL TRANSACTION stmt.

    If you are working with normal report then Check the below code.

    if subrc eq 0

    sum condition.

    else.

    IF SY-BATCH is initial. "Fore Ground Execution

    Message e066(Z01).

    Else.

    v_mess = 'Your message'.

    endif.

    endif.

    At last if you want you can display the variable v_mess.

    Rgds,

    Bujji

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Bujji's code will work. Check SY-BATCH, and if it's 'X' (Background execution), then don't use dialog box, use some other form of message log display, viz., displaying it on screen or creating a log table of the stated type.

      Sorry I know it's been a long time this thread was created and by now you probably already know the answer, but your question if still in 'not answered' state, that's why I'm posting it

      Kind regards

      -Sudhu

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.