cancel
Showing results for 
Search instead for 
Did you mean: 

defining constraint in SAp CAPM application

anandprakash_rai2
Participant
0 Kudos
336

Hi Experts,

We need to define a constraint on one of our table/entity which we defined in the db folder of our CAPM application.

I am not ware on how to define the below Constraint on my entity in CAPM. Please provide any pointer/suggestion on how to acheive this

CONSTRAINT [PK_MARM] PRIMARY KEY CLUSTERED

(

[MATNR] ASC,

[MEINH] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

Accepted Solutions (0)

Answers (2)

Answers (2)

patricebender
Product and Topic Expert
Product and Topic Expert
0 Kudos

There is no special CDL syntax which would you allow to define a custom primary key constraint.

You may make this possible by using `@sql.prepend` or `@sql.append`, refer to this doc: https://cap.cloud.sap/docs/guides/databases#sql-prepend-append

If this doesnt help you, you may need to define this table as a HANA native artifact: https://cap.cloud.sap/docs/advanced/hana#create-native-sap-hana-object

Dinu
Active Contributor
0 Kudos
patricebender
Product and Topic Expert
Product and Topic Expert
0 Kudos

completely unrelated. This refers to foreign key constraints.

Dinu
Active Contributor
0 Kudos

True. The documentation referenced is for foreign key constraints.