Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap

Former Member
0 Likes
391

hi folks,

I am trying to display some values read into the internal table within a 'TEXT WINDOW' in the smartform in a properly aligned manner

Each field of the itab has a currency value with the field length of 13. Irrespective of whether it has any value in it it displays a lot of empty spaces and displays at the end of the window, at times it wraps around in the next line,

I read all the currency values into the itab and read the itab through 'Form interface' into the form.

How can i align these values which come one below the other in the window of the form ?

Infact in the 'smartstyle' I have the paragraph format as 'left-align'

The window should look like this

Cxxxx1 13144.50 (currency field of value 13)

Cxxxx2 234.67- (currency field of value 13)

Cxxxx3 42424.34 (currency field of value 13)

Thanks in advance

Santhosh

2 REPLIES 2
Read only

former_member221770
Contributor
0 Likes
364

Santosh,

You need to define "Paragraph Formats". To do this you also need to define your opwn "Smart Style".

I am going to start from the beginning because I feel it is easier for me to explain things. If I go over bits you already know I apologise but please bear with me.

First look at your SmartForm's default Style (see the "Output Options" tab in the "Form Attributes". We are going to copy this Style.

Now go back to transaction "SMARTFORMS" and enter in your Style and copy it to your "Z" style. Open up your "Z" style. We are now going to create a new Paragraph Format. Right Click the Paragraph Format node on the left hand side and select "Create Node".

Give your new Paragraph Format a name (let's call it Z1). Give it a description and then define your margins and spacing (in the "Indents and Spacing" tab) and also the fonts (in the "Fonts" tab).

Now when you get to the "Tabs" tab, you define your column alignments. Think of these alignments as pressing the "Tab" button in MS Word. Once you have defined your "Tabs", save and activate your Style.

Now go back to your SmartForm and define your "Z" style as your default (remember the Output Options under Form Attributes).

Now go to the Text Window with the currency values. Define your "Z1" Paragraph format and use a ",," to indicate a new tab eg.

Z1 &BSEG-WRBTR&,,&BSEG-DMBTR&,,....

Hope this helps.

Cheers,

Pat.

PS. Kindly assign Reward Points to the posts you find helpful.

Read only

Former Member
0 Likes
364

hi ,

I thing the problem is not with paragraph format, becase the currency field always fill blank spaces as the prefix.

in this case

define one character type data in the global definitions with 15 length

ex . l_price like mara-matnr.

insert one program line in the above of your text element

there you assign

l_price = neprice.

condense l_price.

print l_price ( change the text element )

cheers,

sasi