cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent update to custom table (rapid application)?

Former Member
0 Kudos

Hi Experts,

I have a question regarding update to custom table (rapid application).

Currently there's code to prevent update to the custom table in method EH_ONSAVE (when save button is clicked - error is displayed and changes will not be saved).

The issue is when Back button is clicked, pop up is shown asking whether to save the changes (standard CRM behavior). Changes is saved when Yes is clicked. ORDER_SAVE badi is not useful in this case, does anyone know how to stop it from saving?

Thanks,

Jacinth.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182421
Active Contributor
0 Kudos

Hi Jacinth,

Please take a look at the following blog:

The BADI for an AET table and a Rapid application is the same, you can also check my blog which doesn't fullfit your requeriment but has a nice collection of links

Cheers!

Luis

former_member182421
Active Contributor
0 Kudos

Another approach can be, using AET instead of rapid application to extend the one order model (let's say CRMD_ORDERADM_H or CRMD_ORDERADM_I) and then use the BADI ORDER_SAVE getting the infromation from CRM_ORDER_READ -  et_extension2 and raising the exception DO_NOT_SAVE.

Without knowing your requirement I would went for this approach as rapid application doesn't support RAW types so it will be hard/not supported to embed your view to the standard component.

Cheers!

Luis

Answers (1)

Answers (1)

deepika_chandrasekar
Active Contributor
0 Kudos

Hi,

Data loss popup will be raised in class CL_CRM_UI_FRAME_APP_CONTROLLER method LAUNCH_DATALOSS_DIALOG

Process for yes_no_cancel will be done in class CL_CRM_UI_CORE_APPL_CONTROLLER method PROCESS_DATALOSS.

Check this class methods you will get some idea. You should enhance these classes for your requirement. This methods will be called for all data loss popup cases.

Regards,

Deepika.

Former Member
0 Kudos

Hi  Deepika,

Thanks for your reply. I tried debugging these 2 classes, but couldn't see any custom class that triggers it. could you please provide more info how can i enhance this class? and where is this enhanced method can be called?

Appreciate your help,

Jacinth.