on 2017 Mar 30 11:58 AM
Hi everyone,
I'm traying to display an internal table in SAP Script and I met a problem when the field text is too long. And my question is very clear: how to move the text to new line?
The screenshot with the scenario: http://image.prntscr.com/image/26f1a37d835a48bca93e557a2dbbde96.png
The code:
/E TOP
/: BOX FRAME '0.5' PT
/: POSITION XORIGIN '1' CM YORIGIN '8' CM
/: BOX HEIGHT '0.5' CM FRAME '0.1' MM INTENSITY '20'
/: INCLUDE ZCPI_TABLE_HEADER OBJECT TEXT ID ST
/: BOX WIDTH '1.2' CM FRAME '0.1' PT
/: POSITION XORIGIN '2.2' CM YORIGIN '8' CM
/: BOX WIDTH '7.239' CM FRAME '0.1' PT
/: POSITION XORIGIN '9.439' CM YORIGIN '8' CM
/: BOX WIDTH '0.8' CM FRAME '0.1' PT
/: POSITION XORIGIN '10.239' CM YORIGIN '8' CM
/: BOX WIDTH '2.35' CM FRAME '0.1' PT
/: POSITION XORIGIN '12.589' CM YORIGIN '8' CM
/: BOX WIDTH '2.71' CM FRAME '0.1' PT
/: POSITION XORIGIN '15.299' CM YORIGIN '8' CM
/: BOX WIDTH '2.71' CM FRAME '0.1' PT
/E BODY
P2 &GS_ITEM-ITEM&,, &GS_ITEM-DESCR&
/E FOOTER
Thanks a lot!
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Petru,
if you have such a problem you need to split your value into severals ( something like gv_part1 / gv_part2 ).
I would recommend you when the progress of the form is not that far you should at least switch to smartforms, because there the runtime takes care about it and you don't have to worry at all.
No matter what, if you have to stay at sapscript it depends on where the text comes from. If it is a internal texttable you can use this function module below:
CALL FUNCTION 'FORMAT_TEXTLINES'
EXPORTING
formatwidth = 90 "Width of text needed for printing
linewidth = 132
TABLES
lines = i_line "Structure TLINE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
42 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.