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

call transaction

Hi,

Can you help me in capturing the errors in Call transaction method ?

points assured

thanx

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jun 17, 2008 at 10:49 AM

    Hi Use this..

    declare itab as

    DATA: itab TYPE TABLE OF bdcmsgcoll .

    then use.....

    CALL TRANSACTION tcode USING lt_bdcdata

    MODE 'E' MESSAGES INTO itab.

    error messages will be stored in table itab

    Reward points...if the above is helpful.. 😊

    Regards

    Rudra

    Edited by: Rudra Prasanna Mohapatra on Jun 17, 2008 12:49 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 11:00 AM

    Hi,

    TYPES : BEGIN OF tp_messtab_error,

    vbeln TYPE vbeln,

    posnr TYPE posnr,

    delno TYPE vbeln_vl,

    msgid TYPE bdc_mid,

    msgnr TYPE bdc_mnr,

    msgspra TYPE bdc_spras,

    msgtyp TYPE bdc_mart,

    msgv1 TYPE bdc_vtext1,

    msgv2 TYPE bdc_vtext1,

    msgv3 TYPE bdc_vtext1,

    msgv4 TYPE bdc_vtext1,

    END OF tp_messtab_error.

    DATA : ig_bdcdata TYPE TABLE OF bdcdata,

    ig_messtab TYPE TABLE OF bdcmsgcoll,

    ig_messtab_error TYPE TABLE OF tp_messtab_error.

    ..........................

    ..........................

    CALL TRANSACTION 'VL02N' USING ig_bdcdata MODE 'N'

    UPDATE 'S' MESSAGES INTO ig_messtab.

    PERFORM error_handling.

    ..................

    ..................

    ..................

    FORM error_handling .

    LOOP AT ig_messtab INTO wg_messtab WHERE msgtyp EQ 'E'

    AND msgspra EQ 'E'.

    wg_messtab_error-vbeln = wg_ship_info-vbeln.

    wg_messtab_error-posnr = wg_ship_info-posnr.

    wg_messtab_error-delno = wg_ship_info-delno.

    wg_messtab_error-msgid = wg_messtab-msgid.

    wg_messtab_error-msgnr = wg_messtab-msgnr.

    wg_messtab_error-msgspra = wg_messtab-msgspra.

    wg_messtab_error-msgtyp = wg_messtab-msgtyp.

    wg_messtab_error-msgv1 = wg_messtab-msgv1.

    wg_messtab_error-msgv2 = wg_messtab-msgv2.

    wg_messtab_error-msgv3 = wg_messtab-msgv3.

    wg_messtab_error-msgv4 = wg_messtab-msgv4.

    APPEND wg_messtab_error TO ig_messtab_error.

    CLEAR: wg_messtab_error, wg_messtab.

    ENDLOOP.

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 11:09 AM

    Hi,

    IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.

    FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.

    THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.

    THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"

    AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING.

    reward if helpful

    preet

    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.