cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc triggering from a transaction

Former Member
0 Kudos

Hi,

Actually we have a scnerio like sending the idoc to orace system. It's a online process.means when ever i will create a customer in sap r/3 system it should automatically trigger the debmas06 idoc. and then send it to xi system and from XI to oracle.So how can i trigger an IDOC from an transaction XD01 or any other Transaction and i also want to know how to configure the idoc adaptor in XI as sender. Coz IDOC adaptor can only be receiver. so how can u set it as sender.

thanks in advance

Manas

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi friends,

Actually we have a scnerio like sending the idoc to JDBC. It's a online process.means when ever i will create a customer in sap r/3 system it should automatically trigger the debmas06 idoc. and then send it to xi system and from XI to JDBC.So how can i trigger an IDOC from an transaction XD01 or any other Transaction and i also want to know how to configure the idoc in XI as sender and JDBC adaptor config in Directory.

thank you ,

Regards,

sharath

9892227922

ssharathbabu@gmail.com

Former Member
0 Kudos

This is the core SAP EDI/ALE question.

I do not think an XI consultant will be responsible for this.

IDoc triggering depends on the applications. Master data is sent through the ALE. In both the cases the output is IDoc.

1. Transactional applications

Ex: Sales Orders, Delivery Documents or Purchase Orders, Goods Receipts..

These all have different mechanism called Output Determination in R/3.

2. Master Data

This is done by ALE, by creating distribution model, maintining change pointers where provided, and creating the IDocs based on those changes or distribution based on a selection. SAP provided standard programs to do this.

In your case, to send an IDoc immediately when customer is created, either have to depend on the workflow task where you can execute a function module in a task. This is custom work.

You cannot do it in the user-exits because, the data is not committed by then. There are ways to do it but it is an ABAP/ALE developer task.

Hope this explanation helps.

regards

SKM

Former Member
0 Kudos

hi SKM and Padma

thanks a lot for the reply.it was very helpful.but with that my mind wonders now how do i get it executed.i have this extended idoc of basic type delvry03.i need to take care to fill in the custom segments of the extended idoc.can u please guide me as to how can i do it in the whole process.SKM what do u mean by cant be done in user exit?i was under the impression that the function module for the idoc has some customer exits which can u used to fill the idoc data.

take a scenario where u create a new delivery.when u post goods issue, an idoc should be passed on to the XI system with data.i know how to do the configurations but just am not understanding the flow of the whole process as to how will the transaction vl01n trigger the idoc.can u please explain with a small example.all i need is to reach a stage where i can see data in idoc.

thanks a lot.appreciate the help,time and patience.

take care

Former Member
0 Kudos

Sanket,

What I mean is in the customer master program SAPMF02D has user exit at the end of the program, there you can write to some code to kick off an IDoc using MASTERIDOC_CREATE_DEBMAS, but this is not the right approach since by the time the database commit would not take place in case of changes.

Every IDoc function module has user-exits to fill the extensions.

VL01 is used to create a delivery document. In the SAP customization, Transaction SPRO -> SAP Reference IMG -> SAP Customizing Implementation Guide -> Logistics Execution -> Shipping -> Basic Shipping Functions -> Output Control -> Output Determination -> Maintain Output Determination for Outbound Deliveries.

Since this is R/3 SD configurtaion, this is done by SD functional consultants at most of the clients, ABAPers would not have access.

They will configure for what condition type (ex. if Delivery Type is LF), what type of output type (IDoc, or FAX or MAIL etc) to produce the output (IDoc, or FAX or MAIL etc).

Once this is all configured, when a delivery document is created or changed based on the condition, the IDoc will be created. Based on the partner profile for that specific output type whatever the function code (in this case DELV) is assigned and typically a function module IDOC_OUTPUT_DELVRY is assigned to the function code (go to WE42 in R/3), that specific IDoc will be created. In the IDOC_OUTPUT_DELVRY function module, there are couple of user exits to modify the control record or the data segments.

When it comes to the ALE, typically this is used for master data distribution.

I guess this should help you understand, how the IDocs are created for transactional data like Orders, Delivery documents.

regards,

SKM

Former Member
0 Kudos

hi SKM

that was a perfect explanation to what i was looking out for.thanks a lot man.i really appreciate the time,patience and help from you.i think i should be able to get the interface working now.

take care

Former Member
0 Kudos

you are welcome. Any questions shoot in the forum. Some great people to name like Michal, Sudhir, Shiva are there to answer.

regards

SKM

Former Member
0 Kudos

IDOCs are triggered from R/3 and they sit in the ABAP stack. You don't need sender configuration for IDOC communication. So, in your case, you need not to configure IDOC comm channel but a FILE comm channel for the receving end. (Since sender is R/3).

R/3 Settings you need:

1. Using WE20, create the Partner Profile (LS type) and assign DEBMAS message type to the Outbound Parameters.

2. Enter the Sending PORT, Packet Size, IDOC Type (leave the Partner Function Box empty. This is needed for other types like LI, KU etc.,).

3. You are almost set at this point of time and for your info, you don't have to maintain MESSAGE CONTROLS as they are used more in transaction data like PO, SO, DELIVERY, BILLING etc., where you control the trasmission using OUTPUT TYPES etc.,).

