on 07-13-2006 6:02 PM
i have an application in which i got the table . Inside this table , i got the details from one Bapi.
In the next view, I have one more table to get the details from other BAPI.
How should i write the code..so that the output of the first BAPI is the import parameter to the second BAPI and get the item level details.
I am able to see the data from first BAPI..but i m not getting the details in the second BAPI.
Hi ,
Did u mean to ask send the output of the first bapi to second bapi?
If ok then
In second bapi execute method u create a instance of second bapi. and passing the parameter to that instance.
BAPI2 output=new BAPI2();
wdContext.nodeBAPI2().bind(output);
// Calls remote function module
output.set<Second bapi input>wdContext.node<first bapi out put node>().currentElement().getFieldname());
wdContext.currentBAPI2Element().modelObject().execute();
this might works.
Do u need more reply me.
Thanks
Mandapati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi nagesh,
Eg:- There are BAPI1 and BAPI2. I m using BAPI1 in first screen and BAPI2 in second screen.
in first screen ..i got BAPI1 details like Empno, name, description.
In the second screen, i have table in which i am calling one more BAPI.
I have to take Empno. as the input to the second BAPI and display the details in second screen.
If u give me coding it ll be appreciated.
Hi ,
In controller u have execute method inthat u write like this.
execute()
{
BAPI2 output = new BAPI2();
output.nodeBAPI2().bind(output);
output.setempno(wdContext.nodeof firstBAPIoutputnode().currentURBAPIoutnodeelement.getEmpno());
wdcontext.currentBAPI2element().modelObjet().execute();
}
this execute method call in the first view table Onleadselection like as Action method .
I mean to say create method onclick() in that implementation call like this
pluin for first view to second view and
call the execute method.
{
wdthis.FirePlug();
Wdthis.wdGetCustomcontroller().execute() method.
}
This should works
If any query let me know.
Thaks
Mandapati
Message was edited by: Mandapati Nageswara Rao
Hi,
First BAPI is Z_WAPI_WRAPPER.
SecondBAPI is SAP_WAPI_GET_WORKITEM_DETAIL .
In custom/component controller create a execute method.
this method implementation is
execute()
{
SAP_WAPI_GET_WORKITEM_DETAIL output = new SAP_WAPI_GET_WORKITEM_DETAIL ();
wdContext.currentSAP_WAPI_GET_WORKITEM_DETAIL().bind(output);
output.setwi_id(wdContext.node<firstBAPIOutputNode>().currentNodeSAP_WAPI_GET_WORKITEM_DETAILElement().getwi_id();
wdcontext.currentSAP_WAPI_GET_WORKITEM_DETAILElement().modelObject().execute();
wdcontext.nodeSAP_WAPI_GET_WORKITEM_DETAILOutput().invalidate();
}
After this u can goto ur first view outline and click the table and goto the properties.In the Properties u can find OnLeadSelection there u create a action method for plug-in pass from first view to second view.
u need to give inbound and outbound plugins
Let us say that method is Onclick()
{
wdThis.Fireplug();
wdThis.wdGetController().execute();
}
U can implement like this .
thanks
Mandapati
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.