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

SAP smartform table formatting

Former Member
0 Likes
6,488

Hi all,

I am working on a smartform modification, this form has 4 header firlds and item values below it. Two of item value appear appropriately but other two are not appearing in same line. Those field values are getting lower in line. I am trying to show it here how it appears:

Quantity           Description           Price                Value

           1            abc material         

                                                 

                                                  10.00                 10.00

So, these two values (10, 10) are not coming in same line as otehr two (1, abc material).

It is a table and I tried in smart style under line per inch and it didnt work.

Can anyone help me to fix this ?

Thanks,

J

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,587

Hi,

i think your value in getting wrap into next line because of Spaces..

try this..

if your value is in say wa_tab-KBETR then write &wa_tab-kbetr(ZC.2)&..

which will remove leading Zeros(Z), Spaces(C) and (.2) will show only 2 decimal points..

Regards,

Tejas

15 REPLIES 15
Read only

Former Member
0 Likes
3,587

Dear J singh,

Either u need to increase the size of the table field

Or

u have to pass these value in string or character field and populate these string or character filed on smart forms out put.

Thanks & Regards,

buz_sap

Read only

arindam_m
Active Contributor
0 Likes
3,587

Hi,

Try creating a template and assign it to print your header and the item details it will be better binding. Also if you have done that already check the alignment of the each cell.

Regards,

Arindam

Read only

Former Member
0 Likes
3,587

Hi,

provide the same paragraph setting to the body.

Let me know if any clarification/help required.

Thanks & Best Regards.

Pavan Neerukonda.

Read only

0 Likes
3,587

Hi Pavan,

Can you help me applying same paragraph setting?

Read only

former_member209120
Active Contributor
0 Likes
3,587

Hi J Singh,

Create table line this

and pass the values like this for all four cells (with out using style)

Regards,

Ramesh.T

Read only

rosenberg_eitan
Active Contributor
0 Likes
3,587

Hi,

By coincidence I had the same problem just yesterday.

I may case I solved it by using &ST_VBRP_1-KBETR_N1(10)&

Note the (10) .

Regards.

Read only

Former Member
0 Likes
3,588

Hi,

i think your value in getting wrap into next line because of Spaces..

try this..

if your value is in say wa_tab-KBETR then write &wa_tab-kbetr(ZC.2)&..

which will remove leading Zeros(Z), Spaces(C) and (.2) will show only 2 decimal points..

Regards,

Tejas

Read only

Former Member
0 Likes
3,587

Hi,

If you have only 4 columns, you can increase size of your table (for which you may need to increase your window size as well) and then assign more spaces to key figures (amounts mainly). This way it will be displayed on one line.

If you dont have space available, you can define a row type 2 in your table with only 1 column in it after row type1. Delete material description from row 1 and define it in row 2. You can enable a vertical margin for row2 only.

So in that case 1 record will take 2 lines with material description below.

Regards,

KS

Read only

Former Member
0 Likes
3,587

Hi,

In order to get the 10 ,10 in the same line , you have to adjust(increase/decrease) the line type width of second, third , fourth column. Hope it definitely helps you.

Regards,

shamili.

Read only

Former Member
0 Likes
3,587

Hi J Singh,

You have to use the format options in the  program symbols like &wa_ekpo-netpr(C)&. I hope it will work.

Read only

Former Member
0 Likes
3,587

At first,Put into a same line,then do it.

Read only

venkateswaran_k
Active Contributor
0 Likes
3,587

Hi,

Use your variable as follows.

Suppose for price you use  --  &WA_NETPR&       In text field    you write as &WA_NETPR(C)&

for net value   &NETWR(C)&

The  (C) - denotes condensed format..  This will bring your values in the same line.

Please udpate back

Regards

Venkat

Read only

Former Member
0 Likes
3,587

Thanks guys. Your answers helped to figure out the issue.

Read only

Former Member
0 Likes
3,587

Insise the "Table Loop" enter the command line and condense the value of that variable . And also increase the width of the table cell . Hope this will work .

Read only

nishantbansal91
Active Contributor
0 Likes
3,587

Thankss Brthrs Really Helpful ...