Long Text Printing in SAPSCRIPT
Hi Experts,
I got one requirement that i the long text which user will enter that
has to be displayed on the layout of one window not main.
The text comes from FB03 application, that has to be displayed.
I want to know how to do this, i tried to use the hardcoded RSTXT-TDNAME text in my script as define &x& = 'AU1018000010152008001'
and then include command i used.
It will be okay for one item, if there are multiple items then it will not be worked.
so please give me an idea to proceed.
Regards,
sivananda P.
hi,
it_tline like tline occurs 0 with header line,
v_info(50), "#EC
clear it_tline.
refresh it_tline.
clear v_info.
v_name = it_out-ebeln.
call function 'READ_TEXT'
exporting
client = sy-mandt
id = 'F05'
language = sy-langu
name = v_name
object = 'EKKO'
tables
lines = it_tline
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_tline. "#EC *
v_info = it_tline-tdline(50).
endif.
if helpful give the points,
Regards,
Venkat
Similar Messages
-
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 -
Hi Abapers,
I am chaniging an existing SapScript that was not working properly. Client wants to print "Item Text" in output which is of 3 to 4 page. where as there is only one line item in PO. Also there is "Header Text" of 1 page. Client wants to display all line items then "Item Text" should displayed. and at last the "eader Text". The Format is Like as Follows:-
PO No. 12.12.2006
Vendor Name
Country
S.No. Mat. Desc. Qty. ...............and so on..........
1 abc 11 .....................
Item Text starts from here........................
Problem is here
This text is of 3 page (say).
So text starts from here and est of text goes to next page.
Only 4 Lines are printed properly and rest of lines are not printed.
I also checked in debuging mode.
so attachibng the code for reference kindly go through this.
Header Text Starts from here
Total amt. in words......
FORM READ_TEXTSLO1 TABLES IN_TAB200 STRUCTURE ITCSY
OUT_TAB200 STRUCTURE ITCSY.
READ TABLE IN_TAB200 INDEX 1.
EBELN1 = IN_TAB200-VALUE.
READ TABLE IN_TAB200 INDEX 2.
EBELP = IN_TAB200-VALUE.
CONCATENATE EBELN1 EBELP INTO OBJNAME.
CLEAR WRK_IT1.
CLEAR WRK_IT2.
CLEAR WRK_IT3.
CLEAR WRK_IT4.
CLEAR WRK_IT5.
Repeated Code
SELECT SINGLE TDNAME INTO WRK_TDNAME FROM STXH
WHERE TDOBJECT = 'EKPO'
AND TDNAME = OBJNAME
AND TDID EQ 'F01'.
IF SY-SUBRC = 0.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F01'
LANGUAGE = 'E'
NAME = OBJNAME
OBJECT = 'EKPO'
TABLES
LINES = IT_LINE.
IF SY-SUBRC = 0.
delete it_line where tdline EQ ' '.
BREAK ABAP7.
DESCRIBE TABLE it_line LINES wrk_lines1.
LOOP AT IT_LINE.
CLEAR WRK_TABIX.
WRK_TABIX = SY-TABIX.
IF WRK_TDLINE EQ ' '.
WRK_TDLINE = IT_LINE-TDLINE.
ELSE.
CONCATENATE WRK_TDLINE IT_LINE-TDLINE INTO WRK_TDLINE
SEPARATED BY SPACE.
ENDIF.
Y = STRLEN( WRK_TDLINE ).
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = WRK_TDLINE
DELIMITER = ' '
OUTPUTLEN = 100
IMPORTING
OUT_LINE1 = OUT_LINE1
OUT_LINE2 = OUT_LINE2
OUT_LINE3 = OUT_LINE3
OUT_LINE3 =
TABLES
OUT_LINES =
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 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.
*break abap7.
CASE WRK_TABIX.
WHEN 1 .
WRK_IT1 = OUT_LINE1.
WHEN 2 .
WRK_IT2 = OUT_LINE1.
WHEN 3 .
WRK_IT3 = OUT_LINE1.
WHEN 4 .
WRK_IT4 = OUT_LINE1.
ENDCASE.
IF OUT_LINE3 EQ ' '.
WRK_TDLINE = OUT_LINE2.
ELSE.
CONCATENATE OUT_LINE2 OUT_LINE3 INTO WRK_TDLINE
SEPARATED BY SPACE.
ENDIF.
ENDLOOP.
IF WRK_IT4 NE ' '.
Y = STRLEN( WRK_TDLINE ).
IF Y GT 50.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = WRK_TDLINE
DELIMITER = ' '
OUTPUTLEN = 50
IMPORTING
OUT_LINE1 = OUT_LINE1
OUT_LINE2 = OUT_LINE2
OUT_LINE3 = OUT_LINE3
OUT_LINE3 =
TABLES
OUT_LINES =
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 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.
wrk_it4 = out_line1. " Change Uncommented"
WRK_ITA = OUT_LINE1.
WRK_ITA4 = OUT_LINE2.
ELSE.
WRK_ITA = WRK_TDLINE.
ENDIF.
ENDIF.
ENDIF.
CLEAR WRK_TDLINE.
CLEAR OUT_LINE1.
CLEAR OUT_LINE2.
CLEAR OUT_LINE3.
OUT_TAB200-VALUE = WRK_IT1.
MODIFY OUT_TAB200 INDEX 1 TRANSPORTING VALUE.
OUT_TAB200-VALUE = WRK_IT2.
MODIFY OUT_TAB200 INDEX 2 TRANSPORTING VALUE.
OUT_TAB200-VALUE = WRK_IT3.
MODIFY OUT_TAB200 INDEX 3 TRANSPORTING VALUE.
OUT_TAB200-VALUE = WRK_IT4.
MODIFY OUT_TAB200 INDEX 4 TRANSPORTING VALUE.
ENDIF.
*****************************************************************Repeated code
Again the same code is repeated but now the TDID eq F02 in Select Query and also in READ_TEXT Fun. Module. and now in the CASE statement next 4 lines coded as
WHEN 1 .
WRK_IT5 = OUT_LINE1.
WHEN 2 .
WRK_IT6 = OUT_LINE1.
WHEN 3 .
WRK_IT7 = OUT_LINE1.
WHEN 4 .
WRK_IT8 = OUT_LINE1.
and also these 4 rows modified as follows
OUT_TAB200-VALUE = WRK_IT5.
MODIFY OUT_TAB200 INDEX 5 TRANSPORTING VALUE.
Now each time 4 - 4 rows coded as like as above.
upto TDID = F05
So there are total of 20 lines.
Now the text is of 4 to 5 page then its not printed. even 5th line is not printed. control not goes to 2nd Select Query cause the OBJECTNAME does not exist.
<b>for more information write your Email ID . So that i can explain more.</b>
So kindly review this and let me know what should i do ?
Helpful answer rewarded.
Regards
Robinhi,
<b>SAP SCRIPTS TUTORIALS</b>
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf
http://www.sappoint.com/abap/sscrtpex1.pdf
http://www.sap-img.com/sapscripts.htm
http://www.esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
SAP Script From the Scratch
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
http://www.sap-img.com/sapscripts.htm
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
http://sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
http://www.esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://www.esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://www.esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://www.esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://www.esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf.
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
Rgds
Anver
<b><i>if hlped pls mark points</i></b> -
How to get a long text into the SapScript
Hi.
I need to read text from header field from ME21N. I use to this READ_TEXT function module, which is called from SapScript but the problem is, that this function returns me just about 80 chars and trim rest of string.
First idea was use loop in form, but is impossible, how to solve this problem.
ThanksProblem was solved :
INCLUDE &EKKO-EBELN& OBJECT EKKO ID F01 LANGUAGE &EKKO-SPRAS&
Edited by: Daniel Duras on Apr 23, 2008 10:51 PM -
Long Text Printing in TEXT ELEMENTS of a Script
Hi,
I am printing the amount in words using Subroutine pool program. This amount is populationg fine in the program(in out_table structure ITCSY). I assigned those symbol for printing in text elements. While printing the last words are not printing.
Here ex: One Crore Thirteen Lakhs Ninety Two Thousand Four Hundred and Ninety Six and Paise Sixty Seven Only--- it has print like this
but it is printing
One Crore Thirteen Lakhs Ninety Two Thousand Four Hundred and Ninety Six and Pa---only. Remaining are not coming.
please suggest how to get the full text.
Regards,
Mahesh.First you need to understand that a variable in a script holds no more than 60 to 70 characters.
so what you should do is, in your subroutine pool declare 4 variables each of size 60 chars, and then move the amount in words 60 chars each and then pass these 4 variables to the script and use these variables to print.
This solves your problem.
Regards,
Termi. -
Standard text printing in sapscripts in EN & DE Language....
HI All,
My requirement was very simple....
I have some 6-7 Layouts......
i want to replace some hard coded text with some other text in those layout when the layout language is DE .the text will be in german...
for all remaining langauges of the layout i want the text to be displayed in EN.
can i use Standard Text or mormal hard coding will do aa....How....can any one help me out with sample coding or navigation....
Thanks
GaneshHi Kalandar,
The above solution was not working......I'll explain my problem clearly once again.
1. I have 6 layout to be changed in language DE
In the main window with tax text element i have some hard code in german language...that has to be replaced with some other sentence in german only(i have both the Sentences with me)
2. For the same 6 layouts to be changed in other languages(except DE)
same window ,same text element ,same hard code,but in English i have that to be replace with some other english sentence.
Simple to say in those 6 layouts if layout lang is DE then german sentence ,if lang other then DE...English sentence
Please check the possibility to use standard texts for this texts. Do u have to make any changes to program as well...
Plz help me out regarding this ...very important
Thanks
Ganesh -
Printing long text from material master in from MM07ET
Hello,
I'm using WEE1 output condition to print labels for gr. I'm using the standard object MM07ET and I need to include in the label the long text from material master - table STXL. I know that there is a function READ-TEXT in ABAP for this but I don't have access to abap development. I need to know if it's possible to include a command in the sap scrip to retrive the long text without modifing the program SAPM07DR.
Thank you!Hi,
Sorry for the late Reply, Please use the following code in SAPSCRIPT
/: INCLUDE &EKPO-EMATN& OBJECT MATERIAL IDGRUN LANGUAGE EN
&EKPO-EMATN& material Number ( Here please maintain the Field value which is used to print Material Number )
MATERIAL is the Object Name
GRUN Is Text ID
EN Language
You can use the above code for priting long text in the SAPSCRIPT FORM. to find the object name and ID please follow the below Steps
Go to the window were you have maintained Long text... Double click on the text, then it will open a new window.. there Click on the top Goto-->Header.. here you will find the relevant data as follows:
Language: EN
Text ID : GRUN
Text Object: MATERIAL
Name: Material Code
Regards
GK. -
Hi All,
I have created a script.....in that i have to print only long text in the main window.
Now my problem is...the LONG text is breaking and going to next page...
means a part on 1 page and remaining on subsequent pages..
And the problem is the box which i have put arround the main window is coming only in first page and last page . In between pages the box arround the main window is not coming .
How to get the box around those pages also.
help me out...
Thanks,
GuruHi
The property of MAIN window is like that, If the Data is more than a Page it automatically goes to next pages.
So better decide where I mean in which you wants to print ? In MAin window , then it automatcially goes to other pages. use a new paragraph format and mention PAGE PROTECTION for that such that it prints in the Same page.
For the boxes see the seetings of the main window in all pages, especially in NEXT page.. so that the box is coming properly
see the box related commands
SAPScripts
POSITION WINDOW
SIZE WIDTH '160' MM HEIGHT '140' MM
BOX FRAME 10 TW
Box
BOX HEIGHT '11' MM WIDTH '160' MM FRAME 10 TW INTENSITY 35
linessssssss
BOX XPOS '20' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
BOX XPOS '45' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
BOX XPOS '80' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
BOX XPOS '120' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
Boxes, Lines, Shading: BOX, POSITION, SIZE
Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.
The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.
Syntax:
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
BOX Command
Syntax
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
Effect: draws a box of the specified size at the specified position.
Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT, and FRAME, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter as a percentage between 0 and 100.
XPOS, YPOS
Upper left corner of the box, relative to the values of the POSITION command.
Default: Values specified in the POSITION command.
The following calculation is performed internally to determine the absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
WIDTH
Width of the box. Default: WIDTH value of the SIZE command.
HEIGHT
Height of the box. Default: HEIGHT value of the SIZE command.
FRAME
Thickness of frame.
Default: 0 (no frame).
INTENSITY
Grayscale of box contents as %.
Default: 100 (full black)
Measurements: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period as the decimal point character. See also the examples listed below.
Units of measurement: The following units of measurement may be used:
TW (twip)
PT (point)
IN (inch)
MM (millimeter)
CM (centimeter)
LN (line)
CH (character).
The following conversion factors apply:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = height of a character relative to the CPI specification in the form header
1 LN = height of a line relative to the LPI specification in the form header
/: BOX FRAME 10 TW
Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
/: BOX INTENSITY 10
Fills the window background with shading having a gray scale of 10 %.
/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line across the complete top edge of the window.
/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line along the complete height of the left hand edge of the window.
/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
POSITION Command
Syntax
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).
Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
XORIGIN, YORIGIN
Origin of the coordinate system.
WINDOW
Sets the values for the left and upper edges to match those of the current window (default setting).
PAGE
Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
/: POSITION WINDOW
Sets the origin for the coordinate system to the upper left corner of the window.
/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
SIZE Command
Syntax
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).
Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
WIDTH, HEIGHT
Dimensions of the rectangle or line.
WINDOW
Sets the values for the width and height to the values of the current window (default setting).
PAGE
Sets the values for the width and height to the values of the current output page.
/: SIZE WINDOW
Sets WIDTH and HEIGHT to the current window dimensions.
/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
/: POSITION WINDOW
/: POSITION XORIGIN -20 TW YORIGIN -20 TW
/: SIZE WIDTH +40 TW HEIGHT +40 TW
/: BOX FRAME 10 TW
A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
<b>Reward points for useful Answers</b>
Regards
Anji -
PASS THE LONG TEXT TO SAPSCRIPT
Hello Friends,
I m using itcsy structure to pass long text of quality certificate to sapscript output but im able to show only 80 characters in the output but my long text is more than 250 characters.
so how i can show these many characters value in my sapscript pls guide....
Regards,
SunnyIf you want to print the long text, you should use the INCLUDE statement in your SAP SCript.
1. You don't have to take the pain of fetching the text.
2. You don't have to reformat the same.
INCLUDE TEXT_NAME OBJECT TEXT ID
example:-
INCLUDE ZSDINV2A OBJECT TEXT ID ST LANGUAGE EN
Edited by: krupa jani on Nov 25, 2008 10:17 AM -
Display long text in SAPScript
Hi
I'd like to display long text of line item text which is there in VF03 (Billing/Invoice docu) menugoto-items-texts in output of SAPSCRIPT form.It would like to write the command in script text editor as: " /: INCLUDE &VBDPR-TDNAME& OBJECT VBBP ID 0001 PARAGRAPH HT " .
will this piece of code is enough to display on form. are is there anything that i need to do. like declaring in print program.....? please, suggest me experts....
thank you....that is enough, but make sure you populated the TDNAME in the driver.
/: INCLUDE &VBDPR-TDNAME& OBJECT VBBP ID 0001 PARAGRAPH HT -
Formatting Long Text gets disturbed during Adobe form Printing
Hi Guru's,
I have developed Adobe Form for PM work Orders (IW32) printing using Code u2018SFPu2019. The Order Contains order Long Text or Operation Long Text.
In my case the user maintains some table like structure in the Long text .e.g. ( Here the tab means the actual space and the text length can vary. So basically he will draw a table cells one below another by adjusting tab's)
Text 2 Tab Tab |___|___|
Te TabTab Tab |___|___|
I am reading this using READ_TEXT and it gets perfectly read.( I mean the tab positions will be intact. Also it will remain intact by the time ADS will get called)
When i submit this for generating Adobe Form the formatting of the tab positions gets disturbed and it prints something like
Text 2 |___|___|
Te |___|___|
How to keep the Tab positions intact while printing the Adobe Form? For SAP script printing it comes perfectly but for Adobe form printing it gets disturbed. Any idea how to handle this situation?
Thanks
PradeepTough request!
You have to calculate the widths of texts so that to determine to which tab position refers each tab character.
You might print the sapscript to OTF format, and read the OTF to get the exact positions (based on top left border of the page).
But now comes the second big issue: how to position a text in Adobe form at a dynamic position. That, I don't know. You might ask a question about this 2nd issue in forum -
Hi
My requirement is ,i have to read the long text entered in the FB03 transaction(it may be several lines) in my Z Print program and pass that to the sapscript form that it gets displayed as line item. can you please send sample how to do in program and how it is called in sapscript form..
Thanks
Swarna.Hi
You have to use FM READ_TEXT.
In FB03 Transaction, you can get the Technical information of the Text Area. Use those as inputs to this FM, which will return the text entered into an internal table.
You can use this Internal table data to write onto script.
Eg:
stxl_id-tdobject = 'VBBK'.
stxl_id-tdname = wa_vbfa-vbelv.
stxl_id-tdid = '0012'.
stxl_id-tdspras = 'EN'.
DATA: BEGIN OF tlines OCCURS 10.
INCLUDE STRUCTURE tline.
DATA: END OF tlines.
clear: i_text.
*DATA : l_text(120) TYPE c,
DATA : l_text(1050) TYPE c,
v_tline LIKE tline-tdline.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = stxl_id-tdid
language = stxl_id-tdspras
name = stxl_id-tdname
object = stxl_id-tdobject
archive_handle = 0
local_cat = ' '
IMPORTING
HEADER =
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
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 TLINES.
CALL FUNCITON 'WRITE_FORM' with the text element..
ENDLOOP.
Regards,
Raj -
Service long text not copied in PO print preview
Hi,
I have maintained Long text while creating Service master...Now when i am creating PO for that service...In the Item table under Service text coloumn , if i am clicking on it , i am getting my text which was maintained while creating Service master...Now after saving, if i am seeing this is print preview, my long text data is not getting copied in PO print preview..
What went wrong?
utsHi Utsav,
If the text was short is it shown in prinit preview ?
If yes , then Contact ur ABAPer for adjusting the form .
If not ,change the Form - Sapscript through ABAPer to print the changes
Regards
Ramesh Ch -
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 -
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.
Maybe you are looking for
-
I'm having trouble with back to my MAC. I had everything working on my home wifi network but now I am at my daughter's house and trying to connect via a verizon hotspot wifi connection. I'm wondering if the Verizon hookup is a problem.
-
How to upload an excel to a dynamically generated internal table?
Hi, I have an excel sheet. I have to create an internal table dynamically according to the fields of the excel sheet. The internal table i have created successfully, the fields are exactly coming as the excel sheet. I need to upload the excel sheet d
-
Import users from BIAR file -- users not listed in import screen of Wizard
Hi, we try to import users from a BO XI R2 SP4 running on Windows to our BO XI R2 SP4 running on Linux (both use Oracle database). When I try to import users with the Import Wizard, I can't see the list of users so at the end of the import and show
-
Linking 2 Captivate 3 Projects
I had to break a Captivate 3 project into 2 executables due to size. When the change from Captivate #1 to #2 takes place, the desktop appears for a second or two. Is there a way to stop this and get a smooth change?
-
OID external plugin to delete a user in OID
Hi, My requirement is that when the value of a attribute (e.g. employeeType) in OID 11g is set to a particular value for a user, then that user in OID should be deleted / disabled automatically. Can this be achieved using e.g. OID external plugin ? T