cancel
Showing results for 
Search instead for 
Did you mean: 

read_text in smartform

Former Member
0 Kudos

hi guys,

i need to display data from FM read_text in smartform simultaneously .

in the Text element, i am keen to have this code:

/: LOOP AT ILINE

P &iline-tdline&

/: ENDLOOP

how can i declare iline globally ? pls help

Accepted Solutions (1)

Accepted Solutions (1)

former_member624107
Contributor
0 Kudos

u can directly declare it in the progra like

ata: iline TYPE TABLE OF tline WITH HEADER LINE.

n loop at iline.

call the FORM text elemnt.

n write iline-tdline

endloop

Message was edited by:

Sheeba Bhaskaran

Former Member
0 Kudos

Hi Sheeba,

I have declared iline in Program Lines node , but when it comes to display the text to Text element node, error occurs: Field "ILINE-TDLINE" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.

thats why i need to declare iline globally, how can i do that , plz advice

Former Member
0 Kudos

Hi,

That is not the way to get the Long text in smartforms.

Create a text node and in the gerenal Attributes Maintain the text type as Include Text.

And take the Object details from the Long text text editor --> Header, Provide Object details in Text Key Box of in text node of the smartform as you give in READ_TEXT FM, you will get the long text automatically.

Regards,

Satish

former_member188829
Active Contributor
0 Kudos

Hi Ester,

Check this thread..

Former Member
0 Kudos

Hi Satish,

If i use Include Text element, it uses only static text name.

This does not fulfil my requirement as i need to get text from every PR item for Item Text , which requires dynamic text name

Former Member
0 Kudos

Hi Vishnu,

the link displays empty thread

former_member188829
Active Contributor
0 Kudos

Hi,

former_member624107
Contributor
0 Kudos

Hi...

try to pass values of the iline into varibales n use the variable in FORm text element..

eg:

LOOP AT iline.

CASE sy-tabix.

WHEN '1'.

w_text1 = iline-tdline.

WHEN '2'.

w_text2 = iline-tdline.

WHEN '3'.

w_text3 = iline-tdline.

ENDCASE.

ENDLOOP.

CONCATENATE w_text1 w_text2 w_text3 INTO w_text4 SEPARATED BY space.

use w_text4 in FORm text elemt...

former_member624107
Contributor
0 Kudos

Hi..

U r using SMARTFORM rit..

den u can define the table iline in global definition(inside global settings)

Former Member
0 Kudos

Hi Sheeba,

thanks for the suggestion, is there any other way i can use instead of hardcoding line by line using concatenate

former_member624107
Contributor
0 Kudos

Hi Estr..

hav u tried declaring iline in Global definitions....?

Former Member
0 Kudos

Hi Sheeba,

I have tried to declare in golbal definition tyline type tline

then in Program Lines node i code this:

call function 'READ_TEXT'

exporting

client = sy-mandt

id = 'Z02'

language = sy-langu

name = W_OBJ_NAME

object = 'ZEBAN'

tables

lines = iline

exceptions

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

others = 8.

loop at iline.

append iline-tdline to tyline.

endloop.

it gives me error :"TYLINE" is not an internal table - the "OCCURS n" specification is missing.

how can i declare tyline to be internal table

Former Member
0 Kudos

Hi,

As i told you above do like this to get the text in your smartform

Create a text node and in the gerenal Attributes Maintain the text type as Include Text.

declare W_OBJ_NAME in form interface parameters and get the value in print program and pass this value to the parameter in Call Function Module of Smartform.

In the Text Key Provide these values

Text Name: &W_OBJ_NAME& << Get W_OBJ_NAME value in Print Program

Text Object: 'ZEBAN'

Text ID: 'Z02'

Language 'EN'.

Regards,

Satish

former_member624107
Contributor
0 Kudos

try declaring tyline in global definition n also program node....

in global definition it shud be

tyline type table of tline

in program node

data:tyline type standard table of tline.

den it wont giv error...

Answers (0)