cancel
Showing results for 
Search instead for 
Did you mean: 

Forbid saving DIR

Former Member
0 Kudos

Hi together

We want to forbid saving DIR if a specific field has the wrong entry. Could you recommend a BADI to us in which we can forbid this?

The user should be able to change the entry after he/she has tried to save.

Thank you very much.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi we have chosen the method that the transaction stops and the user has to execute the transaction again. (we need it now)

But thank you anyway

Greetz

Former Member
0 Kudos

Thank you very much! I have already tried this badi with the "before save" methode, but it doesn´t work like we want

When I´m taking the Message-Types E, I, S and W, a information appears but you can still save this option.

When I´m taking the Message Types A nad X, an error pop-up appears and the transaction stops -> You have to insert all fields again.

We would like to have the possibility that the user can change the class without any losses before he is saving the DIR. BUT he should not be able to save the DIR with the wrong security class.

Former Member
0 Kudos

Hi N K,

thank you very much for your respond. In detail:

We have insert a new register in CV01N (etc.) for our company. In this register, we have assigned a new field "Security Class". Should the user create oder change a DIR with the security class "secret" or "top secret" he should not be able to attach a file or to save the DIR.

I have already block the possibility to attach a new file:

if tcode = 'CV02'.

if draw-zzsec_class = 'SECRET'

OR draw-zzsec_class = 'TOP SECRET'.

MESSAGE E011(ZDOK).

else.

endif.

endif.

But now I need a option to forbid saving the DIR if the user choose abovementioned security classes. I have found two possibilites:

1. the user gets a information that he should not take this both classes. -> The user have still the possibility to save!

2. the user be dismissed from the transaction. -> we don´t like this possibility.

So, is it possible to forbid saving without dismissing the user from the transaction?

I hope now it is clearer

Former Member
0 Kudos

Hi Kristin,

Try implementing DOCUMENT_MAIN01 badi; method - BEFORE_SAVE and provide the checks you want here.

Hope this helps.

regards

N K

Former Member
0 Kudos

Hello Kristin Hafner,

If you are talking of the data entry fields such as classification entries (CTO4 & CLO1) you can restrict and validate the values to an extent. If you are looking at validating a description etc it is not possible unless you automate it. Please let us know what "field entry" you are trying to validate before saving the DIR in more detail.

hope this gets you started to think about characteristics if you have not already explored it.

regards

N K