Skip to Content
0

Is it possible to trigger action on After Save or extend event on standard button?

Jul 11, 2017 at 12:23 PM

90

avatar image
Former Member

Dear Experts,

I have an issue that I need to call custom action to fill data in another custom BO after checkout button (in Visit tab) was triggered. I realized that there is no way to extend event on standard button so I decided to find another solutions.

My problem is I need to automatic trigger my custom action after user click the Checkout button in Visit and the status of visit was changed to "Complete" (that's why I guess it should be on after save event).

Is there anyway to make this happens?

Best Regards,

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:48 PM
0

Hello Krit,

If the SAP BO is PSM-released and the extensible you can ad ABSL code to e.g. the "BeforeSave" event in which you call the resp. action.

HTH,
. Horst

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Dear Schaude,

Thanks you for your response. My target is I want to collect data only from Visit that was already "Complete". If I add ABSL within "BeforeSave". It can't notice that this Visit just be saved from edit mode or from checkout button. Moreover, I can't check "LifecycleStatusCode" in "BeforeSave" that's "Complete" or not unless the Save is triggered from Visit that already complete.

Best Regards,

0

Hello Krit,

I would assume you can read the StatusCode and check if it is set to "Complete".
If not, what elements are available ?

Bye,
. Horst

0
Former Member

Dear Horst,

When user click the checkout button that visit will change from "In process" to "Complete" so If I read StatusCode within "Before Save". The Status will still be "In process" not "Complete".

My scenario is.

1.) User click the checkout button -> 2.) Check if status is "Complete" or not -> 3.) If yes, collect this visit data to custom bo (because I only need data from a complete visit).

but what really happens is

1.) User Click the checkout button -> 2.) I can't check that this Visit is going to be "Complete" or not (Before Save) -> 3.) Do manual additional action (After this Visit already complete) with "Before Save" or etc to check this Visit Status is "Complete" or not. -> 4.) If yes, collect this visit data to custom bo (because I only need data from a complete visit).

The problem is I don't need user to do a manual action and find the way to collect data automatically.

Best Regards,

0

Hello Krit,

The SAP coding is running bevor the ABSL code is called. Therefore the status change should already happend.

Nevertheless, this looks like an request for a MDRO.
Unfortunately you can not (up to now) define a MDRO on a SAP BO, so you need some shadow BOs represents the Visits on which you define the query and the action.

HTH,
. Horst

0