Skip to Content
0

Disable/ Enable a Button in the CustomerQuote OIF-Screen depending on custom field (Indicator)?

Jul 10, 2017 at 03:26 PM

99

avatar image

Hi all,

is it possible to enable or disable a Standard-Button in the CustomerQuote OIF-Screen depending on a custom indicator element?

I extend the CustomerQuote - BO with an indicator element. Then I enhance the OIF-Screen and display this element in the General Section.

Depending on this Indicator element, a Standard-Button should be enabled or disabled. Therefore I select the Anchor-Button in the Extensiblity Explorer in the UI-Designer and click on "Adjust Properties".
When select "Bound" in the Enable-Property, a new window opens. But there is no element shown in this list, so I can't bind an element to this Enable-Property.

Has anybody an idea why the indicator element is not shown in this list?

Thank you.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Horst Schaude
Jul 12, 2017 at 12:52 PM
0

Hello Cordula,

It is possible to add an ABSL script of the type "ActionValidation" for the resp. action.
if this validation returns false (because the indicator is set) the action is disabled.

HTH,
. Horst

Show 6 Share
10 |10000 characters needed characters left characters exceeded

Hello Horst,

I don't find an Action Validation for this event.

It's the "Follow-Up -> Sales Order" - Button.

The Event of this Button fires an Outport and the Button itself has a calculated rule for the Enable-Property, but I want to calculate a rule for myself.

Regards,

Cordula

0

Hello Cordula,

You need to create an Extension to the resp. SAP BO. In your case I suggest it will be the CustomerQuote.
Next a right-click on the xbo file will open a context menu in which you can "Create Script Files".
One of the entries in the next popup should refer to the action.

HTH,
. Horst

0

Hello Horst,

In the XBO of CustomerQuote I created script files for all possible "Action Validation"- Events. In all these events I set the return value to false.

For testing I logged on in ByD and clicked on the "Follow-Up -> Sales Order" Button, but it is still possible to create a Sales Order. No "Action Validation"-Events are executed when I clicked on this Button.

Here are some more informations:

properties of the "Follow-Up -> Sales Order" -Button:

and the responsible Event has 2 Operations:

  1. Window Save - operation
  2. FireOutport - operation

Thank you for your help.

Best regards,
Cordula

tacsw.png (252.6 kB)
0

Hello Cordula,

As you reported the event has 2 operators, but none of them are actions.
So, the action validations can not applied to them.

If the UI already triggers the SalesOrder creation I am sorry, but there is no way to intercept this.
Maybe you can code something at the SalesOrder detecting the creation?

Bye,
. Horst

0

Hi Horst,

thank you for your help.

I find no Action-Validation to intercept the creation of the SalesOrder.

I create code in the ValidationOnSave-Event to interrupt the Save, but this is too late. In the CustomerQuote you can click on the "Followup->SalesOrder" - Button. A SalesOrder is created and you can edit it. Once you click on "Save" then the error message is shown.

Isn't it possible to disable the Button? I can set the "Enable"-Property of the Button to true or false, but isn't it possible to bound it to an element?

Best Regards,

Cordula

0

Hello Cordula,

Within the Extensibility Explorer is in principle possible to bind such properties as (in)visible, (in)active, mandatory, ... to an Indicator typed element.
Normally this is an Extension element at the SAP BO which is filled acc. the required purpose.

HTH,
. Horst

0