0% found this document useful (0 votes)
89 views8 pages

OData Create 1695874478

1. The document describes the steps to configure an SAP Gateway OData service, which includes importing entity types from DDIC structures, creating entity sets, associations, and generating runtime objects. 2. Key steps are importing Sales Order and Order Status structures, creating entity sets for each, defining associations between them, generating runtime objects, and implementing create methods in the DPC extension class. 3. The service is registered using transaction IWFND/MAINT_SERVICE to make it available for use by App Connect.

Uploaded by

jayifow743
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views8 pages

OData Create 1695874478

1. The document describes the steps to configure an SAP Gateway OData service, which includes importing entity types from DDIC structures, creating entity sets, associations, and generating runtime objects. 2. Key steps are importing Sales Order and Order Status structures, creating entity sets for each, defining associations between them, generating runtime objects, and implementing create methods in the DPC extension class. 3. The service is registered using transaction IWFND/MAINT_SERVICE to make it available for use by App Connect.

Uploaded by

jayifow743
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

configure a well-defined SAP Gateway OData service

1. Display the SAP Gateway Service Builder (transaction SEGW)


2. Create a project.

3. Configure details for the project.


Chose a project name, give your project a description, select Standard generation
strategy, and specify the package. The project will be saved as a local object (Package:
$TMP or click Local Object.)

4. Create the Entity type by importing a pre-defined DDIC Structure for the Order header.
Right-click Data Model, and then select Import > DDIC Structure.

5. Choose the required structure.


If the Sales order structure is not available in your SAP system, select the ABAP structure
ZST_VBAK. Click Next.
6. Choose the required fields, and then click Next.

7. Select the key field, VBELN, and then click Finish.

8. Repeat the same sequence of steps from 4 to 7 to import the next structure, Order
Status. This may be an Item structure. The following example shows the import of
another custom structure called ZST_SO_STATUS.
a) Second Import from DDIC Structure, step 1 of 3
b) Second Import from DDIC Structure, step 2 of 3

c) Second Import from DDIC Structure, step 3 of 3

When you have completed the preceding steps, you should see the two newly created
Entity Types: Order Status and Sales Order:

9. Create the Entity Sets for the entity types that you have just created.
a) Right-click the folder Entity Sets, and then select Create.
b) Create an Entity Set SalesOrderSet for the entity type SalesOrder.

c) Create an Entity Set OrderStatusSet for the entity type OrderStatus:

You should now see the newly created entity sets:

10. Create the Associations which sets the cardinal rules, and then click Next.

11. Set the Dependent Property, Vbeln, and then click Next.
12. Click Finish.

13. Click Save.


14. Check Consistency. Right-click ZORDER_MAINTAIN and then select Check Consistency:

15. Generate runtime objects to use the service with the changes that you have made, you
need to generate the runtime objects. This creates the underlying ABAP classes that
contain all the information that you've specified in the service builder. Click the
Generate Runtime Objects icon or right-click ZORDER_MAINTAIN and then select
Generate Runtime:

16. Choose the package for the objects.

Now, you should see that the runtime objects were created successfully:

This completes the design stage. Next, you need to develop the code as part of the
implementation.
17. Expand the Runtime Artifacts folder.

18. Double-click the Data Provider Class Extension (DPC_EXT).


19. Implement the insert method:
Because more than one structure or table is involved, you need to implement the
method '/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY' for
implementing CREATE (POST) functionality for deep insert. However, for single insert,
you can use the CREATE_ENTITY method.
a) To implement the method, first click the Change Mode icon:
b) Select the method:
• Deep Insert (Nested)

• Independent Insert Implement separate CREATE ENTITY methods as shown


below:
c) After selecting the method, click the Redefine icon.

d) Add the business logic for your requirements.

After completing the logic development, the CREATE functionality is complete.

20. Register the service Use Service Registration: Transaction: /IWFND/MAINT_SERVICE

a) In the Activate and Maintain Service window, click Add Service


b) Get the Technical service name from the transaction SEGW.
The Runtime artifact which ends with 'SRV' in SEGW refers to the Technical
Service, for example:

c) In the next screen, specify the System Alias (created by Basis) and the new
service which has been created.
After that, click the Get Services icon. The result is displayed:

d) Click Add Selected Services. This adds the service so that it can be used by App
Connect.

You might also like