01-27-2009 1:45 AM
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.
01-27-2009 1:48 AM
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.
01-27-2009 2:44 AM
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.
01-27-2009 4:19 AM
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
01-27-2009 4:34 AM
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
01-27-2009 5:42 AM
Hi,
Use Fm "Format_message" It fetchs massage from fields message id.
Regards
Md.MahaboobKhan