SAP Odata - TECHNICAL GYAN GURU https://technicalgyanguru.com All SAP information on 1 place Tue, 01 Oct 2024 06:48:24 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 https://technicalgyanguru.com/wp-content/uploads/2024/04/cropped-cropped-technical--32x32.png SAP Odata - TECHNICAL GYAN GURU https://technicalgyanguru.com 32 32 SAP XI/PI – Invoice Attachment Transfer from ARIBA to VIM https://technicalgyanguru.com/sap-xi-pi-invoice-attachment-transfer-from-ariba-to-vim/?utm_source=rss&utm_medium=rss&utm_campaign=sap-xi-pi-invoice-attachment-transfer-from-ariba-to-vim https://technicalgyanguru.com/sap-xi-pi-invoice-attachment-transfer-from-ariba-to-vim/#respond Fri, 08 Nov 2024 08:15:00 +0000 https://technicalgyanguru.com/?p=6116 The documents that are connected to the invoice in the Ariba Network system should be transferred to the VIM system via PI Integration as part of the Ariba Supplier Invoice…

The post SAP XI/PI – Invoice Attachment Transfer from ARIBA to VIM first appeared on TECHNICAL GYAN GURU.

]]>
The documents that are connected to the invoice in the Ariba Network system should be transferred to the VIM system via PI Integration as part of the Ariba Supplier Invoice process. From there, the attachment can be viewed from the VIM workspace transaction /OPT/VIM_WP.

Only Ariba network PDF invoices are accepted by VIM, allowing them to accurately supply goods, materials, and services. Beginning with Ariba cloud integration version CI9, Ariba supports BASE64-encoded data and has included a document transfer feature.

PI Mappings and UDF’s Used:

PI mappings for attachment fields in IDOC

Below UDF’s are used in PI Mappings

1. GETATTACHMENTATTRIBUTES

2. GETATTACHMENTCONTENT

3. SPLITATTACHMENTCONTENT

S/4HANA Setting up:

The comprehensive setup instructions needed to activate the document transfer feature are listed below.

Step 1: Create custom document types beginning with Z in t-code OAC2, as indicated below.

Step 2: Next, link these custom document types to the business entity using t-code OAC3.

Type of Object: /OPT/V1001
Type of Document: Z_DOC
Link Condition: X
Link Condition: X
CA Storage System (It is “MA” according to guidelines; client-to-client variations may occur. Basis designed the storage system name as CA.)
url: TOA01
Retention as of: Null or blank

The aforementioned procedures will be carried out by BASIS, although BASIS needs feedback from the technical team.

Step 3: Ariba offers a single standard IDOC extension/ARBA/INVOICE for handling invoice attachments.

Set up WE81’s extension/ARBA/INVOICE against the INVOIC message type.

Improving the VIM Class to Manage ARIBA Documents:

As can be seen below, a Registration ID was formed in VIM against the IDoc once it had been successfully generated.

If the VIM process code is set in the WE20 partner profile, the same registration ID (ex:344) ought to show up in the VIM inbound work place tcode /OTX/PF03_WP.

After submitting the registration ID on tcode /OTX/PF03_WP, a DP document will be generated in the VIM workspace.

Standard Ariba document archiving can be triggered via the VIM class /OTX/PS03_CL_VIM_MODULE_IDOPDF method PROCESS_MODULE. This method can also be used to archive bespoke documents attached from the Ariba network.

Reading attachment content from IDOC and manually putting it in the CA content repository is how all Ariba invoices are automatically generated, following the same procedure as ordinary Ariba documents.

You can access the ARIBA documents that are connected here. Only PDF documents are supported by VIM.

Please feel free to ask questions in the space provided below if you need any help understanding any of the tutorial’s sections. We make an effort to respond to every question.

Please share your thoughts.

Let’s Web Dynpro. Part IV

The post SAP XI/PI – Invoice Attachment Transfer from ARIBA to VIM first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/sap-xi-pi-invoice-attachment-transfer-from-ariba-to-vim/feed/ 0 6116
Attachments for SAP XI/PI – ARIBA Invoices sent via PI to S/4HANA https://technicalgyanguru.com/attachments-for-sap-xi-pi-ariba-invoices-sent-via-pi-to-s-4hana/?utm_source=rss&utm_medium=rss&utm_campaign=attachments-for-sap-xi-pi-ariba-invoices-sent-via-pi-to-s-4hana https://technicalgyanguru.com/attachments-for-sap-xi-pi-ariba-invoices-sent-via-pi-to-s-4hana/#respond Thu, 07 Nov 2024 08:26:00 +0000 https://technicalgyanguru.com/?p=6119 Integration with SAP systems has never been more intriguing, especially with Ariba, Workday, Concur, Successfactors, Fieldglass, Hybris, and other satellite cloud solution vendors banging on doors every day. 🙂 I…

The post Attachments for SAP XI/PI – ARIBA Invoices sent via PI to S/4HANA first appeared on TECHNICAL GYAN GURU.

]]>
Integration with SAP systems has never been more intriguing, especially with Ariba, Workday, Concur, Successfactors, Fieldglass, Hybris, and other satellite cloud solution vendors banging on doors every day. 🙂 I just had the chance to work on a SAP PI-based ARIBA to SAP connectivity. Without SAP PI, we can also integrate Ariba with SAP. However, we’ll examine how PI functions in the midst today.

The subject has been separated into the following sections: Introduction; S4 HANA Configurations; PI Mappings and UDFs Used; and BADI Implementation.

Introduction: The documents that are connected to the invoice from the ARIBA supplier system should be transmitted to the S/4HANA system via PI connectivity so that it may be opened from the MIR4 transaction as part of the ARIBA supplier invoice process.

Drawings, photos, or documents in any format attached by the provider via the ARIBA network may be included in the invoice file format. He would be able to accurately supply goods, materials, and services with these attachments. The document transmission feature was added by ARIBA starting with cloud integration version CI9. Data encoded in BASE64 is sent and received by ARIBA.

UDFs and PI Mappings Employed:

Please refer to the PI mappings listed below for every field in the IDOC attachment segments.

Utilizing UDFs in PI mappings

Now let’s examine a few of the UDFs this interface makes use of. It should be noted that UDF stands for User Defined Function.

  • GETATTACHMENTATTRIBUTES
  • GETATTACHMENTCONTENT
  • SPLITATTACHMENTCONTENT

S/4HANA Setting up:

The comprehensive setup instructions needed to activate the document transfer feature are listed below.

Step 1: Create special document types in t-code OAC2 as indicated below:

Step 2: Next, using the ARIBA guidelines listed on page 142, link these new document types to Business object BUS2081 using t-code OAC3.

Kind of Object: BUS2081
Type of Document: Z_DOC, Z_PDF, Z_XLS
Link Condition: X
System of Storage: Z1 (It is “MA” according to guidelines; client-to-client variations may occur. Basis generated storage system name Z1)
url: TOA01
Retention as: Null or blank

The technical team must supply inputs to BASIS so that it can execute the aforementioned procedures.

Step 3: One standard IDOC extension/ARBA/INVOICE is supplied by ARIBA for handling invoice attachments.

Set up WE81’s extension/ARBA/INVOICE against the INVOIC message type.

BADI Application:

Use the BADI INVOICE_UPDATE function to implement the code.Modify Prior to Update

To retrieve the content of the invoice attachment from the archive link, use the standard ARIBA FM/ARBA/ARCHIVE_IDOC_ATTACH.

IDOC will be created with the content of the attachments as indicated below:

You can check the attachments in MIR4 transaction.

I’ve attempted to include every detail. If you are still experiencing problems, don’t hesitate to ask inquiries in the part below the comments. I shall reply to you.

The post Attachments for SAP XI/PI – ARIBA Invoices sent via PI to S/4HANA first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/attachments-for-sap-xi-pi-ariba-invoices-sent-via-pi-to-s-4hana/feed/ 0 6119
Section 16 of CDS: Utilizing Built-In Features in CDS IV https://technicalgyanguru.com/section-16-of-cds-utilizing-built-in-features-in-cds-iv/?utm_source=rss&utm_medium=rss&utm_campaign=section-16-of-cds-utilizing-built-in-features-in-cds-iv https://technicalgyanguru.com/section-16-of-cds-utilizing-built-in-features-in-cds-iv/#respond Tue, 05 Nov 2024 06:27:00 +0000 https://technicalgyanguru.com/?p=5493 We have discussed SQL functions, unit/currency conversion functions, and date functions in our Built In Functions in CDS section; however, we did not cover the Time function. We’ll pick up…

