on 07-07-2006 12:39 PM
hi all,
the scenario is--
i have executed a BAPI which would display the workitems for a particular user.
after executing the first BAPI a table will be displayed with the list of workitems. now on
choosing a particular row from the table and pressing a button would execute another BAPI which would
display more detail information about the particular workitem.
the input for the second BAPI is the workitems "Workitem ID"
my requirement is--
how to call the "Workitem ID" from the first BAPI and give it as the input value for the
second BAPI.
the BAPI's used are--
<b>SAP_WAPI_WORKITEMS_BY_TASK - First BAPI
SAP_WAPI_WORKITEM_DESCRIPTION - Second BAPI</b>
kindly give me an idea of how to call the workitem ID from the first BAPI.
please let me know if i need to be more clear
Regards,
Ajay
Hi
You can set use the new Custom controller or wite a method in the same Custom controller to execute the modelobject as you have done for the first BAPI.
Since you want to execute the second BAPI on selecting the row of the table, you have to set the parameters of the second BAPI in the action itself and then call the method to execute the model of the second BAPI which may be in the new Custom Controller or in the same Custom Controller for your first BAPI as per your design.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Here you are displating the WorkItems coming from first BAPI in the table.
You must have bound the node for the workitems(WORKLIST Iguess) to this table.
Now there is a field for WorkItem Id say WI_ID.
Now you create an action Say getWorkItemDetails and assign it to the event onAction of your Button.
In this action you can get the Work Item Id of the selected row by using following method.
String wid = wdContext.currentWorklistElement().getWI_ID();
and set this value to input parameter of you second BAPI
as
wdContext.currentSAP_WAPI_WORKITEM_DESCRIPTIONElement().setWORKITEM_ID(wid);
Or you can directly set it by
wdContext.currentSAP_WAPI_WORKITEM_DESCRIPTIONElement().setWORKITEM_ID(wdContext.currentWorklistElement().getWI_ID());
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajay,
thanks for the response.
you have rightly understood my problem.
now iam able to understand how to give the input values for the second BAPI. but do i need to create another custom controller in order to execute the second BAPI.
after getting the Workitem ID from the getWorkItemDetails Action, where should i set the input values whether in custom controller WdoInit method or in the action itself.
eagerly waiting for your replies...
Regards,
Ajay
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.