cancel
Showing results for 
Search instead for 
Did you mean: 

help reqd on displaying text from smartform

Former Member
0 Kudos

Hi all...

im facing a problem in PO-smartform...that i want to display a text fully as whatever given in the header detail text window.....from me23n.

it displaying the 1st line of the text only....but i want the full details whatever the user given on it...how to do it???

will i have to give it on loop...means looping the window....???

or will i have to declare it in global definition......

Do the needful and reply <b>in detail,</b> at the earliest.

for ur ref....i've enclosed the coding below

**********************************************

data: gline1 like tline occurs 0 with header line,

var like THEAD-TDNAME.

select evtxt from t027b into g_evtxt where evers = g_xekpo-evers and spras = 'E' .

endselect.

select tdid from stxh into gtdid where tdname = ZXEKKO-EBELN.

endselect.

if sy-subrc eq 0.

var = zxekko-ebeln.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

id = gtdid

language = 'E'

name = var

object = 'EKKO'

tables

lines = gline1

.

loop at gline1.

gline = gline1-tdline.

if gline ne space.

exit.

endif.

endloop.

endif.

******************************************************************

thanks & regards

sankar

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

I guess there is no other option other than doing this if you want to display all the lines maintained in Header detailed text...

data: gline1 like tline occurs 0 with header line,

var like THEAD-TDNAME.

select evtxt from t027b into g_evtxt where evers = g_xekpo-evers and spras = 'E' .

endselect.

select tdid from stxh into gtdid where tdname = ZXEKKO-EBELN.

endselect.

***if sy-subrc eq 0.

var = zxekko-ebeln.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

id = gtdid

language = 'E'

name = var

object = 'EKKO'

tables

lines = gline1

.

<i>***loop at gline1.

***gline = gline1-tdline.

***if gline ne space.

***exit.

***endif.

***endloop.

***endif.</i>

<b>IF sy-subrc = 0.

READ TABLE gline1 INDEX 1.

remark1 = gline1-tdline.

CLEAR gline1.

READ TABLE gline1 INDEX 2.

remark2 = gline1-tdline.

CLEAR gline1.

READ TABLE gline1 INDEX 3.

remark3 = gline1-tdline.

CLEAR gline1.

READ TABLE gline1 INDEX 4.

remark4 = gline1-tdline.

CLEAR gline1.

READ TABLE gline1 INDEX 5.

remark5 = gline1-tdline.

CLEAR gline1.

READ TABLE gline1 INDEX 6.

remark6 = gline1-tdline.

CLEAR gline1.

ENDIF.</b>

Display them in your smartform,

Or try to populate all the values and create loop in your smartform and display each line inside the loop.

Regards,

SaiRam

Former Member
0 Kudos

Hi Sairam R.N,

Sorry for the very late reply.....actually i went off for my internal meeting..

in ur code.....what's that remark1....2....3....6.

where i've to declare it....means as globaly or in coding part...

and what field i've to give in the text for display.....&gline1&...is it right????

former_member196280
Active Contributor
0 Kudos

yes, similar to gline1 define globally...

close the thread if your question is answered.

Regards,

SaiRam

Former Member
0 Kudos

Hi Sairam .R.N,

i gave gline type char120 in the global definition.....what u want me to do...

it is like remark1 type char75,remark2 char75...like that

and what variable name i've to give in the text also to display my output

thanks

sankar

Answers (2)

Answers (2)

Former Member
0 Kudos

this Post has been done/closed from 11.10.2007 @ 13:10pm....

pls dont do reply on this.

thanks to all

sankar

Former Member
0 Kudos

Hi Sankar

U can avoid using READ_TEXT fm to obtain the texts and printing in text elements/...

Instead go for Include text in the smartform....

U can convert a text element into a Include text...., and just pass the text name, object, id and language...

U will get a proper output without any formatting error...

Thanks

Rajiv

Former Member
0 Kudos

Hi Rajiv....

i did already...and its not coming out.....for this header text.....in text element if i do include text....it'll ask for TDNAME...this one is an internally genereated number ans it'll change in one PO to next PO's......

tell me what can i do....and how in DETAIL....with samples

thanks & regards

sankar