on 11-11-2008 2:12 PM
Hi All,
I'm working on scripts.
the material description field is been passed from my driver program ..into the script..
Ex: &gs_final-maktx& ..
There r a number of other fields to be displayed ...after this field ....
Is there any option to split the 'Material description into two lines'?
Ex: at present it is :
This is material description
Requirement is:
This is material
description
I mean that there a number of field berfore and after this field......in the same line
I need to jst split the materia description ...& make it to appear in two lines.....!!
Expecting your suggestions....
Edited by: vidya vidya on Nov 11, 2008 3:17 PM
Edited by: vidya vidya on Nov 11, 2008 3:20 PM
DATA : LV_TEXT like makt-maktx,
LV_LINE1(20),
LV_LINE2(20).
LV_TEXT = 'This is material description'.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = LV_TEXT
DELIMITER = ' '
OUTPUTLEN = 20
IMPORTING
OUT_LINE1 = LV_LINE1
OUT_LINE2 = LV_LINE2
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2.
LV_LINE1 - contains 'This is material'
LV_LINE2 - contains 'description'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srikanth,
Iam having similar kind of issue in SAP Scripts, Here my problem is iam having contious text which is coming form print progarm its more than 40 lines know in testing may be it can be more if it goes to production how could i handle this problem.
One more thing here these text is going out of page layout.
Please let me know if any possible solution.
Regards
Bhaskar
FM TEXT_SPLIT ?
..but i handled this by code.
DATA: zzboldsx(18) TYPE c,
zzboldsx2(18) TYPE c,
zzboldsx3(18) TYPE c,
zzboldsx4(18) TYPE c.
DATA: i_lines TYPE STANDARD TABLE OF tline WITH HEADER LINE ,
r_lines TYPE tline,
v_cnt LIKE sy-tabix.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = stxh-tdid
language = stxh-tdspras
name = name
object = stxh-tdobject
TABLES
lines = i_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.
* Only 4 lines of Header text supported. Can add if needed
LOOP AT i_lines INTO r_lines.
CONDENSE r_lines-tdline NO-GAPS.
v_cnt = v_cnt + 1.
CASE v_cnt.
WHEN 1.
zzboldsx = r_lines-tdline.
WHEN 2.
zzboldsx2 = r_lines-tdline.
WHEN 3.
zzboldsx3 = r_lines-tdline.
WHEN 4.
zzboldsx4 = r_lines-tdline.
WHEN OTHERS.
EXIT.
ENDCASE.
* zzbolDSX = i_lines-tdline .
ENDLOOP.
Hi,
You can get the length of the text at runtime and then split it into 40 characters.Also you Can check out from your Functions about the maximum length that would appear during Production.
Also you can reduce the font size of the text.......Increase the window size......to bring it into the layout...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreekanth ,
I feel this shld solve the problem.....adjustments need to be done for the remaining fields.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kesava,
thank you for the reply ,,,,
What if the splitting occurs in between words?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes you can split 2 lines.
1st line : &gs_final-maktx+0(20)& ..
2nd line : &gs_final-maktx+20(20)& ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.