SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
Custom BAPI creation - Step-by-step Procedure
Scenario: Step-by-step creation of a BAPI to retrieve fields from table T001.
Procedure: Go to transaction SE11 and create a structure as shown or as per your requirement.
Give the name in the Data type field and click create.
In the pop-up that comes up, select the radio button “ structure”.
In the components tab of the structure, give the different fields and their corresponding field types
and press enter to check the compatibility and corrective ness.
Do not forget to save it in a package. You can even save it as a local object. For my example, I
save it in a package.
Check the structure (ctrl + F2) and activate (ctrl + F3) the structure.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a Structure.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Go to transaction SE37 where you create function modules. Click on create after you enter the
name of the Function module.
A screen as shown above would pop-up where you mention the function group to save the
function module and also provide some short text describing your function module.
In the next pop-up that follows, click on continue as shown above.
The function module screen would look like the one above.
Go to the Attributes tab and select the radio button reading “remote-enabled module”. Come back
to the imports tab and provide the import parameters as shown or as per your requirement.
Now in the Export tab, provide the export parameters as shown or as per your requirement.
In the tables tab, provide the information as shown or as per your requirement.
The next screen you visit is the source code. It would look like this.
In the source code tab, write the following code in order to pick the data based on the input you
provide.
Now, save and check the code and activate the function module.
After successful activation, Go to the attributes tab. Go to Function moduleàReleaseàRelease.
+++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a Function Module.
+++++++++++++++++++++++++++++++++++++++++++++++
Go to transaction SWO1 and enter the name of the BAPI you would like to create or as shown in
the screen and click the create button.
Give the name of the BAPI as above and click on create.
Give the above-mentioned details and click on the continue icon.
Save in a package.
The resulting screen is as follows.
Now click on the methods to drop down and see what methods are provided by default. There
would be two methods, showing in red color which come by default while creating the BAPI.
Click or select the method as shown above and go to the path “UtilitiesàAPI methodsàAdd
methods”.
On the screen that follows, provide the function module name and click on the continue icon.
In the ultimate pop-up, click the next step icon. We observe that the information is predefined in
the fields.
This is the next screen where you would just click on the “next” icon.
Click on Yes. You can see an information message reading “ ZBAPIFMT001” inserted.
Now save after you add the method. Select & Double click on the API method.
Go to Tab: ABAP Check 'API Function'.
The above screen is displayed. Go to the ABAP tab as shown below.
Select the Radio button reading “API Function” as already said above.
click on the continue icon to proceed further.
Now select the Object “ZBAPI_T001” as shown below.
Go to : EditàChange Release StatusàObject type àTo Modeled.
The above shown screen will be displayed. Click on yes.
The message shows, The object type status set to modeled. (or already modeled)
Go to : EditàChange Release StatusàObject type à To Implemented.
You can see a message reading “Object type status set to implemented”
Now, go to: EditàChange Release StatusàObjectàTo Released.
There would be two pop ups coming up. Click continue on the Pop Ups.
Keep the cursor on the 'Method'.
Go to: EditàChange Release StatusàObject type componentàTO Modeled.
You can see the message reading “ status for method ‘zbapifmt001’ set to modeled”.
Now, go to: EditàChange Release StatusàObject type componentà TO Implemented
You can see the message reading “ status for method ‘zbapifmt001’ set to implemented”.
Now go to: EditàChange Releasse Status à Object type component à To Released
You can see the message reading “ status for method ‘zbapifmt001’ set to Released”.
Click on Generate Button. (the red ball kind of button is the Generate button)
After clicking on the generate button, you can see the message reading “Object type
'ZBAPI_T001' generated successfully”.
Now go to BAPI Tcode (BOR) there we can find the BAPI (our BAPI)
The BAPI browser would look like the screen below.
You can click on the Alphabetical tab so that you can browse the BAPI’s in an alphabetical order.
Find your BAPI as shown.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a BAPI.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Test Your BAPI.
Enter the name of your BAPI in the transaction SWO1 and click on ‘Test’.
The above screen is displayed. Click on the Execute icon against the BAPI as shown.
The above screen is displayed where you would require entering the data against the empty input
fields.
We have entered some data in the Field.
After entering the data, click on the execute icon as shown below.
The following screen is displayed which has some values as is indicated by the ITEMTAB.
Click on the Edit table icon as shown below.
The results as per our input are as shown below.
By this, we would get it confirmed that our BAPI is working properly.
We can even check it by passing different values again. Come back to the input and execution
screen.
After executing the BAPI based on the input provided, we get the following screen.
Hit on the execute icon.
In the above shown screen, hit on the edit table icon.
The above is the output we get from the input we provided.
We are now done with the creation and successful execution of a BAPI.
For more Tips, Tutorials, Certification Questions and Interview Questions, please visit
SAPTechnical.com

