Showing posts with label SAP HANA MODELLING. Show all posts
Showing posts with label SAP HANA MODELLING. Show all posts

Saturday, 18 February 2017

HANA XS Project -Maintaining HANA Repository packages

Why to maintain Packages?
  1.  It enables you to group together the artifacts you create and maintain for your application.
  2. A proper hierarchy of packages helps you to set package privileges for a specific user or role.

Basic actions as a part of Package Maintenance:
  1. Define Package Hierarchy.
    1.  Package belonging to an application development delivery unit (DU) should be organized in a clear hierarchical structure under single root package representing the vendor.
    2.  How to create it?
      1. Open SAP HANA DEVELOPMENT perspective.
      2. Choose System tab.
      3. Select Package under which you want to create new package.
        NEWàPACKAGE.
      4. In the Create Package Dialog:
        1. Enter the Name of Package (Mandatory).
        2. Enter Package Description (Optional).
        3. Specify the delivery unit that the package is assigned to (Optional).
        4. Specify a language for the package content.
        5. Assign responsibility of the package to a specific user or role.
        6. Maintain translation details.
    3. Type of Packages:
      1. Structural:
        Can contain only sub-packages.
      2. Non-Structural.
        Can contain sub-packages and objects.
  2. Default package delivered by SAP.
    1. sap
      it’s a transportable package reserved by for content delivered by SAP.
      Partners or customer must not use the sap package.
    2. system-local
      Non-transportable, structural package (and sub package).
      Content in this package is local and non-transportable.
    3. system-local.generated.
      Non-transportable, structural package for generated content.
    4. System-local.private.<user_name>
      Non transportable, structural package reserved for object that belongs to individual users.

Tuesday, 7 February 2017

HANA XS Project - How to Import a Project from HANA Repository

Why to import a project from HANA Repository?
  1. To start working on already existing project.
  2. It enables you to synchronize the local changes with the colleagues working on the objects in the imported project.
How to import a project?
  1. Open SAP HANA Studio.
  2. Open SAP HANA Development Perspective.
  3. Open Repository tab.
  4. Right Click on Package where the project is located
    and select Checkout and Import Project in the context menu.



    Note: The package which will contain project will have .project file.

  5. Select the Project to import.
  6. Select Finish.



HANA XS Project - How to Share a Project to HANA Repository

How to Share an HANA XS Project?

  1. When you share your Project, you set up a connection to the SAP HANA repository associated with a particular SAP HANA Instance.
  2. It ensure that the changes you make to project related files are visible to other team members and applications.
    Other Developer can import a shared project and work on the same files.
  3. To share a project.
    1. Open SAP HANA Studio.
    2. Open SAP HANA development Perspective.
    3. Open Project explorer tab.
    4. Right Click on Project -->Team-->Share Project.


    5. Share Project Dialog- select SAP HANA Repository for sharing.
    6. Select the package that you want associate the shared project with.
    7. Click Finish.
    8. Now, you can add project related files to the shared repository.
      These artifacts will be committed to the repository, where they reside as inactive objects until they are activated.
      To activate them, use Team -->Activate.

HANA XS:Setup a Project For SAP HANA XS.

Why we create a Project ?

  1. To group together all the artifacts you need for an application.
  2. For Version Management, sharing, and maintenance of resources.
How to create a Project?
  1. Open a SAP HANA Studio.
  2. Open a SAP HANA Development perspective.
  3. Choose Project Explorer.
  4. File -->New-->Project
    In New Project Wizard, select
    SAP HANA -->Application Development-->XS Project
  5. Enter Following Details.
    1. Shared Project.
      This is default setting.
      This will ensure continuous synchronization between your local workspace and HANA repository.
      If you choose not to share project then you share it later manually.
    2. Project Name.
      Provide the project Name.
      Since your project name should be unique therefore provide the complete path of packages where you want to save your project in HANA DB.
      For example.
      com.company.example.MyHanaXsProject

      Where com.company.example are the hierarchy of package in main HANA DB.
    3. Project Location.
      If the project is not shared then you can save it in default location.
      and can share it manually later.
    4. Working set.
      It contains the object that you work on most frequently.
    5. Repository workspace and package.
      For a shared project, you can set the project location by selecting a repository workspace and package.
      see, how to create repository workspace?

    6. Common Objects.
      For a shared project, you can include some commonly used objects in your project.
      Some of these will provide you with a basic template to begin with.
    7. Access Objects.
      For Shared Project, the access objects (.xsaccess, .xsapp) option is already checked out.

Maintain A Repository Workspace

What is a Repository in SAP HANA?
Its a local directory that you map to all (or part) of a Package Hierarchy in SAP HANA.

What happens when you check out a package from a Repository?
It copies the content of the package hierarchy to you work-space, where you can work on the files.

How to create Repository?
  1. Open SAP HANA Studio.
  2. Open SAP HANA Development Perspective.
  3. Choose Repository View.
  4. Choose Create Repository Workspace.
    1. Specify the SAP HANA system name for which you want to create a new workspace.
    2. Enter Workspace Name.
    3. Specify where the workspace root directory should be located on your local file system.
       
    4. Finish.
  5. Status of Workspace.
    1. Yellow Database Icon:
      An Inactive workspace exist in repository.
    2. Yellow Database Icon with blue check mark.
      An Inactive workspace has been imported to your local file system and the content has been checked out from the repository.
  6. Remove the Workspace.
    1. Select the Workspace which you want to remove.
    2. Choose the below Workspace-deletion mode.
      1. Delete
        Delete all local files and related changes to remote data.
      2. Remove from client (keep remove changes).
        Delete all local files and retain changes to remote data.
      3. Disconnect local from remote.
        Keep the workspaces but remove the workspace level from the list of workspaces displayed in repository view.
        Connection can be re-established at any time with the option
        "Import Local Repository Workspaces".