on 12-03-2008 5:37 PM
Hi
Iam having continous text issue in SAP Scripts, Here my problem is iam having contious text which is coming form print progarm its more than 40 lines curently in testing. May be it can more if it goes to production how could i handle this problem.
I want to print only 40 characters per line if exceeds it should continue in next line adn futher.
One more thing here these text is going out of page layout.
Please let me know if any possible solution.
Regards
Bhaskar
Hi,
You can Use below FMs to split your long texts at desired position.
RKD_WORD_WRAP
RSDG_WORD_WRAP
Thanks,
Sree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try with below code.
TYPES: BEGIN OF type_lines.
INCLUDE STRUCTURE tline.
TYPES: END OF type_lines.
DATA: tline TYPE STANDARD TABLE OF tline,
wa_tline TYPE type_lines.
DATA: lv_string TYPE string,
lv_text TYPE text65,
lv_length TYPE i.
lv_string =
'textttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttt'.
WHILE lv_string IS NOT INITIAL.
lv_length = 64.----
yout required length
lv_text = lv_string.
WHILE lv_text+lv_length(1) NE space AND lv_length GE 0.
lv_text = lv_text(lv_length).
lv_length = lv_length - 1.
ENDWHILE.
IF lv_length GE 0.
MOVE lv_text TO wa_tline-tdline.
APPEND wa_tline TO tline.
CLEAR wa_tline.
CLEAR lv_text.
ENDIF.
lv_length = lv_length + 1.
SHIFT lv_string LEFT BY lv_length PLACES.
ENDWHILE.
LOOP AT tline INTO wa_tline.
WRITE:/ wa_tline-tdline.
ENDLOOP.
Thanks,
Sree.
get itab with splitted text as others mentioned befor
define entry point ->loop at itab-> fil global data ->call entry point via write_form->print global variable
Regards
Stefan Seeburger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use below f.m itself....
RKD_WORD_WRAP----->
if u pass the text in f.m
total length of textline is 35 if i use f.m
exporting.
TEXTLINE = wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
OUTPUTLEN = 10.
then o/p is
wwwwwwwwww
wwwwwwwwww
wwwwwwwwww
wwwww
35 will be splited at 10th position so it is splited into 4 lines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
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.