Mais conteúdo relacionado

Mais procurados

Auto inspection lot creation and Auto Usage decision for required parts
Auto inspection lot creation and Auto Usage decision for required partsAuto inspection lot creation and Auto Usage decision for required parts
Auto inspection lot creation and Auto Usage decision for required partsAkshath L.T
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modificationsscribid.download
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answersUttam Agrawal
 
Oops abap fundamental
Oops abap fundamentalOops abap fundamental
Oops abap fundamentalbiswajit2015
 
Ale Idoc Edi
Ale Idoc EdiAle Idoc Edi
Ale Idoc Edishesagiri
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricksKranthi Kumar
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2dejavee
 
Charm workflow for urgent changes while adding node
Charm workflow for urgent changes while adding nodeCharm workflow for urgent changes while adding node
Charm workflow for urgent changes while adding nodeAditya Shivhare
 
Edit idoc , reprocess and test idoc
Edit idoc , reprocess and test idocEdit idoc , reprocess and test idoc
Edit idoc , reprocess and test idoclakshmi rajkumar
 
Ale idoc training kit sap Anilkumar chowdary
Ale idoc training kit sap Anilkumar chowdaryAle idoc training kit sap Anilkumar chowdary
Ale idoc training kit sap Anilkumar chowdaryANILKUMARPULIPATI1
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questionskssr99
 

Mais procurados (20)

Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
Sap edi idoc
Sap edi idocSap edi idoc
Sap edi idoc
 
Text determination
Text determinationText determination
Text determination
 
Auto inspection lot creation and Auto Usage decision for required parts
Auto inspection lot creation and Auto Usage decision for required partsAuto inspection lot creation and Auto Usage decision for required parts
Auto inspection lot creation and Auto Usage decision for required parts
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
Step by step exercise for bw 365
Step by step exercise for bw 365Step by step exercise for bw 365
Step by step exercise for bw 365
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
Oops abap fundamental
Oops abap fundamentalOops abap fundamental
Oops abap fundamental
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
Ale Idoc Edi
Ale Idoc EdiAle Idoc Edi
Ale Idoc Edi
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2
 
Charm workflow for urgent changes while adding node
Charm workflow for urgent changes while adding nodeCharm workflow for urgent changes while adding node
Charm workflow for urgent changes while adding node
 
Edit idoc , reprocess and test idoc
Edit idoc , reprocess and test idocEdit idoc , reprocess and test idoc
Edit idoc , reprocess and test idoc
 
07.Advanced Abap
07.Advanced Abap07.Advanced Abap
07.Advanced Abap
 
Ale idoc training kit sap Anilkumar chowdary
Ale idoc training kit sap Anilkumar chowdaryAle idoc training kit sap Anilkumar chowdary
Ale idoc training kit sap Anilkumar chowdary
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
 
Abap proxy
Abap proxyAbap proxy
Abap proxy
 
Idocs
IdocsIdocs
Idocs
 

Semelhante a Step by-step creation of a bapi in detailed steps with scr…

6.develop a synchronous service for caliculation of factorial of a given number
6.develop a synchronous service for caliculation of factorial of a given number6.develop a synchronous service for caliculation of factorial of a given number
6.develop a synchronous service for caliculation of factorial of a given numberxavier john
 
Change and Transport System (CTS) in SAP
Change and Transport System (CTS) in SAPChange and Transport System (CTS) in SAP
Change and Transport System (CTS) in SAPKunal Chadha
 
Sales force class-3
Sales force class-3Sales force class-3
Sales force class-3Amit Sharma
 
Birt (business intelligence and reporting tools)
Birt (business intelligence and reporting tools)Birt (business intelligence and reporting tools)
Birt (business intelligence and reporting tools)Dharmesh Kumar Sharma
 
SAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdfSAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdfPhani Pavan
 
SAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdfSAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdfPhani Pavan
 
Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)Leila Morteza
 
Tutorial Search With Custom Column Slide Share
Tutorial Search With Custom Column Slide ShareTutorial Search With Custom Column Slide Share
Tutorial Search With Custom Column Slide Shareguest3f640c
 
Authorization objects a simple guide.doc (1)
Authorization objects   a simple guide.doc (1)Authorization objects   a simple guide.doc (1)
Authorization objects a simple guide.doc (1)Vikram Polinati
 
Reports in Horizon
Reports in HorizonReports in Horizon
Reports in HorizonJohnny Pe
 
