2022 Dec 21 8:00 AM
how to change the fontsize of smartform output text depends on variable
i tried this one but not working
ZX fontsize is 6pt
X2 fontsize is 9pt
2022 Dec 21 4:38 PM
Such commands - preceided by characters 😕 (like 😕 IF 😕 ELSE, etc.) - do not work in Smartforms at all.
Instead you can put a condition in the specific node of a form, for example in a text node. You can define it in a "Conditions" tab. If you define a condition, then the node will be output only if the condition is satisfied.
So you can define two text nodes in your smartforms tree, both containing the same text, but each one with its own formatting/font size - and each one with its own condition, opposite to each other.
Or instead: you can create a node that itself functions as an "if" command (context menu: Create-> Flow Logic-> Alternative). Then you define only one condition: in the "General attributes" of the "Alternative" node.
2022 Dec 21 8:11 AM
Deleting my answer as the issue is about your IF, and my answer is about SAPScript.
Plain wrong: You did it correctly. But of course, how you did it, ZX and X2 must be "character formats", and not "paragraph formats" (paragraph formats can be used instead of star character on the left).
Plain wrong: But there may be a "font substitution" (A.K.A. "font conversion"), based on the font family you have selected and the fonts which are supported by the output device type (or by your Windows laptop if it's print preview). It's discussed in the forum. There is a function in SE73 to see the effects of font conversion for a given output device type. I think there are also some SAP notes which describes the different logic which operates in the print preview.
2022 Dec 21 8:38 AM
2022 Dec 21 10:05 AM
2022 Dec 21 4:38 PM
Such commands - preceided by characters 😕 (like 😕 IF 😕 ELSE, etc.) - do not work in Smartforms at all.
Instead you can put a condition in the specific node of a form, for example in a text node. You can define it in a "Conditions" tab. If you define a condition, then the node will be output only if the condition is satisfied.
So you can define two text nodes in your smartforms tree, both containing the same text, but each one with its own formatting/font size - and each one with its own condition, opposite to each other.
Or instead: you can create a node that itself functions as an "if" command (context menu: Create-> Flow Logic-> Alternative). Then you define only one condition: in the "General attributes" of the "Alternative" node.
2022 Dec 22 12:22 AM
do you have a links / blogs about this?
i dont know how to do this
2022 Dec 22 10:02 AM
There is a documentation for Smartforms at help.sap.com, for example:
regards
2022 Dec 21 5:46 PM
If you test without /: condition, only using, does it work?
* <ZX>test font 6pt</>
* <X2>test font 9pt</>
If it works, then the problem is about using /: in Smart Forms. It works only in SAPScript.
If it doesn't work, see my "plain wrong" answer.
Simple as that.