on 09-24-2008 6:29 PM
hi all,
I have a view in which there is a interactiveform form1 with a table1 in it.
I wanna to know how to make the field displayed with different color according to their value.
And how to make value = 0 not displayed.
I know there is a method fillcolor, but where should I call this method?
In wdInit? How can I access the object Form1 with java code?
Could somebody give me a idea?
Thanks a lot
Yimin
Reema thanks for your reply.
but I work in web dynpro java , not abap.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code that I have given you is on the interactive form... in FormCalc language. This has nothing to do with WEb Dynpro ABAP or JAVA...
You may use this code irrespective of whether you are working in ABAP or JAVA.
Just open the interactive form, select the required UI element and write the given script in the script editor.
Select the initialize event.
Regards,
Reema.
Hi yimin,
Open the form in transaction SFP.
Select the datarow of the table from the heirarchy palette.
Write the foll script in the initialize event of the datarow of the table.
Language FormCalc
For Color:
if ($.field1.rawValue == "A") then
$.border.fill.color = "220,220,220"
elseif ($.field1.rawValue == "B") then
$.border.fill.color = "120,120,120"
endif
In order to hide a row if column value is 0
if ($.field1.rawValue == 0) then
$.presence = "hidden"
$.relevant = "-print"
endif
Regards,
Reema.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.