2007 May 18 5:22 AM
hi all
i am using FM read_Text and if it doesn't found any text entry then it gives a error message . i want to avoid that error message.
bcoz i am using not an standard table that's why a lot of time i get this prob.
plz help me
2007 May 18 5:26 AM
Hi,
try with this ....
in the message part of the FM use
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 <b>into l_f_msag.</b>
ENDIF.
l_f_msag is of type char.
---Patil
Message was edited by:
Santhosh Patil
2007 May 18 5:25 AM
Hi
Generally we check the value of Sy-SUBRC after the fun module code
and we write further code when the sy-subrc = 0.
So don't check the Sy-SUBRC <> 0 value to raise some exception.
Reward points if useful
Regards
Anji
2007 May 18 5:26 AM
Hi,
try with this ....
in the message part of the FM use
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 <b>into l_f_msag.</b>
ENDIF.
l_f_msag is of type char.
---Patil
Message was edited by:
Santhosh Patil
2007 May 18 5:39 AM
hi santhosh and anji
i am not using if sy-subrc<>0 .block . i all ready commented this clause.
but still it is giving an error message.
ashish
2007 May 18 5:41 AM
2007 May 18 5:43 AM
Hi,
If the msg is coming from with in the FM then i have
no idea how to handel it....
Please check with others
-
Patil
2007 May 18 6:16 AM
Hi satish,
Here your using the standard FM. Even u commented the sy-subrc block, you will get the error becuse that is built in side like that. FM in source code blick they mentioned with raise statement. so that you are getting error even u commented that sy-subrc block.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar
2007 May 18 6:19 AM
hi satish
error message is
"Text 0080012665000020 ID 0002 language DE not found"
if i will pass 0080012665000010 then it will run perfectly .
2007 May 18 6:23 AM
hi kumar
ya you are write but, i have to avoid that error message,
one way to do this is copy the whole fm and modify it. but i think it is not so practical.
2007 May 18 6:29 AM
hi
for some transactions, if the long text exists then, there will be some field in the table where the indicator X is set, the field is left blank if there is no long text (for eg. QMEL-INDTX = 'X' if the notification qmnum has long text or not)...so, before calling the fm, check if the line item whose long text you are trying to access has long text or not...the error comes because you are trying to read an object from memory which doesn't exist..reply back for queries
if helpful, reward
Sathish. R
2007 May 18 2:05 PM