2006 Feb 09 9:36 PM
Hi All,
I have been studying and practising IDOC creation. I have a few doubts , Plz help me clear those:
1) If I want that whenever transaction F-02 is used for posting a G/L A/C, the Idoc should be generated. For this i know that we need to set the output type , media, partner profile. But I am confused as to how the system knows/maps that for F-02 transaction '<b>xyz</b>' is the idoc to be created with '<b>xx</b>' message type?(what settings make this happen)and I am not clear as to how the IDOC gets created actually , Which is the program that creates IDOC and how can i check the status of generated idoc.
2) I have studied that for custom IDOCS we need to create our own programs or FM with message control?
If its a standalone program then how to link this program to process my IDOC(ex for F-02 Idoc type :xyz and mess type xx)..i mean what settings to do to ensure that this program is linked to the idoc i want to process.
If i write a fm with message control then also how it is linked to handle my Idoc and mess type.
3) what is the meaning of process code in partner profiles setting ? and in realtime , how to check the status of the idoc and resolve the error if any??
I am under a great state of confusion and unclarity. Plzz help me come out of this ASAP.
Thanks,
Shills
2006 Feb 09 10:07 PM
3. Go to transaction we02/we05 and check out the status
of your IDoc.Then check out for the meaning of the
status in we47 and correct accordingly.
Process Code - The message type of your IDoc is
associated to a process code which is
linked to the function module that
posts data at the receiver's end.
2. You can link message type to the custom process code
using transaction we20.You can actually link the
process code to the custom FM developed by you using
transaction we42.
1. Go to table 'EDIMSG' from se16.There you get all the
message types and idoc types associated.Say you are
transferring material master,then the corrsponding
message type is MATMAS.You choose it as your message
type,pick corresponding IDoc type and create
IDoc.Thus the system will know what you intend to
do.To check the status of your IDoc,go to transaction
we02/we05.
Hope I was able to answer your query.
Thanks,
Nikhil Phani Polepally
2006 Feb 10 12:10 AM
Thanks a lot for your quick and detailed answer.
I still have few queries from what i culd understand ...
1)That means if i develop a new idoc and a new message type , i create a relation between the two using we82. Now that i have my own type and custom idoc , I will need to write a program/function module to post/process the data.
Correct me if i m wrong here ?
If this is the case then what i understand is that i will have to create a process code-->FM/Program i create link in we42.
2)I am still no clear on this::
For a specific transaction eg va01, what do we do to let the system know that whenever a sales order is created automatically idoc orders01 with mess type xx is to created. How that is linked?
3)What is supposedly the last step in Idoc process in live environment. ? segments, , creating idoc, messtype,linking to fm , triggering and testing ..am i rt?
4)If we create our own idoc and mess type, then is it necessary to create a fm to process it ? i want to know that whn actually comes the requirement to create own FM(filling the idoc / calling master_idoc_distribute).?
I would be very thankful to your response
Shills
2006 Feb 10 5:07 AM
hi,
IDOC CONTAINS 3 TYPES OF RECORDS..
1) CONTROL RECORD( SHOULD BE ONE) [ EDIDC]
2) DATA RECORDS( CAN BE MANY) [ EDIDD/EDID4]
3) STATUS RECORDS( CAN BE MANY) [EDIDS]
IF U WANT TO CREATE UR OWN TYPES,
1)
A)IN WE31, U CREATE AN SEGMENT WHICH IS NOTHING BUT A COLLECTION OF FIELDS.
B)IN WE30, CREATE AN IDOC TYPE, SELECT BASIC TYPE OR EXTENSION, AND ASSIGN THE SEGMENT.
SO IDOC TYPE IS NOTHING BUT STRUCTURE CONTAINING FIELDS
OF SEGEMENT!!
C) GO TO WE81 , CREATE A MESSAGE TYPE, MESSAGE TYPE GIVES THE MEANING OF THE IDOC (EX MATMAS FOR MATERIAL MASTER)
D) GO TO WE82, ASSIGN MESSAGE TYPE TO IDOC TYPE.
2) GO TO SALE, CONFIGURE ALL THE STEPS (HOPE U KNOW)
WITH THE TYPES U CREATED.
3) NOW WRITE A <b>PROGRAM</b> WITH THE LOGIC TO POST IDCOS TO PARTNER SYSTEM.
SO ITS LOGIC SHOULD BE AS FOLLOWS.
FOR EVERY CONTROL RECORD, DATA RECORDS SHOULD BE MAPPED.
CONTROL RECORD CONTAINS DATA LIKE PARTNER LS, PARTNER TYPE etc.
create structures like EDIDC, EDIDD.
and pass parameters into the structures.
now , for every control record.
loop at data record,
caLL fn module 'MASTER_IDOC_DISTRIBUTE'
endloop.
<u>PURPOSE OF FN MODULE</u> : THERE CAN BE MANY PARTNERS FOR A SINGLE SENDER.
SO, THIS FN MODULE GENERATES COMMUNICATION IDOCS.
<b><u>IDOCS : MASTER IDOC, COMMUNICATION IDOCS, APPLICATION IDCOS.</u></b>
FOR EVERY MASTER IDOC , THERE CAN BE MANY COMMUNICATION IDOCS DEPENDING UPON THE NUMBER OF RECEIVERS.
2006 Feb 10 5:47 AM
Hi Shilpi,
Idocs are not specific to transactions.
A single Idoc can serve to more functionaliteis.
For example message type ORDERS belong to Ssles Order, Purchase order etc.
So Idocs are related to the functionality not to a specific transaction.
As u have written u know that u need to set partner profile but also the message contril if u want the transaction to trigger Idoc for u.
This meesage control is also needss to be defined in partner profile.
U need not create a new message type or Idoc type .
Thanks & Regards,
Ankur