183203806 sales force-class-8
183203806 sales force-class-8183203806 sales force-class-8
183203806 sales force-class-8Amit Sharma
 
IMPACT/myGrid Hackathon - Introduction to Taverna
IMPACT/myGrid Hackathon - Introduction to TavernaIMPACT/myGrid Hackathon - Introduction to Taverna
IMPACT/myGrid Hackathon - Introduction to TavernaIMPACT Centre of Competence
 
JetBot basic motion
JetBot basic motionJetBot basic motion
JetBot basic motionPeiJia5
 
Dynamic 365 business central guild on material request and shipment
Dynamic 365 business central guild on material request and shipmentDynamic 365 business central guild on material request and shipment
Dynamic 365 business central guild on material request and shipmentNewman Jonathan
 
Simatic manager siemens S7 guide
Simatic manager  siemens S7 guideSimatic manager  siemens S7 guide
Simatic manager siemens S7 guideRoopesh Matale
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109Thinkful
 
Sales force managing-data
Sales force managing-dataSales force managing-data
Sales force managing-dataAmit Sharma
 
Getting Started with Splunk Enterprise Hands-On
Getting Started with Splunk Enterprise Hands-OnGetting Started with Splunk Enterprise Hands-On
Getting Started with Splunk Enterprise Hands-OnSplunk
 

Semelhante a Step by-step creation of a bapi in detailed steps with scr… (20)

6.develop a synchronous service for caliculation of factorial of a given number
6.develop a synchronous service for caliculation of factorial of a given number6.develop a synchronous service for caliculation of factorial of a given number
6.develop a synchronous service for caliculation of factorial of a given number
 
Change and Transport System (CTS) in SAP
Change and Transport System (CTS) in SAPChange and Transport System (CTS) in SAP
Change and Transport System (CTS) in SAP
 
Sales force class-3
Sales force class-3Sales force class-3
Sales force class-3
 
Birt (business intelligence and reporting tools)
Birt (business intelligence and reporting tools)Birt (business intelligence and reporting tools)
Birt (business intelligence and reporting tools)
 
SAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdfSAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdf
 
SAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdfSAP ABAP lsmw beginner lerning tutorial.pdf
SAP ABAP lsmw beginner lerning tutorial.pdf
 
Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)
 
Kbox 101 1000 slide
Kbox 101 1000 slideKbox 101 1000 slide
Kbox 101 1000 slide
 
Tutorial Search With Custom Column Slide Share
Tutorial Search With Custom Column Slide ShareTutorial Search With Custom Column Slide Share
Tutorial Search With Custom Column Slide Share
 
Authorization objects a simple guide.doc (1)
Authorization objects   a simple guide.doc (1)Authorization objects   a simple guide.doc (1)
Authorization objects a simple guide.doc (1)
 
Reports in Horizon
Reports in HorizonReports in Horizon
Reports in Horizon
 
Mca 504 dotnet_unit5
Mca 504 dotnet_unit5Mca 504 dotnet_unit5
Mca 504 dotnet_unit5
 
183203806 sales force-class-8
183203806 sales force-class-8183203806 sales force-class-8
183203806 sales force-class-8
 
IMPACT/myGrid Hackathon - Introduction to Taverna
IMPACT/myGrid Hackathon - Introduction to TavernaIMPACT/myGrid Hackathon - Introduction to Taverna
IMPACT/myGrid Hackathon - Introduction to Taverna
 
JetBot basic motion
JetBot basic motionJetBot basic motion
JetBot basic motion
 
Dynamic 365 business central guild on material request and shipment
Dynamic 365 business central guild on material request and shipmentDynamic 365 business central guild on material request and shipment
Dynamic 365 business central guild on material request and shipment
 
Simatic manager siemens S7 guide
Simatic manager  siemens S7 guideSimatic manager  siemens S7 guide
Simatic manager siemens S7 guide
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109
 
Sales force managing-data
Sales force managing-dataSales force managing-data
Sales force managing-data
 
