Conditional Logic in Program Lines of Smartform
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
Edited by: Satyabrata sahoo on Sep 8, 2008 12:26 PM
Narin Nandivada replied
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.