The post Section 16 of CDS: Utilizing Built-In Features in CDS IV first appeared on TECHNICAL GYAN GURU.

]]>

We have discussed SQL functions, unit/currency conversion functions, and date functions in our Built In Functions in CDS section; however, we did not cover the Time function. We’ll pick up where we left off in the previous post today. Now let’s dive right into what may be the final installment of this Built-In Functions series.

Let’s go over the Time Functions in this post. It will be quite easy to go through the four functions indicated below with Time.

  • Time Is Valid
    It is necessary to pass a single parameter. It is imperative that the field type be TIMESTAMP – DEC – Length 15.The remaining features of this blog operate in the same way.
  • UTC HOUR
    The best thing about this is that no parameters are required. Provides the Coordinated Universal Time (UTC) by default.
  • ADD A SLEEP
    The result is the total of the numbers when, as the name implies, we add the seconds to the timestamp.
  • SLITS IN BETWEEN
    We had days between in our last issue, remember? There are now seconds in between.

It is improper to violate customs.How come the Code isn’t available to us?

@AbapCatalog.sqlViewName: 'ZTM_FNS_SQL_V'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Time Functions'
define view ZTM_FNS as select from zdt_concr_rept as a{
    key a.rpt_id as RPT_Comment,
    a.ztime as RPT_TMSP,
    tstmp_is_valid(a.ztime) as valid1,   
    tstmp_current_utctimestamp() as UTC_TM,
    tstmp_add_seconds(a.ztime, cast( 15 as abap.dec(15,0) ), 'INITIAL') as ADDED_TM,    
    //TESTING DIFFERENCE OF SECONDS
    tstmp_seconds_between(tstmp_current_utctimestamp(), a.ztime , 'FAIL') as difference 
}

Nothing that demands particular attention.

If you find this boring, check out our extra section. This section will link to all other worlds as well as SAP.

OData: Many of you have heard of this lovely idea and have worked with it.However, what if CDS was connected to the outside world (apart from SAP) via OData service?

Also Consider: ABAP on HANA Course

@AbapCatalog.sqlViewName: 'ZTYPE_CAST_V'
 @AbapCatalog.compiler.compareFilter: true
 @AbapCatalog.preserveKey: true
 @AccessControl.authorizationCheck: #NOT_REQUIRED
 @EndUserText.label: 'Type Casting Examples'
 define view ZTYPE_CAST
   as select from sflight as a
 {
   key a.carrid,
   key a.connid as originalConn,
   key a.fldate,
       cast (a.connid as abap.char(2) )
       as castedConn,
       a.planetype as originalType,
       cast( a.planetype as abap.char( 2 ) )
                   as castedType
 }
Observe keenly there are two warnings. Let’s see what are they.

So effectively two things needs to be kept in mind.

  1. Apply Type casting only when changing from one data type to other. If it is done within same data type the very purpose is not served.
  2. Need to be very careful such that no harm is done to data.

Output validates the earlier assertion.

Another insightful lesson for me! I attempted to insert castConn, the non-primary key, before fldate. However, SAP denied me access.

This concludes the functions series and Ishan’s specific request.

Return to CDS View via OData exposure. At technicalgyanguru, we already have a few articles on OData from CDS Annotations.However, our next piece on OData from CDS will be unique and captivating.Because there isn’t much room here, you’ll have to wait a little while longer. We pledge not to bother you too much and to deliver it in as little as two days. Please continue to watch.

We really appreciate your input. Kindly, provide your feedback down below.

WSDL file in SAP – Part I

The post Section 16 of CDS: Utilizing Built-In Features in CDS IV first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/section-16-of-cds-utilizing-built-in-features-in-cds-iv/feed/ 0 5493
“A Strategic View of SAP Fiori: Insights from a Space Level Perspective” https://technicalgyanguru.com/a-strategic-view-of-sap-fiori-insights-from-a-space-level-perspective/?utm_source=rss&utm_medium=rss&utm_campaign=a-strategic-view-of-sap-fiori-insights-from-a-space-level-perspective https://technicalgyanguru.com/a-strategic-view-of-sap-fiori-insights-from-a-space-level-perspective/#respond Tue, 01 Oct 2024 06:48:22 +0000 https://technicalgyanguru.com/?p=4693 Discover the high-level benefits of SAP Fiori with our in-depth guide. Explore its design principles, the SAP Fiori Apps Library, and how it integrates with existing systems to enhance business…

The post “A Strategic View of SAP Fiori: Insights from a Space Level Perspective” first appeared on TECHNICAL GYAN GURU.

]]>
Discover the high-level benefits of SAP Fiori with our in-depth guide. Explore its design principles, the SAP Fiori Apps Library, and how it integrates with existing systems to enhance business performance and user experience.

In today’s digital era, optimizing user experience is crucial for enhancing business processes and operational efficiency. SAP Fiori represents a significant advancement in this realm, offering a modern, role-based approach to user interfaces within SAP systems. This blog post provides a comprehensive overview of SAP Fiori from a strategic, space-level perspective, exploring its core functionalities, benefits, and integration possibilities. By understanding SAP Fiori at this high level, organizations can better appreciate how it transforms user interaction and boosts overall productivity.

What is SAP Fiori? Unpacking the Concept

At its core, SAP Fiori is a design framework that redefines the user experience for SAP applications. By integrating modern design principles with SAP’s powerful backend systems, SAP Fiori offers a streamlined, intuitive interface that significantly enhances usability. It focuses on delivering a consistent and responsive experience across various devices, whether on desktop, tablet, or mobile.

SAP Fiori is built on the principle of simplicity, aiming to simplify user interactions with complex SAP systems. It achieves this by providing role-based access, which ensures that users see only the information and functionalities relevant to their specific roles. This tailored approach not only improves efficiency but also reduces the learning curve associated with traditional SAP interfaces.

Exploring the SAP Fiori Apps Library: A Treasure Trove of Functionality

The SAP Fiori Apps Library is a central component of the SAP Fiori ecosystem, offering a comprehensive repository of pre-built applications designed to meet diverse business needs. This library categorizes applications into three main types: transactional apps, analytical apps, and fact sheets.

Transactional apps facilitate daily business tasks such as processing orders or managing inventory. They streamline these processes by offering a simplified and user-friendly interface. Analytical apps, on the other hand, provide insights and reports based on real-time data, enabling informed decision-making. Fact sheets offer detailed information on business objects, such as customers or products, giving users a comprehensive view of critical data.

By leveraging the SAP Fiori Apps Library, organizations can quickly identify and deploy applications that align with their business requirements. This library not only accelerates implementation but also ensures that users have access to the tools they need to perform their roles effectively.

Navigating the SAP Fiori Library: An Essential Guide

The SAP Fiori Library, accessible via the SAP Fiori Launchpad, serves as the gateway to exploring and managing SAP Fiori applications. This library provides a user-friendly interface that allows users to search for, explore, and launch various applications based on their roles and needs.

Users can browse through the SAP Fiori Library by categories or use the search functionality to find specific apps. Each application in the library is accompanied by detailed information, including its purpose, functionalities, and prerequisites. Administrators can also use the library to manage application deployment, configure settings, and monitor performance.

Effective navigation of the SAP Fiori Library is crucial for maximizing the benefits of SAP Fiori. By familiarizing themselves with the library’s features and functionalities, users and administrators can ensure a seamless experience and optimize their use of SAP Fiori applications.

The Role-Based Approach: Tailoring SAP Fiori to User Needs

A defining feature of SAP Fiori is its role-based approach, which tailors the user experience to specific roles within an organization. This approach ensures that users see only the information and functionalities relevant to their responsibilities, reducing complexity and improving efficiency.

For instance, a finance manager might have access to applications related to financial reporting and budget management, while a sales representative would see applications focused on sales orders and customer interactions. This targeted presentation of information helps users focus on their tasks without being overwhelmed by irrelevant data or features.

By adopting a role-based approach, SAP Fiori enhances productivity and streamlines workflows. Users can complete tasks more efficiently, and organizations can benefit from a more organized and user-centric interface.

SAP Fiori Login: Accessing Your Applications Securely

