Skip to Content

Custom Key JPA Generator

Hi all,

Using CE 7.1 is possible to define a GENERATOR for a Custom Key on CAF Business Object?

Best regards

Isaías Barroso

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 27, 2008 at 06:03 AM


    CAF does not have any key generator.

    What you can do is, you can create a utility DC of java type. Create a Key Generator class that uses SAP's unique ID generator classes.

    Method to get the key will look like

    public String getUUID() {
            return this.generator.createGUID().toHexString();

    Now use this class in your caf project to generate unique keys.

    Hope this helps,


    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      Thanks by response, but i will need something like :

              @TableGenerator(name="InvTab", table="ID_GEN",
                  pkColumnName="ID_NAME", valueColumnName="ID_VAL",
              private long id;

      I wouldn't to implement it, but i will do it on the utility class.

      Best regards

      Isaías Barroso