on 12-31-2005 10:18 AM
hi
I have two BAPIs used by my application and my first BAPI is being called after I give input parameters in the first screen.
Now on calling first BAPI, the results are being displayed in the table format in second screen, now on selecting any row from that table, that should take the input for tha secind BAPI and call the second BAPI.
I am not able to get through that.
Can anybody help me in this issue.
thanks and regards
gopi krishna
closing the ticket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Armin
The problem is not yet solved.
I am still not able to call the second BAPI.
can you guide me further
thanks and regards
gopi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Armin
I am calling the particular BAPI for that particular onLeadSelection Action.
I am not sure whether the method is being called or not.
I am passing the particular order_number parameter but the BAPI is not being called.
yes I called invalidate() after the BAPI execute().
Maybe there is any problem in my mapping of the context.
Or should I send you my code, can you just help me if any thing has to be added.
thanks and regards
gopi
hi Bharathwaj
I am posting the complete code this one is for the execution of the second BAPI.
public void executeZ_vf_Lennox_Final( java.lang.String Sd_Doc )
{
//@@begin executeZ_vf_Lennox_Final()
try
{
// Calls remote function module BAPI_FLIGHT_GETLIST
wdContext.currentZ_vf_Lennox_InputElement().modelObject().execute();
// Synchronise the data in the context with the data in the model
wdContext.nodeI_Order_Details().invalidate();
}
catch (Exception ex)
{
// If an exception is thrown, then the stack trace will be printed
ex.printStackTrace();
wdComponentAPI.getMessageManager().reportSuccess("call BAPI2 with order number " + Sd_Doc);
}
//@@end
}
And for the action handler where I am calling the second BAPI.
public void onActioncallZ_vf_Lennox1(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActioncallZ_vf_Lennox1(ServerEvent)
wdThis.wdFirePlugToOrderStatusDetails();
wdThis.wdGetOrderStatusCustController().executeZ_vf_Lennox_Final(wdContext.nodeSales_Order_List_Output().currentSales_Order_List_OutputElement().getSd_Doc());
//wdThis.wdGetOrderStatusCustController().executeZ_vf_Lennox_Final();
//@@end
}
can u please suggest me what has to be modified.
thanks and regards
gopi
Hi,
You have passed the sd_doc value as an argument for the execute function.
Now you have take this value and set t as input for the second bapi.
<z_vf_..element>.setSd_doc(sd_doc); and then execute the function.
Check this link on how to do it..
Regards
Bharatwhaj
Message was edited by: Bharathwaj R
hi Bharathwaj
Thankd for your response.
Now in my application I am only using one custom controller, all my BAPIs binding is done in the same custome controller.
You have mentioned that we have to set the input for the second BAPI after doing this step.
<z_vf_..element>.setSd_doc(sd_doc); and then execute the function
can you tell me where exactly where this has to be done.
thanks and regards
gopi krishna
Hi Bhardwaj,
Could you pls tell me where can I bind ,call second BAPI .
Means I created Only one Customecontroller in that only I called the first BAPI. But I need the first BAPI Input as a input for the second BAPI.
For that reason Where can I Bind the second BAPI And where can i give the Input parameter To second BAPI.
How it goes dynamically .I.E Selection of pirticular link in the output table of first BAPI Result.
I have Only SearchView and Resultview and FinalView
For control CustomControlView only.
I am struk in calling dynamically pls
guide me how to solve this.
Thanks& Regards
Assign an action to the "onLeadSelect" event of the table. In the action handler, call the (component/custom) controller method that calls the BAPI.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, think about how you want to trigger the action that calls the BAPI.
Should it be triggered when
- the table row selection changes
- when some button e.g. in a toolbar is pressed
- when a link inside the table row is pressed
In the action handler (view controller method on<ActionName>), you have to get the order number that should be passed to the BAPI.
In case, you want the order number of the currently (lead-) selected table row, this is exactly the order number in the current (lead-selected) node element of the table's data source node "X":
wdContext.nodeX().currentXElement().getOrderNumber()
assuming the attribute storing the order number is named "OrderNumber".
Armin
hi Armin
Thanks for the reponse.
I have created an action on the table onLeadSelection option and I have given the fireplug to next screen and also passed the execute method of the second BAPI in that.
Now on clicking any row in the table, the order number from that particular row should be the input for the second BAPI that I have to call.
So how should I go about this, by selecting any row in the table, such that it picks the order number from that row coming from first BAPI
And then it has to be passed to the second BAPI as input.
Please suggest me as what has to be done in order to achieve that.
thanks and regards
gopi
Suppose you have a component controller method "callBAPI2" with a parameter "orderNumber" that calls the second BAPI.
First, declare a "controller usage" for the component controller from the view controller.
Doing so, you will get a method wdGet<ComponentController>() in the view controller.
In the action handler, you then call something like
wdGet<ComponentController>().callBAPI2
(
wdContext.nodeX().currentXElement().getOrderNumber()
);
where "X" is the table's data source node.
Armin
hi Armin
I have done as you said, but on clicking the row of a table the second BAPI is not being called and the table is not being populated.
So you mean to say that I have to define the second BAPI mothod with one input parameter.ie order number in this case.
Is there anything that I am missing, can you help me out.
thanks and regards
gopi
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.