cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Logic in Program Lines of Smartform

Former Member
0 Kudos

Hey,

Can i add logic in Program Lines that if it is satisfying a condition it will call to ADDRESS window otherwise it will call to TEXT WINDOW ?

Problem am facing : (window PARTY ADDRESS)

select single * from kna1 into l_kna1 where kunnr = it_header-kunnr.

if the above statement is true then It will call to ADDRESS NODE otherwise it will call to some Text nodes (&g_name1& , &g_name2&)..

Thanks in Advance

SATYA

Edited by: Satyabrata sahoo on Sep 8, 2008 12:26 PM

Accepted Solutions (1)

Accepted Solutions (1)

narin_nandivada3
Active Contributor
0 Kudos

Hi,

Write the logic in INITIALIZATION and set a flag... Based on the value of the flag set the CONDITION in the

Condition TAB of the window.

Write code in INITIALIZATION TAB of GLOBAL DECLARATION AS BELOW.


Clear flag.  " Declare the flag variable in Global declarations...
select single * from kna1 into l_kna1 where kunnr = it_header-kunnr.
IF sy-subrc eq 0.
   flag = 'X'.
ELSE.
  Flag = ' '.
ENDIF.

That would solve your issue.

Good luck

Narin

Answers (2)

Answers (2)

Former Member
0 Kudos

Create Alternative node

It is basically works on condition (like if endif)

try this

former_member181995
Active Contributor
0 Kudos

Use condition from condition tab in ADDRESS NODE and Text nodes rather than in program lines.

Edited by: Amit Gujargoud on Sep 8, 2008 8:59 AM