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

Smartforms - How can insert condition in smartforms

Former Member
0 Likes
604

Hi, My requirement is to insert a line at the 11th position in main window. Main window has 20 line to be printed. I need to print 'Y' at the 11th line for the condition below:

i.e. if a w_varibale eq 'X'.

print 'Y'.

endif.

When I tried to write this inside the code, it is not working properly. Can any one help me in this.

4 REPLIES 4
Read only

Former Member
0 Likes
495

Hi

U have to insert that condtion in the condition tab of the node of text element.

Max

Read only

0 Likes
495

Hi,

Inserting condition in the condition tab will affect the other code.

The main window has 20 lines of code to print 20 line.

My requiremnt is to print 11th line only if the w_variable is 'X'.

If I insert this condition in condition tab then the whole code in Main window will execute depending upon the w_variable value.

I can resolve this by copying the whole code in Main window and creating another one specifically to write in the w_variable eq 'X'. I wanted to find out if there is any other way like we do in SAP Scripts.

Thanks,

Regards,

Shahu

Read only

Former Member
0 Likes
495

If you want insert the condition, you can simply do the on the CONDITIONS TAB for the text element. So, if the condition is satisfied, the text element will be printed.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
495

Hi,

You add the condition to the condition tab of the node where the text element belongs.

Also you can check the standard sample program availavable in SAP

SF_EXAMPLE_01 , where they are summing up the value for calculating the totals

smilar sort of logic can be used in ur program

Regards

Yamini