cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Supply function for VBAK and VBAP

Former Member
0 Kudos

Hi All,

I was trying to implement supply function for practice. I copied this code below from the tutorial and this doesnt work.

I have made a VBAK and VBAP table display, its not a sflight display. Please tell me how do I modify this code so that it works for my scenario. What is happening is it says Object IF_COMPONENTCONTROLLER doesnot exist and I dont know what is Elements_Bookings. Can some one explain where are the classes and object given belowin the code are coming from. I am lost ......

method GET_BOOKINGS . data: Itab_Bookings type IF_COMPONENTCONTROLLER=>Elements_Bookings, Stru_Bookings like line of Itab_Bookings, Stru_FlightList type if_componentcontroller=>Element_FLIGHT_LIST. parent_element->get_static_attributes( importing static_attributes = Stru_FlightList ). Itab_bookings = CL_WDABAP_FLIGHT_MODEL=>GET_BOOKINGS( CARRID = Stru_FlightList-airlineid CONNID = Stru_FlightList-connectid FLDATE = Stru_FlightList-flightdate ). node->bind_table( Itab_bookings ). endmethod.

Update

Thaks,

Anu.

Accepted Solutions (0)

Answers (2)

Answers (2)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

Go to the Component Controller

select Attributes tab

double click IF_COMOPENNTCONTROLLER

you see an interface definition, there you can find that all the types are defined here with structures

Abhi

Former Member
0 Kudos

Hi,

I tried double kliking on if_componentcontroller but its not happening.

method GET_SUPPLY .

data: Itab_Bookings type If_COMPONENTCONTROLLER=>Elements_Bookings,

I found out another interface whos name is IG_COMPONENTCONTROLLER. But this IG_...... interface do not have a method name elements_bookings.

This is wrf to my question posted above about trying to implement supply function with the help of tutorial no. 4 available on the internet. Please help.

Rgds,

Anupama.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Anu

If_COMPONENTCONTROLLER=>Elements_Bookings is not a method it is just a data declaration

IF_COMPONENTCONTROLLER will be there in your COMPONENTCONTROLLER's Attribuet Tab, in View's Attribute tab

  • Intf.: Ig_Componentcontroller

  • Purp.: programming interface for usage of this controller within

  • other controllers of the same component

  • Intf.: If_Componentcontroller

  • Purp.: programming interface for the application class of this

  • controller only

Every web dynpro component has these two interfaces, and the data declaration is added to these interfaces when you create a context node/attribute in the component controller

Abhi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

What Support Package level are you? Actually very old 7.0 SP levels didn't generate constants for the node and element names into the interface. You had to hard code constants. Why not use the code wizard to generate the access to the node. It generates read access, but that is easily changed to meet your needs. That way the data declarations are made for you.

Former Member
0 Kudos