cancel
Showing results for 
Search instead for 
Did you mean: 

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

2fink-2co
Explorer
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

2fink-2co
Explorer
0 Kudos

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

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

2fink-2co
Explorer
0 Kudos

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

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

2fink-2co
Explorer
0 Kudos

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

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

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