Accessing SAP Fiori applications involves a straightforward login process designed to ensure secure and personalized access. The SAP Fiori login page is the entry point to the SAP Fiori Launchpad, where users can access their assigned applications and services.

Users need to enter their credentials, including a username and password, to log in. Depending on the organization’s security protocols, additional authentication methods such as single sign-on (SSO) or two-factor authentication (2FA) may be required. Once logged in, users are directed to the SAP Fiori Launchpad, where they can access their role-specific applications and begin their tasks.

The SAP Fiori login process is designed to provide both security and convenience, ensuring that users can easily access their applications while maintaining the integrity of the system.

Design Principles of SAP Fiori: Enhancing User Experience

SAP Fiori’s design principles are foundational to its success in transforming user experiences. These principles include simplicity, coherence, and responsiveness, each contributing to a more effective and engaging interface.

Simplicity is about reducing complexity by presenting only the necessary information and actions. Coherence ensures a consistent look and feel across all applications, making it easier for users to navigate and use different apps. Responsiveness guarantees that applications work seamlessly across various devices and screen sizes.

By adhering to these design principles, SAP Fiori delivers a user experience that is both visually appealing and highly functional. This focus on user-centric design helps organizations achieve higher levels of user satisfaction and operational efficiency.

Integrating SAP Fiori with Existing Systems: Best Practices

Integrating SAP Fiori with existing SAP systems is a critical step in realizing its full potential. Effective integration ensures that SAP Fiori applications can interact seamlessly with other SAP modules and data sources, providing a unified user experience.

Organizations should work closely with their IT teams or SAP consultants to facilitate integration. This process may involve setting up interfaces, configuring data exchanges, and testing application performance. Successful integration allows organizations to leverage SAP Fiori’s capabilities fully, enhancing their overall SAP ecosystem.

Best practices for integration include thorough planning, comprehensive testing, and ongoing monitoring. By following these practices, organizations can ensure that their SAP Fiori implementation is smooth and effective.

Future Trends in SAP Fiori: What to Expect

As technology continues to evolve, so too does SAP Fiori. Future trends in SAP Fiori may include advancements in artificial intelligence (AI), machine learning, and advanced analytics. These innovations aim to further enhance user experience by providing intelligent recommendations, predictive insights, and automated workflows.

Additionally, SAP Fiori is likely to continue its focus on mobile and cloud-based solutions, enabling users to access applications and data from anywhere and on any device. Staying informed about these trends will help organizations remain competitive and fully leverage the capabilities of SAP Fiori.

Conclusion

SAP Fiori represents a significant leap forward in user experience design for SAP applications. By providing a modern, role-based, and responsive interface, SAP Fiori enhances productivity and user satisfaction. Understanding SAP Fiori from a high-level perspective helps organizations appreciate its transformative impact on business operations.

From exploring the SAP Fiori Apps Library to integrating with existing systems, SAP Fiori offers a range of features and benefits designed to optimize user interactions and streamline processes.


you may be interested in this blog here

Discover Joy Worksheet for Pre Primary English PDF Free Download

Getting the Best Salesforce Partner: A Tutorial for Business Growth

The post “A Strategic View of SAP Fiori: Insights from a Space Level Perspective” first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/a-strategic-view-of-sap-fiori-insights-from-a-space-level-perspective/feed/ 0 4693
SAP Netweaver Gateway and SAP OData. Section IV. OData Service Association and Navigation https://technicalgyanguru.com/sap-netweaver-gateway-and-sap-odata-section-iv-odata-service-association-and-navigation/?utm_source=rss&utm_medium=rss&utm_campaign=sap-netweaver-gateway-and-sap-odata-section-iv-odata-service-association-and-navigation https://technicalgyanguru.com/sap-netweaver-gateway-and-sap-odata-section-iv-odata-service-association-and-navigation/#respond Thu, 12 Sep 2024 06:28:00 +0000 https://technicalgyanguru.com/?p=5022 As of our third tutorial in the series on SAP Netweaver Gateway and OData, our data models are built to independently retrieve item data from EKPO and header data from…

The post SAP Netweaver Gateway and SAP OData. Section IV. OData Service Association and Navigation first appeared on TECHNICAL GYAN GURU.

]]>
 SAP Netweaver Gateway and SAP OData. Section IV. OData Service Association and Navigation

As of our third tutorial in the series on SAP Netweaver Gateway and OData, our data models are built to independently retrieve item data from EKPO and header data from EKKO.Currently, POHeaderSet and POItemSet are not communicating with one another. Real-world applications require us to modify item data in response to input from other entity types or the header, and vice versa.Therefore, there needs to be a link that connects them. The term “Associations” in SAP Netweaver Gateway language refers to the creation of Associations and Navigation Properties between the data model’s entity types.

Association explains how Entity Types are related to one another. A Navigation Property of the Entity Type is likewise generated with the creation of an Association.

Steps to implement Association in OData

Let’s establish a single Association and examine its appearance within the system. Locate the Association folder and perform a right-click to create your first association. Go to t-code SEGW, select Data Model.

Understanding Association vs AssociationSet vs Navigation Property

Between the Principal Entity and Dependent Entity, you must define the Key (Dependent Property, similar to the Foreign Key idea).

In the event that we require AssociationSet fo

What is Association Set?
What is OData?

The link between Entities, Navigation Property, Association, and AssociationSet is summarized in the figure below.

OData

Are definitions of Navigation Properties, Association, and Association Set still necessary?

\NavigationProperty Name=”HeadToItemNav” Relationship=”ZGW_PO_SRV” is the navigation property.Head to Item Ass.
Role From=”FromRole_HeadToItemAss”
/> ToRole=”ToRole_HeadToItemAss”

The code snippet and image above demonstrate that entity types have defined navigation properties. Through Relationship, it indicates the association kind. It also uses FromRole and ToRole to specify the flow direction. To put it briefly, Navigation Property facilitates movement between associations.

Link: – \Link Name=”HeadToItemAss” SAP:content-version=”1″

Link: - \Link Name="HeadToItemAss" <End Type="ZGW_PO_SRV.POHeader" Multiplicity="1" Role="FromRole_HeadToItemAss" /> SAP:content-version="1"
<End Type="ZGW_PO_SRV.POItem" Role="ToRole_HeadToItemAss" Multiplicity="*" />
- <PropertyRef Name="Ebeln" /> - <Principal Role="FromRole_HeadToItemAss"> - <ReferentialConstraint>
- <PropertyRef Name="Ebeln" /> <Dependent Role="ToRole_HeadToItemAss"> </Dependent> </ReferentialConstraint> </Association>

In a similar vein, the code and image above verify that Association gives the FromRole and ToRole their cardinality (multiplicity).It then has a Referential Constraints field that informs the Key field about the connection between the dependent and primary entities. The direction of the data flow is specified by the FromRole and ToRole. In conclusion, the relationship name between two entity types—one being the origin and the other the destination point—is called an association.

– “HeadToItemAssSet” is the AssociationSet Name.
Link=”ZGW_PO_SRV.HeadToItemAss” sap:creatable set to “false”
sap:updatable set to “false” SAP displays as “false” sap:content-version=”1″>