Getting Started with Splunk Enterprise Hands-On
Getting Started with Splunk Enterprise Hands-OnGetting Started with Splunk Enterprise Hands-On
Getting Started with Splunk Enterprise Hands-On
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Step by-step creation of a bapi in detailed steps with scr…

  • 1. Custom BAPI creation - Step-by-step Procedure Scenario: Step-by-step creation of a BAPI to retrieve fields from table T001. Procedure: Go to transaction SE11 and create a structure as shown or as per your requirement. Give the name in the Data type field and click create. In the pop-up that comes up, select the radio button “ structure”.
  • 2. In the components tab of the structure, give the different fields and their corresponding field types and press enter to check the compatibility and corrective ness. Do not forget to save it in a package. You can even save it as a local object. For my example, I save it in a package.
  • 3. Check the structure (ctrl + F2) and activate (ctrl + F3) the structure. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Now we are done with the creation of a Structure. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Go to transaction SE37 where you create function modules. Click on create after you enter the name of the Function module.
  • 4. A screen as shown above would pop-up where you mention the function group to save the function module and also provide some short text describing your function module. In the next pop-up that follows, click on continue as shown above.
  • 5. The function module screen would look like the one above. Go to the Attributes tab and select the radio button reading “remote-enabled module”. Come back to the imports tab and provide the import parameters as shown or as per your requirement.
  • 6. Now in the Export tab, provide the export parameters as shown or as per your requirement. In the tables tab, provide the information as shown or as per your requirement. The next screen you visit is the source code. It would look like this.
  • 7. In the source code tab, write the following code in order to pick the data based on the input you provide. Now, save and check the code and activate the function module. After successful activation, Go to the attributes tab. Go to Function moduleàReleaseàRelease.
  • 8. +++++++++++++++++++++++++++++++++++++++++++++++ Now we are done with the creation of a Function Module. +++++++++++++++++++++++++++++++++++++++++++++++ Go to transaction SWO1 and enter the name of the BAPI you would like to create or as shown in the screen and click the create button. Give the name of the BAPI as above and click on create.
  • 9. Give the above-mentioned details and click on the continue icon. Save in a package. The resulting screen is as follows.
  • 10. Now click on the methods to drop down and see what methods are provided by default. There would be two methods, showing in red color which come by default while creating the BAPI. Click or select the method as shown above and go to the path “UtilitiesàAPI methodsàAdd methods”.
  • 11. On the screen that follows, provide the function module name and click on the continue icon. In the ultimate pop-up, click the next step icon. We observe that the information is predefined in the fields. This is the next screen where you would just click on the “next” icon.
  • 12. Click on Yes. You can see an information message reading “ ZBAPIFMT001” inserted. Now save after you add the method. Select & Double click on the API method. Go to Tab: ABAP Check 'API Function'.
  • 13. The above screen is displayed. Go to the ABAP tab as shown below.
  • 14. Select the Radio button reading “API Function” as already said above.
  • 15. click on the continue icon to proceed further. Now select the Object “ZBAPI_T001” as shown below. Go to : EditàChange Release StatusàObject type àTo Modeled.
  • 16. The above shown screen will be displayed. Click on yes. The message shows, The object type status set to modeled. (or already modeled) Go to : EditàChange Release StatusàObject type à To Implemented.
  • 17. You can see a message reading “Object type status set to implemented” Now, go to: EditàChange Release StatusàObjectàTo Released. There would be two pop ups coming up. Click continue on the Pop Ups. Keep the cursor on the 'Method'. Go to: EditàChange Release StatusàObject type componentàTO Modeled.
  • 18. You can see the message reading “ status for method ‘zbapifmt001’ set to modeled”. Now, go to: EditàChange Release StatusàObject type componentà TO Implemented You can see the message reading “ status for method ‘zbapifmt001’ set to implemented”. Now go to: EditàChange Releasse Status à Object type component à To Released
  • 19. You can see the message reading “ status for method ‘zbapifmt001’ set to Released”. Click on Generate Button. (the red ball kind of button is the Generate button) After clicking on the generate button, you can see the message reading “Object type 'ZBAPI_T001' generated successfully”. Now go to BAPI Tcode (BOR) there we can find the BAPI (our BAPI) The BAPI browser would look like the screen below.
  • 20. You can click on the Alphabetical tab so that you can browse the BAPI’s in an alphabetical order. Find your BAPI as shown. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Now we are done with the creation of a BAPI.
  • 21. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Test Your BAPI. Enter the name of your BAPI in the transaction SWO1 and click on ‘Test’. The above screen is displayed. Click on the Execute icon against the BAPI as shown.
  • 22. The above screen is displayed where you would require entering the data against the empty input fields.
  • 23. We have entered some data in the Field. After entering the data, click on the execute icon as shown below. The following screen is displayed which has some values as is indicated by the ITEMTAB.
  • 24. Click on the Edit table icon as shown below. The results as per our input are as shown below.
  • 25. By this, we would get it confirmed that our BAPI is working properly. We can even check it by passing different values again. Come back to the input and execution screen. After executing the BAPI based on the input provided, we get the following screen.
  • 26. Hit on the execute icon. In the above shown screen, hit on the edit table icon.
  • 27. The above is the output we get from the input we provided. We are now done with the creation and successful execution of a BAPI. For more Tips, Tutorials, Certification Questions and Interview Questions, please visit SAPTechnical.com