Skip to Content
avatar image
Former Member

BDC return message table problem

Dear All

We are doing BDCs for Excise Invoice (J1IS) and for Posting Excise

Invoice (J1IV) in Backgroung mode.

Here we are facing problem in BDC return message table (messtab) which

retruns the internal document number,errors or warning messages

in BDC rerurn message table.when we are doing BDC for J1IS in background

mode, no internal document number or error messages is generated in

BDC message table (ie in messtab), but the excise invoice is posted and database table

j_1iexchdr is updated with internal document number even though Accessible

value is '0'.Then we are taking this internal document nuber from databae

table j_1iexchdr passing to next BDC for J1Iv.Again after execution of BDC for J1IV

in background mode the same is happening as J1IS BDC return message table.

Is it the correct method of data retrieving from Database table ?

and we want to capture all types of error messages and internal document

no generated by BDC message table.How to capture BDC return messages.

Does Transactions J1Is and J1IV are executable for BDC ?

Thanks and Regards,

Ulhas

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 13, 2008 at 06:36 AM

    Hi

    Use the following code to capture the return table values.

    data: i_msg type standard table of bdcmsgcoll with header line. 
    
    LOOP AT I_MSG.
    
        CALL FUNCTION 'FORMAT_MESSAGE'
         EXPORTING
           ID              = I_MSG-MSGID
           LANG            = SY-LANGU
           NO              = I_MSG-MSGNR
           V1              = I_MSG-MSGV1
           V2              = I_MSG-MSGV2
           V3              = I_MSG-MSGV3
           V4              = I_MSG-MSGV4
         IMPORTING
           MSG             = W_STR
    *  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.
    
        WRITE:/ i_msg-msgnr,w_str.
    
    
    
    
      endloop.

    Regards,

    Vishwa.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 17, 2010 at 06:45 PM

    Ignore

    Edited by: Keshav.T on Nov 18, 2010 12:18 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 19, 2010 at 09:40 AM

    Hi Ulhas,

    it happens for some transactions SAP itself does not consider certain situations as errors and hence you cant capture those as errors, It is advisable to use BAPI for such cases as BAPIs are designed with much more attention to capture all types of errors and warnings.

    Regards,

    Vinod

    Add comment
    10|10000 characters needed characters exceeded