Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC return message table problem

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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.

kesavadas_thekkillath
Active Contributor
0 Kudos

Ignore

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

Former Member
0 Kudos

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