The association between entity sets is called an association set. This serves as the arrays’ (tables’) connection. The Association Set points to the Association, as the image above makes evident. To put it simply, AssociationSet possesses every attribute (cardinality, direction of data flow.

Navigation in SAPNWGW

Have you noticed that the metadata bears the Entity Type’s Navigation Property signature? For the definition of the Association and AssociationSet, see the response below as well.

SAP Netweaver Gateway

In our earlier articles, we have been retrieving one entry from the PO Header using the URI below. You would see there is an extra link if you were to run the same URI again.The Query Option with the Navigation Property we previously defined is present in this additional new link.

URI: (‘4500002012’)/sap/opu/odata/sap/ZGW_PO_SRV

Navigation Property
navigate

A new href link is displayed in the POHeaderSet result when the Query option is set to one primary key. It suggests that by adding the Navigation Property and selecting the Query option, we may go to the PO Item data.

You can see an alternate URL to obtain the specific PO item by expanding one of the results above. The POHeaderSet query’s result displays the alternate link to obtain a single PO item.Is that not helpful?

SAP Netweaver Gateway and OData

Question: What distinguishes the two URIs below from one another?
SAP OPU OData SAP ZGW_PO_SRV POHeaderSet(‘4500001729’)/HeadToItemNav is the first URL.
URI 2: “4500001729” in /sap/opu/odata/sap/ZGW_PO_SRV/POHeaderSet?$expand=NavigateToItem

The first URI would simply retrieve item level records, whereas the second URI would retrieve item level entries along with header level data display. To put it briefly, the $expand query option shows the dependent entity type and expands the Header information with the assistance of the Navigation property.

We have currently observed data flow from Header to Item.Allow us to present an additional entity type that has the potential to be linked to the item. We will construct a navigation link between this new entity type and POItem Entity. This new entity type’s data would be created, updated, and erased.To put it succinctly, this new entity type and entity set would serve as our guinea pigs for our upcoming CRUD operations.

Let’s now build the new EntitySet, zekkoekpoSet, and Entity Type, zekkoekpo.Please verify that the entity type zekkoekpo was purposefully generated in lower case to demonstrate the case sensitivity of the entity names.You can review the problems that could occur because of the name case in later posts.

You ought to be aware of the following move by now. For this new e
ntity type, Zekkoekpo, we must put into practice the METHODs of the Operations that we wish to apply. All of our work up to this point has been in vain if you still do not know how to apply and redefine the methods.

SEGW

To examine how to implement and redefine the Data Provider Class Methods, please refer to the OData articles, Create Your first OData Service and URIs.

Two methods that contain 0 lines of code have been redefined. Let’s examine the behavior of our OData service. Place external breakpoints at both Entity Methods for testing purposes.

Remember to re-generate your OData Project after adding or removing any components, including Entity Types.

i.. Now let’s call the URI that is meant to invoke the GetEntitySet Method.

Access Point URL: /sap/opu/odata/sap/ZGW_PO_SRV/zekkoekpoSet

Breakpoints

Verify that the EntitySet Resource triggers the GetEntitySet Method.

ii. Let’s now call the URI that will initiate the GetEntity Method.

URI: /sap/opu/odata/sap/ZGW_PO_SRV/zekkoekpoSet(Ebelp=’10’,Ebeln=’4500003480′)
As anticipated, the GetEntity Method is called upon passing the Entity’s primary keys.

We discovered that our methods operate even in the absence of code, allowing us to construct our logic.To extract data from EKKO and EKPO and enter it into our Entity Type zekkoekpo, let’s write some basic code.

OData
zekkoekposet_get_entity is the method.

ls_key_tab data TYPE /ls_request_input_data, /iwbep/s_mgw_name_value_pair ZCL_zgw_purchase_mpc is the type.ts_ and ls_zekkoekpo Zekkoekpo type, lv_ebeln TYPE lv_ebelp, ebeln Ebelp is the type.
* Obtain the values of the relevant properties.
TABLE READ it_key_tab INTO ls_key_tab WITH KEY name = "Ebeln"
lv_ebeln = ls_key_tab-value IF sy-subrc = 0. ENDIF.
* Obtain the values of the relevant properties.
READ TABLE it_key_tab INTO ls_key_tab WITH KEY name = 'Ebelp'.
lv_ebelp = ls_key_tab-value IF sy-subrc = 0. ENDIF.

In the event where both lv_ebeln and lv_ebelp are not initial.
CHOOSE A SINGLE HOMANDTT HOEBELN i\ebelp HOBUKRS HOBSART i~matnr i~werks i~meins i~menge i~loekz
WHERE h~ebeln = lv_ebeln AND i~ebelp = lv_ebelp, FROM ( ekko AS h INNER JOIN ekpo AS i ON h~ebeln = i~ebeln ) INTO er_entity.

ENDIF.

ENDMETHOD.


Now let's test this URI using the just added code.

URI: /sap/opu/odata/sap/ZGW_PO_SRV/zekkoekpoSet(Ebelp=’10’,Ebeln=’4500003480′)

So far, everything is well. Our logic is used to fetch and show the data. Let’s now establish an association between the zekkoekpo Entity Types and the POItem.


Let’s examine the metadata once more.The new Association, AssociationSet, and Navigation Property would be displayed. URI: /sap/opu/odata/sap/ZGW_PO_SRV/$metadata
Now let’s examine the Navigation Property.

Let’s say you have no idea how to use the Navigation Link in the URI to frame the Query Option. Simply frame the URI for the one POItemSet that you are already familiar with. Look for the href in the XML. All the links to obtain the same value using different URIs are available there.

Let’s now call the new Navigation Query Option URI in addition to our URI: /sap/opu/odata/sap/ZGW_PO_SRV/POItemSet(Ebeln=’4500003480′,Ebelp=’10’)/ItemToCustomNav

The fundamentals of associations, association sets, and navigation properties are as follows.To distinguish between the Navigation and Association and Association Set, try to adhere to a naming convention. The majority of us attempt to name the Association and Navigation properties similarly. Therefore, we are unsure if they are Navigation Properties or Associations when we utilize them in URIs to frame the Query Option. It is easier to recognize what you are working with when you include an identifier, such as Nav, Ass, or AssSet.

More CRUD (Create, Read, Update, Delete) operations are what I wanted to demonstrate in this piece, but I believe that chapter deserves more attention than a passing mention.

We would also explore more operation methods, such as PUT, DELETE, and POST. We have just utilized the GET Operation thus far.Our Guinea Pig Entity Type zekkoekpo will be given data to populate and brought to life. Please continue to watch.

Part V: CRUD Functions in OData Services Up Next

What more would you like to add to this article? Have you encountered any difficulties comprehending SAP Netweaver Gateway or OData? Would you like to share any actual project specifications or solutions?Do not hesitate to speak up. Kindly share your opinions in the space provided for comments.

I sincerely appreciate your time.!

you may be interested in this blog here:-

SAP S/4HANA Cloud Public Edition 2408: A Comprehensive Guide to Product Implementation

Salesforce Course Professional System Skills 

The post SAP Netweaver Gateway and SAP OData. Section IV. OData Service Association and Navigation first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/sap-netweaver-gateway-and-sap-odata-section-iv-odata-service-association-and-navigation/feed/ 0 5022
SAP Netweaver Gateway and OData. Section VI. Commonly Asked Questions https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-vi-commonly-asked-questions/?utm_source=rss&utm_medium=rss&utm_campaign=sap-netweaver-gateway-and-odata-section-vi-commonly-asked-questions https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-vi-commonly-asked-questions/#respond Tue, 10 Sep 2024 06:25:00 +0000 https://technicalgyanguru.com/?p=5031 The SAP Netweaver Gateway and OData Tutorials’ five earlier sections included practical exercises along with some technical insights. Those lessons would be helpful and sufficient for ABAPers, but in order…

The post SAP Netweaver Gateway and OData. Section VI. Commonly Asked Questions first appeared on TECHNICAL GYAN GURU.

]]>
What is OData?

The SAP Netweaver Gateway and OData Tutorials’ five earlier sections included practical exercises along with some technical insights. Those lessons would be helpful and sufficient for ABAPers, but in order to communicate what we know, there are various terms and jargons we need be aware of. We are also able to take part in the constructive conversations and debates. The frequently asked questions about the following subjects may aid in your comprehension of the terminology that have already been covered in previous sections.

Some of you may think that this article ought to be the series’ debut piece. My friend, you are correct. This subject was included in every introduction. However, at , we start by giving you the foundations and then we show you the real stuff—hands-on SAP—before beating around the bush to add further clarity.

OData was created by who?

Microsoft, 2007.

Who were the key figures in the OData standardization process?
Answer: Citrix, Progressive Software, WSO2, IBM, Microsoft, and SAP.

Is OData currently managed by Microsoft or by another entity?
The Oasis Organization (Organization for the Advancement of Structured Information Standards) currently oversees OData.

What is OData’s advantage?
Answers:

  • • OData decouples data provisioning from
  • UI designers by acting as a bridge between SAP developers and UI designers (non-SAP developers);
  • • It supports multichannel access to SAP data as it is supported by multiple platforms;
  • • It is lightweight and built on the HTTP protocol, allowing database-like access to data via the web.
  • Because OData communications are self-descriptive, any non-SAP developer can comprehend their content without the need for additional
  • The URI (Uniform Resource Identifier) is the standard address representation or resource that all players can simply access.
  • OData supports common industry-wide formats like the JSON and Atom Pub formats, which are based on XML. This facilitates learning, comprehension, connection, and consumption.