4. One important thing to check before using the RFC port is to check the Connection which you can do from SM59, select R/3 connections, double click on PORT then TEST CONNECTION. This is to ensure that it is in place as I have seen people just spending huge time in debuggin in MONI with a message as "RFC connection failure which appears in (may be) bottom most part of the message displayed). " Consulting Tip---just kidding.

5. To read and understand XML message from MONI, just look for fields SNDPRN, RCVRPN etc., for troble shooting purpose and be patient while doing so.

XI Steps needed:

1. Create the a receiver business systems along with necessary SWCV, SWC, PROD (I am sure you are thru with this).

2. In the Int Repository, create the Data Types and Message type (Use standard Message type DEBMAS.DEBMAS06 from Basis Comp drawn from Usage dependencies which you do in SLD, Software catalog)

3. Perform the mapping (you can simplify this by opting to map simlar fields (named identical in the source and receiver). (Seconde ICON from left on top tool bar). Make sure you assign all that you need. ( I would advise to check with your Oracle guys what data they are looking for). I would make this easy if I do an XSLT mapping otherwise, I would prefer to the mapping with most of the config handling. Example: imagine CUSTOMER Account group (KNA1-KTOKD - SAP Table and filed) in R/3 is "0003" and in ORACLE you want this to be like "ABCD" etc., kind of stuff at BASIC LEVEL can be done here.

4.Create an inbound Async message interface. Tip: Async, as you want the message to be persistant and may want to have the retriggering done automatically incase of failures. This helps in fact to debug and if this SYNC, you will not have a clue (unless you know how to track) as it is termed as QoS-BE.

SO you have the Source interface, Target Interface and Mapping program as well. Create Interface and link the SOURCE and TARGET with MESSAGE MAPPING TYPE and drop down to locate the MAPPING PROGRAM created in the above step.

5. Save, generate the change list.

6. Do a test in MESSAGE MAPPING for your confortness.

7. Get into Integration Directory and do the following.

7.1 Create the scenario and assign the business systtems created in first step mentioned above.

7.2 Create the RECEIVER COMM CHANNEL ( uncheck the Check box while assiging the business system which specifies the COMM CHANNEL generation...you don't want to do it this way). Make sure it is FILE ADAPTER, Provide FTP protocol, Specify SERVER,Port, User ID, P/w etc., specify the FOLDER which is accessible to ORACLE (which you have specified in SHELL Script for automatic pickup of the file and make sure they are identical..just to avoid risk)

7.3 Create the Receiver determination and leave SENDER Aggreement as it is not needed. Reason, IDOC need not to have SENDER Config.

7.4 Make sure you have everything set and generate the change list. (Consulting tip....Hit F7 to check the CONSISTENCY when you think you messed it up. This gives you clues (rather a detailed log) in the process log...)

Log into R/3, create a Customer using XD03 and maintain the Basic Data (if you are curious to see what you have done just now).

Check in SXMB_MONI in XI..

I would do this using IDX5 than doing it using SXMB_MONI as it puts everthing in XML and you need to scroll down like 50-60 pages to understand where it failed. IDX5 gives kind of R/3 interface similar to WE02/WE05. Check this initially and get used to MONI too.

If the message looks successful, then go to ADAPTER FRAME WORK and look for your FILE ADAPTER (Comm chanel you created in 7.1, 7.2 above). If is successful, check the FILE in the location you specified and run the shell script then check in the ORACLE table.

Thatz it...

One suggestion;;;

Guys, Please use SAP RECOMMENDED NAMING CONVENTIONS and this makes life easy to understand what you have named. CREATE one name space for every project/scenario you are doing if you think Tech Landscape is reusable.

Still questions...reply..

Good Luck,

Srini.

Incase of Inbound into R/3, you would need an IDOC and corresponding inbound process code and other settings.

Former Member
0 Kudos

hi guys...

nice post...helped me a lot.

i am implementing a similiar scenario wherein i have to send an idoc to an XI system.the idoc is to be posted when a delivery is created upon post goods issue.i am using an extended idoc for this purpose with basic type delvry03.can someone tell me what settings need to be done from the functional side to trigger the idoc?from the above discussion i understood how to do the partner profile and port settings.all i need to know is how to trigger the idoc from the delivery application and how to fill the extended idoc.i guess i will be using the user exit in the function module idoc_delvry_output for that right?

Former Member
0 Kudos

Hi Sanket..

U need to maintain the out procedure to respective application like here delivery document....

i.e u need to create condition table,condition records....like that..

Hope this helps u..

Thanks.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>So how can i trigger an IDOC from an transaction XD01

you have to create change pointers for message type debmas and schedule job that sends idocs created from change pointers - debmas06

this is how it's done in the standard

Regards,

michal

Former Member
0 Kudos

Hi Manas,

An idoc adapter need not be separately configured,since it can directly talk with the IS.

The configuration steps for a idoc :

1)) create rfc destination sm59(check R3 connection)

2)) create tRFC port for the rfc destination (idx1)

3)) manually import the idoc thru idx2 transaction

4)) create logical system by bd54

5)) create partner profiles for them(we20)

The exact flow is mentioned in this blog :

/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters

and this thread would also be helpful.

https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode1-6&contenttype=url&content=https://

To trigger an idoc you could go for ABAP proxies.

Hope this is helpful.Please revert back for further queries.

Regards,

Priyanka

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>Transaction and i also want to know how to configure the idoc adaptor in XI as sender

you don't have to set IDOC sender adapter in XI directory

Regards,

michal