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)
219 views
26 pages
Create Odata Service Using RFC FM
Odata service
Uploaded by
raju.knvs1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
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)
219 views
26 pages
Create Odata Service Using RFC FM
Odata service
Uploaded by
raju.knvs1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
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
Joule 4 Devs
PDF
No ratings yet
Joule 4 Devs
39 pages
Steps To Implement A Deep Entity in An OData Service
PDF
No ratings yet
Steps To Implement A Deep Entity in An OData Service
17 pages
SAP ABAP CDS VIew - CDC
PDF
No ratings yet
SAP ABAP CDS VIew - CDC
12 pages
How To Configure & Execute The ABAP Test Cockpit (ATC) For SAP S - 4 Conversion
PDF
No ratings yet
How To Configure & Execute The ABAP Test Cockpit (ATC) For SAP S - 4 Conversion
9 pages
Smooth Transition For Cloud Devlopment
PDF
No ratings yet
Smooth Transition For Cloud Devlopment
34 pages
Change Pointer Technique For Idocs - SAP Community
PDF
No ratings yet
Change Pointer Technique For Idocs - SAP Community
9 pages
Abap Class To Xlxs
PDF
No ratings yet
Abap Class To Xlxs
12 pages
Sap Gateway Beginers
PDF
No ratings yet
Sap Gateway Beginers
61 pages
Notes Section Handling in SPAU and Other Sections Handling
PDF
No ratings yet
Notes Section Handling in SPAU and Other Sections Handling
12 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
3 Cookbook VBTYP Field Length Extension 20151023 PDF
PDF
No ratings yet
3 Cookbook VBTYP Field Length Extension 20151023 PDF
14 pages
Bapi
PDF
No ratings yet
Bapi
1 page
Conversion Exit in Sap Abap
PDF
No ratings yet
Conversion Exit in Sap Abap
15 pages
SAP - CDS - PLANVIZ - Safeguard Performance of ABAP CDS Views - Part 3 Rules For Good Performance of CDS Views
PDF
No ratings yet
SAP - CDS - PLANVIZ - Safeguard Performance of ABAP CDS Views - Part 3 Rules For Good Performance of CDS Views
13 pages
Sap Abap Algorithm For Processing Huge Volumes of Data in Sap R3 - John Shane
PDF
No ratings yet
Sap Abap Algorithm For Processing Huge Volumes of Data in Sap R3 - John Shane
43 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
Exploring SAP ABAP 7.4 Syntax Enhancements
PDF
No ratings yet
Exploring SAP ABAP 7.4 Syntax Enhancements
6 pages
Code Standard S4 HANA
PDF
No ratings yet
Code Standard S4 HANA
65 pages
SPAU
PDF
No ratings yet
SPAU
11 pages
R3 Connection To BW
PDF
100% (1)
R3 Connection To BW
7 pages
Integration Guide Feature Delivery PROD
PDF
No ratings yet
Integration Guide Feature Delivery PROD
386 pages
SAP ABAP 3+ Yrs of Exp
PDF
No ratings yet
SAP ABAP 3+ Yrs of Exp
6 pages
Configuration Steps For Flexible Sales Document Numbering in S4
PDF
No ratings yet
Configuration Steps For Flexible Sales Document Numbering in S4
9 pages
ABAP - DataTransfers (Batch Input-BDC)
PDF
No ratings yet
ABAP - DataTransfers (Batch Input-BDC)
14 pages
Working Hana SQL Statements
PDF
No ratings yet
Working Hana SQL Statements
27 pages
Abap Call Transformation To Download Excel
PDF
No ratings yet
Abap Call Transformation To Download Excel
5 pages
Read Serial Port in Abap
PDF
No ratings yet
Read Serial Port in Abap
3 pages
Sap Abap Interview Questions and Answers
PDF
No ratings yet
Sap Abap Interview Questions and Answers
4 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
Creation of Odata Services For Beginners
PDF
100% (1)
Creation of Odata Services For Beginners
10 pages
LSMW With Bapi
PDF
No ratings yet
LSMW With Bapi
19 pages
Field Symbols
PDF
No ratings yet
Field Symbols
7 pages
Taw12 - 1 Abap Objects
PDF
No ratings yet
Taw12 - 1 Abap Objects
3 pages
Digi Tests
PDF
No ratings yet
Digi Tests
10 pages
Hana SQL Statement
PDF
No ratings yet
Hana SQL Statement
7 pages
Range of Input Select Options in Usual Abap Class 1727970560
PDF
No ratings yet
Range of Input Select Options in Usual Abap Class 1727970560
10 pages
BAPI - SALESORDER - CREATEFROMDAT2 Configuration
PDF
No ratings yet
BAPI - SALESORDER - CREATEFROMDAT2 Configuration
2 pages
12 - Enhancements and Modifications
PDF
No ratings yet
12 - Enhancements and Modifications
5 pages
SAP - BDT (Business Data Toolset) Developers' Manual
PDF
No ratings yet
SAP - BDT (Business Data Toolset) Developers' Manual
51 pages
Hana Select
PDF
No ratings yet
Hana Select
20 pages
BAPI Enhancement
PDF
No ratings yet
BAPI Enhancement
6 pages
Traning PPT On ABAP Proxies
PDF
50% (2)
Traning PPT On ABAP Proxies
20 pages
HANAtization Checklist v1.0
PDF
No ratings yet
HANAtization Checklist v1.0
14 pages
2 - ABAP Program Analysis
PDF
No ratings yet
2 - ABAP Program Analysis
32 pages
Interviewflow
PDF
No ratings yet
Interviewflow
80 pages
Sap Interview Question
PDF
No ratings yet
Sap Interview Question
10 pages
How To Use The BOL Tree
PDF
100% (1)
How To Use The BOL Tree
13 pages
Controlling Excel Using OLE Automation in ABAP
PDF
No ratings yet
Controlling Excel Using OLE Automation in ABAP
9 pages
ABAP Read - Text Function Module Tutorial To Read Long Text - Free SAP Tutorial - SAP Functional and Technical Training
PDF
No ratings yet
ABAP Read - Text Function Module Tutorial To Read Long Text - Free SAP Tutorial - SAP Functional and Technical Training
4 pages
Sapnote 0000018023
PDF
No ratings yet
Sapnote 0000018023
3 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
FM Code To Clear Customer Open Item
PDF
No ratings yet
FM Code To Clear Customer Open Item
5 pages
Spau Enh
PDF
No ratings yet
Spau Enh
2 pages
Resume SAP ABAP Exp 13 Years Udaykumar Borate Mumbai 918097192200 PDF
PDF
100% (1)
Resume SAP ABAP Exp 13 Years Udaykumar Borate Mumbai 918097192200 PDF
6 pages
Table Controls in Tab Strip
PDF
No ratings yet
Table Controls in Tab Strip
14 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
BRF Plus-A Real Time Example - SAP Blogs
PDF
50% (2)
BRF Plus-A Real Time Example - SAP Blogs
27 pages