2008 Nov 06 9:41 PM
We've upgraded to ECC 6.0 and now I have a BDC program using FORMAT_MESSAGE function module that has a problem. The number after the & (&1, &2, &3, &4) in the function mod isn't replaced, it stays as a literal and only the & is replaced with a valid value which it then passes back to the program.
Anyone else have this problem? Any ideas how to fix?
thanks
lz
We've upgraded to ECC 6.0 and now I have a BDC program using FORMAT_MESSAGE function module that has a problem. The number after the & (&1, &2, &3, &4) in the function mod isn't replaced, it stays as a literal and only the & is replaced with a valid value which it then passes back to the program.
Anyone else have this problem? Any ideas how to fix?
thanks
lz
2008 Nov 06 11:01 PM
Hi,
Try using the FM message_prepare...
DATA: v_message TYPE string.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
language = sy-langu
msg_id = '00'
msg_no = '275'
msg_var1 = 'Test'
msg_var2 = 'Test'
IMPORTING
msg_text = v_message
EXCEPTIONS
function_not_completed = 1
message_not_found = 2
OTHERS = 3.
WRITE: / v_message.Thanks
Naren
2008 Nov 06 11:08 PM
Instead of the FM you can try with the MESSAGE with addition into .
MESSAGE ID '00' TYPE 'E' NUMBER '398'
into IT_MESSAGE-message
WITH 'Test Message' SY-MSGV2 SY-MSGV3 SY-MSGV4.
Regards,
Naimesh Patel
2008 Nov 07 4:23 AM
Hi,
try like this....
*&---------------------------------------------------------------------*
*& Form CALL_TRANSACTION
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM call_transaction .
CALL TRANSACTION '<Y......>' USING it_bdcdata
MESSAGES INTO messtab
MODE 'N'
UPDATE 'S'.
LOOP AT messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = messtab-msgid
lang = sy-langu
no = messtab-msgnr
v1 = messtab-msgv1
v2 = messtab-msgv2
v3 = messtab-msgv3
v4 = messtab-msgv4
IMPORTING
msg = msg_txt
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.
IF messtab-msgtyp EQ 'E'.
WRITE:/ icon_checked AS ICON, 10 msg_txt.
WRITE: 5 i_tab-wb_book COLOR 6.
* ELSEIF messtab-msgtyp EQ 'S'.
* WRITE:/10 msg_txt COLOR 6.
* ELSEIF messtab-msgtyp EQ 'W'.
* WRITE:/10 msg_txt COLOR 3.
* ELSE.
* WRITE:/10 msg_txt COLOR 4.
ENDIF.
CLEAR msg_txt.
ENDLOOP.
REFRESH:it_bdcdata,messtab.
ENDFORM. " CALL_TRANSACTION
Arunima
2008 Nov 17 9:43 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |