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

Smartforms formatting

Former Member
0 Likes
1,416

Hi!

I'm new to creating smartforms but I have a requirement to format the line items on the invoice depending on the item category. For example, if the item category of the items are ZABC, they should be printed in bold. Then if the item category is ZDEF, they should be printed with smaller fonts.

Is that possible? Can anyone please advise on how this can be implemented? Thanks for any help!

Cholen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,373

Hi,

     You must have all the formats required by you in any smartstyles (here BOLD,SMALL Fonts).

     Now Create Text Elements Each for your output style ( i,e one for BOLD, one for Small Fonts...)

     under a Cell.

     In Text Element Last Tab is CONDITION, Set a Condition Here ( like WA-ICATG = 'ZABC') so that each element will be displayed only when a condition satisfies.

Regards:

Soumendra

9 REPLIES 9
Read only

Former Member
0 Likes
1,373

Hi,

ya . You can use  Text element  .In conditions tab of text element you can check the  condition.

Read only

Former Member
0 Likes
1,374

Hi,

     You must have all the formats required by you in any smartstyles (here BOLD,SMALL Fonts).

     Now Create Text Elements Each for your output style ( i,e one for BOLD, one for Small Fonts...)

     under a Cell.

     In Text Element Last Tab is CONDITION, Set a Condition Here ( like WA-ICATG = 'ZABC') so that each element will be displayed only when a condition satisfies.

Regards:

Soumendra

Read only

0 Likes
1,373

Does this mean I have to create 2 text elements for the same text/variable with different condition?

For example, the text element fo item number will have 2 entries with different format and different condition?

Read only

0 Likes
1,373

Yes. You are absolutely correct.

Create 2 text elements while designing and add a condition to display/hide any one of the text.

Read only

0 Likes
1,373

Hi,

     Yes ,     If Entries are in different format, then you will have to create separate Text Element,

             You may also combine conditions if output are in same format. 

Read only

Pavithra_madhu
Participant
0 Likes
1,373

Hi,

Yes u can use two formats( one with bold and other with small font).

U can use one condition by adding Alternative condition to the place u print the text.

In true event and false event u can use the created formats.

Regards,

Pavithra

Read only

0 Likes
1,373

This makes sense but I'm not sure why it did not work when I tried using this approach. The texts did not display at all when the false condition was met.

Read only

VenkatRamesh_V
Active Contributor
0 Likes
1,373

Hi cholen,

Create two character one with bold 'B' and other with  normal 'N'  in  Smartstyle.

while entering text in element.

/: if  item categor =  ZABC.

/: <B> &wa_itab-ebeln& </>.

/: else.

/: <N> &wa_itab-ebeln& </>.

/: endif.


Regards,

Venkat.


Read only

Former Member
0 Likes
1,373

Thanks for all the help everyone! My question is answered.