Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

control commands

Former Member
0 Likes
302

how to use control command( if and endif) with function module CONTROL_FORM?

2 REPLIES 2
Read only

Former Member
0 Likes
284

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

Read only

Former Member
0 Likes
284

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