cancel
Showing results for 
Search instead for 
Did you mean: 

Internal key assignment; enter a reuse area

benjamin_allsopp
Active Participant
0 Kudos

I'm creating a custom object with it's own data model to govern in MDG.

I want the object to be in flex mode and need a temporary key to be assigned so I can then automate a proper key at the approval stage.

However I am receiving the following message:

Internal key assignment; enter a reuse area

Message No. USMD1586

Diagnosis

A reuse active area must be specified for entity types with internal key assignments.

System Response

You cannot activate the data model.

Procedure

Change the type of key assignment, or enter a reuse active area for data model ** or entity type ******.

How can I assign temporary keys for a flex entity?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I believe that "flex" will take care of generating internal keys. You don't need to worry about it if you don't care about the value of this internal key. You can then implement your own number range when the object is being activated.

benjamin_allsopp
Active Participant
0 Kudos

That would be ideal if it were the case. It's exactly what we're looking for.

However I can't seem to achieve this without entering a reuse area...is there something I'm doing wrong?

Have created a brand new model and entity type to test this out.

Storage Type: 1

No Edition

Internal Key Assignment Only

Error =

Model ZY, entity type TEST: Missing number range object

Model ZY, entity type TEST: Deletion of entities not allowed

Model ZY, entity type TEST: Internal key assignment; enter a reuse area.


Once I change Deletion to 'Not allowed' and specify a custom number range I'm left with the error

Model ZY, entity type TEST: Internal key assignment; enter a reuse area.

And the only other options are to not have internal key assignment which means we're back to the user inputting a key because entering a number range in here generates the following error:

Data model ZY, entity type GLOBIN: Number range assignments are not supported


I'm beginning to think it's not possible

Former Member
0 Kudos

It will need some experimenting to see how that is possible. However, do you think you can leave it as "external" assignment? Then, do create a number range object that you can default into that field using a BAdI or derivation BRF+ application.

benjamin_allsopp
Active Participant
0 Kudos

I could do that, however because it is a key field the user would have to populate it with something in the first place, which would be confusing for them. I'm using Entity_Value2 as the webdynpro application so the initial screen is populating the key field and choosing the entity type and change request type (like with finance objects)

Is there any way I could default a value on the initial screen? Any BADI's that control the inital screen?

raghu3
Contributor
0 Kudos

Hi Benjamin,

Check BADI USMD_CREQUEST_UI.Method GET_DEFAULT_VALUES could be used for this purpose.

Regards,
Raghu

d024348
Employee
Employee
0 Kudos

Hi, in standard, there is no way to set up a flex entity with internal numbering and/or a temporary ID.

IIRC, the method DERIVE_KEY of BAdI USMD_UI_EVENT2 (UI ENTITY_VALUE2) provides the possibility to change a key via custom coding (if the entity is set as with a changeable key).

But the user nevertheless needs to input a unique ID first, or you need to do some modification wherever.

Regards, Ingo Bruß

benjamin_allsopp
Active Participant
0 Kudos

This is as I feared.

We will have to make it a reuse then!

Thank you for confirming.

Answers (1)

Answers (1)

former_member188878
Active Contributor
0 Kudos
benjamin_allsopp
Active Participant
0 Kudos

Thanks but that document doesn't even mention using internal keys.

It only outlines the basic set up of a data model using keys specified by the user which isn't suitable for our requirements.

We need to assign a temporary key at creation which will be converted to a real number on approval (again an automated number range).

However the system is not allowing us to set this up because it's claiming you can only do this for reuse entities. Ours needs to be a flex entity.

former_member188878
Active Contributor
0 Kudos

check the relation ship between the Entity and Attributes are created properly ,there is a check flag is available in the attributes section "key field" check it.

benjamin_allsopp
Active Participant
0 Kudos

The model etc. all work fine.

The issue is we want an internal key assigned from a number range rather than a user entered one but in trying to have internal keys is where we have a problem because it's asking for a reuse area.

If it comes to it we'll have to create a reuse area instead of flex but this isn't ideal.