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

Error Message dialog box in BDC

Hello All,

I have a problem in a BDC for CRM transaction COMM_HIERARCHY.

When am working with this transaction, based on the inputs on the screen, system throws a error message as a dailog box.

I want to avoid this record during the processing of the internal table and proceed with next record.

For this, one solution is, at application level in customizing we can change the message from E to a S status message. But i want to handle it programatically.

Is there any way i can do?

Your help is highly appreciated.

Thanks & Regards,

Jilan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2006 at 02:30 PM

    hi

    hav u used FORMAT_MESSAGE fm

    it_msg like bdcmsgcoll occurs 0 with header line.

    call transaction 'PA30' using it_bdcdata mode 'A'

    update 'S'

    messages into it_msg.

    call function 'FORMAT_MESSAGE'

    exporting

    id = it_msg-msgid

    lang = sy-langu

    no = it_msg-msgnr

    v1 = it_msg-msgv1

    v2 = it_msg-msgv2

    v3 = it_msg-msgv3

    v4 = it_msg-msgv4

    importing

    msg = v_msg

    exceptions

    not_found = 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.

    • the above gives u the error message

    • u wish u can transfer these error records into session

    call function 'open_session'.

    loop at it_msg where msgtyp = 'E'.

    call function 'insert_session'.

    endloop.

    call function 'close_session'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2006 at 03:12 PM

    Jilan,

    I am not familiar with transaction but are you trying to process multiple records in your internal table with the one transaction call?

    If this is the case, you will probably need to determine what conditions are causing the error within the COMM_HIERARCHY transaction, then programatically check the internal table record for that condition before inserting into your BDC internal table.

    Chris

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      > Jilan,

      >

      > I am not familiar with transaction but are you trying

      > to process multiple records in your internal table

      > with the one transaction call?

      >

      > If this is the case, you will probably need to

      > determine what conditions are causing the error

      > within the COMM_HIERARCHY transaction, then

      > programatically check the internal table record for

      > that condition before inserting into your BDC

      > internal table.

      >

      > Chris

      Chris,

      Thanks for your reply. I have also followed the same approach, fileterd the internal table to possible extent with error conditions.

      I have a plan to conv. the customer about application settings can temporarly and use the upload BDC.

      Once agian thanks for your inputs.

      Best regards,

      Jilan

  • Posted on Jun 09, 2006 at 03:17 PM

    It is not possible to avoid the error message programatically and continue with the next unless you are doing a call transaction to get the error conditions or success messages in the messages internal table and then move only the error ones into batch input sessions. Basically the logic goes like this.

    Loop at itab.

    prepare bdc data for one transaction call.

    do a call transaction with the option messages bdc_messages.

    look in the messages for error messages.

    If there are errors, create a session using the same bdc data.

    endloop.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2006 at 04:23 PM

    Hii Bhasha ,

    If you run in A (Display All Screens) Mode you will get all these OK code instead run in N(Background) No Screen Mode

    After the call transaction you will get the error msg in messtab. You can get the error messages there.

    <b>

    CALL TRANSACTION '<Tcode>' USING bdc_tab OPTIONS FROM bdc_opt.
    
    where bdc_opt is defined as 
    DATA: bdc_opt TYPE ctu_params.
    
    and the following settings:
    bdc_opt-racommit = ' '. "No end on COMMIT
    bdc_opt-dismode = 'N'.
    bdc_opt-updmode = 'S'.

    </b>

    Regards

    Naresh

    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.