cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript Suppress/Control Amount field size

Former Member
0 Kudos

Hi Guys,

I have been working on a SAPScript form and I have an issue. Can I restrict the size of the amount field so that it appears with a certain number of digits before the decimal point? If so, how? The size of the amount field is causing part of the amount to be written to the next line, which I do not want to happen.

I also need a character field not to compress spaces. It seems this is what is happening if this field contains a smaller number of characters than the defined number e.g. &EKPO-TXZ01(17)& having max 17 characters. This causes the other numbers and so on in front to drag back wards. I do not want this to happen as well. Also, it seems it is also creating spaces (about 3) after each line and I have not defined any new lines in the form itself.

Please assist.

Thanks and Regards,

Darlington

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Darlington,

Regarding the first issue:

U can use the amount variable in this way.

&amount(3.2)& - 3 digits before the decimal and 2 digits after the decimal.

Regarding the second issue:

Make use of TAB spaces in the PARAGRAPH format.

Regards

HM

Former Member
0 Kudos

Hi Guys,

Thanks for the quick response. The first issue I think can be resolved through the use of the solutions you suggested. For the second issue, I need to understand how the tabs would work as you suggested. For instance, &EKPO-EBELP& &EKPO-EMATN(10)& &EKPO-TXZ01(15)& &EKPO-TXZ01(17)& &RM06P-PRMG1& &T006A-MSEHT& ,,&EKPO-NETPR&&RM06P-PRPEI& &EKPO-NETWR& are all in one line and the element in question is &EKPO-TXZ01(15)&. The text 'test' is less than 15 characters and it seems it compresses the spaces such that the other elements (&RM06P-PRMG1&, &T006A-MSEHT&, etc.) are dragged leftwards towards it., but for characters exactly 15 characters long, the others do not move.

How would I apply the tabulators in this case?

Thanks

Former Member
0 Kudos

applying those tabulators would look like:

&EKPO-EBELP&,,&EKPO-EMATN(10)&,,&EKPO-TXZ01(15)&,,&EKPO-TXZ01(17)&,,&RM06P-PRMG1&,,&*T006A-MSEHT&,,&EKPO-NETPR&,,&RM06P-PRPEI&,,&EKPO-NETWR&

The only thing i did here is to add tabs between your fields instead of spaces.

If you got spaces instead of tabs exactly THAT what you described will happen.

Make a tab for every field and all is fine.

You probably need an own paragraph format just for this line, but well that is what paragraph formats are here for.

Answers (1)

Answers (1)

Former Member
0 Kudos

for Amounts and values you should make use of a right aligned tabulator. Then it can not happen that it flows over to next line.

Just leave enough space between you tabulators to fit in the number in its full expression.

Handle your stuff with tabs, and leave enough space for the things to print. you will not face such problems anymore.