cancel
Showing results for 
Search instead for 
Did you mean: 

problem for printing include text in smart form

Former Member
0 Kudos

Dear Team,

Following is my problem when printing a purchase requisition smart form.

I need smart form to be print if there is include text found or not .(include text means go me53n>go text>go sapscript editer>goto header>select textname/ text obj/ text id)

If there is a include text found by calling function CALL FUNCTION 'READ_TEXT', then output is coming, but if there is no text found in include text then error has come "Include text 8000000113 does not exist (object EBANH, ID B03)

Message no. SSFCOMPOSER610"

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'B02'

language = 'E'

name = l_BANFN

object = 'EBANH'

TABLES

lines = tlines1

Please help me .

Rgds

sp

kolkata

Accepted Solutions (0)

Answers (3)

Answers (3)

aidan_black
Active Contributor
0 Kudos

Hi,

For the smartform, in the node where the Include text is defined, there should be a checkbox called 'No error if no text exists'. You should select this chcekbox and the error should no longer occur.

Regards,

Aidan

Former Member
0 Kudos

Hi ,

The FM READ_TEXT has 7 exceptions , i think you are not handeling it . Please handle it and also comment he defualt code which comes with exceptions i.e.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

As this might result in a popup or an error message .

You can decide how do you want to handle exceptions.

Regards,

Arun

satyajit_mohapatra
Active Contributor
0 Kudos

I don't see any exception handling of the FM READ_TEXT in your code. Uncomment the exception part and handle them by checking sy-subrc.

Also, why are you using FM to get the text. You can use the smartform "Include Text" element and as far as I remember there is an option to supress the error if no text is found in that element.