on 08-07-2007 11:09 AM
Hi,
We have a function module called STRING_CENTER to centering a string. inaddition to this, is there any alternative method to place a string in center position in the report header.please give me the answer for this one.
Thanks & Regards.
Laxman.P
Hi..
This should work for u.
REPORT ZREP00 LINE-SIZE 100.
WRITE :/(<b>SY-LINSZ</b>) <YOUR VARIABLE> CENTERED .
<b>Reward if Helpful.</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Use the Function module
"<b>STRING_CENTER</b>"... Pass your string..
Display the exporting value and it will be centered..
Eg:
<b>DATA: v_string TYPE char200 VALUE 'STRING HEAD'.
DATA out_string TYPE char200.
CALL FUNCTION 'STRING_CENTER'
EXPORTING
string = v_string
IMPORTING
cstring = out_string
EXCEPTIONS
TOO_SMALL = 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 : / out_string.</b>
Copy paste the above program in your editor
rewards if useful.
regards,
Nazeer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
u can give the length in write statement
like below
<b> WRITE: 55 'PURCHASE ORDER DETIAL'</b>
Regards,
Divya
Message was edited by:
Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
WRITE 01(15) <VARIABLE> CENTERED .
Regards,
SaiRam
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.