cancel
Showing results for 
Search instead for 
Did you mean: 

Check fields at save

wolfgang_brunneder
Participant
0 Kudos

Hi cprojects experts,

My requirement is to check if a project role contains one or more BP when the user clicks the save button (if not i'd like to display an error message). I've tried badi DPR_ATTRIBUTES (methods VERIFY_ATTRIBUTES, CHECK, CHANGE_CHECK) and DPR_EVENTS (with filter ON_IF_DPR_COMMON_CHANGED). Unfortunately the badi implementations get triggered each time a field is changed.

Is there another badi which only gets triggered at click at the save button? Or is there a possibility to find out if the save button was clicked using the above mentioned badis?

I appreciate any hint!

Kind Regards

Wolfgang Brunneder

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Under the Resources tab in cProjects, you'd see the role and the BP assigned to the role. As long as the role has not been staffed, and/or as long as the assignment is for 0 days/hrs, the red icon (under status tab) indicates this fact.

Not too sure of this works out for you. But this indicates the fact that you are looking for.

wolfgang_brunneder
Participant
0 Kudos

Thanks for your reply!

But project must not be saved if a role has no BP assigned - thus i have to send an error message!

former_member201206
Active Contributor
0 Kudos

Hi Wolfgang,

a customer own subsystem should be the 'modification free' soluation for your case. Please take a look th example codes

CL_DPR_DEMO_SUBSYSTEM, which you can abort the save and raise error.

I think, for your case the method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~PREPARE_TO_SAVE is relevant.

Regarding how to create a customer subsystem.

I think, what important is to create a Z class, which implement the both interface IF_DPR_APPL_PLUG_IN_SUBSYSTEM &

IF_DPR_APPL_BOOTSTRAP_MEMBE, and adjust the parameter SR_INSTANCE with your own class name. After then the program will search all the active class, which implemented the interfaces and call one after another.

Kind regards,

Zhenbo