cancel
Showing results for 
Search instead for 
Did you mean: 

Used DC. API or SDA?

Former Member
0 Kudos

Hello,

When adding a component as a Public Part, it gives a choice either to use it as an API, or to be compiled to SDA.

What seems to be the difference between the two? Isn't it that when it is provided as an API, it will still be packaged as an SDA?

Also, if it is provided as an API, how do I package the DC project?

regards,

arnold

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Purpose Provides an API for developing/compiling other DCs

The objects (symbols, classes, and so on) in the public part of a component are needed to compile the other component. In this case, when defining the public part, you assign the purpose Provides an API for developing/compiling other DCs to it.

To a public part of type Provides an API for developing/compiling other DCs, add only those objects that you want to be visible on the outside, such as interfaces, but never their implementations.

In the Properties view, this purpose is named compilation. You can change the purpose in this view.

Purpose Can be packaged into other build results (e.g. SDAs)

The objects (symbols, classes, and so on) in the public part of a component are assembled to a larger unit by the other component, such as an archive or an application. In this case, when you define the public part, you assign the purpose Can be packaged into other build results (e.g. SDAs) to it.

Usually, public parts of type Can be packaged into other build results (e.g. SDAs) also contain some private objects of their component, for example, the interfaces and their implementation.

You cannot use a public part of this type for the compilation of a component, and vice versa. However, you can assign two public parts of different types to a component, which both contain the same development objects.

In the Properties view, this purpose is named assembly. You can change the purpose in this view.

Example

A public part PP of type Provides an API for developing/compiling other DCs (compilation) contains a Java interface api and a factory class factory, which creates instances of api. When compiling the component, a Java archive named PP.jar is created, which contains the .class files of api and factory, but not the implementation api_impl of the api interface.

Another component can use this public part and is compiled without any problems, even though the public part does not contain api_impl. At runtime, however, api_impl is required. Therefore, the component defines a second public part PP1 of type Can be packaged into other build results (e.g. SDAs) (assembly) and assigns api, api_impl and factory to it. When compiling the component, a Java archive named PP1.jar is created, which contains the .class files of api, api_impl and factory. You can now wrap this archive in, for example, a J2EE application and download both of them into a runtime system.

http://help.sap.com/saphelp_nw04/helpdata/en/80/096744c271f8408bae38a49d556c80/content.htm

Regards'

Ayyapparaj

Former Member
0 Kudos

Hello Ayyapparaj,

Thank you for the reply. Now I get it.

regards,

arnold

Answers (0)