How to Print Long Text
Hi All
I want to print long text of WCD (work clearance document) in smart form (Field name is LTXT). How do i do. I don't know different parameters for function module 'READ_TEXT'. Any suggestion.
Thanx and Regards,
Rajesh Vasudeva
Hi,
Go to the text in the Standard Document and then double Cliick on it. Then Click on the Lens below(Detail). In the new screen, Naviagate Goto---->Header. It will give you the relevant details like Text object, Text ID etc which can be used in the read text FM. Usally the text name is the Document Number and the Text ID and Text Object is Constant for that particular Document type.
Hope this helps
TC
Similar Messages
-
How to print long text in scripts
plzzzzzzzzz answer this qestion
how to print long text in scriptsHi Kranthi,
You can create Text Id and include that in your script.
For example:
/E TEXT
/: INCLUDE ZTEXT OBJECT TEXT ID ST
Hope this helps.
Please reward if useful.
Thanks,
Srinivasa -
How to print long Text & No of page settings in F-58
Dear Gurus,
Can anybody guide me reg. below:
01. user want to print long text also along with document.
02. When user printing F-58 Payment advice..where we can set no of pages
Pls guide me.
REgards,
VenkatHi,
a. Display Document FB03 and change current layout (Ctrl+F8) and choose GL Long Text (SKAT_TXT50).
Rgds. -
i want to print a description in text mode which is 5-6 lines some times it have a blank line also so
how to print in ALV .i m using READ_TEXT function but sumtime it not works when text exceed 4-5 lines
what i sud do.hi,
there is another way u can use yours internal table field like long text field. that is.
parameters: salno type vbak-vbeln.
data: begin of itab occurs 0,
vbeln type vbak-vbeln,
matnr type vbap-matnr,
longtext type thead occurs 0,
end of itab.
data: itabstxl type standard table of stxl with header line.
select single vbakvbeln vbapmatnr into (itab-vbeln, itab-matnr)
from vbak inner join vbap
on vbakvbeln = vbapvbeln
where vbak~vbeln = salno.
select single tdobject tdname tdid tdspras from stxl
into (itabstxl-tdobject,itabstxl-tdname,itabstxl-tdid,itabstxl-tdspras)
where relid = 'TX'
and tdobject = 'VBBK'
and tdname = salno "YOUR OWN TDNAME e,g
and tdid = 'Z003'
and tdspras = 'EN'.
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = itabstxl-tdid
language = itabstxl-tdspras
name = itabstxl-tdname
object = itabstxl-tdobject
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = itab-longtext
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
break abaper.
I HOPE THIS WILL SOLVE THIS WILL SOLVE THE PROBLEM OF THE OTHERS AS WELL. -
HOW TO PRINT LONG TEXT OF 255 CHARACTER IN ALV GRID instead of132 Char's
Hi sir/mam
i'm sreekar can any one help me on this please
"As I took a variable 'STR' with 255 length, But still ALV GRID DISPLAYS the same 132 characters, and
When I download the report into excel it is showing the 250 charactered text"
how can i print it in alv grid
FORM BUID_CATALOG .
DATA : COL_POS TYPE I.
COL_POS = COL_POS + 1.
*--DECLARING FIELDCATALOG FOR HEADER
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'EBELN'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Purch.doc.no.'(002).
LT_FCAT-REF_FIELDNAME = 'EBELN'.
LT_FCAT-REF_TABNAME = 'EKKO'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'BEDAT'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Po Date'(003).
LT_FCAT-REF_FIELDNAME = 'EBDAT'.
LT_FCAT-EDIT_MASK = '__.__.____'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'EKGRP'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Purch.Grp'(004).
LT_FCAT-REF_FIELDNAME = 'BKGRP'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'EKNAM'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Purch.Grp. Name'(005).
LT_FCAT-REF_FIELDNAME = 'EKNAM'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'LIFNR'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Vendor No.'(006).
LT_FCAT-REF_FIELDNAME = 'ELIFN'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'NAME1'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Vendor Name'(007).
LT_FCAT-REF_FIELDNAME = 'NAME1_GP'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'ZTERM'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Pay.Code'(008).
LT_FCAT-REF_FIELDNAME = 'ZTERM'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'TEXT1'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Own explanation'(009).
LT_FCAT-REF_FIELDNAME = 'DZTERM'.
LT_FCAT-OUTPUTLEN = '30'.
LT_FCAT-DDICTXT = 'L'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'WAERS'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Curr'(010).
LT_FCAT-REF_FIELDNAME = 'WAERS'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'NETWR'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Net Value'(011).
LT_FCAT-REF_FIELDNAME = 'BWERT'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
ENDFORM. " BUID_CATALOG
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_BUFFER_ACTIVE = 'X'
I_BACKGROUND_ID = 'ALV_BACKGROUND'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = LT_FCAT[]
I_SAVE = G_SAVE
IS_VARIANT = GS_VARIANT
IMPORTING
E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER
TABLES
T_OUTTAB = LT_FINAL[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC = 0.
IF G_EXIT_CAUSED_BY_CALLER = 'X'.
ELSE.
IF GS_EXIT_CAUSED_BY_USER-BACK = 'X'. "F3
EXIT.
ELSE.
IF GS_EXIT_CAUSED_BY_USER-EXIT = 'X'. "F15
LEAVE TO SCREEN 1000.
ELSE.
IF GS_EXIT_CAUSED_BY_USER-CANCEL = 'X'. "F12
LEAVE TO SCREEN 1000.
ELSE.
EXIT.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ELSE.
ENDIF.
ENDFORM. " DISPLAY_DATA
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F15' "ls_thead-tdid PAYMENT TERMS
LANGUAGE = SY-LANGU "ls_thead-tdspras "CURRENT LANGUAGE 'E'
NAME = NAME "ls_thead-tdname PO NUMBER LW_EKKO-EBELN
OBJECT = 'EKKO' "ls_thead-tdobject TABLE NAME EKKO
IMPORTING
HEADER = HTEXT
TABLES
LINES = LTEXT
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC = 0.
LOOP AT LTEXT.
IF LTEXT-TDLINE NE ''.
MOVE LTEXT-TDLINE TO WA_WORD-TEXT.
APPEND WA_WORD TO LT_SENTENCE.
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT LT_SENTENCE INTO WA_WORD.
COUNT = COUNT + 1.
IF COUNT = 1.
STR = WA_WORD-TEXT.
LW_FINAL-TEXT1 = STR.
ELSEIF COUNT = 2 OR COUNT = 3 OR COUNT = 4 OR COUNT = 5 OR COUNT = 6 OR COUNT = 7 OR COUNT = 8.
CONCATENATE STR WA_WORD-TEXT INTO STR SEPARATED BY SPACE.
LW_FINAL-TEXT1 = STR.
ENDIF.
ENDLOOP.can you provide an example of how to wrap the text i have like this please see the below code and correct if any errors
FORM GET_TEXT_LINES .
DATA :NAME TYPE THEAD-TDNAME.
NAME = LW_EKKO-EBELN.
V_TABIX = SY-TABIX.
CALLING FUNCTION READ_TEXT FOR PAYMENT TEXTS
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT "CLIENT ID 200/600/400
ID = 'F15' "ls_thead-tdid "PAYMENT TERMS TEXT ID 'F15'
LANGUAGE = SY-LANGU "ls_thead-tdspras "CURRENT LANGUAGE 'E'
NAME = NAME "ls_thead-tdname "PO NUMBER LW_EKKO-EBELN
OBJECT = 'EKKO' "ls_thead-tdobject "TABLE NAME EKKO
IMPORTING
HEADER = HTEXT "LS_THEAD
TABLES
LINES = LTEXT "LT_LINES[]
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC = 0.
LOOP AT LTEXT.
IF LTEXT-TDLINE NE ''.
MOVE LTEXT-TDLINE TO WA_WORD-TEXT.
APPEND WA_WORD TO LT_SENTENCE.
ENDIF.
ENDLOOP.
ENDIF.
Word Wrap the text in multiple lines
LOOP AT LT_SENTENCE INTO WA_WORD.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = WA_WORD-TEXT
OUTPUTLEN = 100
TABLES
OUT_LINES = LT_SENTENCE
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
IF not LT_SENTENCE IS INITIAL.
READ TABLE LT_SENTENCE INTO WA_WORD INDEX v_tabix.
LW_FINAL-TEXT1 = WA_WORD_TEXT.
MODIFY LT_FINAL FROM LW_FINAL INDEX V_TABIX.
ENDLOOP.
CLEAR: LT_SENTENCE.
ENDFORM. " GET_TEXT_LINES
*& Form LAYOUT_INIT
text
-->P_GS_LAYOUT text
FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
*"Build layout for list display
RS_LAYOUT-DETAIL_POPUP = 'X'.
ENDFORM. " LAYOUT_INIT
*& Form EVENTTAB_BUILD
text
-->P_GT_EVENTS[] text
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
*"Registration of events to happen during list display
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_AFTER_LINE_OUTPUT
INTO LS_EVENT.
IF SY-SUBRC = 0.
APPEND LS_EVENT TO RT_EVENTS.
ENDIF.
ENDFORM. " EVENTTAB_BUILD
*& Form AFTER_LINE_OUTPUT
text
--> p1 text
<-- p2 text
FORM AFTER_LINE_OUTPUT.
CLEAR :COUNT,LT_SENTENCE.
LOOP AT LT_SENTENCE INTO WA_WORD.
READ TABLE LT_SENTENCE INTO WA_WORD INDEX V_TABIX.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = WA_WORD-TEXT
OUTPUTLEN = 20
TABLES
OUT_LINES = LT_SENTENCE.
DESCRIBE TABLE LT_SENTENCE LINES V_TABIX.
CHECK V_TABIX > 1.
COUNT = COUNT + 1.
IF COUNT = 1.
STR = WA_WORD-TEXT.
LW_FINAL-TEXT1 = STR.
ELSEIF COUNT = 2 OR COUNT = 3 OR COUNT = 4 OR COUNT = 5 OR COUNT = 6 OR COUNT = 7 OR COUNT = 8.
CONCATENATE STR WA_WORD-TEXT INTO STR SEPARATED BY SPACE.
LW_FINAL-TEXT1 = STR.
ENDIF.
ENDLOOP.
ENDFORM. " AFTER_LINE_OUTPUT -
How to print the texts retrived by using READ_TEXT fun module in Smartform
Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
I have coded all things in the program lines and in that i am retriveing the long texts.
I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text.
I have to print the trouble ticket. in that the notes log I have to pass.
its urgent. Points will be rewarded for any type of clue. whether it will work or not.There are a few ways to do it. If you need to take all of the text in the text type, in your SF text element choose "Include Text".
Populate the fields with the data that corresponds to the text type. It is similar to the interface to the FM "Read_Text.
Text Name
Text Obje
Text ID
Language
Encase any variables with the "&" symbol.
If you have already coded the call to the FM "READ_TEXT" and loaded the text into an internal table, create a loop and loop through the itab. Inside of the loop create a text element and add a variable in the text element for the field you are looking to output. -
How to print the text in points wise in sap script
hi friends,
how to print the text in points wise in sap script.
ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
1. hai how ru.
2. what r u doing.
3.where r u.
like this i want numbering.. waiting for ur replys.
thanks,
kirandeclare a counter
data : cnt type char 4.
print :
cnt = cnt + 1.
&cnt& &text&
cnt = cnt + 1. and so on.
or.
if the data is in an internal table
loop at internal_table.
cnt = cnt + 1.
write form.
in script -&cnt& &text&
endloop.
Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM -
How to print the text in only last but one page in sapscripts
hiiiiiiiiiii,
explian how to print the text in only last but one page in sapscripts? wher to write the code? plz if possible explain in detail with an example?Hello,
The total no pages is given by &SAPSCRIPT-FORMPAGES& command.
So u can handle the situation in ur form like this
/: if &PAGE& = &SAPSCRIPT-FORMPAGES&
p1 TEXT
/: endif
Try in this way it may help u.
Regards -
How to Print a text in bold format in a classic report ??
How to Print a text in bold format in a classic report ??
hi
u can use
<b>FORMAT INTENSIFIED ON.</b>
regards
ravish
reward if useful -
How to print a text in java?
How to print a text in java?
of corse, i have JTextField in my frame that i want to extract the text and print it on a paper with a printer.
-
How to print Arabic text along with the English in smartform ( ECC6 version
Hi All,
our is ECC6 version, Non unicode, ABAP stack ( not dual stack )
is it possible to print in Arabic language in the above version ?
if yes, then please let me know how to print Arabic text and English text in the same smartfrom.
i tried in the following procedures :
1) i created standard text (SO10) in arabic language.
i called in the smartform ( include text - i )
langage AR
but system throws error message saying, required language is not installed.
2) if i use READ_TEXT function module.
text getting printed in diff format but not in arabic.
waiting for your replies..ECC6 and Non-Unicode? I think you'll need multiple code pages, I doubt there's a mixed Arabic/Latin1 available. And I don't think SAP supports new MDMP systems any more. If you need to support multiple languages you really need to go Unicode. It's probably easier to do the Unicode conversion than to try to support multiple code pages and you have to make the switch eventually.
-
Tcode FV50: How to find long text in FI Document line item Before Saving.
Hi,
How to find long text in FI Document line item.
During Parking of the FI document through Tcode FV50 i m giving the some text in the long text not in the text field.
I would like to validate the Long Text Before Saving in user exit "U300" under the "Sunstitution" .
Please anybody can be help me out where exactly this long text is going to be stored or in which internal table or memory id.
Please give me the answer as soon as possible .
Note:- Read_Text function module is not useful. Because Read_text useful after saving document.Hi Amit,
In application area FINANCIAL ACCOUNTING , go for node LINE ITEM. Here create a step & maintain the prerequisite as per your requirement & in the check you can mention the code or you can direct it to a custom program like ZFI_RGGBR000.
Here while maintaining the check you will get structures BKPF & BSEG in which you will get the desired field you are looking for.
Just try to explore in your system how the other validations are maintained.
After you are done with all your code, you have to run the regeneration program RGUGBR00.
Here utmost care should be taken while running regeneration program, you should select all the checkboxes in the selection screen except GENERATE SETS, GEN SUBSTN ROUTNS IN ALL CLNTS & TRACE PROG. GENERATE CALLS .
Hope this make your doubt clear.
Regards
Abhii -
How to create Long Text in Module Pool Program
Hi all,
I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
Thanks & Regards
NirmalHai ,
here you have to use custom control, for this
DATA: line(256) TYPE c,
text_tab LIKE STANDARD TABLE OF line,
field LIKE line.
1) Create custom control in your screen
2) CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT', "--> (this is custom control name in screen)
editor EXPORTING parent = container.
3) CALL METHOD editor->get_text_as_stream "This method reads data from custom control , inserts into itab 'text_tab'
IMPORTING
text = text_tab. "
READ TABLE text_tab INTO line INDEX 1. read the text into wa 'line'
if you want more clarity , see 'ABAPDOCU' >ABAP USER DIALOGS> COMPLEXSCREEN ELEMENTS--> DEMO CUSTOM_CONTROL -
How to read long text in Document line item
Hi,
How to read long text in FI Document line item.Use Read_text function module.
you need to pass
ID
LANGUAGE
NAME
OBJECT to the function moduel
To find the Text id name language and object these are the following steps. Example: FB02
1. goto FB02, Enter Document number
2. from menuselect Goto>Header-->header Text..... New window will be displayed
3. select the Header Text. here you can see all the text.
4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper.
5. in the Next window you will find Text Name. Text ID, Language. etc...
Regards,
Lalit Mohan Gupta. -
How to use long texts in explanation tool tip?
Hi ,
Can anyone tell me how to add long text in Explanation tool tip?
I am able to use short OTR texts in explanation tool tip but not able to use long OTR texts.
Thanks and regards,
Vivek Shetty.For long text
method1
Create TEXT node- general attributes change text type to include text
then you can input text name/text object/text id/language
method2
create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
then use LOOP or TABLE node to display it
For TEXT module(For foreign language)
Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
then enter smartform Create TEXT node- general attributes change text type to text module
input the text module name which created by above
btw SO10 is just for Scriptform, in smartforms we use text module to replace SO10
Maybe you are looking for
-
How to upgrade MB Pro Lion to Yosemite
Looking for some "how to" advice on upgrading software from(Late Year 2011) 15" Mac Book Pro Lion 10.7.5 to newer Yosemite OS X. I'd also like to remove all old non-working Power PC Apps and any other junk, bugs or viruses it might have. Lookin
-
Hi I want to upload a video in one of my page so that who ever visits my page should be able to run and see the video. There is component for uploading images. But how can i upload a video. If it is possible can you please guide me how to achieve
-
Algorithm to read pdf meta data
Hi, I want to know how can i read pdf meta data. Like number of pages and each page height and width. Note i want to for older pdf files which are created by 1.5 pdf creator. I know using pdf 1.7 version we can communicate two way. Abou we know that
-
Slideshow, Thumbnails& MovieClips Oh My!
I would like to create a thumbnail scrollbar where there is a panel of thumbnails (SlideShow1, Slideshow2, Slideshow3, etc) which are MovieClips populated from external jpgs. The Movie clip also needs to be able to display a description of the thumbn
-
Hi, Please let me kow if there is any standard BAPI for creating variant configuration profile in CU41. Thanks.