When did SAP Netweaver Gateway have its start?

SAP Netweaver Gateway: What is it?


In response, this technology offers a straightforward method of connecting to SAP Software from many platforms, contexts, and devices using widely accepted market and industry standards. Put another way, it’s a platform that, independent of existing SAP knowledge, enables access to SAP Applications using any model or programming language.

SAP Netweaver Gateway is a gateway or gate that allows the outside world to peek into SAP, as we have stated many times in all of our prior writings. Without any prior SAP experience, front-end developers of non-SAP systems can create apps that can use data from SAP with the aid of SAP Netweaver Gateway.

What distinguishes OData from OData Services?


The web protocol OData is used to retrieve and update data. It is simpler to use and comprehend because it is based on widely accepted industry standards like XML and JSON. SAP Applications and Data are accessible through OData Service, which also implements the OData protocol and exposes endpoints.

SAP Netweaver Gateway and OData

What advantages does SAP Netweaver Gateway offer?


Answer: Using OData Services, SAP Netweaver Gateway enables the provision of a single solution to numerous customers. Thus, one can avoid point-to-point solutions, which can be costly and difficult, and opt instead for SAP Netweaver Gateway and OData Service single point solutions.

  • Any device or technology can serve as the frontend; hence, backend developers (ABAPers) do not need to worry about what frontend technology or who will use their OData services. Thus, the responsibilities of front-end and back-end developers may be divided.
  • Meets all the end user expectations and business application needs of contemporary business applications.
  • SAP Netweaver Gateway installation is easy and non-disruptive (zero downtime).

What is SAP Netweaver Gateway’s architecture?


The architecture of SAP Netweaver Gateway is composed of three layers, same like that of SAP.

SAP Netweaver Gateway Tier (Heart + Middle Man) • SAP Business Suit Tier (Backend) • SAP Consumer Tier (Frontend)

Interview questions in SAP Netweaver Gateway and OData
SAP Netweaver Gateway Architecture

SAP Business Suite Tier 1
This is where the business logic and application data are located.

  • It comprises of Service Provider Implementation based on the Add-on IW_BEP (Business Enablement & Event Provisioning) and Development Tools (Service Builder, i.e. T-code SEGW).
  • In turn, Service Provider Implementation connects to the SAP Business Suit system and can connect to different SAP Interfaces, including RFCs, BAPIs, BW, HANA, and BOL.

SAP Netweaver Gateway is Tier 2

Tier:

• Supports the majority of Netweaver Gateway features and parts, such as the core component

• Serves as a conduit between the Business Suit Layer and the Consumer Layer

• Offers instruments for building and enhancing services
Comprising Runtime and Metadata Components, the Service Registry maintains the connection between the OData Service and the service’s real implementation.

One component of metadata is managed, which details the OData models that are exposed as documents in OData Services and OData Service metadata documents.

OData Library: ₧ Contains metadata unique to SAP that uses SAP Business data that is obtained from SAP Data Dictionary.

Tier 3: Consumer Tier consists of UI-centric clients, such as desktop, tablet, mobile, and web apps.

  • Capable of developing applications that may swiftly and readily consume services;
  • SAP Netweaver Gateway service consumption actually occurs at the consumer layer
  • The Consumer Layer consists of two different kinds of components.
    i) Consumer SAP Netweaver Gateway
    ii) Standard environments such as Eclipse or Microsoft Visual Studio are known as Integrated Development Environments (IDEs).

How does the web browser and SAP Netweaver Application Server communicate?


Answer: Using Internet Communication Manager (ICM).
TCP/IP (Transmission Control Protocol/Internet Protocol) is contained in ICM.

Manager of Internet Communications

This is one of the few entirely theoretical articles on Technicalgyanguru. Even if we place a greater emphasis on practical technical knowledge, we occasionally need to be able to communicate our technical ideas clearly.We are hoping that this essay would assist us in making our technical knowledge more clear.

In the following section of our SAP Netweaver Gateway and OData series, we’ll demonstrate how to leverage the SAP OData Services that we created in earlier sections in our SAPUI5 applications. Please review your concepts and re-train yourself on your SAP system until then. Not from PPTs or PDFs, but from actual SAP systems, is how Team Technicalgyanguru prefers to upload pictures.

you may be interested in this blog here:-

ABAP Test Cockpit(ATC) – Introduction and Steps

Salesforce Rainy ’24 Highlights | All You Need to Know

The post SAP Netweaver Gateway and OData. Section VI. Commonly Asked Questions first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-vi-commonly-asked-questions/feed/ 0 5031
SAP Netweaver Gateway and OData. Section VII. Help with Debugging, Trace, Cache Cleaning, and F4 https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-vii-help-with-debugging-trace-cache-cleaning-and-f4/?utm_source=rss&utm_medium=rss&utm_campaign=sap-netweaver-gateway-and-odata-section-vii-help-with-debugging-trace-cache-cleaning-and-f4 https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-vii-help-with-debugging-trace-cache-cleaning-and-f4/#respond Mon, 09 Sep 2024 06:35:00 +0000 https://technicalgyanguru.com/?p=5036 SAP Netweaver Gateway and OData. Section VII. Help with Debugging, Trace, Cache Cleaning, and F4, We anticipate that by this point, every reader is familiar with the process of creating…

The post SAP Netweaver Gateway and OData. Section VII. Help with Debugging, Trace, Cache Cleaning, and F4 first appeared on TECHNICAL GYAN GURU.

]]>
Debugging in SAP OData and SAP Netweaver Gateway Services

SAP Netweaver Gateway and OData. Section VII. Help with Debugging, Trace, Cache Cleaning, and F4, We anticipate that by this point, every reader is familiar with the process of creating projects in SEGW, mapping data models, creating services, and testing URIs. assuming you have completed the six SAP Netweaver Gateway and OData Services courses before. If not, kindly take a moment out of your hectic schedule to educate yourself over the next few days. We think that a solid understanding of OData and SAPNetweaver Gateway development ideas is a must for every ABAPer.

Our advancements would not be as straightforward as they were in the instructional exercises once we began working on actual projects.We see strange problems and failures related to code, configuration, and authorization. Being an ABAPer, we must

I’ll explain to you in this post how any developer can keep track of problems and errors in the OData models. What can be the greatest ally of an ABAPer in identifying problems and resolving errors. You guessed correctly. ABAPer relies on its Debugging and Tracing Tools for survival. Allow me to demonstrate how to trace and debug any SAP Netweaver Gateway service.

  1. OData Services Debugging

Let’s examine the basic model as it is shown below.

OData Tutorial
What is URI?

Simply add the expression “&sap-ds-debug=true” at the end if you wish to debug the data now. And you believed that “/h” was necessary. Correct? That is still something you can do.However, it is more easy to pass the “&sap-ds-debug=true” argument in the URL when debugging services.

DEBUGGING IN SAP NETWEAVER GATEWAY

Click the top-most Execute button. Additional tabs such as Body, Request, Response, Server, and Runtime appear on the screen below. Examine every tab to comprehend the functionalities. Here are a few pertinent screenshots that should go without saying.Please feel free to write us with any more queries, and we would be pleased to address them.

In the ‘Server’ section it will show the path.

ODATA Tutorial and Training

Additionally, this debug syntax can be used directly in the web server’s URI. It will assist us in debugging and understanding the flow.

See Also: End-to-End Execution of Two Typical Fiori Applications

  1. OData Trace Services

We can better grasp how to trace any OData service by following the steps below.

carry out the “/IWFND/TRACES” transaction.

Choose the two boxes above, then hit return or enter.

trace any ODATA service
fiori tutorials

Check the “Payload Trace” and “Performance Trace” tabs now.

i. Trace of Performance

SAP ABAP Tutorials

The time required for each step of the process is shown in the graphic above.

Select the “Trace Details” button and the first line.

SAP Technical

Checking the “Source Code,” “Payload Trace,” “Error Log,” and so on is possible.

To view the “Trace Details,” click the second line in the trace log.

Error Log

ii. Payload Trace

OData issues
sap technical

select on ‘HTTP Header’

OData Training

HTTP Body->Original Payload’.

original payload file

Also Read: SAPUI5 Application Consuming Custom OData Service Without Custom Javascript

  1. Clearing the Cache

