cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript Text fields Alignment

Former Member
0 Kudos

Hello Experts,

I have two text fields in the MAIN window which I want to Right-Align.

Both the text fields are basically amount fields also containing the sign. These are text fields because I am getting the values in these fields from the subroutine defined in my SAPScript form. Now when I try to align these two fields I am getting them properly.

These are appearing as:

1.29 1.29

1.29 1.27

12925.00 -234.56

-3173.00 5176.21

Thanks in Advance

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Okay try this..

DATA: V_CHAR(20).

READ TABLE IT_OUTPAR INDEX 1.

WRITE: V_VALUE TO V_CHAR RIGHT-JUSTIFIED.

IT_OUTPAR-VALUE = V_CHAR.

MODIFY IT_OUTPAR INDEX 1.

Thanks,

Naren

Former Member
0 Kudos

Hi Naren,

Tried this also but the alignment is still not accurate. There are no tab positions.

The two fields which I want to align are 15 char each. If the amount is of same digit everytime it aligns properly but if there is a difference in digits then it gets disturbed.

Cheers

Former Member
0 Kudos

Hi,

I believe you may not be able to see it in the debugging...Execute the form completely..and check it in the output..

Thanks,

Naren

Former Member
0 Kudos

Hi Naren,

I checked in both. I can't see it in Debugging and there is nothing in the output also.

Former Member
0 Kudos

Hi,

When you are moving the value to the internal table of ITCSY..Use WRITE right justified..

Example..

READ TABLE IT_OUTPAR INDEX 1.

WRITE: V_VALUE TO IT_OUTPAR-VALUE RIGHT-JUSTIFIED.

MODIFY IT_OUTPAR INDEX 1.

Thanks,

Naren

Former Member
0 Kudos

Hi Naren,

I tried this also. I am moving the value to outpar-value right-justified.

But when the subroutine comes back to Script form there is no value in the field. If I remove right-justified I can see the value.

Please suggest.

Rajesh

Former Member
0 Kudos

Hi,

In the Paragraph format, use the Alignment as RIGHT and write the Symbol as &Symbol(R)&. if the Problem still coming, then write a Perform in the Script, and in the Form just move it to a Integer format and print it

Regards

Sudheer

Former Member
0 Kudos

Hi

If I'll write a subroutine in form I have to use the structure ITCSY to pass or get the values in my form. I am anyway using a subroutine to get these values but can't pass the integer field to ITCSY-VALUE field.

Correct me if I am wrong.

Former Member
0 Kudos

Hi,

For right justified..use &symbol(R)&

Check this link

http://help.sap.com/saphelp_46c/helpdata/EN/d1/8034a0454211d189710000e8322d00/content.htm

THanks

Naren

Former Member
0 Kudos

Hi,

I am using the (R) option but the problem is that it is not aligned even after giving this option. I even tried TAB options DECIMAL, LEFT, RIGHT, CENTER, SIGN but nothing is working.

Thanks for your reply but the problem is still there.

Rajesh

Former Member
0 Kudos

Hi,

Why dont you create a paragraph format which is right aligned and try that?

Regards

Subramanian

Former Member
0 Kudos

Hi Sub,

I tried that but again its not working. I tried with the TAB positions and without the TAB positions. No difference.

Thanks anyway.