on 02-20-2015 11:22 AM
Hi,
We are using the SAP standard application ca_all_apv. I have extended this application to hide the buttons from the footer.
1. Now while using the application through desktop we gets the buttons as below at the footer
2. But when we use the same application through phone then we gets the screen as below having "Approve" and "..." (3 dots) button.
3. Clicking on "..." button we gets the screen for footer as below in phone
As we now have only two buttons at the footer so we want both the buttons in a single row instead of having "..." (3 dots) button on using phone.
The code running behind this as below:
var oButtonList = {};
oButtonList.oPositiveAction = oPositiveAction;
oButtonList.oNegativeAction = oNegativeAction;
oButtonList.aButtonList = aButtonList;
if (this.extHookChangeFooterButtons) {
this.extHookChangeFooterButtons(oButtonList);
oPositiveAction = oButtonList.oPositiveAction;
oNegativeAction = oButtonList.oNegativeAction;
aButtonList = oButtonList.aButtonList;
}
this._oHeaderFooterOptions = $.extend(this._oHeaderFooterOptions, {
oPositiveAction : oPositiveAction,
oNegativeAction : oNegativeAction,
buttonList : aButtonList,
bSuppressBookmarkButton : true
});
this.setHeaderFooterOptions(this._oHeaderFooterOptions);
Can someone advise how we can achieve it?
Best Regards,
Deep
Hi,
In the extension controller create a function extHookChangeFooterButtons and get it to take one parameter like above. This means control will go through the if clause and you can adjust the buttons.
If you debug, you can see the parameter passed will look something like:
{
oPositiveAction: <ApproveBtnObj>,
oNegativeAction: <RejectBtnObj>,
aButtonList: [
<ApproveBtnObj>,
<RejectBtnObj>
]
}
From this it should be straightforward to manipulate the buttons. It is not clear what you are trying to achieve, do you want to remove both buttons? Or just one?
Hope this helps. If you post some samples of what you have tried and results if this doesn't work.
Oli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deep,
For Approve and Reject button, you have to manually configure the buttons in SPRO path.
SAP Netweaver ->Gateway service enablement ->Content ->Workflow setting ->Maintain task names and decision options.
Maintain workflow id , Step ID, and Step Description
Click on row and maintain Decision keys.
1 for Approve. Nature as Positive
2 for Reject. Nature as Negative
Save it.
You should now see , Approve (Green) and Reject(Red) in the app, and it would replace your existing ones. The ones which you see, comes up when the step type is User decision in workflow.
If the step type is Activity. You have to write one decision handling BADI for this.
No need to change anything from UI code.
Regards,
Tejas
User | Count |
---|---|
76 | |
11 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.