Splitting long text in smartform
Hi,
I got a 'item description' field which is of 30 char wide.
How split it into 2.
Hi
Try this function module :
TR_SPLIT_TEXT.
With Regards
Nikunj Shah
Similar Messages
-
How to display long text in smartforms
Hi experts,
Iam trying to display long text into smartforms.I got the long text into ITAB frm database
in the abap program.In the form interface how to define the variable?In the long text i have 6 lines.
points guaranteed
cheers
kakiKaki,
Delcare a table and getting the LONG TEXT is not the right way of doing this.
You create a TEXT object and change the TYPE to INCLUDE TEXT. Once that is done all you have to do specify the parameters of your long text - TEXT ID, TEXT OBJECT and TEXT NAME. These are the same parameters that you use for READ_TEXT funciton. You don't have to fetch the text manually, it happens automatically.
Make sure this is a part of the main window as this might run into multiple pages.
Regards,
Ravi
Note : Please reward the posts that help you. -
Ask split long text into two line into same cell for ALV
Dear All,
Is it possible split long text into two line into same cell for ALV display data?
Regards,
Luke
Moderator message: please search for information before asking.
Edited by: Thomas Zloch on Feb 24, 2011 10:12 AMKeep options: Select the paragraph, then CtrlAltK (Mac: CmdOptK, I
think).
If you want the paragraphs in pairs, create two paragraph styles. Style
A has keep options set to start on a new page, and also, its Next Style
is style B.
Style B has no keep options, but it's Next Style is Style A.
Select all the text.
From the flyout menu of the paragraph styles palette, apply Style A
"then next style."
Now all paragraphs will be alternating -- style A, style B, style A, etc.
Now do what I wrote initially, and you'll have pairs of paragraph in
separate text frames. -
Print the Long text in Smartform
Hi all,
I designed a Work order document using Smartform for the T-Code 'IW32'.
I am able to print the Operation short text, but there is one more provision for the user to enter long text also.
I am not getting where this text gets stored in the database.
Any one can give me some solution to over come this problem.
Regards,
Ravi Shankarhi Ravi,
check this link
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/faq
here in FAQ , you will know abiut how longtext is created and where it is stored
it might be helpful to you.
thanks
Sachin -
Formating long text in smartforms
Hi,
I am receiving a long text in an internal table of lines.
But when i do the loop to the table to display the lines, i cant justify this same lines to the cell, even if the paragraph is defined as justify.
Thanks,
Bruno PimentaHi,
check this...
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'B01'
language = sy-langu
name = name
object = 'EBANH'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
lines = it_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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH c_tab[].
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
* CODEPAGE = '0000'
formatwidth = 72
language = sy-langu
tabletype = 'ASC'
* TAB_SUBSTITUTE = ' '
* LF_SUBSTITUTE = ' '
replace_symbols = 'X'
replace_sapchars = 'X'
IMPORTING
* FORMATWIDTH_E =
* X_DATATAB =
c_datatab = c_tab[]
* X_SIZE =
TABLES
itf_lines = it_lines
* EXCEPTIONS
* INVALID_TABLETYPE = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT c_tab.
CONCATENATE text c_tab INTO text SEPARATED BY space.
ENDLOOP.
Arunima -
Display issue with Long Text in Smartform
Hi All,
We have a custom smartform, where we are displaying the Invoice Item level details.
The Item description (InvoiceItemItem Text) is of about 1000 character length and a variable v_temp with 2000 length has been defined and saved.
In debug mode, the complete text is saved in the variable v_temp.
The same variable is placed in the smartform to display the complete text.
But the complete Text is not getting displayed and only the system displays 256 char.
How to resolve this issue?
Regards
PavanHi,
Another workaround will be to define internal table with a field of lenght 256, and use the function module RKD_WORD_WRAP to split the string (v_temp) into 256 characters length. Now loop at this internal table and print the same.
Regards,
Swarna Munukoti. -
Long text not appear in E-mail Notification (Smartform)
Dear Gurus,
Need your insight on this issue. I'm trying to insert long text (Response/Description/etc) from the message into body of e-mail notification. I use function module 'CRM_DNO_READ_ORDER_TEXT' to get the text in the smartform and then use function module 'READ_TEXT' to get the text lines but it returns exception 'not_found'.
I try to debug and it seems like the smartform is executed before the long text is saved into the table (STXH), thus i can't get those text. I have set Action Processing Time to Processing when saving document.
Anyone had this problem before? Need your help.
Thanks and Best Regards,
TresnaI know I am late to this thread but yes you are right. Samrtform gets executed before the Logntext gets saved in Database.
I just did the following and it's working perfectly fine
Please go through the code below and this solution is working best for me and I just implemented that today.
DATA iv_header_guid TYPE crmt_object_guid.
DATA et_textdata TYPE comt_text_textdata_t.
DATA ls_textdata TYPE comt_text_textdata.
DATA et_alltexts TYPE comt_text_textdata_t.
DATA et_error TYPE comt_text_error_t.
DATA ev_text_procedure TYPE comt_text_det_procedure.
DATA et_text_cust TYPE comt_text_cust_struc1_tab.
DATA: stxh TYPE stxh.
DATA: lines TYPE comt_text_lines_t.
DATA: ls_lines TYPE tline.
iv_header_guid = wa_header-guid.
CALL FUNCTION 'CRM_DNO_READ_ORDER_TEXT'
EXPORTING
iv_header_guid = iv_header_guid
IMPORTING
et_textdata = et_textdata
et_alltexts = et_alltexts
et_error = et_error
ev_text_procedure = ev_text_procedure
et_text_cust = et_text_cust.
LOOP AT et_alltexts INTO ls_textdata.
stxh = ls_textdata-stxh.
IF stxh-tdid = 'ZARD'.
lines[] = ls_textdata-lines[].
LOOP AT lines INTO ls_lines.
CONCATENATE gv_comments ' ' ls_lines-tdline
INTO gv_comments SEPARATED BY space.
ENDLOOP.
ENDIF.
ENDLOOP.
Tresna Cahya wrote:
Dear Gurus,
Need your insight on this issue. I'm trying to insert long text (Response/Description/etc) from the message into body of e-mail notification. I use function module 'CRM_DNO_READ_ORDER_TEXT' to get the text in the smartform and then use function module 'READ_TEXT' to get the text lines but it returns exception 'not_found'.
I try to debug and it seems like the smartform is executed before the long text is saved into the table (STXH), thus i can't get those text. I have set Action Processing Time to Processing when saving document.
Anyone had this problem before? Need your help.
Thanks and Best Regards,
Tresna
No need for READ_TEXT.
Message was edited by: Mansoor Ahmed -
Split record fetched from long text
Hello experts,
I am fetching a long text that has a value like this:
06/25/2002-12/15/2005
How can I split it in such a way that I will put the 1st date(06/25/2002) to field1 and
2nd date(12/15/2005) to field2 in my itab. Again, thank you guys and have a nice day!Hi,
Data : wa_temp like line of itab.
split data at '-' into wa_temp-field1 wa_temp-field2.
append wa_temp into itab. -
Do long texts always split up?
There is no character counter when I text. Will too long texts always break up into multiple texts, regardless of receiving carrier?
If over the limit for your carrier and/or for the receiving carrier, the SMS should be broken up into multiple SMS.
-
How to take annexture [ long text ] in purchase order in smartforms
hi all expert's
[1] i printing P.O in smart form ....
can any body tell me how to take annexture [ long text ] into P.O layout....text will be a page or more pages...
[2] how to pass mumtiple line item on next susquent page .....
e.x suppose i having 10 line items for a P.O [ Purchase Order ]
on page first it should display 5 lines and on 2nd page it should display 5 lines .....
while i am printing it is showing all items on same page and breaking footer and printing on next line...
kindly suggest me ...
thanx in advance ...Hi,
The method is quite simple, i presume you're quite well versed with doing recording, so the key thing to keep in mind is how to prepare the input file.
At my end i had about 5 lines of data which needed to be uploaded, hence i had a tab-delimited file with the order nos. in the first column & the five lines of text in five different columns (Refer format below)
Order No.
Line - 1
Line - 2
Line - 3
Line - 4
Line - 5
12345
txt - 1
txt - 2
txt - 3
txt - 4
txt - 5
67890
txt - a
txt - b
txt - c
txt - d
txt - e
Now provide this input file for your lsmw or bdc program & it will work. You can work with your abaper if you're not so comfortable with LSMW or BDC programming he / she should be able to easily make it work for you.
Regards,
Vivek -
hi all,
i have a long text stored in a field in database . i want to specify that firld in the include text so that it can be fetched and displayed... biut my problrm is about the display of the long text . there r certain words in the long text that is to be dipalyed in bold or may as next paragraph..... how will i customize it....
also if i do any change in the field by inserting a code node will that refelct.....Hi
Double click on that Long Text
it takes you to TEXT ediotr
From MENU GOTO-> HEADER
you will find the 4 paramaters like OBJECT,ID,OBJECTNAME and LANGUAGE
using these 4 parameters fetch the Long Text using the fun module READ_TEXT in the driver program or in the PROGRAM LINES of the Smartform and split that long text (it_lines lines) as per your wish and make them Bold and display
see the read_text Doc
READ_TEXT
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters * or ,.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
Regards
Anji -
Long text doesn't fit the window exactly
Hi friends,
in PO smartforms i have included the header text of PO.
the problem is the long text doesn't fit to the window exactly i.e.,
when we enter the text in PO in the header a line can contain only 60 characters approximately where as in my smartforms it can contain more than that.
so in the display of smart form i get lot of space in the right side and i get the remaining part of text in the next line.
regards,
Saravan rajhi,
what u have told is correct but we can't expect the end user to do it each time when they paste the long text.
is there any option to bring it by default.
regards,
saravan raj -
How to use standard texts in smartforms
Hi Friends,
How to use standard texts in smartforms, ie in scripts we are using standard texts using tr so10.
thanks in advance,
regards,
sharma.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 -
How to display long text in SAP Query ALV layout? It only show 129 char now
I have a SAP Query which show a remark field(Max length more than 500 char), but it only show max length 129 char now. In fact, the lenght of remark field text is more than 300, and i had debug the source code, the field text value do is correct, its length do is 376.
Do anybody can help me solve the issue, let the query ALV layout can show the long text field value?
thanks very much in addvance.Hi,
ALV can show only a restrict value length around 128 characters, many experts said that we can not extend. many suggestions is split text into some column.
Regards, -
Error while reading the Long text Using READ_TEXT
Hi friends,
Right now I am working with Smartforms.While I am reading the Long text of the material using function module READ_TEXT I am getting the following error if the text is not there.
OUT_PURCH_PO ID GRUN language EN not found.
I should not get this error Instead I should get the blank value.
OUT_PURCH_PO - my material name.
Following is my code.
IF WA_EKPO-KNTTP = 'F' AND WA_MTART-MTART = 'ZMSC'.
READ TABLE IT_SGTXT INTO WA_SGTXT WITH KEY MATNR = WA_EKPO-MATNR.
WA_EKPO-TXZ01 = WA_SGTXT-SGTXT.
NAME = WA_EKPO-MATNR.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = ID
LANGUAGE = SY-LANGU
NAME = NAME
OBJECT = OBJECT
IMPORTING
HEADER = THEAD
TABLES
LINES = LTEXT.Hi,
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = id
language = sy-langu
name = name
object = object
TABLES
lines = ltext
EXCEPTIONS " --> have this
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.
Edited by: Avinash Kodarapu on Jun 5, 2009 7:32 PM
Maybe you are looking for
-
Help me out with Appleworks?
Opened a .doc file with Appleworks, translated and saved again as a .doc file. For some unknown reason the font always reverts back to Helvetica, even when I change it and save as something else (Bookman Old Style). A real pita and I need the proper
-
How can we set two events in a single button ???
HI I created a button named bold , when i click it first time the textarea texts will became as bold.. I created another button bold cancel when i click at that button textarea texts will became plain... But how can i set that controls in a single bu
-
Levels Histogram in 16:9
My levels histogram is messed up when I edit HD video in 16:9. All of the values barely show up on the graph. I believe this is because the histogram is including the black bars across the top and bottom of the screen when 16:9 is letterboxed, and th
-
OK folks, I've done a stupid thing. To nake a long story short, I re-installed Tiger via Archive and restore, twice, but I mistakenly let it set up my primary user account under my personal name, forgetting that previously I had set up my business na
-
Best way to organize menu code?
I've been developing a Swing application for my small company for a little over six months now. It's essentially a front end for a SQL Server database, which the application connects to using JDBC over our VPN. Anyhow, the application has reached a l