cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform: Command Line (If condition)

Former Member
0 Kudos

Hi,

Can't we use a command line inside a text element in smartforms?

I want to put some IF conditions inside the text element. However.

All the IF condtions are simply being ignored and the values are being printed unconditionally.

I use the SAPscript type of editor where I can choose /: for command

so it looks like this

/: IF &VARA& EQ &VARB&

P1 &PRINTDATA& where P1 is a paragraph type

/: ENDIF

However the IF condition is simply being ignored.

and PRINTDATA is always being printed. I dont want to use the conditions tab

for the text element. I need this inside the text element

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

I guess toy cannot use conditions inside text element as you use in your SAPscript editor, smartforms are provided with many options for placing conditions, you can place your condition in condition tab or you can create alternative which give us an option of true or false... not only this you can create program lines and place your conditions and basing on the condition you can populate the field.

Lastly, smartform concept is entirely different from SAPscript, once smartform is activated function module is generated in backgroud...

Close the thread once your question is answered.

Regards,

SaiRam

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

CREATE the PROGRAM LINES and write the Code using IF condition and populate that PRINTDATA field there

and in smartform window you dispaly that field with the required Paragraph format, which you have to get from the smartstsyles.

Regards

anji

Former Member
0 Kudos

Hi,

u remove p1 and try .

Assign points if useful.

Regards

(YUGANDHAR)