Execute the “/IWFND/CACHE_CLEANUP” transaction.

/IWFND/R_MED_CACHE_CLEANUP
Cleanup of Model Cache

Occasionally, after modifying or repairing any code, the browser does not display the changes. In certain situations, the cache needs to be cleared or updated.Recall that we also experience comparable problems with Workflow modifications. Additionally, in order for the Workflow update to take effect, we must run a specific t-code. What does the t-code stand for?

  1. OData Services F4 Assistance

We might occasionally need to use the Web Server’s SAP Search Helps. In other words, we wish to incorporate search capabilities into our OData Services-consuming applications. We don’t really need to worry. As demonstrated below, achieving this is simple.

OData F4Help

OData Training for free

next move on to the relatively simple process of choosing the fields and mapping them in accordance with the requirements.

I hope that everyone who uses ABAPers will find this material useful when they begin working on genuine projects. Everybody knows that their programs can have 101 bugs or problems. But every flaw can be fixed and every problem can be solved as long as we know how to diagnose it using the Trace and Debugging Tools.

What more would you like to add to this article? Have you encountered any difficulties interpreting and utilizing OData? Would you like to share any actual project specifications or solutions? Do not hesitate to speak up. Kindly share your opinions in the space provided for comments.

you may be interested in this blog here:-

SAP v/s Oracle

How to Convert JSON Data Structure to ABAP Structure without ABAP Code or SE11?

Salesforce Rainy ’24 Highlights | All You Need to Know

The post SAP Netweaver Gateway and OData. Section VII. Help with Debugging, Trace, Cache Cleaning, and F4 first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-vii-help-with-debugging-trace-cache-cleaning-and-f4/feed/ 0 5036
SAP Netweaver Gateway and OData. Section VIII. SAP’s Adoration for OData: A Story of the Amicable ABAPer https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-viii-saps-adoration-for-odata-a-story-of-the-amicable-abaper/?utm_source=rss&utm_medium=rss&utm_campaign=sap-netweaver-gateway-and-odata-section-viii-saps-adoration-for-odata-a-story-of-the-amicable-abaper https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-viii-saps-adoration-for-odata-a-story-of-the-amicable-abaper/#respond Sat, 07 Sep 2024 06:00:00 +0000 https://technicalgyanguru.com/?p=5039 Senior SAP OData Solution Architect-EHSM at Blessey Marine, provided assistance. There once was a King who resided in a kingdom far, far away in the past.Oh! I apologize; this is…

The post SAP Netweaver Gateway and OData. Section VIII. SAP’s Adoration for OData: A Story of the Amicable ABAPer first appeared on TECHNICAL GYAN GURU.

]]>

Senior SAP OData Solution Architect-EHSM at Blessey Marine, provided assistance. There once was a King who resided in a kingdom far, far away in the past.Oh! I apologize; this is a blog on OData for SAP.

Let’s set that aside, return to reality, and begin anew.

There once was a Functional Consultant who lived in a far-off nation in the distant past.His client used a somewhat unusual sales order procedure. As challenging as it may sound, his responsibility was to set up the SAP sales order transaction so that it matched the client’s workflow.Unfortunately, whatever he did, whatever switches he activated, whichever IMG node he examined, whatever table item he modified,

After applying all of his expertise, the ABAPer wrote some enhancement code that ultimately tamed the dragon in a matter of weeks, including development, testing, etc. Now, the sales order transaction functioned just as the client had requested.

Does the tale above seem similar to you?


If you have a technical background and are from the SAP world, you should be extremely familiar with situations like this. Nothing unusual in this instance. Correct? Not many grandiose Hollywood effects.

This narrative discusses the widely used term “gap analysis.”

A GAP occurs when some SAP functional requirements cannot be satisfied with a minimal configuration.There are several approaches to use custom development to close these GAPS.

What has changed, and where is OData now?

The story isn’t quite over, though. There is still more to say than “then they live happily ever after.”So let’s carry on with the narrative.

The customer was relieved once the dragon was slain, and the consultants received accolades, until the client one day let loose another dragon on the consultant.

Much more powerful than the last time was this one. It had the name dotNet (.NET).You did really hear correctly!

The customer desired to create sales orders using their own native.NET application that they had developed internally.Remember that SAP and. NET are not the best of friends. Microsoft makes.NET, and SAP, well, that’s all SAP.

I won’t ask you why the client requested.NET support.?

It’s possible that some of its users were content with the. NET screen capabilities, desired an improved entry screen over SAP GUI, or were simply employing an experienced in-house. NET development team. We’re not sure. However, we won’t try to figure it out right now. Rather, we shall examine the subsequent events in the narrative.

Thus, the ABAPer was clueless this time. His proficiency lay in ABAP, but not in.NET. He so went to the gods of. NET, and they together planned and determined to summon the all-powerful SAP BAPI (Application Programming Interface) to the planet.

However, the tale does not finish here. Of course, how could that be, given that OData hasn’t been released yet?

Days later, both of the dragons had been tamed and were providing excellent service to the client.However, the happiness was short-lived, as the customer was purchased by a different business who intended to integrate its Java application with SAP.

Because he was more skilled this time, the ABAPer began with an enhancement, but it was unsuccessful.

Java and SAP don’t communicate with each other at all. He then considered employing the BAPI technique, but that method also proved to be unsatisfactory, so he tried a different approach. He did a great deal of reading and investigation.

Three case studies were given, as the narrative above makes clear. The client desired three methods of access to the SAP database:

i. Via ABAP directly within SAP
ii. Using RFC with.NET from SAP iii. Using JCo Connection with Java from SAP

Middlewares in SAP

A situation like this frequently occurs in software development. Initially, a straightforward demand gradually develops into an intricate web of software components, which results in the creation of what are known as point-to-point solutions.

See Also: Your Very First ABAP HANA Program

The picture below illustrates how the number of data consumers increases with system complexity in a typical SAP overall IT landscape. SAP Data is now saved across numerous storage sources, which is another difference from prior times.Data may be stored in the SAP BW system, the corporation may purchase a HANA database, and the customer may use SRM, CRM, and other systems.

What is OData?

Therefore, creating systems for data connection between each and every data consumer and data provider results in Point-2-Point systems, which present a number of difficulties like adaptability, upgrade problems, and maintenance concerns.

Consider upgrading the SAP system that underpins your organization. Then, you would need to make sure that none of the communication lines fail in a standard Point to Point system. This also entails making certain that the original users of the SAP system can still comprehend and use it. It is actually a risky supposition to make.

SAP therefore saw a pressing need to make its data available to external data consumers in a form that is:

i. Consistent across all systems, software, and customers
ii. Is traceable, trackable, and monitorable iii. Doesn’t interfere with regular business operations or daily production activities

Stated otherwise, if SAP develops a solution, it ought to guarantee that the solution functions uniformly across all platforms. We must seek for similarities between each of these systems and develop a method that takes advantage of these commonalities in order to examine consistency across systems.

It is reasonable to presume that every data consumer you look at uses the internet for their profession. Additionally, as the internet operates on the HTTP protocol, if they are all employed online, they must all be familiar with it.Therefore, if we create a technology for data communication using the HTTP protocol, then all systems and users will be able to access the data in a consistent manner.Therefore, neither the data creator nor the user would need to adopt a special development process. Everything would function exactly as it always does.

In light of this, SAP started investigating the “How to solve the data exposure” conundrum online.Alright, the solution.

Yes, as the open systems community had previously identified this problem and was investigating and experimenting with numerous potential solutions.Businesses like Adobe, Microsoft, and many more are working together on this concept. And it’s from this concept that OData has taken on its current shape.Unfortunately! The OData Entry.

You should now be able to see why SAP included OData in its development framework.

To merely address its data exposure issue, such as facilitating clients’ usage of various third-party development tools and platforms so they may access its internal SAP database in a standardized, regulated, and

It is useful to note that integration is a middleware’s main priority. It is what allows systems to communicate with one another; nevertheless, point-2-point systems are created by middlewares, which are typically quite particular in their approach. Object Request Brokers (ORBs), Java Database Connectivity (ODBC), and C++ are examples of middleware ideas with particular implementations. However, each one of them has a distinct purpose and does not fulfill the general need of establishing an internet connection to the database.

Thus, the question of how OData actually addresses this difficulty must be asked.

