Show TOC Start of Content Area

Procedure documentation Defining the Model Classes as Public  Locate the document in its SAP Library structure

Use

You can use the models defined in the storage development component in the servapp development component. To do this, you must define the imported model classes as public.

Recommendation

We recommend that you create separate development components for models and the application logic.

Procedure

...

       1.      Click the model that you imported (ServiceModels) with the secondary mouse button and choose Add to Public Part.

The Add Entities to Public Part window appears.

       2.      Choose New.

       3.      In the Name field, enter Modelspublic

The Purpose field must be of the Compilation type.

However, the Purpose field can have any of the following three values:

¡        Compilation – Choose this option whenever the objects from the public part of the DC being used are also required for compiling in the DC. Using the Component Build function, the DC bundles together these objects in a separate JAR archive.

¡        Assembly – Choose this option if you want to bundle the objects from the public part in the DC being used to a larger DC. This is possible together with the DCs used, and then the DC is deployed – but not in a separate archive.

The public part in this case is not required for compiling the DC used.

¡        Infrastructure – This option is not of relevance for Web Dynpro DCs. It is only important for plug-in developments.

       4.      Choose Finish.

       5.      Select Modelspublic, and choose Next.

       6.      Choose Finish.

       7.      Choose Window Open Perspective Other…

       8.      Select Development Infrastructure and choose OK.

       9.      From Component Browser,  expand local development  MyComponents and select servapp.

   10.      In Component Properties, select the Dependencies tab.

   11.      In Required DCs, choose Add.

The Adding Dependencies wizard starts.

   12.      Expand Local Development   MyComponents and choose storage.

   13.      Choose Next.

   14.      In the Required New DCs, select Modelspublic, and choose Finish.

   15.      Choose Window Open Perspective Other…

   16.      Select Applications for Laptops  and choose OK.

End of Content Area