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

how to use Program logic in Table node inn smartform

Former Member
0 Likes
4,333

Hi Guys,

                I have a requirement to do some program logic under the table node in Smartform.

if I insert a program logic inside a table, when it will be processed..? before loop iteration or after it..?

I have to some text and numerical changes to some of the fields before it get printed inside the table loop for each item.

Thanks

Sam

7 REPLIES 7
Read only

VijayaKrishnaG
Active Contributor
0 Likes
3,093

Hi Sam,

If you insert programming logic inside table node, that will be executed every time in the loop. So, if your logic is to change values on workarea of table, you can insert in table node.

Thanks & Regards,

-Vijay

Read only

praveenboss
Participant
0 Likes
3,093

HI Sam Vel,

                  U have Nice Name, You Can perform these operation on your TABLE FIELDS                                       compare,check,initialize to other field,sort, 

                 

                 YOU  Need to assign some calculated value to Field Each time on LOOP .

                  to solve your problem it's easy to make ( program line)  before loop in smartform

                  and make text and numerical changes.

                      Please     tell me  How Is That.

                                                                                                           Thanks

                                                                         


                   

Read only

Former Member
0 Likes
3,093

Dear Sam Vel,

      Wht you just have to do in which cell you want the changes to be happend.

before the text put a programlines right click create->flowlogic->programlines.

now dblc click on the programlines in this case %CODE3.

you will see the input and output parameters.

Here you can see I have been using the wa_ftab-item and v_item two variables.

Wa_ftab-item is coming from loop and v_item is the global dcelaration and now the result is coming in v_val.

Now My result is in v_val which I have decleared in the global definition.

now put the variable iv_val in the TEXT below the %CODE3.

you will get the desire result.

Regards,

Read only

Former Member
0 Likes
3,093

Hi ,

Check this Sample Smartforms given by SAP "SF_EXAMPLE_01" or Search with "SF*"

Regard's

Smruti

Read only

Former Member
0 Likes
3,092

Hi Sam ,

This is the way to use Program Line in Table Node:

And there is nothing new in putting code in Table node .

Put variable to be used in Input Parameter and Output Parameter .

Keep Learning and sharing,

Jeetendra

Read only

praveenboss
Participant
0 Likes
3,091

   hi,

  3 steps

1) make one Program limes in parent node of LOOP

in this case MAIN mainwindow

2) %code1 is default first program line name

     inside program line 

   pass input and output parameters

   which used in your logic inside %cod1

IT's done

Only two steps boss.

thanks

Read only

praveenboss
Participant
0 Likes
3,091

HI Sam,

   

one solution is That inside loop You Can Create     PROGRAM LINES

and do your operation with table work area

          THANKS

           PRAVEEN