on 04-27-2012 11:53 AM
Hi guys,
I know how to create a dyanmic table with dynamic number of columns.
problem here is, I will know the number of columns after dropdown selection of one filed,
actually we have to write the code in wddomodiftyview method and have to use first_time parameter...
but here i can;t use first time parameter, because after dropdown action i have to write the code...(
Any ideas guys? you guys understand the issue?
Regards
Srinivas
Hi Srinivas,
Take two attributes in your view one to store the calculated no. of days(DAYS) and other(SET) of boolean type.
Now first in onselect event of your dropdown calculate your no. of days and bind to attribute DAYS.
and make the SET attribute as true.
In wddomodifyview check the SET variable, If it is true then write your code using the no.of days(DAYS) attribute and then make the SET attribute to false.
Method wddomodifyview.
if SET = true.
<<<code>>>
SET=false.
endif.
Endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
for this you will need to create the attributes dynamically and also the table would be a dynamic one.
Try it urself else let me know if you need a ready to use code for the same.
Thanks,
Shitanshu Sahai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
can you share the code. i have similar requirement. i have to create table with no of days of a month.
Thanks & Regards,
Sankar Gelivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
I am not sure whether your issue is resolve or not.
I had a same kind of requirement though little different, What I can suggest is that take two flags in Assistance class like lv_year and lv_month and on the onselect action of the drop downs fill the respective vaiables with 'X' and then in the WDOMODIFY check if both the variables are 'X' if yes then write your respective code for building table abd then clear both the variables .
Let me know if this was of any help to you.
Thanks
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi srinivas,
Please follow the link:
Regards,
Sayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sayan,
the link which you gave wont suitable for me, because in link number of columns known in wddoint method it self, so we can write dynamic code in wddmodifyview method.
but here I know the number of columns , once wddoint method executed...so i cant use first_time parameter in wddomodifyview method.
Any guess?
Regards
Srinivas
Hi Srinivas,
here dropdown UI element name(ID) will takes place. like TabStrip(Tab Name)
1. In dropdown action add one parameter ID as importing (String) ---- dropdown UI name DRP_YEAR
2. Declare one string type attribute at component controller level and store the ID there.
wd_comp_controller->drop_id = ID.
3. now go to modify view and compare the ID
IF WD_COMP_CONTROLLER->DROP_ID EQ 'DRP_YEAR'.
<<<<< process your dynamic table coding >>>>>>>>>
ENDIF.
4. Now test.
hope it will resolve your issue.
Hi srinivas,
srinivas sana wrote:
I will know the number of columns after dropdown selection of one filed
You mean the drop down field is present in a column of the table? ALV or table UI you are using.
Regards,
Fareez
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Sana,
See your requirement was to create the dynamic table based on the 2 drop down values right,
Initially while view was loaded the drop down has no lead selection.
Once the drop down are selected, in the respected action method you can save it in the view local variable by the way you can check in the modifyview if your local variable is not initial, procedure you dynamic table creation based on the value else set the table visible as false.
i think it may work for your requirement
Regards,
Mani
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.