11-16-2007 6:24 AM
Hi,
i have to upload Payment Reference field for the transaction FB02 and i'm using CALL TRANSACTION Method. I'm able to get the messages based on the Doc.No, i also want the messages based on Item No. For the messages i'm using Function Module 'MASS_MESSAGE_GET'.
11-16-2007 7:16 AM
Hi,
first u should difined the internal table of type BDCMSGCALL this table will collect all erors of the program than call function module FORMAT_MESSAGE
this FM pass the Internal table & work area .
tahn loop the intrenal table than write that internal automatically it displye the all error occurs during program.
<b>Reward is usefull</b>
11-16-2007 7:56 AM
Hi Shenthil,
My suggetion is that please find the below code for your reference....
*****/ Declaration part...
DATA : BEGIN OF IMSG OCCURS 0.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA : END OF IMSG .
DATA : IT_T100 LIKE T100 OCCURS 0 WITH HEADER LINE.
*****/ end of declaration...
****/ when you are calling the transaction
CALL TRANSACTION 'MD61' USING BDCTAB
MODE U_MODE
UPDATE C_UPDATE
MESSAGES INTO IMSG.
PERFORM ALL_MESSAGES .
REFRESH BDCTAB.
CLEAR BDCTAB.
******/
******/form for above perform to get system messages for your upload transaction s
*****/ status.
FORM ALL_MESSAGES .
LOOP AT IMSG.
SELECT SINGLE * FROM T100 INTO IT_T100
WHERE SPRSL = IMSG-MSGSPRA
AND ARBGB = IMSG-MSGID
AND MSGNR = IMSG-MSGNR.
IF SY-SUBRC IS INITIAL.
L_MSTRING = IT_T100-TEXT.
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH IMSG-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH IMSG-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH IMSG-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH IMSG-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH IMSG-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH IMSG-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH IMSG-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH IMSG-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
WRITE : /5 IMSG-MSGTYP, L_MSTRING .
ELSE.
WRITE : /5 IMSG.
ENDIF.
ENDLOOP.
ENDFORM. " ALL_MESSAGES
*****//end of form for maggeses...
I hope this will help you to resolve your query....reward the points..
Cheers,
Sagun Desai..................