on 07-17-2009 5:27 AM
Hi All,
I have to develop a report like Attendance register..i.e the first column of the table consisting of standard headings and has to display while intializing it self......and respective columns are dates for a month....once i gave any search criteria the data has fetch from backend and it will give the values with respective each heading in the first column via date wise.
Please help to resolve this....
Regards,
Ravi
Hi,
Create a Ztable with the requried fields and write the
logic to retrieve the data from this table in a class
and design the layout with 2 views one for selection/input
and a button that triggers the next view. In this 2nd view create a node
with the Ztable structure and bind this node to the Table UI element
and instantiate the class in the WDA and using this instance
call that method that returns the data and bind this
data to the view.
If you want to save the data, then create that method in the class and
call this method inside the SAVE button of WDA.
Refer to following tutorials -
http://help.sap.com/saphelp_nw04s/helpdata/EN/43/1f6442a3d9e72ce10000000a1550b0/content.htm - Assistance class
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lekha,
Thanks for ur reply....My requirement is not like a general report. It was like a attendance report..
Names DAY1 DAY2 DAY3
Thomus
Robert
Martin
John
Steeve
u2026u2026..
u2026u2026..
My Table/ALV default display is like above....After any inputs and search ....it has to display correponding values of each day w.r.t each person....
Plz let me know if u any queries regarding my requirment....
Regards,
Ravi
Hi,
When you fetch data from your custom database table, and bind it to your node
For eg: After writing the select query, lt_names has all the names that you want to display in your first column.
Suppose your node is CN_DATA, attributes - NAME, DAY1, DAY2 etc.
Data: l_node type ref to if_wd_context_node.
Data: gt_data type wd_this->elements_cn_data, " internal table type node
gs_data type wd_this->element_cn_data. " workarea type node
loop at lt_data into ls_data. " this internal table has data fetched from your database table using select query
gs_data-name = ls_data-name.
append gs_data to gt_data.
clear gs_data.
endloop.
l_node= wd_context->get_child_node( 'CN_DATA' ).
l_node->bind_table( gt_data ).
Regards,
Radhika.
Hi,
If you have got data into lt_table. then modify the table for the 1st column.
loop at lt_table into ls_table.
lv_tabix = sy-tabix.
"If you have any table for names, then use the READ statement with some key and give that name here
ls_table-name1 = 'XXXXX'.
modify lt_tabe from ls_table index lv_tabix.
clear ls_table.
endloop.
lr_node->bind_table ( lt_table ).
Regards,
Lekha.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.