‎2008 Jan 02 6:33 PM
Hi Gurus,
I'm working on the Smartforms, In that smartforms i'm using READ_TEXT Function Module to get the Texts(Header and Item Texts)
My Requirement is, if the text is not existing for that particular Text ID and for that Material, At present it is giving the Error Message as
"Material No" "Text ID" "EN" Text does Not exist.
I want to capture this Error Message and it should not through the Error.
How to capture the Error which is appearing in the READ_TEXT Module.
If Possible please send the example code.
Thanks & Regards,
Adinarayana
‎2008 Jan 02 6:50 PM
Hi,
If you remove the MESSAGE if sy-subrc <> 0 how it behaves?
-Pavan
‎2008 Jan 02 6:57 PM
Make sure that your call function exceptions are uncommented and then add IF SY-SUBRC <> 0 check after the call function. You can use SY-MSGTY, SY-MSGID, SY-MSGV1, .... V4 fields and call FORMAT_MESSAGE function module to get the error message.
‎2008 Jan 02 7:15 PM
Hi,
My problem is, once i run the smartform, when there is no text exists for that text id it is coming out of the entire application and giving the error message as
" Material No" "Text ID" "EN" Language text is not found
I want to execute the report even though there is no text exists.
Please send me the sampe code?
My Idea is to test the text id and text exists in that particular table before calling the READ_TEXT FM
But i don't know in which table can i get these TEXT ID and TEXT .
Please suggest me .
Regards,
Adinarayana
‎2008 Jan 02 7:20 PM
Are you calling READ_TEXT yourself in the smartform or you just using INCLUDE text. If you are calling the READ_TEXT function module, then that is the correct way to read the text and you will have to handle the exceptions. I don't think it is issuing an error message in its code. It only raises exceptions which you should handle after the call.
How are calling the READ_TEXT function module?
STXH and STXL are the tables but the actual text cannot be seen here in these tables. You have to use the function module.
‎2008 Jan 02 7:42 PM
Hi Srinivas,
I'm using the READ_TEXT Module in the smartforms to get the texts.
Whenever there is no text exists for a particular text id the smartform is coming out from the execution by raising the exception.
My requirement is, if the text exists for that particular Text Id, then only the READ_TEXT Should call otherwise it sould not.
Please send me the sample code if you have.
Thanks in Advance.
Regards,
Adinarayana
‎2008 Jan 02 8:07 PM
Can you please post your piece of code where you call READ_TEXT?