cancel
Showing results for 
Search instead for 
Did you mean: 

How fill BOPF attribute at CREATE action, when BO-entity created from Smart template UI?

0 Kudos

Hello, everybody!

I have a problem.

I have 1 BOPF object Z_APOBJECT_WD(with draft, We use a model "with draft" ) generated by CDS, and I have 2 UI Application for that BO-object. All data are stored in a 1 table, but there is one field(fieldname: AS_MODEL) that determines the difference.

I need to fill this field as 'X' at action "create entity", when I run application 1 "Manage model object", and fill with empty, when I run application 2 "Manage active object".

I do not know how to do that?! Where and How can I set BO-field depending on the running application(at creation)?

I have BOPF determination(GET_NEW_KEY), where I generate "ID number" from 2 number ranges, I have to get the numbering according to field AS_MODEL

If AS_MODEL = 'X', range 9001-9999

when AS_MODEL = empty, range 1000000-9999999 (It's just for example)

Accepted Solutions (0)

Answers (1)

Answers (1)

ivo_vollrath
Active Participant
0 Kudos

Hello Yuri,

sorry for the late reply. I have been "offline" for a while.

Unfortunately, there is not much I can tell you. Within a BOPF determination you have no way of detecting the application on top. I think you should be able to fill AS_MODEL in the OData POST request, and it should then be available in the backend. Of course, you must be aware that such requests can always be faked. So, you must not trust them when your functionality is somehow security-relevant. As I am not a UI expert I do not know how to influence the request from the UI.

Kind Regards,

Ivo