on 01-03-2008 3:04 PM
Hello,
Problem area: Script
I have a problem with sizing of data. I want to print description of material in a window but it can not accomodate 40 char in one line, so now I have to take remaning descriprion in next line . How to do it.
I can not reduce the font also.
Please help .. Urgent.
Thanks ,
Madhura
Hello.
I would do all the pre-processing in the printing program as follows:
assume we have an itab internal table for the main window's line items to print
DATA: BEGIN OF itab OCCURS 0,
matnr(18),
maktx(100), "but only 40 can be displayed in a single row.
END OF itab.
DATA: wa_itab LIKE itab.
DATA: wl_current_tabix LIKE sy-tabix.
DATA: wl_len TYPE i.
itab-maktx = text-001.
APPEND itab.
LOOP AT itab.
wl_len = STRLEN( itab-maktx ).
IF wl_len > 40.
wl_current_tabix = sy-tabix + 1.
CLEAR wa_itab.
MOVE itab-maktx+40 TO wa_itab-maktx.
INSERT wa_itab INTO itab INDEX wl_current_tabix.
CLEAR itab-maktx+40 WITH space.
wl_current_tabix = wl_current_tabix - 1.
MODIFY itab INDEX wl_current_tabix.
ENDIF.
ENDLOOP.
LOOP AT itab.
write:/ itab.
ENDLOOP.
So, in the printing program, you need to "prepare" the internal as if the next line contains only the characters of text you need to print that didn't fit in the previous line.
This code does exactly what you need.
Please reward points.
Regards,
George
Edited by: George Lioumis on Jan 3, 2008 5:29 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.