on 12-08-2009 4:57 AM
Hi,
Thanks in Advance.
I am trying to get the data of field AUFNR and KTEXT from AUFK table into Layout.
These are the attributes of Change Node
Node Name PROD_ORDER
Interface Node : No
Input Element (Ext.) : No
Dictionary structure AUFK
Cardinality : 0..n
Selection : 0..1
Init. Lead Selection : Yes
Singleton : No
Supply Function
Mapping Path
*************************
Method :
I have written the following code to fetch the data from AUFK table
method WDDOINIT .
Data: it_AUFK type standard table of AUFK,
context_node type ref to if_wd_context_node.
select AUFNR KTEXT from AUFK INTO table it_AUFK.
if sy-subrc eq 0.
context_node = wd_context->get_child_node( name = 'PROD_ORDER').
context_node->bind_table( it_AUFK ).
endif.
endmethod.
There is no syntax error and getting activated. But while testing no data or even column is displaying into browser. It is blank page.
Am not sure where I am wrong. Please assist me.
Thanks
Hi,
Hoe many fields are there under the node....haev you mapped the whole table...only some of teh columns..
have you checked in debugging...is the data avaialbe in aufk table or not..
select AUFNR KTEXT from AUFK INTO correspoindign fields of table it_AUFK.
or
select * from AUFK INTO table it_AUFK.
try to check both the select statements.
Edited by: Lekha on Dec 8, 2009 10:35 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of this :
select AUFNR KTEXT from AUFK INTO table it_AUFK.
Try this :
select AUFNR KTEXT from AUFK INTO corresponding fields of table it_AUFK.
If it doesnt work, try to debug the application and check the value of it_AUFK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you instantiated teh ALV or....have you mapped the DATA node of ALV to the PROD ORDER node or not..usnder the compoent usages check it out..
If you have used the TABLE UI element have you created teh bindign to the table to this PROD_ORDER node or not..
Edited by: Lekha on Dec 8, 2009 11:14 AM
Hi,
Are you getting the data in it_aufk table?? If yes, then there must be something wrong with the mapping. Just check the mapping between DATA node of ALV and Prod_Order node. Try to delete the mapping between DATA node of ALV and Prod_order node and map them again. It might work.
Regards
Arjun
Hi ,
Check this for testing purpose :
Afer you have binded the internal table to the node , check if node has some vlaues in it or not :
Use this code to get the data of node into an internal table and see if the node is getting populating with data or not :
DATA lo_nd_cn_table TYPE REF TO if_wd_context_node.
DATA lo_el_cn_table TYPE REF TO if_wd_context_element.
DATA ls_cn_table TYPE wd_this->element_cn_table.
DATA it_table TYPE wd_this->elements_cn_table.
* navigate from <CONTEXT> to <CN_TABLE> via lead selection
lo_nd_cn_table = wd_context->get_child_node( name = wd_this->wdctx_cn_table ).
*lo_nd_cn_table->get_static_attributes_table( IMPORTING table = lt_table).*
<CN_table is my node binded to table.>
User | Count |
---|---|
93 | |
10 | |
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.