‎2007 Jul 08 5:24 AM
how to use control command( if and endif) with function module CONTROL_FORM?
‎2007 Jul 08 7:03 AM
hi,
am not sure this code working properly, but it will give some idea....
Use CONTROL_FORM to pass SAPscript control statements to the form.
<b>Function call:</b>
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'if <condition>'
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = ' ' "here pass element name, which
you want to print based on condtion.
WINDOW = ' ' " specifies the window.
TYPE = ' ' " specifie the location
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'endif '.
in element you write the logic as per your needs.
if you want print more than one element data based on condition, for that one you call more than WRITE_FORM function modules.
regards,
Ashk Reddy
‎2007 Jul 08 12:28 PM
Hi
No need to pay that much attention to this CONTROL_FORM fun module in Scripts
better pay attention to other fun modules like OPEN_FORM,WRITE_FORM, CLOSE_FORM
if needed look at START_FORM, END_FORM also
they are useful very much.
Reward points for useful Answers
Regards
Anji