on 08-04-2008 2:38 PM
Hi All,
I'm developing one webdynpro application which is using BAPI_FLIGHT_GETLIST for gettting list of flights and then using an other bapi BAPI_FLIGHT_GETDETAIL for getting details of particular flight which is selected from getlist bapi.
how can use these two BAPI in single application? How to get the flight details after selecting the one row in getlist view?
please provide me the procedure.
Regards
Srikanth
hi
First create two models Bapi_flight_getlist, Bapi_flight_getDetails.
Add these models in your component.
Do the model binding on Component Controller.
Comp.Controller>apply template>servicecontroller>flightlist>choose
Airlineid
Maxrows
Expand Output node.
select Flight_List node.
ServiceController will automatically generate the method,choose ok.
Repeat the same for second bapi also.
choose
Airlineid
Connectionid
Flightdate
and select Flightdata
(you can find it by expanding output node).
after completion of all these steps u will have Getdetilas and getlist bapi details in comp.Controller.
To avoid overloading in selecting particular node specify different name for node.(eg:output-->output1)
Contextmapping.
you do the contextmapping between Comp.Controller and view by choosing appropriate details from comp.controller.
now you will have GetDetail and GetList nodes data.
do the view binding.
Apply template-->select Airlineid
Maxrows from getlist node.
again do the
Apply template-->select Flightdata from getdetailnode.
onleadselect of table you call the execute methods from comp.controller generated by service Controller.
Layouttab>table>properties-->onleadselect Event
create action for it.
in onleadselect<actionname>
{
wdThis.wdGetFirstCompController().executeBapi_Flight_Getdetail_Input();
wdThis.wdGetFirstCompController().executeBapi_Flight_Getlistl_Input();
}
in the output Getlist table will be displayed.
by clicking on table row,onLeadselectaction will be called.
you will get the flightdetails.
i hope this will solve your problem.
Regards
sowmya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Srikanth,
Get both BAPIs in a single model. Import and use them. You should use Supply function to get data for selected line and maybe Dispose function as well if you need that. For information on supply and dispose functions, please follow [this|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60086bd5-9301-2b10-6f97-a14366a5602b] e-book.
Hope this helps.
Vishwas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi srikanth,
Its as simple as you work with one BAPI. there is no change.
if you use two bapi's you will get node for each bapi under your context ( after mapping).
and when you select the row in table i.e. result of BAPI_FLIGHT_GETLIST, those row(s) will be input to the BAPI_FLIGHT_GETDETAIL bapi.
get the selected row of the BAPI_FLIGHT_GETLIST by wdcontext.current<table node>.getXXattribute();
like this forward all the input attributes to the second bapi.
find the tutorials for adaptive rfc (for importing bapis) and if the BAPI_FLIGHT_GETDETAIL needs multiple rows as input, that also you can do it.
let me know if you need more clarification.
PradeeP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
only one component is enough.....
under your component context you will find two bapi nodes.....
presentation on adaptive RFC's https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/707f9632-74db-2910-9d95-e8d9fbbd...
/thread/735077 [original link is broken]
/thread/466588 [original link is broken]
can provide more..... or just search in SDN you will find many more.....
dont go for supply functions and make your first application complex... its just simple web dypro...
take selected row (onSelect / onLeadSelect) method of the table just pass that parameters to another bapi. Its simple.....
PradeeP
Edited by: pradeep bondla on Aug 4, 2008 3:52 PM
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.