on 11-17-2011 5:58 AM
Hi,
I want to display a row in smartform table , based on condition, like, if the Fixed amount is > 0, then only print that row. the logic of calculating fixed amount has been written in cell->code.
Can I add a code at the table level? I tried to add the code->program lines at the table level. but its getting added at the last. means after rows.
Thanks and regards,
Madhuri Sonawane
I assume the condition can be only evaluated based on table content. As based on this condition you want certain row to display or no, I would suggest the following:
- create type which wraps your table with data with additional field (i.e. DISPLAY) - simply include structure of original table and add this field,
- create a code node before table,
- copy data to your custom table from original one, setting DISPLAY field based on condition,
- in your table node loop through your custom table ,
- set condition on your row (DISPLAY = 'X') - this way entire row won't get printed if condition is not met.
Regards
Marcin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Read the value which you want to check just before you display the row.
and in the row in conditions tab give the condition like Fixed Amount > 0.
Regards,
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In smartforms table, you are having second tab "Data" in which you have to mention the name of the internal table on which you want to loop. Just below this, you can also mention the "where" conditions for this internal table. Give your condition here and try.
Regards,
Mahidhar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have done some research and sample development but finally i found very simple logic.
as follows.....
1) take 1 integer variable in your internal table (i have used "color type i").
2 ) in initialization i wrote
data : val type i.
loop at it_bseg into wa_bseg.
val = wa_bseg-buzei mod 2.
wa_bseg-color = val.
modify it_bseg from wa_bseg.
endloop.
so that i can get true and false(which 1 and 0) value in each row of internal table number of rows.
3 ) in main area of the table control
i have created 2 row type lines.. each line contains different number of cells like no,name,amount....& so on....
4 ) in 1st row type double click and select conditions tab
apply condition : WA_BSEG-COLOR = 1
5 ) in 2nd row type doble click and select conditions tab
apply condition : WA_BSEG-COLOR = 0
6 ) after completing you can switch your row type at run time
now i have to apply color for each row type
but table control cant support box and shadding feature..
__________________________________________________________
1 ) after showing above logic for doubilng row type.
follow
2 ) double click on table control and press table tab.
3 ) press details button which you nevigate table control in numerical mode (where you have to specify table length and cells by number)
4 ) copy line 1 and paste it to below that line . now you have two lines (you can press table painter button where you can see double line upside/downside)
5 ) press button draw lines and columns now you can select any of row and color it with different color and shade.
6 ) in table control's main area double click any of rowtype and select line type to another (which you have colored)
7 ) activate smartform and execute it.
you can find zebra style table row,
hope this logic helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have the logic written. Then in the text element that you use to display teh row, there will be a Condtition tab. Just write your condition there . The text element will be displayed only if the condition is met.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.