cancel
Showing results for 
Search instead for 
Did you mean: 

if, else stmt in smartform

Former Member
0 Kudos

Hi,

can any one guide me?

how to use the if else and elseif conditions in the smartform

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

There will be a condition window where u can give the check conditions. In other cases you will have to go for command lines.

Nisrin.

Edited by: Nisrin Pindwarawal on Apr 16, 2008 12:04 PM

Answers (6)

Answers (6)

Former Member
0 Kudos

its got solved

Former Member
0 Kudos

thank you very much all of you.

Former Member
0 Kudos

hi ,

for this else and elseif part where i have to write?

shall i take one more alternative?

thanks

Former Member
0 Kudos

Hi.

For if else you can use another alternative condition with in outer if condition. It might help You

Reward if helpful.

Thanks

Swati

Former Member
0 Kudos

hi Sandipan,

i want to add this one in my smartform.

/: IF &WA_TVKO-VKORG& = '2014'

/: INCLUDE Z_2014_SOFTEX OBJECT TEXT ID ADRS LANGUAGE EN

/: ELSEIF &WA_TVKO-VKORG& = '2006'

/: INCLUDE Z_2006_SOFTEX OBJECT TEXT ID ADRS LANGUAGE EN

/: ELSE

/: INCLUDE &WA_TVKO-TXNAM_ADR& OBJECT TEXT ID ADRS LANGUAGE EN

/: ENDIF

how exactly i will do it can u brief me.

Former Member
0 Kudos

Hi,

Create three text node.

In first text node click on condition tab.

give the field name WA_TVKO-VKORG

click on R(relational operator) and select =

Comparision Value give =2014.

Then in general Attribute tab

In Type -->include Text

Text Name-->Z_2014_SOFTEX

Text Object-->Text

Text Id-ADRS

Like this do in all the 3 text nodes.

Regards

Sandipan

Former Member
0 Kudos

Hi,

Couple of ways of doing this.

You could use three nodes in the same window,

Node 1,

Text element using include text Z_2014_SOFTEX with condition WA_TVKO-VKORG = '2014'

Node 2,

Text element using include text Z_2006_SOFTEX with condition WA_TVKO-VKORG = '2006'

Node 3;

Text element using include text &WA_TVKO-TXNAM_ADR& with condition WA_TVKO-VKORG NE '2006' and WA_TVKO-VKORG NE '2014'

Or you could create two nodes;

Node 1;

A program node that based on the value of WA_TVKO-VKORG populates a variable with either Z_2014_SOFTEX, Z_2006_SOFTEX or &WA_TVKO-TXNAM_ADR&

Node 2;

Text element using include text of the variable in the program node.

You could also use an alternative node, but as you have more than one condition you will need to nest these and it tends to get a bit messy.

Regards,

Nick

Former Member
0 Kudos

Hi,

Create program lines and place your conditions and basing on the condition you can populate the fields values.

Regards,

Satish

Former Member
0 Kudos

Hi,

U can use Create>Flow Logic>Program Lines/Alternative

Regards

Sandipan