Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
89 views
Create Odata Service Using RFC FM
Odata service
Uploaded by
raju.knvs1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Create Odata Service Using RFC FM For Later
Download
Save
Save Create Odata Service Using RFC FM For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
89 views
Create Odata Service Using RFC FM
Odata service
Uploaded by
raju.knvs1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Create Odata Service Using RFC FM For Later
Carousel Previous
Carousel Next
Save
Save Create Odata Service Using RFC FM For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 26
Search
Fullscreen
Made By Rahul sharma SAP ADAP Associate Consultant ‘create Odata Service Using Remote Enabled Function Module First Let's create a2 Custom RFC function Module that will be to save enquiry details and another will be to get enquiry detals for that first lets create a custom ztable for enquiry details, Name of rtable ~zenquiry_detal ©) Database table ZenauiRy DETAILS [3 view i ee ee Now let's create an RFC FM fo the above table to save data and fetch data tobe use inthe Odata Fist, e's create a function group and goto tcode se80. Give the name of Function Group and press enter.Made By Rahul sharma “SAP ABAP Associate Consultant == ‘mre | [Wea othe ARAPWorthech sams) 5 [ee Reyourentfothe nt ent ot ABA elm? r ra Create Function ou x oon 25TH DEANS Jeminod ‘Give the short text and ck on save and save it inthe package. =I (Racin —~] ff] Welcome tot a nam [B) Sv) [Are you ready for tt copcnone | catoknn Ara 2 Viszs0 gee? Stn ose > tated came Desay > we > cate "es SeesMade By Rahul sharma ‘SAP ABAP Associate Consultant Now Activate it. Now, Go to t-code se37 and give the name of Fm -zenquiry_detals. Be Ot TG A remy aaa Hose lick on create, ‘Create Function Module x netin Mot [2ENOUTRY_DETAILS Function group: [280 ENQUIRY DETATLS Shor text Enguity Detail vswe Xx ‘Give the details ke function group, shorttext and click on save. vases met oes ans same ce en =p ener roe "Now go to attributes and click on re radiobutton,Made By Rahul sharma “SAP ABAP Associate Consultant aun: = ‘Bot Ghangng Tees scepter Source cade o Te wseae © ewte nce rng ings] vane rm ncn 2 mecomontaaingis fe] aie re Son ica ca ‘Declare the Above importing parameter with pass-by value. unter most pot Chowhe Tbe Gente Snacecte Boo) coeur = one 9 ‘And Declare exporting parameter with passby value also. Now, gt the source code tab and write code ther, Ce ee ‘utes ingot Expt Cragg Tables acetone Source cdeMade By Rahul sharma ‘SAP ABAP Associate Consultant ‘ite the below code in FM suwbaes Iman eierchrgg Tables scp: souce cose "Now, Let's test our Fm whether itis saving the data in ztable or not. Fillin the above details.Made By Rahul sharma “SAP ABAP Associate Consultant ‘We can see the message that enquiry details have been successfully created. Let's check the data inthe 2table. ‘We can see the data has been successfully created. [Now let's create another FM which will get details of RFC FM, runcion Modul: ENQUIRY_DETATLS_get a 7 change {Go to 5037 give the FM name and click onthe Create button.Made By Rahul sharma ‘SAP ABAP Associate Consultant = Create Function Module x Function Moaut:* | ZENQUIRY_DETAILS_GET Function group:* [250 _ENOUIRY_DETATLS ‘Shor text * Enq Det vswe x ‘Give the details ke Function Group, and short text, and click onthe save button. ‘vos mor yor argh Tes cepts sue cae Pecsere corestoms epi ase ren te BE {0 renew betas es chp BET ‘Goto the Attribute tab and select re radiobutton to make it aremote-enabled function module. ves most pot Cimpre hes Gls Soueecse aoe = io joel sl "Now go to the Import parameter tab, and give 1D no. there. sa oo ee rere = a = a cy |Made By Rahul sharma “SAP ABAP Associate Consultant Inthe export parameter tab give the above information. Auwbutes impor Expat Charging Tebles Exceptions Source code Now go to the source code tab and writ the code there. ee ee uybtesompot ge Charge Tables eelons seucecooe Bib ‘ite the Above code. Now let's tes it.Made By Rahul sharma “SAP ABAP Associate Consultant ‘Wecan seit is fetching the above detail ‘Now we have tested both fet and they are working fine, Let's create an Oda service. es seed YJ = bk me vA \ 9 SAP Menu Goto t-code segwMade By Rahul sharma “SAP ABAP Associate Consultant | more v (Al fal fe) [1 '6) fe|[>) > (f MO_C_PRODUCT_MAINTAIN ‘lick on Create Project. Create Project. x Project [ZENQUIRY_DETATLS Description» [Enquiry Det Attributes Project Type [Senvce with SAP Annotations vy] Generation Strategy: Standard v] Object Directory Entry Package:*[STHP Person Responsible» [BEST Y Local object ‘Give the above details ike the Project name and description and save it. Now right-
wea oat D> zc testaec oF 0 ve zenourer_neranis ely Boy a BOE oy o q 0 > gue > 0 >e2 a > z_Meat__ >) Reta Mocet trom Fie ogra (0 >2i Revie >) poe Smee 'ssocu > B21 pede > |__FCIBOR mnertace jyRDo Oo >e2 Seep 1 Ea fetrence >| Sern le ES Oe ps custon a senicet Gm orn ‘A3step witard ville Opened. Fillin the details: Like entity type toca radiobutton Tye Name "Made By Rahul sharma “SAP ABAP Associate Consultant ‘lek on next button. O89 2 Bf Gower e cn owe a = acon 6 cman owe a = 8 Gnet ewe ‘Selec al the fells and dle on next. 2Made By Rahul sharma SAP ABAP associate Consultant ‘Give Key Fields to and click on finish. \ ZENQUIRY_DETAILS \ eS\Data Model’ Entity Types > == ZENQURY Co Associations v WEntiy Sets == ZENOURYSet I Here we can see now entity types and entity sets have been created. Now, expand service implementation, then zenguiryset then select getEntity and then right click and select map to datasource. 13Made By Rahul sharma veaemysm = ZENQURYSet © Senco inplenentaon Vea ZENOURYSet 9 cca dee wise 3G Gete, 28 Ups Display [Runtime & > Da Service M > (&ZKK_PO_DE] (> GzonaTa_se| Target System @ Locat © Remote RFC Destination: Data Source Attributes Type: Name: ‘Map to Data Source Go to ABAP Workbench Details “SAP ABAP Associate Consultant ‘Map to Data Source x Remote Function Gall ‘zenquiry_details_get v ® Here give the RFC type and in the name give the name of FM zenquiry details got. And click on the Continue select button propose mapping. 1“Made By Rahul sharma “SAP ABAP Associate Consultant cgjastafacae |e) Here we can see lelds automatically populate now. |WE CAN SEE WE HAVE SOME ERRORS TO RESOLVE OUR ERROR FOLLOW THE BELOW STEPS ‘As we knowin the FM -zenguiry_ detail get we have an 1D importing parameter we will add to our enquirset. FTN) (e115) sey cron cry a 22a =) I) Gi) Rrra) = cI ‘lic on INSERT ROW at the top. 15Made By Rahul sharma SAP ADAP Associate Consultant 11 pint Operon ty un) te ZENGURYSAt @ COO BH SL OE rms) fecal 38) Soy Setar Comte vie ML. bata seen Puree a] No evan © awn Insert id input sing the 4 key. ‘You wil se IN_id with the input fed as been added in zenquiryset. you want to change the direction you can double click on direction and you can change the retin, Now we can check f there is any error oF not. ‘We can see there sno error in our zenquityset Now we are done with the get data part, now it's to implement create entity to create the data, 6Made By Rahul sharma “SAP ABAP Associate Consultant He O88 FS & > (no_€ pROOUET MAINTAIN 3 Seo cero # em re cori [ae Gam <__] one SRE — feast 2 Baan otis cf eo “tm tot — Coa Y SaEAty pes | moste © osu Co Associations: s - a ee ~ Serie lemeton (™ [rZ010URY_DETALS hs ben coe nec naings Right-click on Create then map tothe data source. = Map to Data Source x ‘Target System © toeat © Remote Dota Source Atibutes ‘yp: [Remote Funcfon Call vx ‘Give the details tke the type and name of RFC FM which s creating our entry and click on continue. 7Made By Rahul sharma “SAP ABAP Associate Consultant Fae ee a senso B08 OOO GO sy Osman) Gon oso eos aio) ‘We are goting the error message now click onthe Fé button of datasource parameter ON ex_message and select ex. message. ~ a ZENOURY_DETALS, fewno ae lessace iwosue ETL MeSsAceMade By Rahul sharma ‘SAP ABAP Associate Consultant ae sae a Secmmann LOCO OSO OO CO ‘We can see datasource parameter and direction has been changed for exmessage. [Now check and generate it. ea o2ase Gia oaoeo ss am ‘lick on generate button. ¥) More Aral) [11 [e1/>) macping ot operation creste 8H oo > (WO_C_PRODUCT_WAINTAIN o [> S0_PRICING_coNorTrONRECOMg 8 |Pr- Entty Set property 1 > zap 1] enane 5 > z01_resr are ole 5g zenavtny-DeTAILS ] Nero wea mae rife oie ) SEM Tyee 5 eaesace 7S ee zehQUR 1°Made By Rahul sharma “SAP ABAP Associate Consultant = Model and Senice Defnton x Mode Provider Class ‘Bese Class Nam” [2CL_ZENOUIRY DETAILS WC Data Provider Class ss Nam: [2CL_ZENOUTRY_DETATLS_DPC_EXT ‘Bose Class Name: [2CL_ZENOUIRY_DETATLS_DPC Service Regisvation Tectiea Met Name [ZENOUIRY_DETATLS OL Teeticl Service Nane:* [ZENQUTRY_DETATLS SRV Y contin ‘lic on continue and save tin the local abject. "Now lets check the method of dpc_ext class of create_entity and get_entity.Made By Rahul sharma “SAP ABAP Associate Consultant ‘We can see sap automatically creates the code inthe create and get_entity methods [Now lets register our service. aMade By Rahul sharma ‘SAP ABAP Associate Consultant ‘lick on the local object and click on the continue button. ‘We can ee our service status turned green. ‘lick on maintain. (@ essere) [@ Dae evi] [seri Dan] (Dw “Type Teeeal serie Nave ve seve omerpzon ene ‘BEPZENGURYDETALS.GRY SV ErmuryOWe ICF Nodes system Ala (erate a A ST seme SS os a ‘Double click on service and execute the sap gateway client. Fist lets check whether our service working or notMade By Rahul sharma “SAP ABAP Associate Consultant © Comm 4 ese merken Qseernpanmm Some a MHL ‘We can see our service working fine Sede === ea [Now let's read 1 existing record and later we can use the same record to create anew record using the post option. “Toread select entity set. EntitySets (1) 1 Entry found Restrictions Use below URI to read the data, 2Made By Rahul sharma ‘SAP ABAP Associate Consultant ‘ce inn GU ATA Neo TAarpad —————— > a Here we are getting below data. a ae eRe ESS [OSes ae) ‘We can see In our able we have already entries with id 1000000000, 1000000001. [Now create a record with anew key. ‘lick on use as request ss en a ren ss ITP Respro Poss Te 1095 ms ©] Qe) Cesare] (Fenrir) (Frm) (5 Bate =p ww eatenMade By Rahul sharma ‘SAP ABAP Associate Consultant Scegoens nenaes env. anane™| 105 ‘esting of RFC EM using odata service", f12s01 58 Facet 5) “= ietaaacar + 4 Sheepi/ 1542024. denoz_com:8021/290/ pa odata/ sap/2MG0TRY_DETAL : ‘Sheep: //at2i2i.sencs-coms021/aup/pa/oasea/e4p/ Sea BETA, 4 ‘Change the 1D key and message.Made By Rahul sharma SAP ABAP associate Consultant ‘We can see the message code 201 with created Lets check our stable, = ee We can see the data also saved in our able Inthis we use RFCEM %
You might also like
CDS Annotations
PDF
No ratings yet
CDS Annotations
33 pages
Calling A Web Dynpro Application From Another Web Dynpro Application
PDF
No ratings yet
Calling A Web Dynpro Application From Another Web Dynpro Application
13 pages
L1 Feedback Form Abhishke
PDF
No ratings yet
L1 Feedback Form Abhishke
4 pages
Abap Objects Tutorial For Beginners
PDF
No ratings yet
Abap Objects Tutorial For Beginners
44 pages
ODATA SERVICE SETUP+CRUDs
PDF
No ratings yet
ODATA SERVICE SETUP+CRUDs
36 pages
All About Update Function Module With Real Time Example
PDF
No ratings yet
All About Update Function Module With Real Time Example
32 pages
3 Cookbook VBTYP Field Length Extension 20151023 PDF
PDF
No ratings yet
3 Cookbook VBTYP Field Length Extension 20151023 PDF
14 pages
SAP NetWeaver Gateway
PDF
No ratings yet
SAP NetWeaver Gateway
16 pages
ABAP Core Data Services (CDS) Cheat - Sheet
PDF
No ratings yet
ABAP Core Data Services (CDS) Cheat - Sheet
5 pages
Real Time Reports
PDF
No ratings yet
Real Time Reports
74 pages
Register OData Service in SAP Fiori Server
PDF
No ratings yet
Register OData Service in SAP Fiori Server
6 pages
Ooabap Questions
PDF
No ratings yet
Ooabap Questions
69 pages
Sams Teach Yourself ABAP/4 in 21 Days: Program Naming Conventions
PDF
No ratings yet
Sams Teach Yourself ABAP/4 in 21 Days: Program Naming Conventions
6 pages
R3 Connection To BW
PDF
100% (1)
R3 Connection To BW
7 pages
Step-By-Step Guide To Ale and Idocs: Sap Virtual/Onsite Trainings
PDF
No ratings yet
Step-By-Step Guide To Ale and Idocs: Sap Virtual/Onsite Trainings
3 pages
Numeric Functions in ABAP CDS
PDF
No ratings yet
Numeric Functions in ABAP CDS
1 page
Rap Sap Rap
PDF
No ratings yet
Rap Sap Rap
2 pages
SPAU
PDF
No ratings yet
SPAU
11 pages
Getting Started With Sap Adobe Forms
PDF
No ratings yet
Getting Started With Sap Adobe Forms
12 pages
ABAP Code (BPC 10 NW) To Read An Application's Transaction Data Within The BAdI
PDF
No ratings yet
ABAP Code (BPC 10 NW) To Read An Application's Transaction Data Within The BAdI
4 pages
3 - Part 1 - Online ABAP Report - Excel With Multiple Tabs
PDF
No ratings yet
3 - Part 1 - Online ABAP Report - Excel With Multiple Tabs
19 pages
Learning SAP Extend CDS Views Using Extend View Entity
PDF
No ratings yet
Learning SAP Extend CDS Views Using Extend View Entity
17 pages
15 CDS Hierarchy
PDF
No ratings yet
15 CDS Hierarchy
3 pages
Demonstrating Concept of Component Usage
PDF
No ratings yet
Demonstrating Concept of Component Usage
12 pages
Adobe Forms From Scratch
PDF
No ratings yet
Adobe Forms From Scratch
35 pages
Method 1: Find The BADI Related To Your Transaction in Minutes
PDF
No ratings yet
Method 1: Find The BADI Related To Your Transaction in Minutes
1 page
D-Code Presentation - Overview of ABAP 7.4 Development For SAP HANA
PDF
No ratings yet
D-Code Presentation - Overview of ABAP 7.4 Development For SAP HANA
51 pages
Class1 Notes & Diagram Attachments For SAP Ui5 Fiori OData CDS Course
PDF
No ratings yet
Class1 Notes & Diagram Attachments For SAP Ui5 Fiori OData CDS Course
5 pages
ABAP Objects
PDF
No ratings yet
ABAP Objects
3 pages
S/4 Hana System Sap Netweaver Gateway Hana Studio Sap Web Ide Cloud Platform
PDF
No ratings yet
S/4 Hana System Sap Netweaver Gateway Hana Studio Sap Web Ide Cloud Platform
14 pages
ABAP LIST VIEWER (ALV) - Presentation
PDF
No ratings yet
ABAP LIST VIEWER (ALV) - Presentation
37 pages
ABAP RAP Application to Create a PO Using Unmanned Scenario
PDF
100% (1)
ABAP RAP Application to Create a PO Using Unmanned Scenario
45 pages
Conversion of ABAP Data To XML
PDF
No ratings yet
Conversion of ABAP Data To XML
15 pages
Association and Navigation in Odata Service - SAP Netweaver Gateway
PDF
No ratings yet
Association and Navigation in Odata Service - SAP Netweaver Gateway
7 pages
My CDS View Self Study Tutorial - Part 9 Cube View and Query View
PDF
No ratings yet
My CDS View Self Study Tutorial - Part 9 Cube View and Query View
9 pages
E - Hanaaw - 17 Full Dump
PDF
No ratings yet
E - Hanaaw - 17 Full Dump
16 pages
What Is Sap Ale Bapi Idoc
PDF
No ratings yet
What Is Sap Ale Bapi Idoc
2 pages
SAP_Adobe_form_using_ABAP_RESTful_Application_Programming_1739642330
PDF
No ratings yet
SAP_Adobe_form_using_ABAP_RESTful_Application_Programming_1739642330
19 pages
Create A Simple BO
PDF
No ratings yet
Create A Simple BO
48 pages
ABAP CDS Views With Authorization Based On Access Control - SAP Blogs
PDF
No ratings yet
ABAP CDS Views With Authorization Based On Access Control - SAP Blogs
25 pages
How To Use Webdynpro With Adobe
PDF
100% (2)
How To Use Webdynpro With Adobe
16 pages
Sap Abap 751 Why
PDF
No ratings yet
Sap Abap 751 Why
38 pages
Step by Step Guide To Build An Odata Service Based On Rfcs Part 1
PDF
No ratings yet
Step by Step Guide To Build An Odata Service Based On Rfcs Part 1
24 pages
ABAP Certification Questions (Scribd)
PDF
No ratings yet
ABAP Certification Questions (Scribd)
2 pages
Hana Select
PDF
No ratings yet
Hana Select
20 pages
What Is The Difference Between RFC and BAPI
PDF
No ratings yet
What Is The Difference Between RFC and BAPI
6 pages
SAP Exercises
PDF
No ratings yet
SAP Exercises
31 pages
SAP Faq's
PDF
No ratings yet
SAP Faq's
121 pages
Function Module Exit - SAPCODES PDF
PDF
No ratings yet
Function Module Exit - SAPCODES PDF
10 pages
ODATA Services Using SEGW in SAP
PDF
No ratings yet
ODATA Services Using SEGW in SAP
24 pages
S_4HANA Conversion Readiness
PDF
No ratings yet
S_4HANA Conversion Readiness
13 pages
Calling RFC From BODS
PDF
No ratings yet
Calling RFC From BODS
10 pages
How To Create a Custom Bapi
PDF
No ratings yet
How To Create a Custom Bapi
20 pages
"Brfplus (Business Rule Framework Plus) Is A Business Rules Management System (BRMS) Offered by Sap Ag. Brfplus Is Part of The Sap Netweaver Abap
PDF
No ratings yet
"Brfplus (Business Rule Framework Plus) Is A Business Rules Management System (BRMS) Offered by Sap Ag. Brfplus Is Part of The Sap Netweaver Abap
25 pages
BRF Plus-A Real Time Example - SAP Blogs
PDF
50% (2)
BRF Plus-A Real Time Example - SAP Blogs
27 pages
SAP BI Generic Extraction Using A Function Module PDF
PDF
No ratings yet
SAP BI Generic Extraction Using A Function Module PDF
17 pages
Sap Abap Cross Applications or Interfaces
PDF
No ratings yet
Sap Abap Cross Applications or Interfaces
42 pages
Calling RFC From BODS
PDF
0% (1)
Calling RFC From BODS
115 pages
ABAP5
PDF
No ratings yet
ABAP5
2 pages