IDOC ans BAPI
Hi Gurus,
Please explain what is the role of IDOC AND BAPI?
Where and why do we use them?
Best Regards,
Kapil
Hello Kapil,
an Idoc ("Intermediate Document") is a SAP proprietary data file comparable to an XML document and is used for EDI szenarios (e.g. data transfer between suppliers and customers) or ALE or central user administration szenarios. There is an interface in R/3 for sending/receiving/processing Idoc's.
A BAPI is a remote callable "function module", an atomic code piece in R/3. In the context of OOP it is a method of a business object.
Try the following links:
Idocs: http://help.sap.com/saphelp_47x200/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/content.htm
BAPI: http://help.sap.com/saphelp_47x200/helpdata/en/5c/f3f0371bc15d73e10000009b38f8cf/content.htm
Hope it helps
Andreas
Similar Messages
-
IDOC -to -BAPI -to -BAPI scenario
Hi ,
my scenario is IDOC - to - BAPI - and BAPI(Response) -to - BAPI (Req) .
I think a bit confusion . Actually I'm getting the data from MDM system through an IDOC into XI system and I want to post this data into an ECC system by using RFC. so, up to this level scenario is simple IDOC - to - RFC. but i want to post the RFC response message to MDM system . for posting this reponse in MDM system they created a simple BAPI and that BAPI will post the data into a ZTABLE in MDM system . so i want to pass the BAPI(ECC system) response message to BAPI(MDM system).
So, please suggest me the steps and how can we achive this..
Because for creating the Out bound interface as synchronous system is not accepting one IDOC message and and one BAPI message.
Regards
JainHello,
You can achieve this using BPM
Async Rec - transfortm - sync send (Req/Response)- transform - send response
Regards,
Sreenivas. -
LSMW: Idoc or BAPI; which one is better and why ?
Hi All,
In LSMW, given the choices between Idoc and BAPI,which processing method is good and why?
Please do reply asap. Its urgent.
Best regards.
RamThe preferece of Import Techniques are:
1)Batch Input
2)Direct Input
3)BAPI's
4)IDOCS's
5)Recording
6)Custom Program
<b>
Refer these Links:</b>
Re: LSMW with Recording or LSMW with BAPI?????
Regards,
AS -
IDOC/ALE/BAPI/BADI
Hi,
I want to understand the difference between IDOC/ALE/BAPI/BADI in context to a functional consultant.what is the role of each with an EXAMPLE.I want to basically understand with examples w.r.t SD or MM instead of theory which i could get in forum.
What is the role of a functional SD consultant, in these technology mentioned?
If i have to Test a BAPI or BADI what is that i should test???what is the T codes to be tested ? How to go about it??
Like in case of Order to cash testing, i will check if the sales cycle runs well, using T codes, Va01, vl01n, vf01.
Awaiting reply.
Thanks
LKHi Lekshmi,
I want to understand the difference between IDOC/ALE/BAPI/BADI in context to a functional consultant.
what is the role of each with an EXAMPLE.
I want to basically understand with examples w.r.t SD or MM instead of theory which i could get in forum.
What is the role of a functional SD consultant, in these technology mentioned?
Idoc/ALE/BAPI/BADI are basically advanced functionalities available in ABAP. These are treated as seperate module by somebody as "Cross Applications".
If we get in
IDOC is the concept which works for Third party communication from SAP.
Scenarion 1:
For example: I am a Buyer from your Company and i don't have SAP system where you have SAP Practice. I had given you one Order for which i need Confirmation and it needs to understand by my system. In this case IDOC is useful to transfer the confirmation details to my system understandable language. This can be acheived by any other outputs like e-Mail/Printout/Fax. But for these kind of Outputs thers is one limitation. those are in document form means if you take the print out it confirmation can be taken as a print out as a hard copy or soft coy by saving into PDF format. but that data cannot be accessed by my system to convert that data for further my own reporting purpose. if we use IDOCs.
These Idocs are transferred through Middleware and reach third party system (in this example my own system which does not have SAP) and store the details. later i can use that data how ever i can for my internal reporting purpose.
Scenario 2:
ALE: ALE also works like above, but the difference is this works for SAP-SAP communication. if i take the above example.... I have SAP System being a buyer and you have SAP sytem. Order Confirmaiton come from your system to my system.
If i have to Test a BAPI or BADI what is that i should test???what is the T codes to be tested ? How to go about it??
Like in case of Order to cash testing, i will check if the sales cycle runs well, using T codes, Va01, vl01n, vf01.
There is no such tcodes to test the enhancement functionality.
I assume you knows SAP SD.
If i take the example of SD Sales Order.
PO Number field is to explain the enhancement testing.
Your client enhanced the functionality of PO Number for which you are doing the testing for example.
now you get inside of the VA01 transaction and put all the headeer data and PO Number and press enter.
then based on the enhancement functionality system will act.
For example.. you had given AAA111 for Customer 123456.
You have entered Inside of VA01 and entered Sold and Shipto numbers as 123456. then entered PO number as BBB111 and press enter.
As per the enhancement you suppose to enter PO number as AAA111 for customer 123456, but you entered as BBB111.
Based on your enhancements system will through the error saying you entered wrong PO Number.
This is the testing part usually Functional Guy do.
Please let me know if you have any further clarification
Thanks & Regards
Venkat -
SAP HR related IDOC and BAPI with description
Hi,
This is regarding SAP HR. Here I need some help from you guys.
It would be great if you could provide list of SAP HR related IDOC and BAPI with description.
If you have any document then please forward same to [email protected]
Thanks,
Sunil Bhavsarhello Sunil ,
to find BAPIs realted to HR,use transaction BAPI and there u have to look for personnel management,time etc ,these all are HR related.
HR related Idocs shud be having Message type like HR*.
hope thts wht u needed.
amit -
Hi Experts,
I doing Idoc to file scenario, my question is when we go ahead to use IDOC or BAPI. please give me some basic understanding of when and how you use IDoc?
When to use BAPI?
Please provide some links of document
Regards,
VenkateshHi,
when u want asynchronous communication u have to use IDOCS
when u want to use synchrnous communciation and want to communicate external langauges u have to use BAPIS
For File to IDOC,
in R/3
1.create rfc connection using sm59
2.create Logical sys using bd54
3.create port using we21
4.create partner profile using we20
in xi
1.create rfc connection using sm59
2.create Logical sys using bd54
3.create port using IDX!
for IDOC to FIle
R/3 side
1.create rfc connection using sm59
2.create Logical sys using bd54
3.create port using we21
4.create partner profile using we20
5.distribute busynessmodel using bd64
for xi side
1.create rfc connection using sm59
2.create Logical sys using bd54
3.create port using IDX!
4.create partner profile using we20
ALE configuration for pushing idocs from SAP to XI
/people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
IDOC testing using WE19
/people/sameer.shadab/blog/2005/07/25/reposting-idocs-instead-of-recreating--for-testing-purpose-xi
File To IDOC - Part1 (SLD and Design):
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC&
File To IDOC - Part2 (Configuration):
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part2+(Configuration)&
File To IDOC - Part3 (Steps required in XI and R3):
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part3(StepsrequiredinXIandR3)&
SAP R/3
R/3 to XI
1) RFC Destination (SM59)
a) Choose create.
b) Specify the name of the RFC destination
c) Select connection type as 3 and save
d) In the technical settings tab enter the details SAP SID/URL and system number#.
e) Enter the Gateway host as same details above SID/URL.
f) Gateway service is 3300+system number#.
g) In the Logon /Security tab, enter the client user & Password details of Destination system.
h) Test the connection and remote logon.
2) Create Port (We21)
a) First Select Transactional RFC and then click create button
b) Enter the destination port name as SAP+SID (The starting char should be SAP)
c) Enter the destination client.
d) Enter the RFC Destination created in SAP R/3 towards other system.
e) Save
3) Create Partner Profile (WE20)
a) Create New
b) Create the Partner no. name as same the logical system name of the destination system.
c) Select Partner type LS
d) Enter details for Type: US/USER, Agent, and Lang.
e) Click on the + button to select the message type.
f) Select Partner no. and LS which ever create above.
g) Select Message type
h) Select Process code related to the Message type.
I) save.
XI to R/3
1) RFC Destination (SM59)
a) Choose create.
b) Specify the name of the RFC destination
c) Select connection type as 3 and save
d) In the technical settings tab enter the details SAP SID/URL and system number#.
e) Enter the Gateway host as same details above SID/URL.
f) Gateway service is 3300+system number#.
g) In the Logon /Security tab, enter the client user & Password details of Destination system.
h) Test the connection and remote logon.
2) Create Port (IDX1) ( Create port to get IDOC Meta data from sender system)
a) Select create new button
b) Enter the port name as SAP+SID (The starting char should be SAP)
c) Enter the destination client.
d) Enter the RFC Destination created in SAP R/3 towards other system.
e) Save
3) Load Meta Data for IDOC (IDX2) (To maintain IDOC Metadata, it is needed by XI because XI needs to construct IDOC-XML from IDOC. It is not needed by any sap system).
a) Create new
b) IDOC Message Type
c) Enter port created in IDX1.
Edited by: krishnachitanya siddavattam on Mar 7, 2008 5:37 AM -
Need T code and standard IDOC or BAPI
Hi All
Need Transaction Code For Assortment Module.
Is there any Standard Idoc or Bapi for Assortment Module Conversion. Please share.
Regards
AboliHi,
Below are the transactions related to Assortment
WSOA3 Assortment Display
WSOA1 Assortment Create
WSOA2 Assortment Change
WSOA6 Assortment Assignment Tool
WSO7 Display Assortment Module Assignment to Assortment
WSL5 Modules In Assortment
WSO1 Assortment Module Create
WSO5 Maintain Assortment Module assignment to Assortment
WSK1 Assortment Copy
WDBM Manual Selection Assortment List
I hope it helps you.
Thanks
Ravi kanth -
Standard Idoc or BAPI to trasfer the routes and stages data
Hi guys,
We want to transfer the routes and stages data from one SAP system to other SAP system . can u suggest any standard idocs or BAPIs to do the job.
thanks
sankar
Edited by: sudhakar murthy on Apr 1, 2009 10:18 AMhello guys
any idea on this????
thanks -
Hi Experts,
I am using an idoc which is internally calling a BAPI - BAPI_ACC_DOCUMENT_POST
I need to pass data custom fields from idoc to bapi BAPI_ACC_DOCUMENT_POST .
For this in the change method of the BADI BADI_ACC_DOCUMENT, I have written the code.
The BAPI has extension2 defined in it.
The inbound idoc has a segment E1BPPAREX which has the contents like this:
STRUCTURE
VALUEPART1
VALUEPART2
VALUEPART3
VALUEPART4
How to fill the data to see whether my Zfields are getting passed?
The code in the change method of the BADI is:
DATA: WA_EXTENSION TYPE BAPIPAREX,
WA_ACCIT TYPE ACCIT,
EXT_VALUE TYPE C LENGTH 960,
L_TABIX TYPE SY-TABIX.
FIELD-SYMBOLS: <L_STRUC> TYPE ANY,
<L_FIELD> TYPE ANY.
DATA: L_REF TYPE REF TO TE_STRUC.
SORT C_EXTENSION2 BY STRUCTURE.
LOOP AT C_EXTENSION2 INTO WA_EXTENSION.
AT NEW STRUCTURE.
CREATE DATA L_REF TYPE (WA_EXTENSION-STRUCTURE).
ASSIGN L_REF TO <L_STRUC>.
ENDAT.
CONCATENATE WA_EXTENSION-VALUEPART1 WA_EXTENSION-VALUEPART2
WA_EXTENSION-VALUEPART3 WA_EXTENSION-VALUEPART4
INTO EXT_VALUE.
MOVE EXT_VALUE TO <L_STRUC>.
ASSIGN COMPONENT 'ITEMNO_ACC' OF STRUCTURE <L_STRUC> TO <L_FIELD>.
CLEAR: WA_ACCIT.
READ TABLE C_ACCIT WITH KEY POSNR = <L_FIELD> INTO WA_ACCIT.
IF SY-SUBRC IS INITIAL.
L_TABIX = SY-TABIX.
MOVE-CORRESPONDING <L_STRUC> TO WA_ACCIT.
MODIFY C_ACCIT FROM WA_ACCIT INDEX L_TABIX TRANSPORTING ZZPRDCD
ZZXXX
ZZXXX.
ENDIF.
ENDLOOP.
where ZZXXX is my custom fields.
Regards,
Sangeeta.Hi,
I donu2019t know , if I understand ur issue correctly or not.
You wanna know whether ur zfield in the extension idoc are getting fiiled thru Bapi or not?
Just go to WE19 and give any Existing idoc number realted to Document posting and fill the Extended segments with your data and execute. Befor this put a break-point in ur badi implemantation and check it.
Revrt back if any issues.
regards,
Naveen -
Hi All
I am learning XI and the difference between " ALE, IDOC, RFC, BAPI, BADI "
Not clear and when to use what and how in point of XI ?
Pl..clarify me
Adv..thanks and points
--- Rakesh BeheraHi
This will expalin you every thing ...pl..go through
The interface concept of the classic R/3 is based on two different strategies: Remote Function Calls (RFC) and data exchange through IDoc message documents. RFC makes direct and synchronous calls of a program in the remote system. If the caller is an external program it will call an RFC-enabled function in R/3 and if the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe). BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.
I hope this will help you to understand the difference bet..those
regards
--- prasad -
Data transfer - ALE or idocs and bapis
hi ,
thank you guys for the support.
i am into a data migration project.
i need the initial setup for the idocs and bapis.
i dont know anything about these so can u send me the process for the setup and the data migration process too with idocs and bapis.
i didnt understand when they asked me if we can data migrate with a ALE, is that the same as using idocs and bapis or is it a different approach.
u can send me at any inofrmation connected to my eamil addr.
i would really appreciate that.
thank you.have a look at the links
hope they will help u
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
ALE/ IDOC/ XML
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
IDOC Convertion
/people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
links on bapis
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
http://www.erpgenie.com/abap/bapi/example.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm
http://www.allsaplinks.com/bapi_example.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
For More Info check this thread.
https://forums.sdn.sap.com/click.jspa?searchID=2721366&messageID=1761503
Do reward if helpful -
Data migration ALE or idocs and bapis
hi ,
thank you guys for the support.
i am into a data migration project.
i need the initial setup for the idocs and bapis.
i dont know anything about these so can u send me the process for the setup and the data migration process too with idocs and bapis.
i didnt understand when they asked me if we can data migrate with a ALE, is that the same as using idocs and bapis or is it a different approach.
u can send me at any inofrmation connected to my eamil addr.
i would really appreciate that.
thank you.Hi,
Outbound:
Step 1. Application document is created when transaction is saved.
2. Message control is invoked.
3. Messages are processed by system.
4. Messages are Edited (if desired).
5. Output (ALE / EDI) is checked
6. Validate against Message control record from Partner Profile
7. Application Document is saved.
8. Entry NAST table is created for every selected output program
along with Medium & Timing.
9. Check for Process Immediately .
If (yes)
Determine Processing Program from TNAPR Table.
ELSE
Execute RSNASTED Program.
10. Read Partner Profile to determine Process Code.
11. Process Code points to the Function Module & Invoked.
12. IDoc is generated.
13. Check for ALE Request.
if (Yes)
Perform Filters, Conversions, Version Changes etc.
Else.
IDoc is stored in DATABASE.
INBOUND:
Step 1. EDI Subsystem creates an IDoc file from EDI Messages
2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.
3. Data in Control Record is validate against the Partner Profile.
4. IDoc is generated in Database and syntax check is carried out.
5. IDoc file is deleted once file read.
6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.
7. Check for Process Immediately.
If NO
Execute RBDAPP01 Program
Else
Read Process Code from Partner Profile
Process Code Points to Function Module
Application Document Posted.
further help:
check url
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/ale/configuration.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapdevelopment.co.uk/training
And also u can get lots of inof from the below link.
http://www.sapgenie.com/ale/why_ale.htm
Just follow the procedure
Sending System(Outbound ALE Process)
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Create Model View
Tcode BD82 ? Generate partner Profiles & Create Ports
Tcode BD64 ? Distribute the Model view
Message Type MATMAS
Tcode BD10 ? Send Material Data
Tcode WE05 ? Idoc List for watching any Errors
Receiving System(Inbound ALE )
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 ? Idoc List for inbound status codes
ALE IDOC Steps
Sending System(Outbound ALE Process)
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Create Model View
Tcode BD82 !V Generate partner Profiles & Create Ports
Tcode BD64 !V Distribute the Model view
This is Receiving system Settings
Receiving System(Inbound ALE )
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 !V Idoc List for inbound status codes
Message Type MATMAS
Tcode BD10 !V Send Material Data
Tcode WE05 ( )
The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
Change( )
The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
just refer to the link below
http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
Also refer to the following links..
www.sap-img.com/bapi.htm
www.sap-img.com/abap/bapi-conventions.htm
www.planetsap.com/Bapi_main_page.htm
www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
Example Code
U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
U can find these parameters for a particular condition type in table KONV.
*& Form saveTransactionJOCR
text
--> p1 text
<-- p2 text
FORM saveTransactionJOCR .
data: salesdocument like BAPIVBELN-VBELN,
order_header_inx like bapisdh1x,
order_header_in like bapisdh1,
return type standard table of bapiret2 with header line,
conditions_in type standard table of bapicond with header line,
conditions_inx type standard table of bapicondx with header line,
logic_switch like BAPISDLS,
step_nr like conditions_in-cond_st_no,
item_nr like conditions_in-itm_number,
cond_count like conditions_in-cond_count,
cond_type like conditions_in-cond_type.
salesdocument = wa_order_information-VBELN.
LOGIC_SWITCH-COND_HANDL = 'X'.
order_header_inx-updateflag = 'U'.
conditions
clear conditions_in[].
clear conditions_inx[].
clear: step_nr,
item_nr,
cond_count,
cond_type.
step_nr = '710'.
item_nr = '000000'.
cond_count = '01'.
cond_type = 'ZCP2'.
CONDITIONS_IN-ITM_NUMBER = item_nr.
conditions_in-cond_st_no = step_nr.
CONDITIONS_IN-COND_COUNT = cond_count.
CONDITIONS_IN-COND_TYPE = cond_type.
CONDITIONS_IN-COND_VALUE = 666.
CONDITIONS_IN-CURRENCY = 'EUR'.
append conditions_in.
CONDITIONS_INX-ITM_NUMBER = item_nr.
conditions_inx-cond_st_no = step_nr.
CONDITIONS_INX-COND_COUNT = cond_count.
CONDITIONS_INX-COND_TYPE = cond_type.
CONDITIONS_INX-UPDATEFLAG = 'U'.
CONDITIONS_INX-COND_VALUE = 'X'.
CONDITIONS_INX-CURRENCY = 'X'.
append conditions_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = salesdocument
ORDER_HEADER_IN = order_header_in
ORDER_HEADER_INX = order_header_inx
LOGIC_SWITCH = logic_switch
TABLES
RETURN = return
CONDITIONS_IN = conditions_in
CONDITIONS_INX = conditions_inx
if return-type ne 'E'.
commit work and wait.
endif.
ENDFORM. " saveTransactionJOCR
Bdc to Bapi
The steps to be followed are :
1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
for VA01 use BAPI_SALESORDER_CREATEFROMDAT2
2. Create a Z program and call the BAPi (same as a Funtion module call).
2. Now, if you see this BAPi, it has
-> Importing structures.
eg: SALESDOCUMENT: this will take the Sales order header data as input.
-> Tables parameters:
eg: ORDER_ITEM_IN: this will take the line item data as input.
Note :
Only specify fields that should be changed
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the checkboxes
The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
Maintain quantities and dates in the schedule line data
Possible UPDATEFLAGS:
U = change
D = delete
I = add
Example
1. Delete the whole order
2. Delete order items
3. Change the order
4. Change the configuration
Notes
1. Minimum entry:
You must enter the order number in the SALESDOCUMENT structure.
You must always enter key fields for changes.
You must always specify the update indicator in the ORDER_HEADER_INX.
2. Commit control:
The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
For further details... refer to the Function Module documentation for the BAPi.
Bapi to VB(Visual Basic)
Long back I had used the following flow structure to acheive the same.
Report -> SM59 RFC destination -> COM4ABAP -> VB.exe
my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.
You need to have com4abap.exe
If com4abap is installed you will find it in sapgui installatin directory , C:\Program Files\SAPpc\sapgui\RFCSDK\com4abap.
else refer OSS note 419822 for installation of com4abap
after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code.
for setting up com4abap and rfc destination please refer to the documentation for com4abap.
Invoke NEW DCOM session
call function 'BEGIN_COM_SESSION'
exporting
service_dest = service_dest "(this will be a RFC destination created in SM59)
importing
worker_dest = worker_dest
exceptions
connect_to_dcom_service_failed = 1
connect_to_dcom_worker_failed = 2
others = 3.
call function 'create_com_instance' destination worker_dest
exporting
clsid = g_c_clsid
typelib = g_c_typelib
importing
instid = g_f_oid
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
call function 'com_invoke' destination worker_dest
exporting
%instid = g_f_oid
%method = 'UpdatePDF'
sntemp = g_v_const_filent
snsysid = sy-sysid
snflag = 'N'
tables
rssaptable = g_t_pdfdetail1
%return = g_t_pdfdetail1 "t_test
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
then close the com session , using
FM delete_com_instance
FM END_COM_SESSION
Thanks and regards,
Sarada -
Are there any standard Idocs or Bapis for posting the data into transaction
Hi,
Are there any standard Idocs or Bapis for posting the data into transactions ME42N and IK11?
Thank You.Thank you.
Any idea of the other one? -
Regarding Selection of IDOC Or BAPI
Hi All,
I have One Doubt on Choosing IDOC or BAPI
If We Have Scenario like File to R/3 .
Here I have the Standard IDOC And I have a Suitable BAPI also To Achieve this.
Then Which one I have to Select in both
Regards
VamsiHi vamsi for your scenario File to R/3
you can go for file to Idoc scenario
below links will help u for this scenario , if stuck anywhere pls mail me , will solve
You can look at the following url (contains step by step approach):
http://www.****************/articles/XI/XIMainPage.htm
Following blog is step by step of File to Idoc scenario
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping File to IDoc
For more information please find the belwo links:
http://help.sap.com/saphelp_nw2004s/helpdata/en/d4/0a43a124e8924ea890cf0855860db5/frameset.htm
For any File -> XI -> IDoc scenario ref:
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
Just have a look at this link:
file to idoc scenario
Pls reward if useful -
Hi All
I have to implement a scenario which converts Idoc to BAPI n vice versa
Can u give me step by step solution for the above..
Plz find the solution as early as popssible
ThanksHI,
Your scenarios are IDOC to RFC and RFC to IDOC.
Follow the below links
for IDOC -> XI:
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
for XI -> RFC
weblog have a look at this one (with BPM):
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
Ravi.
Maybe you are looking for
-
Display items which doesn't have any posting data in report painter
I made some reports by report painter. The problem is that when I run these reports, they can't display the items which doesn't have any posting data. But my customers want to display all items whatever it has been posted or not , can you give me the
-
Please reply ASAP-Discoverer and BI Publisher
Hi, Could some one please list the pros and cons from switching from Discoverer to BI Publisher? I know it seems kinda vague but anything you have experienced would be helpful. New to both tools at this moment. Thanks so much!
-
I have had my ipod since August, and up until about 2 weeks ago its been great. All of a sudden, my ipod froze and displayed and error message. I left it alone, and a few hours later it was working again. This happened a few times for a week, where i
-
Hello All, I am trying out a program which uses vector of objects.It is throwing an exception when I compile it.The aim of the program is. for eg if we have a set of producers count =5 P1 P2 P3 P4 P5 7 8 9 10 11 C1 C2 C3 C4 C5 1 2 3 4 5 store all tho
-
Reg:doubt in dynamic generated internal table
hi everyone, i generated a internal table dynamically,the output is in fied symbol,i want to create a internal table using the field symbol sturture,how to create that???? plz tell me how to create a internal table referencing field symb