IDOC Configuration done is R3 side
Hi all,
When an R3 system is trigerring an IDOC towards an XI system we do the following configuraion in the R3 side.
1. Create Rfc destination- here we specify the target as SAP XI system.
2. Create port- here we give the idoc message type basic type and also the rfc desination created
3. Register the logical system coerresponding to this R3 system in Transaction BD54 or sale.
Now we go to the transaction WE19 and trigerr the idoc
Here in the control records we enter the Port, Partner No,Partner type ( both in the recipient side .. i guess). we also give the idoc message type here. then we say standard outbound processing and we'll have the idoc here in XI.
<b>I don't understand why we do this only in the recipient side and not in the sender side.</b>
<b>I also couldn't figure out how the IDOC knows to namespace does it should go and hit when it comes to XI. coz we are only givingthe target system name in the RFC destination. we are not givin any details of the namespaces or softwarecomponents in XI</b>
any kind of suggestion is appreciated?
regards,
Rahul
<b>Source</b>
Problem receiving IDOC
A post by Deepu Venugopal on the above thread
<i>Think of it as this way...whenever XI's IDOC adapter receives an IDoc, it requires the metadata about the IDOC to operate on it and convert it to an IDOC-XML...
In a regular scenario..it is straight forward...If an SAP system is sending an IDoc, then in XI for that SAP system, there would be a port maintained using transaction IDX1 through whihc XI IDOC adapter downloads metadata dynamically...The download of metadata happens only the first time....The different metadata downloaded can be viewed using TCODE IDX2...(from here if we want we can forcefully import the metadata..)
Now coming to your scenario, the since the sending system is an FTP client and you have a made up ALE name in the business service, we need an entry for that ALE name in IDX1...Now the IDX1 entry should point to an SAP system which has the metadata regarding the IDoc being processed....You may or maynot download the IDOC metadata using IDX2(the system will do it automatically the first time)..
In effect we are telling XI to check for IDOC metadata from a different system and not the FTP clinet...</i>
hope this shud answer ur post.
Similar Messages
-
Why v r not configuring IDoc & HTTP adapters on sender side
Hi Gurus,
Y v r nt configuring the Idoc and HTTP adapter on sender side.
But on d receiver side v r configuring. Why?
IDoc and HTTP Adapters are built on ABAP stack.That's y v r nt configuring on d sender side.It is the same thing also on d receiver side also.But y v r configuring on reciever side.
Could u guide me.Hi Kumar,
Check this thread for your query
Adapters
IDOC adapter resides on Integration server, so Integration engine takes care of the conversion format from IDOC to XML
but in but XML to IDOC is done by Receiver IDOC adapter
Sachin
Edited by: Sachin Dhingra on Jan 10, 2008 4:03 PM -
IDOC Configuration in XI Server
Hi,
i need to send idoc(MATMAS03) from R/3 server to XI server.
In XI server i've done the following configurations:
1. created a logical system for XI server and R/3 server
2. Created a RFC destination for R/3 server
3. Created a port for IDOC adapter using t-code IDX1.
4. Imported the metadata of MATMAS03 idoc into XI server using tcode IDX2.
Configuration done at R/3 server:
1. created a logical system for XI server and R/3 server
2. Created a RFC destination for XI server
3. Created a logical port for R/3 and XI server using t-code WE21.
4. Created partner profile for R/3 and XI server using t-code WE20 and maintained MATMAS in outbound parameter of both the partners.
Now i'm sending idoc from R/3 system using tcode WE19. In tcode WE02, the status of the idoc shown is "IDOC send to the receiving system/program.
But when i'm checking tcode WE02 in XI system, its not showing any inbound idoc.
Do i need to maintain partner profile in XI system also?
Any help will be highly appreciated.
Regards
ManpreetHello Manpreet,
Lets say ur R/3 System is D10 and XI is P10.
Configuration on R/3 Side.. sending system..
1.Create a Port SAPP10 with RFC dest to XI in R/3. WE21
2.Create a Logical System Type LS in R/3. WE20
This logical system is for XI so in you Integration server in SLD Logical System name should be same.
That will do for R/3.
Now for XI..
1. Call Transaction IDX1.
Create a port with name SAPD10 and an RFC dest to R/3.
Now go to WE19 in R/3 take a successful IDOC and display the same.
Doubble click on EDIDC and enter Sender/Receiver Port/Partner Number.
In your case..
Sender: SAPD10.
Partner: xxxxx
Receiver: SAPP10 created above
Partner: xxxxx created above
Partner Type: LS.
And start outbound processing.
Goto SM58 and check ur TRFC if no messages apper you are successful in sending the IDOC else correct and resend.
Let me know if you were successful..
Regards,
Sri. -
ALE/Idoc configuration - (R3--XI--File)
Iam XI developer and know basic ABAP. Client is NOT using any Idocs right now. I have to develop a scenarios ( including ALE/Idoc Configuration on R3 for standard Idocs like MATMAS, DEBMAS, CREMAS etc ) both Master data and change pointer to XI and then to File.
Would some one show me step by step procedures for ALE/Idoc configuration on R3 and XI.I need to send both Master data and incremental data to XI possibly by bundling Idocs to XI.Hi Ram...
Once the mapping is done then re-check the ALE settings.
<b>SAP XI</b>
1) <b>RFC Destination (SM59)</b>
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.
<b>2) Create Port (IDX1)</b>
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
<b>3) Load Meta Data for IDOC (IDX2)</b> a) Create new
b) IDOC Message Type
c) Enter port created in IDX1.
<b>SAP R/3
1) RFC Destination (SM59)</b>
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.
<b>2) Create Port (We21)</b>
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
<b>3) Create Partner Profile (WE20)</b>
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.
<b>In SLD System Landscape Directory</b>
TS for R/3 (Logical system):-Assign the client name created in R/3 as Logical system Name.
Ts for Third Party (Logical system):-
BS for SAP R/3 (Logical system):- Assign the client name created in R/3 as Logical system Name.
BS for Third Party (Logical system):-Enter the XI logical system name.
<b>In Transaction SALE</b>
Define and Assign the logical system name.
Cheers,
raghavesh -
IDoc Configuration for Production Order Creation and Change
Hi All,
Please Help me out for IDoc Configuration for Production Order Creation and Change
I have found the IDoc for Production Order
Messgae Type : LOIPRO and IDoc type : LOIPRO01
Actually my requirment is to send the (LOIPRO01 )IDoc from SAP R/3 to XI system ,when ever the Production Order Created and Changed,
I have done following Configurations:
1. RFC Destination created for XI system
2. PORT was created for XI
3. Partner profile created WE20 and LOIPRO01 IDoc is added in OutBound Perameter.
I need to know how to do the followning.
1. How do i configure the outbound Production order idocs when Production Order is created or changed.
2. in NACE (Output control) which is the Application for Production Order.
3. How can I set IDoc as output Type for Production Order Creation.
Thanks in advance
Dhanabal THi Michal,
I know that it is the old thread but still want to get clarified from you out of curiosity.
Unlike other IDOC, i actiavated change pointers for LOIPRO
1.message and idoc type is linked
2.function module , message type , idoc type is linked
function module used is CLOI_MASTERIDOC_CREATE_LOIPRO
3.BD64, distribution model is created and distributed
4. port and partner profile is in place.
5. IDOC is not getting generated after creating the process order.
do we need to activate the change documents for the message type in BD52,
if yes can you please provide the object types for the same.
or i am missing something else. please guide me in this regards.
Thanks in advance for your time.
S.Janagar -
Idoc configurations in PI7.3
Hi Experts,
For an Idoc scenario prior to PI 7.3, RFC destination, port, logical system and partner profile needs to be created in case of outbound Idoc scenario and again at XI side we need to create RFC destination, port and loading of meta data....
Is the same is applicable for PI 7.3 as well? since Idoc resides in AAE in PI 7.3, I believe there could be some changes applicable for these settings of Idoc....
Pls provide your inputs.....Hi,
Along with the links provided by Phani and Gayatri you can laso refer this thread for IDoc configuration in PI7.3
IDOC settings from sap r/3 to sap pi7.3
IDoc Packaging in PI7.3
http://www.sdn.sap.com/irj/sdn/index?rid=/library/uuid/4096a6b3-3dc3-2d10-bf87-f63d5340a916
Configuring PI 7.30 Java IDoc Adapter
PI/XI: PI 7.3 New Java based IDOC adapter's configuration (sender, receiver) - teaser
IDoc Acknowledments in PI7.3
acknowledge handling for IDOC_AAE in sap PI 7.3
IDoc_AAE acknowledgement handling in PI 7.3
IDoc related error in PI7.3
Processing error in Idoc_AAE sender channel
Hope its informative.
Regards,
Amol -
Idoc configuration in IDES??
hi experts ,
Can somebody explain me about , how do we do entire Idoc configuration in IDES and we can execute the same as sample in IDES
Explain me in step by step for outbound and inbound ...
Thanks
Edited by: MM group on Jul 2, 2010 10:44 AM1 Logical System
2 Assign Logical system
3 RFC
4 Port
5 Customer distribution model
6 Partner profile
7 CDM distribution
Tcode : SALE
First 2 steps not necessary ( Basis work already done )
Two logical system created
Ls110 -Sender
Ls800 - Receiver
RFC
RFC establishment SM59
Receiving system IP address or hostname
System number, client id
Username, password
Ports
We21 define ports
TRFC ale
File Edi
CPI_C - R2 connections
In the port we need to define Port name and RFC destinations
And version
Customer Distribution Model - BD64
Sender
Receiver
Message type
Partner profile we20 , BD62
Partner may be customer, vendor, logical system
In BD62 define the partner system (LS800)
One more additional entry SYNC for synchronization
Post processing Agent - workflow
MATMAS 03 03 is the version
Collect idoc we need to trigger
Transfer idoc will be send immediately
With message control
Which program need to run for generating the idoc
With out message control
For some of the programs have inbuilt idoc generation for that case no need to mention program name
Process code
Distribute CDM
Receiving System:
Partner profile is going to control all the thing
BD64 - > edit - > model view - > distribute
BD67 Function module assigned to the process code
BD10 used to create idoc for material
Master idoc generated only buffered
One master idoc multiple communication idoc
One communication idoc generated
We02 idoc satus -
R/3 sysyem (version 4.7) was linked to CRM system through ALE. CRM server is down since long time. The creation of IDocs for business processes like sale order / Customer creation which are scheduled with transactions are getting triggered as soon as a transaction takes place on R/3 side.
Since CRM server is down these Idocs are delivered and outbound queque is getting accumulated day by day which is affecting the performance of Live system also.
Not able to identify where these automated processes are defined/configured on R/3 side. Can anybody pls help in identifying the root cause so these automated processes can be stopped .
Thanks in advance.
anuHi You can stop data flow to CRM to continue u r business on r3 side
this you can achieve in 2 types one physical method by disconnecting the Adapter
Plug in connected to CRM server and deactivation of Bridge, when yiou want to
Message flow > Display generic Synchronization Bridge configuration
you can choose either of the methods and continue with u r R3 side business Process.
Venkat -
Configure SAP for server-side trust
Hi all,
I am installing BusinessObejcts XI integration for SAP Solution. I need configure SAP for server-side trust. I have read BussinessObjects XI Integration for SAP Solution Installation Guide. In chapter 6, It introduce how to configure SAP Server-Side trust. But I don't understand how to configure SAP for server-side trust, specially configure SAP Cryptographic. Would you please to give me more detailed explanation?
Please advise,
DuypmHi Duypm,
the SAP server side configuration is part of the Installation Guide Chapter 6. It starts on Page 94.
If you unclear about this and what SNC configuration means for the SAP server make sure you talk to the administrator for the SAP system. You need administrative rights for the SAP system and the system will have to be restarted as outlined in the installation guide
Ingo -
Idoc Configuration and interfaces related to 810
Hi,
Can any one tell me the entire configuration of ALE and EDI810 supported tools?
Thanks
Shobi<b>Hi,
ALE
To develop a new custom ALE scenario, comprises 5 steps:
1. Design and develop the custom IDoc with its segments and a new message type
2. Configure the ALE environment with the new IDoc and message type (customer model, partner profiles and linking IDoc to message type)
3. Develop the outbound process which does the following:
Populates the custom IDoc with control info and functional data
Sends the IDoc to the ALE layer for distribution
Updates status and handles errors
4. Configure the ALE inbound side (partner profiles with inbound process code)
5. Develop the inbound process which does the following:
Reads the IDoc into a BDC table; selects other data that is required
Runs transaction using call transaction or BDC session
Updates status and handles errors
Below is a pictorial representation of the flow of a complete ALE scenario from the sending system to the receiving system.
Figure 1: ALE Scenario model
1.1. ALE Example
For the purposes of this example we will develop a small ALE scenario. This scenario is described below.
The receiver of an internal service must be able to reverse (cancel) the invoice receipt which will then cancel the applicable billing document automatically on the service providers system.
Figure 2: 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.</b>
Foe EDI 810 Mapping Refer <b>http://www.altova.com/videos.asp?type=0&video=edimapping</b>.
Online demo you can see,
Thanks
Manju -
IDOC configuration in 46C for BI 7
Dear Experts
Is there a set of steps to create the idoc configurations in R/3 for data transfer between R/3 46C and BI 7?
After refresh, the idoc related configurations are lost and BI is unable to load from Source System R/3.
Thanks for reading and hope you can advise on the above.
Best regards
PascalHello Pascal,
Maybe a thread in the PI forum would help you better:
Process Integration (PI) & SOA Middleware
Check the following thread:
Re: interface help
Regards,
Eduardo Rezende -
ALE/ IDOC CONFIGURATION OBJECT
IT'S URGENT
I NEED AN OBJECT IN ALE/IDOC CONFIGURATION SETTINGSHi Viji.
I can provide you a link which deals with precise material for ALE/IDOC configuration.
This link has just 1 page, but very good configurations.
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wsadapters.jca_sap.doc/doc/csap_depl_config_serv.html
Inside if you want Outbound or Inbound settings, choice is to be made.
<removed by moderator>
Regards
Harsh
Edited by: Mike Pokraka on Aug 6, 2008 10:56 AM -
Hi Guru's
Can any one of you explain the Idoc configuration steps in brief with t.codes?
rgds,Cherukuri:
<a href="http://www.scribd.com/doc/24447/SAP-R3-IDoc-Cookbook-for-EDI-and-Interfaces-by-Axel-Angeli">IDoc Config Guide</a>
In case the link doesn't work:
Google this: "Axel Angeli SAP R/3 guide to Idoc"
Idoc Transactions:
Transaction Code
SALE:Display ALE Customizing
SM59:RFC Destinations (Display/Maintain)
BD64:Maintenance of Distribution Model
BD82:Generate Partner Profiles
WE20:Partner Profiles
WE21:Port definition
WE30:IDoc Type Development ( View Segments of an IDOC )
WE60:IDOC segment field description
WE19:Test tool for IDOC Processing
WE05:IDOC Lists
WE09:Search for IDOC in Database
BD87:Status Monitor for ALE Messages (Process IDOC manually)
BD73:Start Error Handling for Non-Posted IDocs
WEDI:IDOC and EDI Basis
Change Pointers:
BD50:Activate change pointer for message type
BD61:Activate Change pointer generally
BD52:Triggering table and field name
BD21:Creates and sends the Idoc for Change pointer method
BD59:Set the field for Filter in Distribution Model
BD95:Along with BD59 , used for setting a filter in Distribution model
BD60:Assigning FM to the outbound IDOC , and specifying Change pointer Table and Object
BD56:Segment Filtering
Inbound IDOC:
WE81:Create Logical message types
WE82:Assign Messages for IDoc Type
WE31:Development IDoc Segment
WE57:Assignment of FM to Log, Message and IDoc Type
BD51:Characteristics of Inbound FM
WE42:Creating Inbound Process Code
BD67:Function modules for Inbound ALE-EDI
Assign points if info helps Vj -
Hi Gurus,
Please tell me the ALE and Idocs configuration settings
Thnaks in advanceHi,
Please refer to the details mentioned in the hyper-links beow.
You will get the details how to go about it.
To see the IDOC & status check it in WE02/WE05
You will get step by step process.
ABAP Development
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
http://help.sap.com/saphelp_45b/helpdata/en/35/b0ea5187a62488e10000009b38f9b7/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/c4/6bc368fef411d28d0900104b56737d/frameset.htm
ABAP Development
Follow below steps to create custom IDOC.
1.Create segments through transaction WE31.
2.Create IDoc Type through transaction WE30 by attaching created segments.
3.Message type through transaction WE81.
4.Link Idoc and message type in WE82 transaction.
Check the transaction WEDI for ALE settings
Check these links for more details on IDoc's:
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
http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
Hope this will help.
Regards,
Priyanka. -
Web Dynpro Java timesheet to Web Dynpro ABAP timesheet what changes needs to be done from EP side
Hi All,
We are moving Web Dynpro Java timesheet to Web Dynpro ABAP timesheet.
what changes needs to be done from EP side?
I have made Web Dynpro ABAP iView calling Web Dynpro ABAP timesheet and linked it with page.
But It is showing an error 'Web Dynpro Application CATDATARECORD does not exist'.
Please suggest what other changes needs to be done.Hi Anurag,
I have added new Web Dynpro ABAP iView to the same page in which Web Dynpro JAVA iview was added and made ABAP iview visible.
And this page is already assigned to role.
How should I link this ABAP iview so that it get replace by the Web Dynpro JAVA iview.
And the application name (CATDATARECORD) is correct and Web Dynpro JAVA is using the same application.
But now we want new time timesheet for that what changes needs to be done?
Please suggest.
Maybe you are looking for
-
Error in namespace on web service response
How does the namespace value get set in the exchangeDataResponse element in the SOAP response below? It's wrong and it's causing the error shown. When I look at the SOAP message weblogic is sending back I see <!--RESPONSE.................--> <env:Env
-
Actual page size for large books?
Forgive me if this particular info appears in one of the forums, but I've searched and searched to no avail. I want to put together a book, and want to lay out the pages myself using the full bleed option in iPhoto. At 300dpi, what is the actual prin
-
Already I have bought the new battery. Now I would ask about the best way to use it. As a matter of fact 90% of the time I use the iBook at home. What is it better, to use the old battery that still has an hour of duration and to bring the new one fo
-
How to reserve an iphone 4 without contract?
I was told that you can reserve the new iphone 4 for the full price of 699 and 799 but can not find out how. thanks
-
Hi Gurus' Where can we find the options "Before Aggregation" and "After Aggregation"?What is the basic use of these aggregations?Why we should not use the option called Before Aggregation in a Multiprovider? Could any one please let me know the abov