Text Issue in sap-script
Hi All,
I am using writing the text in script using include object and text-id ,but it is not showing up in the form.Can anybody tell me where the text is maintained.where can i check whether this text is maintained or not.
Regards
Lalit
Hi lalit,
Use the read_text function module and pass the object id,object name,language .like as below.
v_name = it_out-ebeln.
call function 'READ_TEXT'
exporting
client = sy-mandt
id = 'F02'
language = sy-langu
name = v_name
object = 'EKKO'
tables
lines = it_tline3
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 eq 0.
read table it_tline3. "#EC *
v_info3 = it_tline3-tdline(50).
endif.
if helpful give me the points
Similar Messages
-
Text display issue in SAP script
Hi All,
I have developed a sap script (Invoice) which is having a Footer window.
The footer window should display page number and some text (address of company). The address data is stored in an internal table and the same will be made to display in sap script.
Now my problem is the address data is displaying correctly in the second page. But no data is getting displayed in the first page. If the Invoice is of single page, the address data in Footer window is getting printed properly.
The problem occurs only, when the invoice is of multiple pages....
What might be the problem in this regard...??????
Please help me, as this bug need to be fixed as early as possible....
Regards
PavanThe size of MAIN and FOOTER window are not getting truncated. Both window have designed properly.
In the first page, the footer window will display Page No data and the address data will be invisible. In debig mode, i can see the value of address will be passed to text symbols of sap script.
There are no conditions set in the sap script for Footer window.
one more observation is that after execution (at print preview screen), if i go back and again click for print preview, the address data is getting printed in the first page...!!!
Regards
Pavan -
Alignmnet Issues with SAP Script
Hi All i have an issue with SAP script i have few columns in the script where in the values in the column changes dynamically.For example the value of second column in the first row can be 5 characters and the value of the same in the 2nd row can be of 10 characters and it keeps varying for every row but the max length of it would be 20 characters.
Now the issues is with the second column as the text in this column keep varying the text in the same row after the second column keep moving either towards right or towards left depending on the text in the second column,Can any one help me as how can i fix this issue.
Looking for your valuable inputs.
Regards
Hari Krishna.Hari,
http://help.sap.com/saphelp_47x200/helpdata/en/d1/802d91454211d189710000e8322d00/frameset.htm
Even though it is not the solution,I guess this link will be helpful.
K.Kiran. -
How to end text element in sap script
how to end an text element in sap script
this is the format.
/E text element name
&tablename-fieldname&
text-text-text-text
now if i do not end that text element it is not displayiny my below text , so what to do in this caseGo through the links mentioned below.
http://www.****************/Tutorials/Smartforms/SFMain.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
http://www.sapmaterial.com/smartform_example.html
Re: Hands on SAP Smart Forms
smartforms
Reward points if useful. -
Hi All
Y do we need Text element in SAP SCRIPT ?yes you can.
are you using your own print program or a standard?
Each window will be called by the code so if you have no elements in there all the data is output in the order they appear in the form. -
Hi all, how can I force auto adjust of Text leght in Sap Script ?
I have a text to print, and when it is taller than page area it is printed in another page Ok. But I don't want that it is printed in another page, I want that it is adjusted automatically to print in one page only, without I have adjust text font manually.Hi!
Welcome on SDN.
Here's the official document of SAPScript.
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
Regards
Tamá -
Dump error when clicked on text elements in SAP Script window
Hi All,
There is an inclusion in SAP Script. I have written the code in driver program. I need to pass the value to SAP Script in the requested position. But when I go to SE71 > Form Name > Change or Display > MAIN Window > Text Elements > I get a dump error.
Category ABAP Programming Error
Runtime Errors DATA_LENGTH_TOO_LARGE
Except. CX_SY_RANGE_OUT_OF_BOUNDS
ABAP Program SAPLSTXK
Application Component BC-SRV-SCR
Date and Time 30.04.2014 20:00:08
Short text
Invalid partial field access: Length is too large
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSTXK" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was not
caught in
procedure "TOKEN_COMMENT" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the executed program "SAPLSTXK", the system attempted to access the field
"ITF_TOKEN" of the type "C" and with the length 255 using the length 272.
However, a partial field access with a length specification that is
larger than the field length is not allowed.
How to correct the error
Reduce the length used to access the field.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DATA_LENGTH_TOO_LARGE" "CX_SY_RANGE_OUT_OF_BOUNDS"
"SAPLSTXK" or "LSTXKFRN"
"TOKEN_COMMENT"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
2937 * todo empty comment ???
2938 if g_tm_open eq true or " Section
2939 g_tm_b_close eq true.
2940 l_token = '\chcbpat0'.
2941 l_len = strlen( l_token ).
2942 token_control = true.
2943 assign l_token to <itf1>.
2944 perform put_itf1_new using l_len.
2945 perform token_line_begin changing l_next_token.
2946 else. " without section
2947 concatenate '\chcbpat0\line' g_cf_string l_cbpat_token into l_token.
2948 l_len = strlen( l_token ).
2949 token_control = true.
2950 assign l_token to <itf1>.
2951 perform put_itf1_new using l_len.
2952 endif.
2953 elseif l_next_token-code eq ')L'. " \par
2954 l_token = '\par'.
2955 l_len = strlen( l_token ).
2956 token_control = true.
2957 assign l_token to <itf1>.
2958 perform put_itf1_new using l_len.
2959 elseif l_next_token-code eq '(C' or " \par + format
2960 l_next_token-code eq ')C' or
2961 l_next_token-code eq '(&' or
2962 l_next_token-code eq 'TA' or
2963 l_next_token-code eq 'SC' or
2964 l_next_token-code eq 'ST'.
2965 concatenate '\chcbpat0\par' g_pf_string g_cf_string l_cbpat_token into l_token.
2966 l_len = strlen( l_token ).
>>>>> itf_token(l_len) = l_token.
2968 token_control = true.
2969 assign l_token to <itf1>.
2970 perform put_itf1_new using l_len.
2971 endif.
2972
2973 * Step 7: (L to disarm
2974 if g_compose eq true and
2975 l_next_token-code eq '(L'.
2976 perform read_next_itf_token(rstxscan) using p_token.
2977 endif.
2978
2979 ENDFORM. " token_comment
2980 *&---------------------------------------------------------------------*
2981 *& Form create_lang_info
2982 *&---------------------------------------------------------------------*
2983 * add default language to rtf
2984 *----------------------------------------------------------------------*
2985 * -->P_HEADER text
2986 * <--P_RESULT text
How do I open the text elements? I need to pass the variable inside SAP Script.
Please Help. The requirement is pending from very long. Not able to rectify this issue.
Regards,
RekhaHi,
There is a SAP Note about this problem
566794 - Runtime error: STRING_OFFSET_TOO_LARGE during conversion
Correction Instructions
Correction Instructions
Software Component
Valid from
Valid to
Number
SAP_BASIS
46B
46D
473267
SAP_BASIS
610
620
473185
Support Packages & Patches
Support Packages
Software Component
Release
Support Package
SAP_BASIS
46B
SAPKB46B48
46C
SAPKB46C39
46D
SAPKB46D28
610
SAPKB61027
620
SAPKB62014
Regards
Miguel -
Vertical line issue in SAP Script main window
Hi All,
I want to draw a vertical line in my main window in SAP Script output.
But problem is in main window i am printing some texts at the beggining then i am printing line items.
So this is not fixed line (box). It may increase/decrease based on text available before line items.
How can i manage this prining vertival line as i don't know height, top of this line!
Thanks in advance.
Thanks,
Deep.Hai Deep,
Use Elements as suggested by Kodarapu.
Now goto Paragraph Formats create a format for Item lines.
ex.
Name Paragraph Format as 'IL' Now click on the Push Button "Tabs" on bottom Right.
now in "Tab Position" enter the spacing that you need for your item dispaly
ex.
Number Tab position Alignment
1 6.00 CH LEFT
2 25.00 CH LEFT
3 54.00 CH LEFT
The above example is for 3 items
Now in your Script Windows-> Main
do the following.
/E ITEM_LINE_A
IL &EKPO-EBELP&,,&EKPO-EMATN&,,,,&EKPO-TXZ01&
Hope it SOlves your Issue.
Cheers,
Suvendu -
Multiple line issue in sap script
Hi All,
There is a window in the sap script.
The window consists of a text element and i am displaying 4 lines of text in that window.
Sap script:
/E Reason
AC &LINE&
In the source code, an internal table will have 5 text lines and those 5 lines should be reflected in sap script.
The source code as follows.....
loop at li_tline.
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
NAME = 'LINE'
VALUE = li_tline-tdLINE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'REASON'
WINDOW = 'REASON'
function = 'APPEND'.
endloop.
In final output, the last line of the internal table is reflacting..... Hope its getting over written each time in the loop.
How to make the code, so that i can reflect all the lines from internal table to the sap script....??????????????
Please help me, as this issue is very much urgent..........
Regards
PavanHi
Do like this.
declare 5 variables each of 80 char length.
data: v1(80), v2(80), v3(80), v4(80), v5(80).
Read the Internal table li_tline with index and move each line to different variables and write those variables in the script.
if not li_tline[] is initial.
read table li_tline index 1.
if sy-subrc = 0.
v1 = li_tline-tdline+0(80).
endif.
read table li_tline index 2.
if sy-subrc = 0.
v2 = li_tline-tdline+0(80).
endif.
read table li_tline index 3.
if sy-subrc = 0.
v3 = li_tline-tdline+0(80).
endif.
read table li_tline index 4.
if sy-subrc = 0.
v4 = li_tline-tdline+0(80).
endif.
read table li_tline index 5.
if sy-subrc = 0.
v5 = li_tline-tdline+0(80).
endif.
endif.
write the &V1& &V2& &V3& &V4& &V5& variables ins cript
Reward points if useful
Regards
Anji -
How do I Hide the text printed from a standard Text Element in SAP Script?
Hi,
I have created one SAP Script which gets printed from IW33 using a standard print program.
In config the standrad SAP script is replaced by the zsap script.
Since the Zscript is printed from a Standard print program, I had to keep all the text elements used by the original(standard) SAP script.
I only kept the text elemets and commented out the printing part.
But still some values are printing. How do I hide these text element values?
I want to delete whatever its printing from these text element. Icant delete the standard text elemetns , otherwise the standard print program will give error.Hi,
I am not printing any text under these text element in my zscript.
I had to include these standard text elemets as they are called from the standard print program using which my zscript is getting printed.
for example:
/E OPERATION
Under operation i didnot print anything. Still some values which are passed in text element Operation by the print program is being printed in the form. i want to hide/delete these values.
how do I do that? -
Text Element in SAP-Script and Box
Hi Gurus
Q1.what is the meaning of text element's in sap-script.e.g.
/E INSPECTION_STATION_INFO
/E SAMPLE_INFO
/E PHYS_SAMPLES_HEADLINE..
I have to use these elements in my script.i am not able to understand what does it mean?
Q2.how we can draw a Tabular format in Script?
Q3.How we can draw Box?
Thanks in advanceHi,
Text Elements
You can define text elements (window texts) for each window. On the Form: Request screen, choose Edit ® Text elements.
The print program accesses text elements by name, formats them and prints them in the respective window. That is, the program can decide which text elements should be printed in a particular window. It calls these text elements by name to print them. You must therefore change text element names in the print program if you make any changes to text element names in a form.
In the layout of a text element, you can use only the paragraph and character formats defined in the form.
Example of a text element in an order confirmation:
/E ITEM_LINE
IL &VBDPA-POSNR&,,&VBDPA-MATNR&,,&VBDPA-ARKTX&
/ &'Customerarticlenumber 'VBDPA-IDNKD' '&&'Position
/ 'VBDPA-POSEX&
This example shows a section of a main window of a form, with an item line of an order confirmation. The /E in the tag column is used to identify the text as a text element, ITEM_LINE is the name of the text element.
Default Text Element
At the start of a window, you can define a text element without the /E command in the paragraph format column. This text is always printed at the start of the window. It is not necessary to insert this text explicitly via a print program.
For more go to this link: Character formats and attributes
http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
Boxes:
Use the following code
/: BOX XPOS 1 MM YPOS 2 MM WIDTH 20 MM HEIGHT 40 MM FRAME 10 TW.
Box is the command used for printing box in script.
XPOS - x- axis position
ypos - y axis position
http://help.sap.com/saphelp_470/helpdata/en/d1/802ec5454211d189710000e8322d00/content.htm
Regards,
Omkaram. -
Text translation in sap-script
Hi
I am using sapscript for PO printing . I need to translate some texts in the PO depending upon the language . I have the translated text in all languages . How to go about it . putting condition on language would be a tedious job . Is there some better way to perform these translations .
Awaiting response . Would reward any sort of help .
ThanksInstead Create A TExt Element and euate the text element to the corresponding field which u r transferring to the S. Script.
Suppose ur displaying : &VA_DESCRIPTION& in the SAP Script...
Then Do like this:
VA_DESCRIPTION = TEXT-001.
Now using TRANSLATION TOOL LOAD THE TEXT-001 for all useful languages with the description u already have...
Hope this is clear... For any query write back to me....
Lastly: Don't forget to give POINTS.. as we are putting extra efforts by seating late in office and trying to help u...
Darshan Patel -
Long Text printing in SAP SCRIPT
Hi Experts,
I have a requirement of printing long text in sapscript.
There are 15 condition types for each item in sales order and one long text for each condition record.
Each long text has multiple lines i.e. for one long text it may have 2 lines and other may have 1 or 3 lines or etc.
My trials :
I used read_text() function mudule in a routine which is being called from the sap script to get the whole long text which has 5 lines and is stored in an internal table.
Now is there a way to transfer the whole internal_table data as a whole into the script i.e. is there a way to transfer the table from the routine to the sapscript.
Thanks in advance.
kalikonda.Hi
In addition of my include solution.
you ofcourse can use a perform statement if you havea maximum of lines which is possible.
like (if you have a maximum of 5 lines
define &line_1& := ' '
define &line_2& := ' '
define &line_3& := ' '
define &line_4& := ' '
define &line_5& := ' '
Perform getsomedate in program abcxyz
using orderno
using itemno
changing &line_1&
changing &line_2&
changing &line_3&
changing &line_4&
changing &line_5&
Endperform
when printing the data
/: if &line_1& NE ' '
IL &line_1&
/: endif
/: if &line_2& NE ' '
IL &line_2&
/: endif
/: if &line_3& NE ' '
IL &line_3&
/: endif
/: if &line_4& NE ' '
IL &line_4&
/: endif
/: if &line_5& NE ' '
IL &line_5&
/: endif
Gr., Frank -
Long text problem in sap script
Hi Experts,
I have craeted sap script for payment print progrem.. in my sap script one window is text window... client want more then 300 char for that window. for that i use read_text function module... its working fine... but problem is it retrive only one line from long text editor. only 70 char i got.
below is my coding......
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = '0001'
LANGUAGE = sy-langu
NAME = NAME
OBJECT = 'DOC_ITEM'
TABLES
LINES = LINES .
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 LINES.
n = 0.
l = 132.
text+n(l) = lines-tdline.
n = n + 132.
l = l + 132.
ENDLOOP.
in sap script i have direct pass lines-tdline
*&lines-tdline&
Please suggest me which point i missing?
Thanks
JigarHi All,
The standard text will be stored in Name = ORDCONF_TEXT_(sales org)_(distributionchannel)_(division)
Text ID = ZSD
Examples: ORDCONF_TEXT_4000_01_01 , ORDCONF_TEXT_4000_01_80 , ORDCONF_TEXT_1000_01_01.
Requirement :
The print program /form will need to pick up the appropriate standard text based on the Sales Area (combination of Sales Org / Distribution Center / Division) of the sales order [VBAK-VKORG / VTWEG / SPART], provided a standard text has been created for that Sales Area. Itu2019s not required that every sales area have a standard text, so if one is not found, this step should be skipped and the rest of the print program executed.
The new text should print after 2 blank lines after the Printable Notes text (which is after the line items and the Total Net Price prints).
The font should be the same size as the Printable Notes, but bolded rather than italicized.
The text should print in the same columns as the Printable Notes currently print in (Material Description / Scheduled Ship Date / Quantity) .
So the logic i have used is this below code:
I used a subroutine in the layout of the main window becoz i need to print it in the main window below after 2 blank lines of line items.
This is logic in the layout:
/:PERFORM GET_OBJECT IN PROGRAM ZSDRP001_ORD_CONF_IRE
/:USING &VBDKA-VBELN&
/:CHANGING &ORDCONF_TEXT&
/:ENDFORM
/:INCLUDE &ORDCONF_TEXT& OBJECT TEXT ID ZSD PARAGRAPH A1
I called this subroutine in the print program:
Logic in the print program:
FORM GET_OBJECT TABLES INPUT_TAB STRUCTURE ITCSY
OUTPUT_TAB STRUCTURE ITCSY.
DATA : TMP_VBELN LIKE vbdka-VBELN,
TMP_VKORG LIKE VBAK-VKORG,
TMP_VTWEG LIKE VBAK-VTWEG,
TMP_SPART LIKE VBAK-SPART,
TMP_TXNAM1(40) TYPE C VALUE 'ORDCONF_TEXT',
TMP_TXNAM2(100) TYPE C.
DATA: v_text LIKE tline-tdline.
DATA : P_V_TEXT LIKE tline-tdline.
CLEAR : TMP_TXNAM1, TMP_TXNAM2, TMP_VBELN, TMP_VKORG, TMP_VTWEG, TMP_SPART.
READ TABLE INPUT_TAB WITH KEY NAME = 'vbdka-VBELN'.
IF SY-SUBRC = 0.
tmp_vbeln = input_tab-value.
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING INPUT = TMP_VBELN
I
MPORTING OUTPUT = TMP_VBELN .
CLEAR VBAK.
SELECT SINGLE VKORG VTWEG SPART INTO (TMP_VKORG, TMP_VTWEG, TMP_SPART)
FROM VBAK WHERE VBELN EQ TMP_VBELN.
IF NOT TMP_VKORG IS INITIAL
AND NOT TMP_VTWEG IS INITIAL
AND NOT TMP_SPART IS INITIAL.
CONCATENATE TMP_TXNAM1 TMP_VKORG tmp_vtweg tmp_spart into TMP_TXNAM2 SEPARATED BY '_'.
endif.
CONDENSE TMP_TXNAM2 NO-GAPS.
PERFORM read_order_text USING TMP_TXNAM2 CHANGING v_text.
READ TABLE output_tab WITH KEY NAME = 'ORDCONF_TEXT'.
IF SY-SUBRC = 0.
output_tab-value = P_V_TEXT.
MODIFY output_tab index sy-tabix.
endif.
endform.
FORM READ_ORDER_TEXT USING P_TMP_TXNAM2 CHANGING P_V_TEXT LIKE tline-tdline.
DATA: ztdid LIKE thead-tdid,
zlang LIKE thead-tdspras,
zobj LIKE thead-tdobject,
zname LIKE thead-tdname.
DATA: tlines TYPE STANDARD TABLE OF tline WITH HEADER LINE
thead LIKE thead.
CLEAR P_V_TEXT.
ztdid = 'ZSD'.
zlang = 'E'.
zobj = 'TEXT'.
zname = P_TMP_TXNAM2.
CLEAR tlines.
REFRESH tlines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
object = zobj
name = zname
id = ztdid
language = zlang
IMPORTING
header = thead
TABLES
lines = tlines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
LOOP AT tlines WHERE NOT tdline IS INITIAL.
MOVE tlines-tdline TO P_V_TEXT.
ENDLOOP.
ENDFORM.
But still its not getting printed .Plz tell me where i am going wrong.
Thanks,
Suman -
Hi ABAP Experts,
i got one object on SAP Script Forms, this is first time i am doing sap scripts, my issue is i created a form Debit memo from scratch and now i want to assign this form to standard print program RFK0RD00(PAYMENT NOTICE) and for this print program the standard layout form is F140_PAY_CONF_01.can u please tell what is the output type of this form and where to assign this ?
Thanks in Advance...Hello Srini,
First thing,how to find output type?
-Go to table TNAPR and enter your print program name in TNAPR-PGNAM and form name in TNAPR-FONAM.
-Look for the entry, the field value of TNAPR-KSCHL will give you the output type for your Print program and sap script form.
-TNAPR-KAPPL will give you the value for Application.
Second thing,how to assign?
-Go to transaction NACE
-Select the application(TNAPR-KAPPL).
-Press the button 'OUTPUT TYPES'
-Select the corresponding output type(TNAPR-KSCHL)
-Now select the folder 'Processing routines' on the left side.
-Enter your Program name (RFK0RD00), form routine name(mostly it is ENTRY) and then enter your form name (form designed by you from scratch).
Kinldy reply if this has helped you.
Maybe you are looking for
-
I have some side nav items that are not showing the background color. Can't figure out why. http://www.aptcoweb.com/dev/aptcoFluid/ Also, 3 divs near the bottom with the class of col are not floating. What's wrong there?
-
using Tixati as my default torrent client and when I open a torrent file it automatically says save and I select open and the box where it says always open this type of file is greyed out. I looked in the extensions on Firefox but .torrent is not an
-
How to implement 'less than' in choosing functions depending on numeric input
I have a 1D array and I want to split what happens with different values I made it so that the array outputs an element, with a scroll bar to change the element The array is random When the element is < 512 I want A to happen When the element is > 5
-
Hi All, My PC is down because of virus problems and I had Ora 10g installed on it for my personal use. Is there any website or URL on which one can log-on as practice database - just for hands-on training on Oracle 10g database and also for Oracle 10
-
More missing on iTunes on iPad
I use my iPad for listening to audiobooks. Recently I accidentally hit the "Radio" button on iTunes, and now I can't get back to the audiobook I'm in the middle of. "Audiobooks" should be one of the menu options, but it isn't. There ought to be a