Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

READ_TEXT MODULE ERRORS

Adi_Bathineni
Participant
0 Likes
1,120

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

6 REPLIES 6
Read only

Former Member
0 Likes
984

Hi,

If you remove the MESSAGE if sy-subrc <> 0 how it behaves?

-Pavan

Read only

Former Member
0 Likes
984

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.

Read only

0 Likes
984

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

Read only

0 Likes
984

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.

Read only

0 Likes
984

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

Read only

0 Likes
984

Can you please post your piece of code where you call READ_TEXT?