cancel
Showing results for 
Search instead for 
Did you mean: 

Data is not displaying using ABAP WebDynPro

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

I tried using both the select statement. Data is also there in the table. Still blank page is displaying without any error.

Let me know.

Thanks!

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

I tried using both the select statement. Data is also there in the table. Still blank page is displaying without any error.

Let me know.

Thanks!

Former Member
0 Kudos

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

Former Member
0 Kudos

yes i did. I mapped also

Former Member
0 Kudos

Are teh names of teh attributes under the node PROD_ORDER are same as to the AUFK table...

Former Member
0 Kudos

yes .... the same as AUFK table... Still blank page is displaying...

Let me know...

arjun_thakur
Active Contributor
0 Kudos

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

Former Member
0 Kudos

hi saurav,

While debugging it shows the value in it_AUFK internal table. but only blank page is showing while doing testing. Please let me know what need to be done further.

Thanks.

Former Member
0 Kudos

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.>

Former Member
0 Kudos

Hi,

Kindly ensure that u have placed the table view in your view container.may be this is missing since youget a empty output.

Thanks,

Arjun.G

Former Member
0 Kudos

hi,

again blank page is displaying....

let me know.

Former Member
0 Kudos

Now I am getting the data and displayed on the browser.

Thank you all for your kind suggestion.