on 07-09-2007 7:47 AM
Hi,
I am displaying 12 fields in the layout of the script. I have assigned tab spaces and alignments for all the fields. It is working fine for all the fields except the amount field. I have negative sign for some values in that field. I made it right aligned but still it is not working. Can anyone help me out to solve this issue?
The data is coming as follows:
117,50
117,50
1.000,00
5.000,00
550,00
13,00-
500,00-
1.000,00-
10.000,00
Thanks
Geeta
Hi,
This could solve your alignment problem.(giving 3 solutions)
1) Don't concatenate if it is "H'.
call subroutine from your form if driver program is not in your control, and multiply with "-1"
EX: DATA: amount type p decimal 2.
IF 'H'.
amount = amount * -1.
ENDIF.
2) IF you want to concatenate and still display the value aligned then the best solution is this.
In you paragraph format define the tab spaces.
Ex : Paragraph AS
1st tab space 13 CM RIGHT
2nd tab space 13.1 CM LEFT
and display the fields like this
IF &TABLE NAME-SHKZG& = 'H'
AS ,,&TABLE NAME-SHKZG&,, -
ELSE.
AS ,,&TABLE NAME-SHKZG&
13 CM
<----
>
<----
>
13.1 CM
12223-
99
100-
Since first tab is right aligned it will print as shown above
Now you will get a feeling that it all number are right aligned.
3) Or try this
IF &TABLE NAME-SHKZG& = 'H'
CONCATENATE &TABLE NAME-SHKZG(<b>C</b>)&'-'
I guess your problem is solved.
Don't forget to reward points for my effort.
Regards,
Sairam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks a lot for all your support. I am able to solve it. I assigned the '-' sign as mentioned by Pavan and Sairam and i made my field amount of type 'C'. Now the right
alignment is working fine.
Points rewarded.
Geeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
I am using the same code as given by you.
IF gs_bsid-shkzg = gc_h.
CONCATENATE gs_bsid-total '-' INTO gv_total.
MOVE gv_total TO gs_final-total.
ELSE.
MOVE gs_bsid-total TO gs_final-total.
ENDIF.
But i am not able to understand even after giving right alignment why it
is not comming properly. Any other solution Pavan?
Thanks
Geeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Geeta
U can use my coding directly ion script it self there is no need to call that report in this report
Ok
Try like this in ur report
Read table amttype. <-- your internal table at which u declared ur shkzg field
IF amttype = 'Credit'.
concatenate amttype '-' into totald.
ELSEIF amttype = 'Debit'.
totald = totald+0.
ENDIF.
Regards
Pavan
Message was edited by:
Pavan praveen
Hi Pavan,
Thanks for your quick response. Actually while passing the values to final internal table i am checking the field <b>shkzg</b> (Debit/Credit indicator). If it is 'H' i am concatenating '-' sign for that value and i require '-' sign at right side of the value (100-). Because of the '-' sign the alignment is not properly set. In the main window i am just displaying &ITAB-WRBTR(R)& .
But it is not solving my problem. Can u suggest me any further solution for this.
Thank You,
Geeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your quick response. I have tried using &ITAB_WRBTR(R)&
but it is still not working properly. I need to print the negative signs also.
I have not used Set Sign Left command. Just declared right alignment in the
tab position for that particular field.
The data is still coming as follows:
27,00-
13,50-
2.235,00-
10.575.000,00
105.750.000,00
1.175,00
117,50-
352,50-
Thanks,
Geeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi geeta
The leading sign is normally displayed to the right of a numeric value, except in the case of a floating point number. This option enables you to specify that the leading sign should be placed to the left of the number.
Syntax
&symbol(<)&
&ITCDP-TDULPOS& -> 100.00-
&ITCDP-TDULPOS(<)& -> -100.00
The SET SIGN LEFT control command specifies that all subsequent symbols with a numeric value should have a left-justified leading sign. If you use this control command, you must no longer repeat the < option for each individual symbol.
Reward all helpfull answers
Regards
Pavan
&amount(R)&
OR
while defining tab spaces for paragraph format you can specify particula tab is right align .
Regrds,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
<b>Right Alignment in Script </b>
The default setting is to print the leading sign to the right of a numeric value. If you used the SET SIGN LEFT control command to specify that the leading sign should be printed in front of the value, you can override this specification for individual symbols. The symbols specified with the > option are then printed with the leading sign to the right.
Syntax:
&symbol(>)&
You can use the SET SIGN RIGHT control command to switch back to the default setting for the output of the leading sign.
Reward all helpfull answers
Regards
Pavan
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 command
&ITAB-NETWR(R)& for right allignement
Do you want to display the -ve sign or not
if you don't want it use S with field
&ITAB-NETWR(S)&
<b>Reward points for useful Answers</b>
Regards
Anji
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 | |
9 | |
9 | |
8 | |
7 | |
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.