cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to remove action button from ca_all_apv application

deepnain_kundra
Participant
0 Kudos

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

View Entire Topic
former_member195440
Participant
0 Kudos

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

deepnain_kundra
Participant
0 Kudos

Hi Oliver,

I want to show both (Accept and Reject) buttons in a single row in phone like below in the footer:

I don't want to display (...) 3 dots link to appear in phone.

Please advise.

Regards,

Deep Nain Kundra

former_member182874
Active Contributor
0 Kudos

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