cancel
Showing results for 
Search instead for 
Did you mean: 

value is not coming alv output in webdynpro abap

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

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

former_member227911
Participant
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi kaustav das,

Check in the properties of the button , whether you have placed the method ONACTIONGET_DETAILS in the events section .

jayanthi_jayaraman
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

somnath
Active Participant
0 Kudos


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

Former Member
0 Kudos

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

ramakrishnappa
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Dear Ramakrishnappa Gangappa sir,

after writing the code in modifyview we debug the code but lt_output is showing data but it is not displayed in alv output

how to resolve that  part sir ??

ramakrishnappa
Active Contributor
0 Kudos

Oh, Can you delete the alv mappings and create it again. I think there is mapping issue.

Regards,

Rama

Former Member
0 Kudos

Dear sir,

can you elaborate me for this issue so i can delete it??

ramakrishnappa
Active Contributor
0 Kudos

Go to interface controller and then right click on DATA context node and choose the option DELETE mapping

Now, again re-map your context node OUTPUT on to DATA of interface controller.

Regards,

Rama

Former Member
0 Kudos

Dear sir,

in the interface controller in context node  data folder is not  showing.

but in the componentcontroller data folder is showing..i am giving you the screenshot..

ramakrishnappa
Active Contributor
0 Kudos

Hi,

You need to choose alv component usage under the COMPONENT USAGES node on left hand side.

Find out the alv component's DATA node over there and then perform the steps suggested in my earlier reply.

Regards,

Rama

former_member222068
Active Participant
0 Kudos

Hi Kaustav,

Please go through this document for the ALV table.

Thanks & Regards,

Sankar Gelivi

former_member184578
Active Contributor
0 Kudos

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

Former Member
0 Kudos

input is coming proerly.. select statement also fetch but no output is coming

Former Member
0 Kudos

Hi,

Can you please share the snapshot of data in LT_OUPUT in debugging.?

Thanks

KH

former_member184578
Active Contributor
0 Kudos

Hi,

Did you properly map the context node 'Output' from component controller to your view and to the 'DATA' node of ALV component in interface controller?

Regards,

Kiran

Former Member
0 Kudos
Former Member
0 Kudos

Dear sir,

I am properly mapped but still i am not getting

former_member184578
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Dear experts, still i am not getting the solution.how to resolve it?

Former Member
0 Kudos

Please post you code where you define the Interfacecontroller and set lo_nd_output to be shown in ALV?

Former Member
0 Kudos

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.

ramakrishnappa
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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