Hi In ALE ,IDOC HOW CONTROL DATA IS TRANSFERRED
Hi Experts,
Hi In ALE ,IDOC HOW CONTROL DATA IS TRANSFERRED .
Thanks & Regards
Bhaskar Rao.M
Hi Bhaskar Rao,
Good Check out the following documentation.
/people/kevin.wilson2/blog/2006/11/13/ale-scenario-development-guide
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1230385,00.html
Some good links on ALE/IDOC
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
Please check this online document for ALE and IDoc.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
Also check this links for additional information.
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
Good Luck and thanks
AK
Similar Messages
-
ALE: IDOC material master data
I created a reduced material idoc type with only segment:
E1MARAM, E1MAKTM, E1MARCM and E1MBEWM and I select a handfull of fields in each segment.
I only want views BASIC 1 & 2, Classification , Plant Stock and Label.
I get additional views that I don't need, how do I configure to get only views I want based on data in IDocShyla,
I did that. And the IDOCs are being sent successfully.
The problem is that when I look at the generated material, all the views are created when I only specified data for basic views in IDOC. -
ALE/IDOC-How to create Change Pointers for Custom Infotype
Hi,
My requirement is to transfer custom OM infotype changes using IDOCs.
But its not creating any change pointers for that infotype.
The message used is a copy of standard message OM_HRMD_A.
Can any one please help me out in this issue.
Thanks,
SarikaHi Sarika,
How did you solve this issue? We are also facing a similar problem, it will be helpful if you could explain how you found out the solution.
Thanks
Anu. -
ALE/IDOC:The group data for the material CS94163AOOO is locked by ECPUSER
Dear All,
I have extended the idoc for MATMAS and getting -The group data for the material CS94163AOOO is locked by ECPUSER
error on receving ( production ) server.I have written BDC in Z-function module to upload the data for extended segments after calling IDOC_INPUT_MATMAS01 function module.
When the same scenario executed in development server the material is not getting locked and idoc is posted successfully.
Please guide to resolve the error.
Thanks,
Sanjay Deshpande.
Edited by: sanjay_123 on Nov 1, 2009 4:41 PMHello,
Can you pls try to use ENQUEUE_E_TABLE or FM specific to lock/unlock MARA table during Idoc creation.
and put some WAIT statement before creation.
CALL FUNCTION 'ENQUEUE_EMMARAS'
EXPORTING
MODE_MARA = 'S'
MANDT = SY-MANDT
MATNR = 'CS94163AOOO'
X_MATNR = ' '
_SCOPE = '2'
*_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Then write code for creation of MARA
Unlcok now like this
CALL FUNCTION 'DEQUEUE_EMMARAS'
EXPORTING
MODE_MARA = 'S'
MANDT = SY-MANDT
MATNR = 'CS94163AOOO'
X_MATNR = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
~Pramod
Edited by: PKUPADHYAY on Nov 1, 2009 5:40 PM -
How to find how much data is transferred. AT&T is putting a "Cap" of 150GB per month.
I hace heard there is a "Meter" available for ATT customers, but I can't find it. Does Firefox have this kind of information available?
Go to the link below and sign in with your ATT e-mail address and password:
*www.MyUsage.att.com,
<br />
<br />
'''You need to update the following.''' The Plugin version(s) shown below was/were submitted with your question and is/are out of date. You should update to avoid known security issues with the version(s) you have installed. Click on "More system info..." to the right of your question to see what was included with your question.
*Next Generation Java Plug-in 1.6.0_16 for Mozilla browsers ('''''9 updates behind''''')
#'''''Check your plugin versions''''' on either of the following links':
#*http://www.mozilla.com/en-US/plugincheck/
#*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
#*'''Note: plugin check page does not have information on all plugin versions'''
#*There are plugin specific testing links available from this page:
#**http://kb.mozillazine.org/Testing_plugins
#'''Update the [[Java]] plugin''' to the latest version.
#*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
#**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
#*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
#* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
#* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
#*Java Test: http://www.java.com/en/download/help/testvm.xml -
ALE/IDOC for Data Migration of some master data
Are ALE/IDOC available for data migration of the following master data:?
1)General Tasklists in PM
2)Equipment Tasklists in PM
3)Single Cycle plans in PM
4)Strategy plans in PM
5)Equipments
6)Functional locations
7)Measuring points
8)Work Centers
9)Equipment BOMS
10)QM Info Records
11)Sampling procedure
12)Certificate Profiles QM
13)Inspection Plans
14)Material master-QM View
15)PP Recipes
16)Equipment BOM
If anyone has worked worked on ALE/IDOC for data migration, please guideHi Dirk ,
Thanks for your reply . Can we use matmas03 for loading. What will be the differences between these two IDOCS. -
Hi All,
I am an abaper with 1.5 yrs of experiance, i have worked in BDC, Reports, SAP Scripts, Smartforms & dailog programming.
I am Intrested in learning ALE & IDOCs.
please provide some info like What is ALE & IDOCs, How it is used & where it is used.
Appropriate points will be rewarded.
Thanks in Advance.HI,
IDOC stands for Intermediate Document. It is simply a data container used to exchange information between any two processes that can understand the syntax and semantics of the data. IDOCs are stored in database .
IDOC Type defines the structure and format of the business document that is to be exchanged between two systems. (Transaction WE30)
Characteristics:
Name
Permitted Segments
Hierarchy of segments
Mandatory/Optional segment
Min/Max range of each segment
A message type represents a specific type of document that is transmitted between two partners. Messages will be logically related.
A segment defines the format and structure of a data record. Segments are reusable components, which can be used in more than one IDOC type. (Transaction WE31)
Components:
Segment type
Segment Definition
Segment Documentation
At runtime the following events occur:
A unique IDOC Number is allocated
One control record is attached to the IDOC
Segments translate into data records
Status records are attached
Syntax rules are checked
It contains all of the control information about an IDOC. It includes the IDOC number, sender and receiver information, and information such as the message type it represents and the IDOC Type. Control records are stored in EDIDC table.
Administrative section contains the segment
name, client, IDOC No, segment No and
hierarchy level information
Data section of a data record is a stream of
1000 bytes where the actual data resides.
The data section is mapped to a segment
type to interpret the meaning of various
data values in a record
Status records are attached to an IDOC throughout the process as the IDOC achieves different milestones or encounters an error. At every milestone a status code, date, and time are assigned. Status codes 01 to 49 are reserved for outbound process, and 50 and above are reserved for inbound process. It is stored in EDIDS table .
Developing IDOC Type
Analyze the Data
Create Data Elements (SE11)
Create Segments (WE31)
Create Basic IDOC Type (WE30)
Release the Segment Type and
Basic IDOC Type
Configuration for Outbound
Create a new Message Type (WE81)
Link the IDOC type and Message
Type (WE82)
Create/Change Partner Profiles (WE20)
Program Flow for Outbound
Provide the selection Screen to enable a
user to specify the objects for which IDOCs
are to be generated.
Data Retrieval
Populate the Control Record
Populate the Data Records
Call the ALE/IDOC layer to create IDOCs
Create a new Message Type (WE81)
Link the IDOC type and Message
Type (WE82)
Allocate the Function Module to the Logical
Message (WE57)
Define the Settings for Inbound Function
module (BD51)
Configuration for Inbound
Create a new Process Code (WE42)
Create/change Partner Profiles
Program Flow for Inbound
Read the control record information and
validate.
Read the IDOC data for an IDOC.
Parse through each data record and build
the required internal table.
Post it to Database.
Populate the Return Parameters
Dear SWAROOP,
User ID: p238055
Password: e?dR9$ac
Dear MANIKANDAN,
User ID: p238058
Password: wm2FfKP?
Dear ravi,
User ID: p233746
Password: apBtUcP9
HI,
IAM ALSO GIVING A DOCUMENT WHICH HELPS YOU TO UNDERSTAND EASILY AND YOURSELF CAN WORKOUT WITH THIS REAL TIME SCENARIO WHICH TRANSFERS THE DATA BETWEEN TWO SYSTEMS.
Application Linking and Enabling (ALE)
In this document you will learn the step-by-step procedure to setup the ALE system and go through a transaction between two clients
For our purpose we have two clients
namely Client 100 and Client 200.
System name is SAPKDC (FOR BOTH 100 AND 200 CLIENTS).
Distribution of Material Master Data Between two Systems
1) SETUP LOGICAL SYSTEM: (Note: Do Not Create This Step)
To do this follow the following steps
Execute SALE Transaction Code
On The Screen Click on Sending and Receiving Systems.
Then Click on Logical Systems.
Then Click Defining Logical Systems.
Click New Entries Button
(E.g. (LG100 sending system)
(LG200 receiving system))
Enter two logical system names and their description.
Save
Comeback to SALE Transaction Code screen.
2) Now you have to allocate the created logical systems to respective clients.( Note: Do Not Create This Step)
LG100 assign to client 100
LG200 assign to client 200
To do this, do the following.
Click Assigning Client to Logical System.
Ignore the message that comes up on the screen.
Select client 100
Click details button on the toolbar icon or press F2.
In the logical system box, enter LG100.
Click on the save Icon
Click the back button.
Now select client 200.
Click details icon or press f2.
In logical Systems box, enter LG200.
Save
Back.
Comeback to SALE Transaction Code screen.
3) Maintain RFC Destination: (TR.CODE:SM59)
(Note: Do Not Create This Step)
Click Create Button on the Screen
On the Screen Maintain RFC Destination i.e LG200.
Enter LG200 in RFC destination box.
Connection type is 3
Give a description for the RFC destination.
Maintain Technical Settings on Details on Technical Settings tab
Target Host as : SAPKDC (NOTE: Save it as a Host Name)
Maintain Logon Details on Logon/Security tab.
Language: EN.
User: MMUSER200 (This is the logon for dist.)
Client : 200
Password: MM1234.
Save.
Click on create to do the above process for Client 200 in
The client 200 system.
4) Maintain Distribution Model.(BD64). (ABAPer role starts here)
Execute Maintain distribution model directly for
creating the model.
Click on change mode button on App tool bar of the Screen.
Create Model View pushbutton on App tool bar of the Screen.
A pop screen will appear in which you specify
Short text as Distribution for MM Data.
Enter Technical Name as LGMODEL.
Select Model View and Click on Add Message Type Pushbutton on App toolbar of the Screen.
A popup screen will appear in which you specify
Model View as LGMODEL.
Sender as LG100.
Receiver as LG200.
Again Click on Add Message Type Pushbutton on App toolbar of the Screen.
A popup screen will appear in which you specify
Model View as LGMODEL.
Sender as LG200.
Receiver as LG100.
SAVE.
On the same screen goto Menubar and select Environment.
And then select Generate Partner Profiles , then execute it.
On the Screen specify the Logical System as LG200.
Then execute the screen.
Click back.
Again On the same screen goto Menubar and select EDIT.
Again select Model View and then select Distribute.
****LOGIN to client 200.
Execute Tr.code BD64 and again On the same screen goto Menubar and select Environment.
And then select Generate Partner Profiles , then execute it.
On the Screen specify the Model View as LGMODEL
And Specify the Logical System as LG100.
Then execute the screen.
Click back.
*******Switch back to client 100 Session.
5) Create Material using MM03 Tr.Code.
Enter the material name as LGMATERIAL
Industry sector as Mechanical Engineering
Material Type as Finished Products.
And then Click on Data Pushbutton on the App tool bar.
Select views.
In the select views box for materials check basic data 1 AND 2.
Click enter icon.
In the next screen that you get
Give the text of the material as NEW MATERIAL.
Base unit of measure as KG.
Gross Weight as 200.
Net Weight as 100.
Weight Unit as KG.
In the description area language (E) and material description.
Click Save.
Now I Created a Material in Client 100 , I want to transfer this data to Client 200.
6) Execute BD10 to transfer the material in which you specify
the material as LGMATERIAL and
message type as MATMAS (client100).
Then a Screen will be displayed in which it shows that
1 Master Idoc Generated .. Enter
1 Communication Idoc Generated..Enter.
*******LOGIN to Client 200.
7) Execute BD11 to get the material in which you specify
the material as LGMATERIAL and
message type as MATMAS (client200).
8) Execute Tr.code MM03 and give the material as LGMATERIAL
and see that the material is displayed as it was in Client 100.
If not follow these steps.
9) Execute Tr.code WE19( for rectification of errors in client200).
Specify the Existing Idoc Number and Executes it .
A Screen is displayed in which you specify the corresponding Function Module as INPUT_IDOC_MATMAS01 and execute it.
10) Execute Tr.code MM03 and give the material as LGMATERIAL
and see that the material is displayed as it was in Client 100.
Now the Material is correctly displayed in Client 200.
11) Monitoring of IDOCS.
Transaction Codes:
IDOC Display of Status: WE 05.
IDOC Date and Time: WE07. -
How many types of ports are there which we use for data transfe in ale/idoc
friends let me know how many types of ports are there which we use for transfering
data in ale/idocs?Hello,
you can use file port,trnasactional RFC port.FI you are using IDOC-XML conversion combination,then you can XML port also.
Thanks -
How to use ale/idocs in sap crm to transfer master and transactional data
hi all,
I am working on sap crm7.0 ehp1. I want to transfer my master and transactional data from crm development system to crm quality system here through idocs. I am aware of basic ale settings and successfully transfe the ztable data through idocs. But i am not able to find any proper step by step procedure for maste and transactional data in sap crm. Also sap ecc tcode NACE is not available here.
pls help..
regards,
kavita chaudharyKavita,
In CRM, Exchange Interface (XIF) ALE/IDOC is available to transfer master and transaction data. You can go through the following link for set up.
Basic Data exchange set up for ALE IDocs - Wiki - SCN Wiki
You can extend the standard XIF IDOCs using Transaction BDFg as well.
Thanks,
Ravi -
Data transfer using ALE/IDOC into XML.
Dear All,
I have to transfer FI document data (FB01) from the sap system ,convert it into XML and dump it in 1 of the file servers.I want to do this using ALE/IDOC.Is it possible to do the same and how.Similarly i want to do the same for Vendor and Customer master i.e sending the data in XML format.
Kindly Suggest how do i go about doin the same..Its very urgent.Please help.
Thanks & Regards,
Lailu Philip.In continuation:
Example Purchasing & Selling scenario
We will develop a custom IDoc to carry the billing number from the Service Receivers system to the Service Providers system. We will populate the IDoc in a user exit on the sending side and we will process the transaction on the receiving side using a custom function module and a BDC transaction call.
No rule conversion, segment filtering or version conversion will be implemented in the model as described in Figure 1.
Requirements
Working ALE environment - See ALE Basis Configuration Guide;
ALE scenario design together with the business requirement;
Development access; and
ALE configuration access.
NOTES:
1. All IMG references to transactions are located in the transaction SALE which is the ALE portion of the IMG
2. This is one way of developing a scenario where no message control exists. If message control exist (EG. On purchase orders) then NAST can be used to call an outbound function module that would create the required IDocs.
3. Extensive knowledge of IDocs and ALE basis configuration is required in order to understand this guide.
2. OUTBOUND PROCESSING
2.1. Create IDoc type (WE30) Client independent
The IDoc type refers to the IDoc structure that you will require for your development. In our case the IDoc type is called ZINVRV01. This IDoc type will have 1 segment called Z1INVRV with 2 fields, LIFNR & XBLNR, in this segment. If you require many segments or nested segments then they are also created using the same procedure.
We will create the IDoc of the following structure:
ZINVRV01
Purchasing and Selling - Invoice receipt reversal
Z1INVRV P&S - Segment 1
Segment fields
LIFNR Vendor account number
XBLNR Reference document number
Figure 3: IDoc type ZINVRV01
To create the IDoc type, follow these next few steps:
Enter transaction WE30 (ALE -> Extensions -> IDoc types -> Maintain IDoc type)
Type in ZINVRV01 and click on Basic IDoc type, click the Create icon
Click on Create new (we are creating an IDoc from scratch but you may want to copy another IDoc if it is similar to your requirements) and enter a description, and press enter
Click on ZINVRV01 and then on the Create icon
Enter Z1INVRV as the segment type (must start with Z1), check mandatory if the segment must exist (in this case check it), enter 1 in minimum number and 1 as maximum number. (Make the maximum number 9999999999 if there are going to be many of these segments in each IDoc. IE. When line items are passed via IDocs), click on Segment editor
Enter a description for your segment type and create
Enter a description for your segment, enter each field required in your IDoc, in our case type LIFNR across for Field name, DE structure and DE documentation, repeat for XBLNR and press enter to validate.
Save and generate, press back
To release the segment choose Goto, Release from the menu
Check the box on the line of your new segment
Save, back and enter
Your IDoc type structure should be displayed with your new segment
Save and back
To release the IDoc type choose Extras, Release type from the menu and Yes
Your IDoc is now ready for use. If you need to add fields or segments to your IDoc type, you will need to cancel the release of the IDoc type as well as the segment release using a similar procedure followed above (except now you uncheck the release box for the segment and you choose cancel release for the IDoc type).
2.2. Create message type (WE81) Client independent
To create a new message type, follow these next few steps:
Enter transaction WE81 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Create logical message type)
Choose Create logical message type by double clicking on it
Click on change icon to enter change mode
Click on New entries to add a new type
Enter the required message type, in our case it is ZINVRV and an appropriate description
Save and exit.
Your message type has now been created. The next step will be to link it to the IDoc.
2.2.1. Link message to IDoc type (WE82 & BD69) Client independent
To link the message type to the IDoc type follow these next few steps:
Enter transaction WE82 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> EDI: Message Types and Assignment to IDoc Types)
Click on change icon to enter change mode
Click on New entries to create the link
Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
Save and exit
Enter transaction BD69 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Assign message type to IDoc for ALE)
Click on change icon to enter change mode
Click on New entries to create the link
Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
Save and exit
Your IDoc is now linked to your message type. We still need to link object types and add the message to the model before we can use the message.
2.2.2. Maintain object type for message type (BD59) Client independent
The ALE objects are used to create links between IDocs and applications objects, to control the serialisation, to filter messages in the customer model and to use listings.
For our own message type and IDoc you must maintain object types for the links.
If you want to check the serialisation for the message type, then you must maintain object types for the serialisation. If no serialisation object has been maintained for a given message type, then the serialisation will not be checked for this message type.
To add an object type to our message type, follow these next few steps:
Enter transaction BD59 (ALE -> Extensions -> ALE object maintenance -> Maintain object types)
Type in your message type ZINVRV and press enter
Click on New entries
Enter your object type, LIFNR (We need to use the vendor as a filter object), the segment name where LIFNR resides, Z1INVRV, a number 1 for the sequence followed by the actual field name LIFNR
Save and exit.
You have now created an object that well use as a filter object in the customer model to direct the flow of messages to the various logical systems based on the vendors in the filter of the message type ZINVRV.
We now need to add our new message type to the distribution model.
2.3. Configuring the Distribution Model
This task is performed on your ALE reference client.
2.3.1. Manual Configuration (BD64) Client dependent
To manually configure the customer distribution model, read the ALE configuration procedure, and follow these steps:
Perform the Maintain customer distribution model directly function. (ALE -> Distribution customer model -> Maintain customer distribution model directly)
Specify the customer model you want to maintain and the logical system that is to be the sender of the messages OR create a new model. (Create model ALE with logical system ALELS1C400)
Choose the receiving systems to which the sending system must forward message type ZINVRV to.
For each receiving logical system allocate the message type necessary for communication to the receiving systems as per ALE configuration procedure.
Create filter objects (in our case LIFNR as the object type with the associated vendor number, 0000018001 with leading zeros, in the object area) for the message types.
Save the entries.
NOTES:
You cannot maintain a message type between the same sender and receiver in more than one customer distribution model.
Only the owner is authorised to modify the model.
To change the owner of a model, choose the 'Maintain ownership of customer distribution model' function. Make sure that all changes will be distributed to all systems that know the corresponding model. To do so, you can use the correction and transport system.
To transport the customer distribution model you should use the Distribute customer model function of the IMG as described below.
2.3.2. Distribute customer model (BD71) Client dependent
After the customer model has been created centrally, it must be distributed to the other remote systems. This entails first of all setting up the communication for the distributed systems and then sending the model.
2.3.2.1. Distribute Model (BD71) Client dependent
This task is performed on your ALE reference client. To distribute the customer distribution model, read the ALE configuration procedure and follow these steps:
Make the settings for the communication with the other decentral systems, you have not set them yet.
Define the RFC destination for R/3 connections whose names correspond to the name of the corresponding logical system.
Create the output partner profile.
Distribute the customer model
Specify the name of the customer model.
You must specify the target system to which you want to distribute the customer model.
You must repeat this function for every distributed logical system.
2.3.2.2. Maintain sending system partner profile (WE20) Client dependent
With this function, you define the partner profiles for all outbound and inbound messages on the basis of the customer distribution model.
After you have defined and distributed the customer model, you will have to maintain the partner profiles locally. To do this read the ALE configuration procedure.
Enter the output mode (background, immediately) and the package size for outbound processing.
Requirements
The customer model must be maintained.
RFC destinations must be maintained.
The customer model must be distributed.
To ensure that the appropriate persons in charge are informed if a processing error occurs, you must make settings in: Error processing Maintain organisational units.
2.4. Populate & distribute IDoc using ABAP
An IDoc consists of a control record with structure edidc and one or more data records with structure edidd. The control record contains the sender and recipient of the IDoc, as well as information on the type of message.
To be able to pass an IDoc to the ALE layer, you must set up a field string with structure edidc and an internal table with structure edidd. They are used to call function module master_idoc_distribute, which performs the save to the database and triggers the dispatch if necessary.
2.4.1. Example code
The code displayed below does the following:
populates our IDoc segment Z1INVR with the 2 fields XBLNR and LIFNR, populates the segment name and appends this to an internal table used to store the IDoc data;
populates the control record info with the message type and IDoc type; and
calls the MASTER_IDOC_DISTRIBUTE function module which distributes the IDoc as configured in the customer distribution model.
Data declaration statements
DATA: C_INVREV_SEGNAME(7) TYPE C VALUE 'Z1INVRV',
C_INVREV_MESTYPE(6) TYPE C VALUE 'ZINVRV',
C_INVREV_IDOC_TYPE(8) TYPE C VALUE 'ZINVRV01',
Z1INVRV LIKE Z1INVRV,
C_INVREV_DOCTYPE LIKE BKPF-BLART VALUE 'YY',
IDOC_CONTROL LIKE EDIDC,
T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
Move the document header into a structure
LOOP AT DOC_HEAD_TAB INTO DOC_HEAD.
ENDLOOP.
Move the document item data into a structure
LOOP AT DOC_ITEM_TAB INTO DOC_ITEM WHERE NOT ( LIFNR IS INITIAL ).
ENDLOOP.
Populate the IDoc segments field with the required data
CLEAR Z1INVRV.
Z1INVRV-LIFNR = DOC_ITEM-LIFNR. Store vendor number for filter
Z1INVRV-XBLNR = DOC_HEAD-XBLNR. Billing number
IDOC_DATA-SEGNAM = C_INVREV_SEGNAME. Segment name
IDOC_DATA-SDATA = Z1INVRV. Segment data
APPEND IDOC_DATA. Populate IDoc internal table
Move the control data info required for the distribution
IDOC_CONTROL-MESTYP = C_INVREV_MESTYPE.
IDOC_CONTROL-DOCTYP = C_INVREV_IDOC_TYPE.
Call the distribute function with the required parameters
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
EXPORTING
MASTER_IDOC_CONTROL = IDOC_CONTROL
TABLES
COMMUNICATION_IDOC_CONTROL = T_COMM_CONTROL
MASTER_IDOC_DATA = IDOC_DATA
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5.
Figure 4: Outbound processing example code
NOTE:
For debugging purposes, use transaction WE05 (IDoc overview) to see check your IDoc status, or to see whether an IDoc was created/
3. INBOUND PROCESSING
3.1. Create Function Module
This function module is called when a message type, of type ZINVRV, comes into the receiving system. This needs to be configured and is dealt with later in this section. The function module is passed the IDoc as a parameter.
Example parameters
Import parameters Reference field Opt Y/N
INPUT_METHOD BDWFAP_PAR-INPUTMETHD N
MASS_PROCESSING BDWFAP_PAR-MASS_PROC N
Export Parameters Reference field Opt Y/N
WORKFLOW_RESULT BDWFAP_PAR-RESULT N
APPLICATION_VARIABLE BDWFAP_PAR-APPL_VAR N
IN_UPDATE_TASK BDWFAP_PAR-UPDATETASK N
CALL_TRANSACTION_DONE BDWFAP_PAR-CALLTRANS N
Table Parameters Reference field Optional Y/N
IDOC_CONTRL EDIDC
IDOC_DATA EDIDD
IDOC_STATUS BDIDOCSTAT
RETURN_VARIABLES BDWFRETVAR
SERIALIZATION_INFO BDI_SER
Exceptions
WRONG_FUNCTION_CALLED
Example code
The code displayed below does the following:
populates a BDC table with the IDoc info;
calls the transaction via a BDC call; and
updates the IDoc status according to the BDC error status.
EXTRACT FROM: Z_IDOC_INPUT_ZINVRV
Declaration of local variables
DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.
*-Loop through the IDOCs
LOOP AT IDOC_CONTRL.
*---Loop through the data for the IDOC
LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
CASE IDOC_DATA-SEGNAM.
WHEN C_SEGNAM.
Here we get the info from the idoc table
IT_Z1INVRV = IDOC_DATA-SDATA.
ENDCASE.
PERFORM REV_INV.
ENDLOOP.
PERFORM UPDATE_IDOC_STATUS.
ENDLOOP.
FORM REV_INV "Reverse invoice form
Local variables & constants
DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'. "BDC transaction code
Now we can build the bdc table to call the reversal transaction start of screen 109
CLEAR BDC_TAB.
BDC_TAB-PROGRAM = 'SAPMV60A'.
BDC_TAB-DYNPRO = '109'.
BDC_TAB-DYNBEGIN = 'X'.
APPEND BDC_TAB.
Document number
CLEAR BDC_TAB.
BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.
BDC_TAB-FVAL = IT_Z1INVRV-XBLNR. "Billing document number
APPEND BDC_TAB.
OK Code for screen 109
CLEAR BDC_TAB.
BDC_TAB-FNAM = 'BDC_OKCODE'.
BDC_TAB-FVAL = 'SICH'.
APPEND BDC_TAB.
Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale. The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.
CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.
Store the return code for use in another form (status update)
RETURN_CODE = SY-SUBRC.
Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.
IF SY-SUBRC NE 0.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'ZINVRV'
USER = C_ALE_USER
KEEP = 'X'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = C_TCODE
TABLES
DYNPROTAB = BDC_TAB.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
ELSE. "No problems
C_EXISTS = 'N'.
Select from the billing document table to get sales doc number
SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.
Select from the sales document table to get user status number
SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND
POSNR = VBRP-AUPOS.
Select from the status table to change the user status to pending
SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND
STAT LIKE C_USER_STATUS.
IF JEST-STAT = C_US_PENDING. "User status is pending
JEST-INACT = C_UNCHECKED. "Make pending the active status
UPDATE JEST.
C_EXISTS = 'Y'. "I.E. An entry is already in table
ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.
JEST-INACT = C_CHECKED. "Make everything else inactive
UPDATE JEST.
ENDIF.
ENDSELECT.
IF C_EXISTS = 'N'. "I.E. Pending has never been a status before
JEST-OBJNR = VBAP-OBJNR.
JEST-STAT = C_US_PENDING.
JEST-INACT = C_UNCHECKED. "Make pending the active status
INSERT JEST.
ENDIF.
ENDSELECT. "Select from VBRP (Billing document table)
ENDIF.
ENDFORM. " REV_INV
FORM UPDATE_IDOC_STATUS.
Now we check the CALL TRANSACTION return code and set IDOC status
CLEAR IDOC_STATUS.
IF RETURN_CODE = 0.
WORKFLOW_RESULT = '0'.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '53'.
IDOC_STATUS-UNAME = SY-UNAME.
IDOC_STATUS-REPID = SY-REPID.
IDOC_STATUS-MSGTY = SY-MSGTY.
IDOC_STATUS-MSGID = SY-MSGID.
IDOC_STATUS-MSGNO = SY-MSGNO.
IDOC_STATUS-MSGV1 = SY-MSGV1.
IDOC_STATUS-MSGV2 = SY-MSGV2.
IDOC_STATUS-MSGV3 = SY-MSGV3.
IDOC_STATUS-MSGV4 = SY-MSGV4.
RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
ELSE.
WORKFLOW_RESULT = '99999'.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '51'.
IDOC_STATUS-UNAME = SY-UNAME.
IDOC_STATUS-REPID = SY-REPID.
IDOC_STATUS-MSGTY = SY-MSGTY.
IDOC_STATUS-MSGID = SY-MSGID.
IDOC_STATUS-MSGNO = SY-MSGNO.
IDOC_STATUS-MSGV1 = SY-MSGV1.
IDOC_STATUS-MSGV2 = SY-MSGV2.
IDOC_STATUS-MSGV3 = SY-MSGV3.
IDOC_STATUS-MSGV4 = SY-MSGV4.
RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
ENDIF.
APPEND IDOC_STATUS.
ENDFORM. " UPDATE_IDOC_STATUS
Figure 5: Inbound processing example code
3.1.1. Debugging inbound FM
Use transaction WE19 to test inbound function module in debugging mode. Also use WE05 to view the IDocs and their statuses.
3.2. Maintain ALE attributes
The inbound function module needs to be linked to the message type and the message type needs to be linked to the appropriate inbound process code at the partner profile level before the scenario is enabled. These steps are described below in detail.
3.2.1. Link Message Type to Function Module (WE57) Client independent
To link a message (ZINVRV) type to a function module (Z_IDOC_INPUT_ZINVRV) follow these steps:
Enter transaction WE57 (ALE -> Extensions -> Inbound -> Allocate function module to logical message)
Select an entry (EG. IDOC_INPUT_ORDERS) and copy
Type in module name Z_IDOC_INPUT_ZINVRV
Type in basic IDoc type as ZINVRV01
Type in message type as ZINVRV
Type object type as IDOCINVOIC (Invoice document) - Used for workflow
Direction should be set to 2 for inbound
Enter and save
3.2.2. Define FM settings (BD51) Client independent
Enter transaction BD51 (ALE -> Extensions -> Inbound -> Define settings for input modules)
Click on New entries
Type in the name of the new function module Z_IDOC_INPUT_ZINVRV
Enter 0 for mass processing in the output column
Save and Exit
3.2.3. Maintain process codes (WE42) Client dependent
A process code needs to be maintained on each client. It then needs to be linked to the message via the partner profiles on each client. This allows the various clients to use a unique function module for the same message type.
To maintain the process code follow these steps:
Log on to the appropriate receiving system client
Execute WE42 (ALE -> Extensions -> Inbound -> Maintaining process codes inbound)
Choose Inbound with ALE service
Choose Processing with function module
Click on Processing with function module and choose create icon
Click on New Entries
Type in process code ZINR and give it a description and save
Now you are asked to Please maintain codes added in ALE entry methods, enter and choose Z_IDOC_INPUT_FIRVSL and copy it. You should choose a FM similar to your one.
Enter your process code ZINR
Enter your function module Z_IDOC_INPUT_ZINVRV
NOTE: The next 6 steps are used in workflow error handling.
Enter IDPKFIDCMT in object type
Enter MASSINPUTFINISHED in End event
Enter IDOCINVOIC in IDoc object type
Enter INPUTERROROCCURREDFI in IDoc start event
Enter INPUTFINISHEDFI in IDoc End event
Enter IDOCINVOIC in Application object type
You will need to determine the task associated with object IDOCINVOIC, and then assign the appropriate position to it. This position will then receive the application error messages via workflow.
To set up the workflow area please consult the Workflow config guide.
3.3. Create inbound partner profile
For each message type you need to maintain the inbound partner profiles.
3.3.1. Maintain receiving system partner profile (WE20) Client dependent
To maintain inbound partner profiles read the document ALE configuration procedure:
Add the message type ZINVRV with process code ZINR.
Enter the output mode (background, immediately) for inbound processing and NO message code.
Enter the position S and choose the ALE administrator 50000085. This position will then receive all the technical ALE errors via workflow.
3.4. Test
Once the inbound function module has been debugged the scenario should be ready to test in its entirety. If problems occur, read through the relevant areas of this document to check your configuration or code.
Hope this will help you,
If you want me to explain more, you can give me your email id.
Reward with points incase you are satisfied.
Regards,
Sushama -
Upload data from legacy system to SAP through ALE IDOC
Hello All,
I have a requirement where i need to upload the data from legacy system to SAP. So i am using ALE IDOC.
In my requirement i need to extend the Standard IDOC. I have extended the IDOC and even found the exit for the updation of the extended fields to SAP. My data would be be placed in the application server.
Can anybody tell me how to retrieve the data and update in the tables for the extended fields.
Could you please provide a sample program for retrieving data for IDOC.
ThanksHi,
You can find the sample code in the following link.
Re: calling idoc_input_creditor
Regards
Sajid -
Data Transfer Using ALE/IDOC
Dear All,
I have to implement an ALE\IDOC scenario and i am totally new to this.I have a web based software from where i need to pull data into SAP.
The moment billing takes place in my web based software i have to pull the required data and generate an accounting document number in SAP using transactions FB01 er FB60 and FB70 depending on vendor or customer Invoice which means i need to have my vendor and customer master data in place before this.The IDOC which i would be using is FIDCCP01.My question is:
The web based software can generate both an XML and EDI file into a domain from where SAP can fetch it. Now,
1. If they can generate an EDI file which format should it be in?
2.If EDI file generation is possible through that web based software its structure should be exactly the same as my IDOC structure right?
3. What would then be the process on SAP side to pick that EDI file data?
4. Does the transaction WE16 help in picking up an XML file format or an EDI format and convert it automatically into an IDOC and how do we go about it?
5. Now when this idoc is going to generate accounting documents against those billing documents if the customer or vendor does not exist is there a way by which i can first create this vendor\customer in the master and then continue using some other abap tool?
6. Could an email be generated automatically when teh document is posted?
I know these are a lot of questions but i really need an answer to this.
If u have an answer my alternate email id is [email protected]
Awaiting your reply shortly.
Thanks & Regards,
Lailu Philip.1. XML Format
2. Message type INVOIC01 or INVOIC02 format
3. You need to write a Z program to read data from that path and use FM IDOC_XML_FROM_FILE to convert that XML file to IDOC.
4. Use transaction we60 with above message type it will all help you need. we16 is for testing it could not be used for a solution.
5. In your Z program check before the XML is ubmitted for processing whether the customer exist by select on KNA1 if not use FM BAPI_CUSTOMER_CREATE to create and same for vendor.
6. You need to implement workflow for this.....
Reward points it this helps -
Ale/Idocs ..... what is the role of message control
Hi Guy s..
Can Any one.. tell me.. Importance of message control , Stand alone and change pointer s in Ale Idoc''' and where to use...Hi,
Message Control:
With Message Control is documents are output based on
certain conditions. In ALE scenarios this is basically used for transfer transaction data (fulfilling configuration settings defined in message control) from one system to another system.
Example: If you want to send purchase order IDocs from customer to vendor system using ALE. When saving of purchase order the IDocs should be triggered. Further the IDocs should only be sent when the purchasing document fulfils certain conditions - purchase document of a certain document type only needs to be sent. By output control we can configure the conditions and the timing (when the document should be triggered) and using ALE (as interfacing technology) we can send IDocs (containing application data fulfilling conditions) from one system to another system.
For More Info on Message Control,
/people/gajendra.bhakuni/blog/2007/03/13/message-control-output-control-for-ale
Change Pointers:
Change pointers are the mechanism through which you can send data to another SAP system or external system if there is a change happening to specific fields of master data.
Change Pointer (Master Data Distribution)
Purpose
If you want to distribute master data changes with the SMD tool (Shared Master Data), changes to the master data objects are flagged for distribution by change pointers ( ® Master Data Distribution).
The SMD tool is connected to the change document interface. If the master data changes are to be distributed, the application writes a change document. The contents of this are passed to the SMD tool. The tool writes change pointers, reads the application data and creates the master IDoc.
The master IDoc is then passed to the ALE layer, which sends it to all interested systems.
The change pointer tables (BDCP und BDCPS) should be as small as possible. Use as few change pointers as possible and delete change pointers which you no longer need.
do the following steps for Change pointers ::
1) Tcode BD61---> check the change pointers activated check box
save and goback.
2) Tcode BD50---> check the MATMAS check box save and comeback.
3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
4) Tcode BD52---> give message type : matmas press ok button.select all what ever you want and delete remaining fields.
save & come back.
5) 5) go to Tcode MM02 select one material and try to change the description and save it
it will effects the target systems material desciption will also changes
6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
give Message type : MATMAS and Executte
go through this link which ll give you detail about the change pointer
http://www.angeli.biz/www5/cookbooks/workflow/workflow_30/docu.htm
http://help.sap.com/saphelp_nw04/helpdata/en/12/83e03c19758e71e10000000a114084/content.htm
http://help.sap.com/saphelp_470/helpdata/en/dc/eb683c00e8a646e10000000a11402f/frameset.htm
Regards,
Padmam. -
How to post material master legal control data (Foreign trade export view)?
Dear Gurus,
Currently we have an external application which posts material master data into SAP using MATMAS IDOC through JCO. Now we have a requirement wherein we need to post legal control data ( especially ALNUM field) beisdes the regular views. MATMAS Idoc do not have a provision to post this specific field ALNUM ( Export control class).
Can you please suggest how to post this field value in to SAP. Do we need to use any other IDOC or RFM/BAPI as we do with classification view. In that case can you please suggest those relevant APIs.
Thanks in advance
AmanHi Aman,
I have got the same problem with this legal control field(ALNUM field).
There is no provison to post this field through IDOC. Can u please tell me what was the why u followed for this issue.
Thanks& regards,
Naren. -
Determination Idoc Control data - Outbound
Hi Guru's
I would like to know how to get the idoc control data, like receiver port and receiver partner. For example:
I have an ABAP program which collects the IDOC data at the end I want to send out the IDOC, but what is the best way to determine the receiver information? Or how does it work in relation with partner profiles?
Best regards,
Guido KoopmannYou don't need to specify all of the information - your distribution model will take care of it. Do something like this snippet of code for the control record for output-based processing:
* Populate the control record
gs_ctrlout = gs_ctrlin.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = lv_logsys
EXCEPTIONS
own_logical_system_not_defined = 1
OTHERS = 2.
IF sy-subrc EQ 0.
gs_ctrlout-sndprt = 'LS'.
gs_ctrlout-sndprn = lv_logsys.
ELSE.
ENDIF.
gs_ctrlout-serial(8) = sy-datum.
gs_ctrlout-serial+8(6) = sy-uzeit.
If you have a standalone program, before calling MASTER_IDOC_DISTRIBUTE, you just need to fill the message type and IDOC type in the control record.
Maybe you are looking for
-
IPad as controller in Fifa 14 and Real Racing 3?
I'm wondering if I can use the iPad as controller in Fifa 14 when Airplay is enable? I can do that with Ducati Challenge HD, but I couldn't do that with Fifa 14 and Real Racing 3. Use iPad as controller is the reason that i bought the Apple TV... I s
-
F4v in IE 7 fails - no metadata?
Hey all - I'm having trouble with my new player in IE 7 (it works great in all other browsers, of course). It seems that in IE 7, it is waiting until the full file downloads in order to get metadata; what this means is that the player itself is not b
-
Wait for success of flow in PL/SQL
Hi! I start my flows using the PL/SQL api (createProcess, startProcess). Is there any way to wait for the execution time of the flow in the procedure? startProcess only starts a background process which executes the flow and terminates successfully a
-
Downloaded ibook but there are no pictures?
I have an ipad 1 and recently purchased an ibook and the book downloaded with no pictures. All i have in the pictures place is a blue question mark. The ipad has the most current ios version and apple support said it is my ipad not a problem with the
-
Itunes match stops while retrieving informations about itunes library
Hi to all, i just subscribed to itunes match, but it doesn't match my songs! it seems to stop when is almost at the end, but keeps showing the page "retreiving informations about iTunes Library". Fortunately it has loaded almost all the songs on my i