on 11-06-2008 9:25 AM
hi all .
i'm doin sap script i got an issue which i'm displaying BSIS-sgtxt field in sap script form .. as sgtxt is 50 char length i made for first line i displayed 20 and in secont line i displayed 30 . but i what happens is for example ' this is the invoice for the particular customer ' what happens is 'this is the invoice fo' is coming in first line and 'r the particular customer' coming in second line pls can anybody say how to make reslove this issue so that words should not get truncate inbetween . thanks . <<text removed by moderator>> . thanks again.
Moderator message: please read the Terms of Engagement - offering points is not allowed.
Edited by: Matt on Nov 6, 2008 10:38 AM
create some charter format c1
and insert <c1>BSIS-sgtxt<c1>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi , i have tried putting what u said even though it is truncating .. in debugging i gave 'this is the report for displaying the invoice for customer' . in output it is coming 'this is the report for di ' in first line
'or displaying the invoice for customer ' in second line pls let me know how to resolve this error ..thanks
actually i need to display bsis-sgtxt field in form . what i did as it is of 50 char length i displayed bsis-sgtxt(20) in first line and remaning length display in second line as bsis-sgtxt+20(30) but now whats the issue is , fo eg if bsis-sgtxt field as got 'this is the report to dispaly invoice for customer' in first line it is coming 'thisis the report t' and in second line it is coming ' o display invoice for customer' . but now i need it should come 'this is the report to' in first line and 'display invoice for customer' in second it should not get truncate . pls let me know hoe to reslove the issue . thanks . i hope u understood now
Hi use the below code in a Form routine and call that from the script. Dont ask me how to use perform in script, do a search in the forum and you will get lots of threads.
DATA : lv_text(50),lv_line1(20),lv_line2(20),lv_line3(20).
lv_text = 'This is the report to display invoice for customer'.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = lv_text
DELIMITER = ' '
OUTPUTLEN = 20 " Your line length
IMPORTING
OUT_LINE1 = lv_line1
OUT_LINE2 = lv_line2
OUT_LINE3 = lv_line3
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.
Write : / 'lv_text : ', lv_text,/ 'lv_line1: ', lv_line1,/ 'lv_line2: ' ,lv_line2,/ 'lv_line3: ', lv_line3.
Output:
lv_text : This is the report to display invoice for customer
lv_line1: This is the report
lv_line2: to display invoice
lv_line3: for customer
Regards
Karthik D
Hi,
U have to to diaply 21chars in first line and 29 chars in 2nd line. OR 18chars in 1st line and 32chars in 2nd line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.