cancel
Showing results for 
Search instead for 
Did you mean: 

Table that gives PO items

Former Member
0 Kudos

Hello,

First of all, I'm totally new in Web Dynpro so this question is probably easy to answer for most of you...

The goal is to display a table that gives several items from a PO.

What I did:

I made a service call for BAPI_PO_GETITEMS, IMPORTING purchaseorder, CHANGING PO_ITEMS.

In my view => Context I added a default value for the purchase attribute (3000000050) which is an existing PO number in the system.

I then went to Layout, used the wizard to add a table and selected the fields I want to show in the table (with binding checkbox).

When I run this it's not showing me any values though, it's showing me an empty table with the correct columns (the ones I selected). I made sure PO number 3000000050 contains items.

I'd appreciate if someone could help me with this

Best regards,

PJ

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

First of all thanks for your replies.

Yes the BAPI returns all fields but I also have all the fields in my note (the service call did that automatically). I'm just not using all the fields in my table (didn't bind them all, removed the checkbox for quite some).

About the debugging: what I did was open WDDOINIT and put a breakpoint there. When testing the window (connected to the view) I came in debugger but I could not find anything in it, it's basically all empty fields. When I put my breakpoint in the componentcontroller -> methods -> execute_bapi_po_getitems my debugger doesn't even start.

I guess that means the execute_bapi_po_getitems is never called? Should I put that in WDDOINIT?

If I put my EXECUTE_BAPI_PO_GETITEMS in WDDOINIT it tells me EXECUTE_BAPI_PO_GETITEMS is unknown or protected or private. That's probably because EXECUTE_BAPI_PO_GETITEMS is in my custom controller?

Edited by: PJ Deraedt on Oct 16, 2009 1:30 PM

Former Member
0 Kudos

Hi

I think you need to activate the custom controller individually and then activate whole component try it.

Former Member
0 Kudos

Hello,

Thanks for your answer but all the needed things are activated. I think the problem is that my EXECUTE_BAPI_PO_GETITEMS is never executed. Could someone tell me where to do this/and how please?

Former Member
0 Kudos

Put the execute method in the component controller WDDOINIT() method.Put the break point.Design the layout in the view.map the controller context to view context.

Former Member
0 Kudos

Hello,

All that I've just re-done, my method WDDOINIT in my controller now contains:

method WDDOINIT .

EXECUTE_BAPI_PO_GETITEMS( ).

endmethod.

and a break point

When I test my web dynpro application I still get an empty table, my debugger is not launching

Former Member
0 Kudos

I solved it, my problem was the way the method EXECUTE_BAPI_PO_GETITEMS( ) is called, a friend told me the wrong thing.

It needs to be:

method WDDOINIT .

DATA lo_componentpo TYPE REF TO ig_componentpo .

lo_componentpo = wd_this->get_componentpo_ctr( ).

lo_componentpo->execute_bapi_po_getitems(

).

endmethod.

Former Member
0 Kudos

Hi,

You can also have this piece of code

method WDDOINIT .
DATA lo_componentpo TYPE REF TO ig_componentpo .
lo_componentpo = wd_this->get_componentpo_ctr( ).

lo_componentpo->execute_bapi_po_getitems(
).

Replace

method WDDOINIT .
wd_comp_controller->execute_bapi_po_getitems(
).

Check in the view's attributes, there is a standard attribute wd_comp_controller of compoennet controller reference.

Regards,

Lekha.

Former Member
0 Kudos

Hi,

Have you checked in debugigng for the tabel entries.

Also check the Input/output exit for EBELN. check the conversion routine.

One thing you do, donot pass any PO number, then that BAPI should return all the Items right.

Check it out.

Former Member
0 Kudos

Check if binding is done. Check if the dataSource property of your table is bound to the node.

Former Member
0 Kudos

Yes it is binded, I've got the po_items as dataSource

Former Member
0 Kudos

Then as suggested by Lekha please check if the internal table has data.

Also check if all the fields( cell editor's of columns) in the table are bound to atrtibutes of the node.

Former Member
0 Kudos

Hi,

I guess using this BAPI you might be getting all columns data, but your node has only some columns right.

One thing you do,

As you get data into lt_table(all columns) move the same contents to toher table of Context node structure.. Then bind the latter one.

Atleast now you should get them.

Regards,

Lekha.