on 11-21-2014 11:02 AM
Dear Experts,
I have created a ALV Webdynpro for EKPO.
I have taken 6 fields.
one is input. when i am clicking the get details button..the alv output is not showing.
While displaying , its not displaying the output .
method ONACTIONGET_DETAILS .
* set the input
DATA lo_nd_ekko TYPE REF TO if_wd_context_node.
DATA lo_el_ekko TYPE REF TO if_wd_context_element.
DATA ls_ekko TYPE wd_this->Element_ekko.
DATA lv_ebeln TYPE wd_this->Element_ekko-ebeln.
lo_nd_ekko = wd_context->get_child_node( name = wd_this->wdctx_ekko ).
lo_el_ekko = lo_nd_ekko->get_element( ).
lo_el_ekko->get_attribute(
EXPORTING
name = `EBELN`
IMPORTING
value = lv_ebeln ).
* set the output
DATA lo_nd_output TYPE REF TO if_wd_context_node.
DATA lt_output TYPE wd_this->Elements_output.
lo_nd_output = wd_context->get_child_node( name = wd_this->wdctx_output ).
* fetch the data
select ebeln txz01 matnr menge netwr from ekpo
into CORRESPONDING FIELDS OF TABLE lt_output
WHERE ebeln = lv_ebeln.
lo_nd_output->bind_table( new_items = lt_output set_initial_elements = abap_true ).
endmethod.
i am not getting the alv output..after clicking the button details alv output is showing blank.
How to resove that Error???
hi Kaustav,
Go to the Component Usage-<Your Crated Component>-INTERFACECONTROLLER_USAGE, and then click Controller Usage button the following screen appears.
Select the Component Controller. Do the Mapping,
Embed ViewContainerUIElement in MAIN view and then go to Windows embed the ALV table as below.
thats it. Reward if it is helpful
Thanks
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kaustav,
Have you reslove this issue???
As i understood by seeing your code i would suggest to do these steps.
1) Try to delete your ALV mapping and do it again.
2) Check in the Window controller whether you embedded your ALV View properly.
If you are getting the values in the Internal table lt_output it should display.
Try this and let me know if any problem u face.
Regards,
Sadiq K
HI Kaustav,
Write the below logic in WDDOMODIFYVIEW( ) method if data in OUTPUT node still exists.
lo_nd_output->bind_table( new_items = lt_output set_initial_elements = abap_true ).
Thanks,
Marimuthu.K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kaustav das,
Check in the properties of the button , whether you have placed the method ONACTIONGET_DETAILS in the events section .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What about if you put the same code in WDDOINIT with explicit value for ebeln?
If ALV is appearing correctly there, then it means there is something in the code which you should check.
If it is not appearing correctly there, then there should be some problem in mapping. Check the mapping in all the places including interface controller data mapping. May be you can delete and do again with fresh mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kaustav,
With all the expert(S) advice if still your issue is not resolved, Please delete the component and try to create new compoent with all the steps to be followed to display data in ALV table .
If you're not able to follow/understand the steps, Look into goolge you'll find the many helpful links which will help you.Else look into below links.
ABAP Web dynpro ALV report table
Creating a WebDynpro ALV Application in 30 easy steps
Creating an ALV List in Web Dynpro Application
Feel free to get back with your concerns.We are happy to help you. Wish you happy new year.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kaustav,
I believe already the correct answers have been provided. If the thread is not yet closed then I assume the problem still persists. Is it so?
I assume you have already done the below steps:
1. Component usage - SALV_WD_TABLE
2. Created the node with cardinal property as 0:n | 1:n
3. You have created a viewcontainer and embed the ALV table in Window section (kindly recheck)
4. You have populated the node with pre-selected data. (Make sure you have done the binding with correct table column format as you have prepared the node,)
5. you have mapped the ALV interface controller with your node which you like to get displayed. My thinking is you please recheck this mapping as already others have also notified it.
If this helps then let me know.
- Thanks , Somnath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear experts,
still i am not getting the output in webdynpro alv Report..
i debugged the code but value is not showing in report output. pleasee advice experts
Thanks & regards,
kaustav das
sap abap consultant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh !!!! is your issue not solved yet ?
From the above replies, can make out that your logic to fetch data and bind to context node is fine.
Write the below logic in WDDOMODIFYVIEW( ) method to test if data in OUTPUT node still exists.
DATA lo_nd_output TYPE REF TO if_wd_context_node.
DATA lt_output TYPE wd_this->Elements_output.
lo_nd_output = wd_context->get_child_node( name = wd_this->wdctx_output ).
* Read data from context node
clear lt_output.
lo_nd_output->get_static_attributes_table(
importing
table = lt_output ).
Now, set break point and check if LT_OUTPUT has values.
Regards,
Rama
Hi,
Is there data available for the entered Ebeln? Please put a break point at the select statement and check whether lt_output is populating or not.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
From the screenshots, your ALV contains few selected fields( without dictionary structure reference) whereas the lt_output( 'Output' Node of your view ) still refers to the dictionary structure and has all the fields!!
If you have changed the attributes or node properties, use 'Update Mapping' on your context node and check.
Regards,
Kiran
Dear sir,
This is the code for the method details button..
but nothing is showing in alv
method ONACTIONGET_DETAILS .
* set the input
DATA lo_nd_ekko TYPE REF TO if_wd_context_node.
DATA lo_el_ekko TYPE REF TO if_wd_context_element.
DATA ls_ekko TYPE wd_this->Element_ekko.
DATA lv_ebeln TYPE wd_this->Element_ekko-ebeln.
lo_nd_ekko = wd_context->get_child_node( name = wd_this->wdctx_ekko ).
lo_el_ekko = lo_nd_ekko->get_element( ).
lo_el_ekko->get_attribute(
EXPORTING
name = `EBELN`
IMPORTING
value = lv_ebeln ).
* set the output
DATA lo_nd_output TYPE REF TO if_wd_context_node.
DATA lt_output TYPE wd_this->Elements_output.
lo_nd_output = wd_context->get_child_node( name = wd_this->wdctx_output ).
* fetch the data
select ebeln txz01 matnr menge netwr from ekpo
into CORRESPONDING FIELDS OF TABLE lt_output
WHERE ebeln = lv_ebeln.
lo_nd_output->bind_table( new_items = lt_output set_initial_elements = abap_true ).
endmethod.
Hi Kaustav,
Your code looks fine.
I suspect, either your mapping of context node from component controller to interface controller is not properly done or some where the code is written to bind output again where lt_output might be empty.
If your mapping is fine, I suggest you to put external break point in WDDOMODIFYVIEW( ) of your alv view and write a logic to read OUTPUT context node to test if records are still there. If no records, it means that some other place output records are being reset.
Regards,
Rama
If your mapping is fine, I suggest you to put external break point in WDDOMODIFYVIEW( ) of your alv view and write a logic to read OUTPUT context node to test if records are still there. If no records, it means that some other place output records are being reset.
Dear Sir,
lt_output have value but is not coming in alv table.
what should be the code in modifyview as this is showing empty..??
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.