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: 

Call Transaction method in BDC.

Former Member
0 Kudos

Hello all,

In Call transaction method, I wrote the statement like below

call transaction 'FB02' using BDCDATA mode 'N' update 'A' messages into I_BDCMSGCOLL.

I am unable to get the messages into I_BDCMSGCOLL, can you pls help on this.

Thanks........

Apps.

5 REPLIES 5

former_member156446
Active Contributor
0 Kudos

in this structure you can pass FORMAT_MESSAGE Function module.

By using BDCMSGCOLL structure there fetch the fields message id, message number, message variable, field name.

Former Member
0 Kudos

Hi,

Try this way..

call transaction 'FB02' using BDCDATA mode 'N' update 'S' messages into I_BDCMSGCOLL.

Try to debug and find the error's are getting updated inthe I_BDCMSGCOLL table.

Former Member
0 Kudos

Hi

DATA: BEGIN OF messtab OCCURS 0.

INCLUDE STRUCTURE bdcmsgcoll.

DATA: END OF messtab.

.

.

.

.

CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'

MESSAGES INTO messtab.

Check out the progam at:

http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm

Hope this helps

Regards,

Jayanthi.K

former_member206439
Contributor
0 Kudos

Hi

these are the steps to display messages

* Call transaction to update customer instalment text
  CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
         MESSAGES INTO messtab.
* Check if update was succesful
  IF sy-subrc EQ 0.
    ADD 1 TO gd_update.
    APPEND wa_ekko TO it_success.
  ELSE.
*   Retrieve error messages displayed during BDC update
    LOOP AT messtab WHERE msgtyp = 'E'.
*     Builds actual message based on info returned from Call transaction
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
           EXPORTING
                msgid               = messtab-msgid
                msgnr               = messtab-msgnr
                msgv1               = messtab-msgv1
                msgv2               = messtab-msgv2
                msgv3               = messtab-msgv3
                msgv4               = messtab-msgv4
           IMPORTING
                message_text_output = w_textout.
    ENDLOOP.

*   Build error table ready for output
    wa_error = wa_ekko.
    wa_error-err_msg = w_textout.
    APPEND wa_error TO it_error.
    CLEAR: wa_error.
  ENDIF.

* Clear bdc date table
  CLEAR: bdc_tab.
  REFRESH: bdc_tab.
ENDFORM.                    " BDC_UPDATE

Former Member
0 Kudos

Hi,

Use Fm "Format_message" It fetchs massage from fields message id.

Regards

Md.MahaboobKhan