We must keep in mind that OData is fundamentally just an improved version of the HTTP protocol in order to comprehend this.The fundamental application of REST principles is actually found in the HTTP protocol.The acronym for Representational State Transfer is REST.

One method of enabling interoperability among computer systems on the Internet is through RESTful Web Services.

Other service types exist as well, such as WSDL and SOAP, each with advantages and disadvantages of their own.

To put it simply, REST offers a set of guidelines that any channel of communication must adhere to in order to be deemed RESTful. These tenets are:

1. Client-server
2. Stateless
3. Cacheable
4. Layered System
5. Code on Demand
6. Uniform Interface.

REST principles are commonly implemented using HTTP.It is feasible to access resources (websites and web pages) using HTTP as we frequently do because HTTP is built on REST and uses URIs. For instance, when you enter www.google.com into your browser internally, Google’s server is contacted via the http -> get method, and your browser returns Google’s home page as the result.

In addition, if the webserver is capable of supporting these actions, HTTP gives us tools to work with the backend data.

OData, on the other hand, elevates HTTP to a new level by giving application and backend server developers explicit implementation shells to create real implementations for each service, also referred to as an OData service.OData can be utilized in this fashion.

A fundamental principle of REST is that any implementation of REST should be able to communicate with the backend database server using the following four verbs: POST, PUT, GET, and DELETE.

Consequently, we may communicate with the backend data using the POST, PUT, GET, and DELETE methods provided by the HTTP protocol.

Every time you complete an online order form on a website, such as Yahoo.com or Amazon, the system internally sends out a POST request to update the database. Nevertheless, there were inconsistent lapses in this communication or in the POST techniques’ application. Put otherwise, the application designer had the final say over how the procedure was implemented. This made maintenance and standardization challenging.

OData eliminated this uncertainty by giving programmers an appropriate channel to program these HTTP methods. OData has shell techniques that allow users to access

CRUD iN OData

Alternative Terms for HTTP In order to provide appropriate implementations for the HTTP POST, GET, PUT, and DELETE methods, respectively, OData provides us with the CREATE, READ, UPDATE, and DELETE methods.
I wanted to explain why SAP must use OData in this blog post. I hope you have a decent idea of the same. I am currently writing a series on the same topic for my site, beginners-sap.com. Please feel free to visit the website to learn about the real implementation of this protocol, how to utilize SAP Netweaver Gateway, a new software component that supports OData in SAP, and examples of real-world OData implementation.

I truly appreciate your time!

How ERP helps for Manufacturing Industry?

Advance SAPUI5 – Integration of Google Maps JavaScript API with SAPUI5 App

Benefits of Using Salesforce Nonprofit Cloud for Event Planing

The post SAP Netweaver Gateway and OData. Section VIII. SAP’s Adoration for OData: A Story of the Amicable ABAPer first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-viii-saps-adoration-for-odata-a-story-of-the-amicable-abaper/feed/ 0 5039
CDS Section 3: Using annotation, expose CDS views as an OData service https://technicalgyanguru.com/cds-section-3-using-annotation-expose-cds-views-as-an-odata-service/?utm_source=rss&utm_medium=rss&utm_campaign=cds-section-3-using-annotation-expose-cds-views-as-an-odata-service https://technicalgyanguru.com/cds-section-3-using-annotation-expose-cds-views-as-an-odata-service/#respond Fri, 06 Sep 2024 06:01:00 +0000 https://technicalgyanguru.com/?p=5043 CDS Section 3: Using annotation, expose CDS views as an OData service , You are probably already familiar with CDS Views if you have been following our series on SAP…

The post CDS Section 3: Using annotation, expose CDS views as an OData service first appeared on TECHNICAL GYAN GURU.

]]>
Expose CDS View as an OData Service

CDS Section 3: Using annotation, expose CDS views as an OData service , You are probably already familiar with CDS Views if you have been following our series on SAP ABAP on HANA. If not, kindly refer to our HANA ABAP Parts IV and V, where we covered a thorough analysis of CDS Views and the introduction of Core Data Services, respectively. Additionally, you are aware that SEGW is the t-code for generating OData Projects and ultimately publishing an OData Service if you have been using our SAP Netweaver Gateway and OData Services Tutorial Course.

However, would it surprise you if we told you that you could establish your OData projects without utilizing a SEGW transaction?Today, we’ll demonstrate how to expose CDS View as an OData service using only a few annotations (i.e., SQL code).

Overview


We have thoroughly investigated the CDS perspectives with key features.Another wonderful power that CDS offers users is the ability to expose views as OData services. Importing the view you built is a traditional method of creating a service in SEGW.

This article shows how to reveal a view as a gateway service using only a subtle annotation.There’s no need to use SEGW to construct services.Sounds fantastic?See if we can make that happen.

Technical Context
We have been using Eclipse Luna for CDS views.
The gateway application has been implemented with OData version 2.

Step I: Construct a view that joins tables VBAP and MARA on the left. We have classified MARA as “prod” and VBAP as “soitem.” An outside connect on the left between

CDS View without SEGW

Fig. 1-Make the Initial View

Step II: Work with the Association to create a second view.Associations in Gateways are more similar to those in CDS perspectives. To associate or conceptually join one data source to a target data source subject to a specified condition, you build an association. In theory, associations connect two entities if data sources are thought of as OData service entities.

Association and OData Annotation


Fig. 2: Establish a view using OData annotation and association

Pay close attention to the annotation on the sixth line:True, @OData.publish.This is the article’s magic spell for today.

Step III: Our view is now prepared. We should be able to view data from the Header table (VBAK), Item table (VBAP), and Product table (MARA) using the DDL view.

DDLS view

Fig.3- DDLS

Data from the view

Data from the view in Fig. 3

Fig. 4: View of OData Exposure

Step V: To register the service generated by CDS, proceed as directed to transaction /IWFND/MAINT_SERVICE in the gateway system.

OData Exposure in View

Fig.4- OData Exposure in View

Step – V :

Find Service in /IWFND/MAINT_SERIVCE

Fig.5- Find Service in /IWFND/MAINT_SERIVCE

Step – VI :
When the service is located, select it to register and store it in the relevant package.Take note that we haven’t created any services using SEGW.The OData Annotation maintained allowed this service to be generated automatically.

Register Service

Step VII:

Use the appropriate OData query to test your service now using the /IWFND/GW_CLIENT transaction. Note that in contrast to a typical gateway, the query uses “to_{association name>” to travel to the second data set. Since vbeln was added as an association condition to our “ZTEST_ASSOC_VIEW2,” an OData query must be used to retrieve the value in order to retrieve the data.

Test Gateway Data Fetch

Fig.7: Data Fetch for Test Gateway

Restrictions
Additionally, please be aware that this service can only do GET operations.With this CDS view OData Exposure, no other CRUD actions are possible.

This technique of exposing CDS views as OData services is quite useful, even with the aforementioned limitation, since CDS views are often developed for data fetching (GET operations). This further demonstrates the strength of the Core Data Services’ annotations (New SQL).

you may be interested in this blog here:-

What is ERP?

Get Latitude and Longitude of any place using Google Map API in SAP

5 Methods for Using Your Salesforce Email Sender Reputation: An Story of Redemption

The post CDS Section 3: Using annotation, expose CDS views as an OData service first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/cds-section-3-using-annotation-expose-cds-views-as-an-odata-service/feed/ 0 5043
SAP Netweaver Gateway and OData. Section IX. How to Include Several Entities in a Single OData Service Operation https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-ix-how-to-include-several-entities-in-a-single-odata-service-operation/?utm_source=rss&utm_medium=rss&utm_campaign=sap-netweaver-gateway-and-odata-section-ix-how-to-include-several-entities-in-a-single-odata-service-operation https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-ix-how-to-include-several-entities-in-a-single-odata-service-operation/#respond Thu, 05 Sep 2024 06:15:00 +0000 https://technicalgyanguru.com/?p=5046 In SAP Netweaver and OData Services, how can I add several entities (relationship data) in a single operation? The background of today’s post: I had to update one of the…

The post SAP Netweaver Gateway and OData. Section IX. How to Include Several Entities in a Single OData Service Operation first appeared on TECHNICAL GYAN GURU.

]]>
Multiple Operations in one Call

In SAP Netweaver and OData Services, how can I add several entities (relationship data) in a single operation?

