Skip to Content
avatar image
Former Member

if, else stmt in smartform

Hi,

can any one guide me?

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

thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 16, 2008 at 10:04 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2008 at 10:04 AM

    Hi,

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

    Regards,

    Satish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2008 at 10:19 AM

    hi ,

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

    shall i take one more alternative?

    thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi.

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

      Reward if helpful.

      Thanks

      Swati

  • avatar image
    Former Member
    Apr 16, 2008 at 10:02 AM

    Hi,

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

    Regards

    Sandipan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2008 at 10:06 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Apr 16, 2008 at 11:07 AM

    thank you very much all of you.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2008 at 11:09 AM

    its got solved

    Add comment
    10|10000 characters needed characters exceeded