10-11-2007 8:55 AM
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
10-11-2007 9:00 AM
loop at gline1.
gline = gline1-tdline.
if gline ne space.
exit.
endif.
endloop.
in the above code what is 'GLINE'. also where ur trying to this the header text is also imp, ru trying to display in a tempate or a table.
pls reply back with the information
10-11-2007 9:00 AM
loop at gline1.
gline = gline1-tdline.
if gline ne space.
exit.
endif.
endloop.
in the above code what is 'GLINE'. also where ur trying to this the header text is also imp, ru trying to display in a tempate or a table.
pls reply back with the information
10-11-2007 9:15 AM
hi amit,
gline is a type....as i called in global def as gline type char70
the whole part...i've declared it under template.....it ahs to display below the main window(as footer window)
reply me
sankar
10-11-2007 10:11 AM
now since u have multiples lines that means in ur table gline1 there would multiple records,each record corresponding to single line in ur header text.
now what u do is
1) create a work area (say wa type lines) type lines
2) in ur footer( here i am talking about the footer in ur main window) create a loop( the one which u get after u right click).
2) now loop lines1 into wa
3) and just drag wa-tdlines into the field where u want to display.
this should mostly work.
10-11-2007 10:25 AM
Hi amit....
thanks for ur prompt reply...and sorry for the delay in my side
1st....my window is the separate one not at all in main window....(it is the secondary window after the main window detials displayed....
i did the same as u mentioned...here my work area is gline
in global def....i've given as
gline1 type table of tdline
gline type tdline.(wa)
in loop...i've given as gline1 into gline.
and in text field....declared as &gline-tdline&....
But its throwing asn error...that
the data obj "GLINE" has no structure and therfore no component called "TDLINE".
waht i do.....tell me how to clear it...?????
Expecting ur reply....
thanks & regards
sankar
10-11-2007 10:37 AM
hi,
now in ur global definition--->global data
declare gline type gline
gline1 type gline1
and now in global definition----->types use the below code
types: gline type tline,
gline1 type gline1 occurs 0.
also as long as ur displaying in a table it does not matter if its main or secondary.
pls let me knw if the problem persists.
if u want 2 mail me smf mail me at sawantamit84@gmail.com
10-11-2007 10:59 AM
in global def...
gline1 type gline1
gline type gline
in types tab:
types: gline type tline,
gline1 type gline1 occurs 0.
in coding part under window: (for ur info: i gave loop funtion for this window..in that
gline1 into gline)
data: 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.
and in text field:
&gline-tdline&
what i've to change in this.....reply me in DETAIL
thanks & regards
sankar
10-11-2007 11:13 AM
u have written
gline1 type gline1 occurs 0.
change it to
gline1 type gline occurs 0.
the code seems to be fine,also just debug the contents of gline1.
now the text in which ur displaying should be inside a loop (loop gline1 into gline)
dont give loop function to ur window,just the loop for the particular text in which ur displaying.
u just add a break point after the function module read_text and check the data in gline1.
i think it should work now,if u dont mind then pls just download ur smf and send me at my email id,i would be able 2 help 2 more properly
10-11-2007 11:17 AM
hi,
i've already sent u with the attachment...
just go thru it...and let me know ur replies imm
bye
sankar
10-11-2007 11:26 AM
Hi amit,
if i remove the loop...it throws an error...says the int table gline1 has no header line....
if i give....no errors has found....but the text is not displaying in the ouput form..while executing from me23n.
Pls advise.
thanks & regards
sankar
10-11-2007 9:05 AM
check da template if ur using one to display text.. try increasing its dimensions in table painter and see if u get da entire text or not