The background of today’s post: I had to update one of the entity sets with numerous entries in a single call (one header and multiple line items) while working on a Fiori PoC (Proof of Concept) for a customer. I attempted to use Create Operation on an entity set that contained many entries, but for some reason, only the first record was ever supplied to the model when the call was made. Once more, we must call the Create/edit Header operation first, followed by the Call Create/Update Items Operations call, if we wish to create or edit one header and several items.

Following some investigation, I discovered that SAP has the ability to perform these kinds of tasks in an OData Model. We refer to this as DEEP INSERT.

In order to update business data where there is a parent-child relationship and we want to create all relevant data in one call, we will learn how to define and call a DEEP INSERT operation in this exercise.

In my circumstance, I’m trying to assign multiple components to an ALM Order (SAP transaction IW31/32). extensively utilized for work orders. Therefore, in this case, the heading is an order operation and the items are components that are assigned to the order operation.

When you open an existing order in transaction IW32/33, select the Operations tab, and double click on it, you will be sent to the operation’s details page, where you can add components.

odata service
add multiple rows in an entity without having to call CREATE/UPDATE operations multiple times.

This talk aims to explain how to construct an operation in the data model that allows us to add numerous rows to an entity without requiring repeated calls to the CREATE/UPDATE procedures.

If you are unfamiliar with OData and SAP Netweaver Gateway, please see How to construct your first OData Service.

Using Services in my Proof of Concept

In my instance, the data model looks like this.

data model
OData Services
Hierarchy of business data

Notification of Services Order of Services The SR_ServiceOrder_Operation operationSR_ServiceOrder_ComponentSet is the navigation. (Reference: SR_SERVICEORDER_COMPONENTSET; Technical Name)SR_ServiceOrder_Component components

To get the technical name of the navigation that is marked in green above, take a snapshot of the DATA MODEL.

DATA MODEL for identifying the technical name

First, redefine the method “CREATE_DEEP_ENTITY” in the DPC Extension class of the backend OData service (IWBEP/IF_MGW_APPL_SRV_RUNTIME).

I hope you are familiar with CRUD functions. If not, look at OData’s CRUD Operations.

Initially, we must design a structure that precisely captures the XML representation of the data that the user interface will send.

The simple solution to determine the structure is as follows:

Gateway Client and conduct a $expand query on the header entity set.

Orderid=’4927185′,Activity=’0010′) in the SR_ServiceOrder_OperationSet (/sap/opu/odata/SAP/Z_SERVICE_REQUEST_SRV_03)?$expand=SR_ComponentSet_ServiceOrder

(In the example above, the item is the SR_ServiceOrder_ComponentSet entity set, and the header is the SR_ServiceOrder_OperationSet entity set. The data for the header entity set is located in the section with the key, (Orderid=’4927185′,Activity=’0010′).I hope that by now, everyone is aware of these. Guys, get moving! Part IX is where we are right now.

Now, in order to post data, we must call the POST method and modify the URI to point to the header. For the system to call the DEEP INSERT method, the updated URI from the user interface (frontend) should be as follows.

SAP Z Service Request SRV 03 Operation Set /sap/opu/odata/SAP/ServiceOrder_OperationSet

Please Note: Based on the URI, MODEL determines whether to call a DEEP INSERT method or a CREATE/UPDATE method. If MODEL discovers the $expand argument in the URI, it invokes the DEEP INSERT method; otherwise, it calls the standard CREATE/UPDATE action.Thus, it is imperative that the UI developer provide the URI in the correct manner.

There will be a response to this inquiry.This response can be used as a request, and a POST method can be executed.MODEL is aware that this,

IO_DATA_PROVIDER

The XML payload is obtained from the user interface (UI) using the importing parameter IO_DATA_PROVIDER in the class. A local structure that can house the data from the UI payload must be created.

We have established a structure called “zpm_sr_service_order_operation” with the following structure in response to my request.

OData handling

The field that is highlighted and intended to contain multiple entries must have the same name as the navigation’s technical name.(In this case, one-level relationship data are being discussed. The same procedure must be used if multi-level relationship data is required.

DATA MODEL for identifying the technical name

Put the reasoning in the method itself: /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY

DATA: BEGIN OF lw_data.
             INCLUDE TYPE zpm_sr_service_order_operation.
DATA: END   OF lw_data.

Please take note that the entity type of the operation (Header) in the preceding definition is represented by the Include type zpm_sr_service_order_operation, and the entity type of the components (Items) is represented by the table type zpm_sr_service_order_comp_tt. The field that would house the ITEM data—in our case, the components—should have the same name as the navigation, such as SR_ServiceOrder_ComponentSet.

TRY.
          io_data_provider->read_entry_data(
              IMPORTING
                   es_data                      = lw_data ).
          CATCH /iwbep/cx_mgw_tech_exception.    "
ENDTRY.

The code mentioned above will read the XML payload from the user interface, convert it, and then populate the lw_data local structure. The deep structure that we have already defined is the lw_data. If we dig deeper, we can create or post data in SAP by calling our own unique FM/BAPI.

The correct response data must be entered into the exporting parameter ER_DEEP_ENTITY once the BAPI/custom FM has completed the data posting. The local variable IW_DATA and the exporting parameter ER_DEEP_ENTITY will share the same structure. All we have to do is invoke the extension class’s standard method “COPY_DATA_TO_REF” like follows:

copy_data_to_ref(
         EXPORTING
                is_data = lw_data
         CHANGING
                cr_data = er_deep_entity ).
copy_data_to_ref

Note that the approach we are re-implementing is generic in nature and may be applied to a variety of DEEP INSERTs on various entity sets inside that service. As a result, we must write our code inside of an appropriate IV_ENTITY_SET_NAME check. Since the “SR_ServiceOrder_OperationSet” is the IV_ENTITY_SET_NAME in my scenario, all of my reasoning should fall into the check for this entity set.

The way this function handles exceptions is another crucial aspect. For informing the user of any errors on the user interface, the method provides two exceptions: /IWBEP/CX_MGW_BUSI_EXCEPTION & /IWBEP/CX_MGW_TECH_EXCEPTION. Use the appropriate exception class depending on whether it is a technical or business exception.

In my instance, because my API has built-in validations that allow it to return failure messages, I have handled it as

DATA:  ls_t100key TYPE scx_t100key.
ls_t100key-msgid = ls_return-id.
ls_t100key-msgno = ls_return-number.
ls_t100key-attr1 = ls_return-message.

*ls_return is the BAPI return structure

RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception
EXPORTING
textid = ls_t100key.

Step 2: UI development with the SAPUI5 viewpoint

Collect all of the input data that is needed to construct the data, then format the data using the entity set and navigation that the service maintains. If there are inconsistencies, XML cannot parse it. SAP has not disclosed any restrictions on the Deep Entity Create set. Here, we attempted to create a Deep Entity at level 4.

Data must be organized in the parent-child relationship manner as indicated below:

sapui5

Root Element CreateData (1:1)

requestChildSO: CreateData’s offspring (1:1)

functioningChild: The one making the requestChildSO (1:n)

child: the kid involved in the operationChild (in 1:n)

level n

See Also: An ABAPer’s Challenge in Building Their First SAPUI5 App.

sapui5 for abapers

It has a depth of n levels. Thus, there are no restrictions. In a similar manner, CreateData will parse XML input that is needed for creation.
Here is the call model for creating data.Root Parent Entity set is called EntitySet.

Call Model for creation of Data

Get the Source Code by Clicking Here.

I hope this post may be useful to you if you find yourself in a similar circumstance to mine.We’re all new to SAPUI5 and OData, and we pick up new skills every day.Please share with us any recent insights you may have gained from using SAP.We are pleased to publish it under your name.Every post we write is the result of extensive planning, testing, and writing.It would be greatly appreciated by our team if you could forward this link to at least five friends or coworkers who you believe would find our content useful.

you may be interested in this blog here:-

SAP ABAP OData APIs: Unlocking the Power of Integration

SAP GST Configuration Step-by-Step Guide: Mastering GST Integration in SAP

Seamless Data Integration: Mastering Data Import in Salesforce

The post SAP Netweaver Gateway and OData. Section IX. How to Include Several Entities in a Single OData Service Operation first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/sap-netweaver-gateway-and-odata-section-ix-how-to-include-several-entities-in-a-single-odata-service-operation/feed/ 0 5046