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

conditional formating in smartforms

Former Member
0 Likes
1,686

how can we do conditional formating in smartforms.

Example :

PHYSICAL EXAMINATION

Color

Appearance

CHEMICAL EXAMINATION

Above value comes from same column.

I want to bold all caps letter without affecting small letter Ex : Color & Appearance

With Regards

Rajesh K Singh

5 REPLIES 5
Read only

Former Member
0 Likes
1,255

You should be able to do conditional formatting if any logic is involved or you are processing data from a driver program or an external transaction code.

If it is just the appearance in layout, it should'nt be an issue.

Please provide issue description in detail.

Thanks & Regards

Vivek Batta

Read only

Former Member
0 Likes
1,255

i am sure you have already created a style with font style bold.

before displaying your text apply this character format to the text which you need bold

eg: character format is <C1>

Write <C1> your text <C1>.

Also you can check in your text for capital letters .

if string CA sy-abcde

now just take the first character of offset

write <C1> first character>C1>

Hope it helps

Read only

Former Member
0 Likes
1,255

Hi Rajesh,

Suppose the paragraph format P1 and chaacter format C1.

P1 <C1>PHYSICAL EXAMINATION</>

P1 Color

P1 Appearance

P1 <C1>CHEMICAL EXAMINATION</>

Thanks,

Tooshar Bendale

Read only

Jelena_Perfiljeva
Active Contributor
1,255

To change text to uppercase you'll need to add a small piece of code (CONVERT TO UPPERCASE) before the text node. In the same ABAP node also set the flag, e.g. FLAG_BOLD = 'X' when necessary.

Then istead of one text element create two text elements with the same field. But one with regular format and one with bold. Add condition to both text elements based on FLAG_BOLD value.

This is just from the top of my head, maybe there is a better option.

Read only

0 Likes
1,255

Excellent way!

Regards.

Mauricio Herrera