‎2006 Dec 21 5:27 PM
Hi,
I have an idoc for which the edids-STATXT CA '&',but the edids-stamno is 0.
my intention is to get the description i.e edids-statxt
so for few idoc i have edids-staxt = &&&&but since the stamno is 0, i am getting an error from
FM MESSAGE_PREPARE SAYING MESSAGE 000 IS NOT DEFINED IN LANG EN AND WA.
loop at itab.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB-IDOC
AND COUNTR = ITAB-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = WA_EDIDS-STAPA1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab-descrp.
CONDENSE ITAB-DESCRP.
ELSE .
ITAB-DESCRP = WA_EDIDS-STATXT.
ENDIF.
modify itab.
endloop.
loop at itab.
if itab-descrp is initial.
select single descrp from teds2 into itab-descrp
where status = itab-STATUS AND
LANGUA = 'E'.
endif.
MODIFY ITAB.
clear itab.
endloop.
LET ME KNOW
Thanks
‎2006 Dec 21 5:30 PM
Hi
U should check if it exists a message number 000 for the class indicated in WA_EDIDS-STAMID.
U can use trx SE91
Max
‎2006 Dec 21 5:48 PM
Hi,
FOR THAT RECORD WA_EDIDS-STAMID IS BLANK
WHAT DOES WA_EDIDS-STAMID. REFER TO .
THANKS
‎2006 Dec 21 5:53 PM
‎2006 Dec 21 6:07 PM
Hi
I have made the foloowing changes which shows as added.
all i want in the itab-descrp is the message in status record.
if you have any messgae below the staus then i need that , if you don't have any mess below the status numeber then i need the message which is beside the no.
note the diffenece is below and beside.
loop at itab.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB-IDOC
AND COUNTR = ITAB-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
if v_msgno ne '000'.----
added
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = WA_EDIDS-STAPA1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab-descrp.
CONDENSE ITAB-DESCRP.
endif.----
added
ELSE .
ITAB-DESCRP = WA_EDIDS-STATXT.
ENDIF.
modify itab.
endloop.
loop at itab.
if itab-descrp is initial.
select single descrp from teds2 into itab-descrp
where status = itab-STATUS AND
LANGUA = 'E'.
endif.
MODIFY ITAB.
clear itab.
endloop.
let me know if this works
Thanks