cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with retreiving Long Text in Scripts

Former Member
0 Kudos

Hi,

I have created a customised Text Object in SE75 for storing long text.I would now like to print this

long text ( Ex: Comments which contain more than 500 chars or so) in my SAP Script.

These are the 2 alternatives already tried....

1) /: INCLUDE &IT_JOIN-PRUEFLOS& OBJECT 'ZABC' TEXT ID '9099' LANGUAGE 'E'

Here when I do a Syntax check in the Layout, it says '' INVALID KEYWORD'

PS: I tried different ways by removing the ' ', but still was throwing the same error message.

2) I tried using READ_TEXT function module in the driver program, and passed that internal table data to a variable window, because functionality demands that it should not be possible in Main Window.

The result is that only the last line in the Work Area in Printed in the Layout,instead of printing all the lines.

Could you let me know, where did I go wrong or if something missing in my way approach ???

Thanks in Advance

Lakshmi.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

Try :

/: INCLUDE &IT_JOIN-PRUEFLOS& OBJECT 'ZABC' ID '9099' LANGUAGE 'E'

Look at [BC SAPscript: Printing with Forms|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf]

Regards

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Mr.A,

I've tried to change the driver program by passing data to a Variable (Var) type string, but when I run my Layout, it throws an error saying ' It exceeds 255 chars''

It works only if my long text is less than 255 char.How to make it work for more than 255 chars ??

Warm Regards,

Lakshmi

Former Member
0 Kudos

Hi lakshmi,

In the driver program itself, after the function module READ_TEXT...loop on internal table lines and move data to a single variable. Now pass it to ur script...

Eg:

data var type string.

loop at lines_tab.

concatenate var lines_tab-TDLINE into var separated by space.

endloop.

now move this value to ur script using Read out_tab....

reagrds,

Mr.A