09-13-2007 11:49 AM
09-13-2007 11:52 AM
hi
We can Create IDOC types in Tcode WE30.
before that Create the Required Segments in Tcode WE31.
REWARD IF HELPFUL
09-13-2007 11:59 AM
09-13-2007 12:09 PM
Hi,
Goto Area menu for 'IDoc & EDI Basis'.
You will find all the transactions to related to IDocs.
09-13-2007 12:32 PM
Hi,
First u need to create segements intead of IDOC
Creation of Segments :
-Go to transaction WE31 create segment
-Add segment fields to the segments( similar to structure)
-Save the segment in the development class with CTS.
-After saving the Segment release the segment.
Goto Edit-> set release.
Now you have created segments.
<b>Next create IDOC Type using transaction WE30.</b> :
-Enter an Idoc type start with Zee this is for creating an new Basic type.
If an idoc type already exists then use the radio button extension(where we can add few new fields.
-After this click on create button as described above. It takes you to a popup screen where you fill the description and also select the radio button accordingly and say ok.
-we go to next screen select idoc type and click on create new It gives a pop up window
-In the Popup window select the segment created using T-Code we31, if you want that segment to be mandatory in the idoc check it, also can specify max and min no of appearances. Similarly we can add other segment to the idoc type which can be of same level or child level to the first segment.
-In the example you can one parent and two child structures(segments ) added to the idoc type.
Once you are done with the addition save the IDOC type and release the idoc type
Goto-> Edit -> Set release.
This completes the creation of IDOC type
<b>Rewards with points if helpful.</b>
Regards,
Vijay
09-19-2007 9:16 AM
09-13-2007 1:14 PM
Intermediate Document
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data. IDoc is not a process.
- IDocs are stored in the database.
- In the SAP system, IDocs are stored in database tables.
- IDocs are independent of the sending and receiving systems.
- IDocs are independent of the direction of data exchange.
Creation of IDOCs
? Transaction code: WE 30
Defining Segment:
Creating Segment : Tcode - WE31
Creating Message Type : Tcode - we81
Assigning Message type to Idoc type: Tcode - we82
Process
The two processes for IDoc are Outbound Process and Inbound Process.
Outbound Process
When the data is sent out from the system, the process is called Outbound Process and the IDoc is known as Outbound IDoc.
Inbound Process
When the data is coming in, the process is called Inbound Process and the IDoc is known as Inbound IDoc.
Outbound Process (Sending System) Steps :
1) Goto Tcode SALE:
Click on Sending & Receiving Systems à Select Logical Systems
Here Define the Logical Systems à Click on Execute Button
Go for New Entries
1) System Name : LOG1
Description: Sending System
2) System Name : LOG2
Description: Receiving System
Press Enter & Save it will ask for Request if you want new request create new request or press continue for transferring the objects.
Assigning Client to the Logical System:
Select Assign Client to Logical Systems -à Execute
Ø 100 à Double click on this and give the following information
Client : Sending System
City : Chennai
Logical System : LOG1
Currency :
Client role :
Ø 250 à Double click on this and give the following information
Client : Receiving System
City :
Logical System : LOG2
Save this Data.
Step 2) For RFC Creation:
- Goto Tcode SM59 à Select R/3 Connects
Click on create Button
RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
Give the information for required fields:
RFC Destination : LOG2
Connection type : 3
Target Host : sappdc.wipro.com
System No : 00
Client : 210
User : Login user name
Password :
Save this & Test it and Remote Login
Step 3) Goto Tcode BD64: - Click on the change button
Click on the create model view
Short Text: model view
Technical Name: LMOD
Save this & press ok
Select just created model view
Name: "LMOD"
Goto add message type
Model Name : LMOD
Sender : LOG1
Receiver : LOG2
Message type: ZAZHARMESS
Save and press Enter.
4) Goto Tcode BD82:
Give Model View : LMOD
Partner system : LOG2
Execute this by pressing F8
It will gives you sending system port No: A00000000089 (Like)
5) Goto Tcode BD64:
Select the model view
Goto à Edit à model view à Distribute
Press ok & Press Enter.
Run your Zprogram
REPORT ZIDOC1 .
DATA: Begin of imara occurs 0,
matnr like mara-matnr,
mtart like mara-mtart,
end of imara.
DATA: wamas_con LIKE edidc,
imas_data LIKE edidd OCCURS 0 WITH HEADER LINE,
icom_con LIKE edidc OCCURS 0 WITH HEADER LINE.
PARAMETERS: e_matnr LIKE mara-matnr,
e_msgtyp LIKE edidc-mestyp,
e_rcvprn LIKE edidc-rcvprn.
retrive app. data from DB
SELECT matnr mtart FROM mara INTO TABLE imara WHERE
matnr = e_matnr.
*Master idoc control record
wamas_con-rcvprt = 'LS'.
wamas_con-rcvprn = e_rcvprn.
wamas_con-idoctp = 'ZAZHARIDOC'.
wamas_con-mestyp = e_msgtyp.
master idoc data records
LOOP AT imara.
imas_data-segnam = 'ZAZHARSEG'.
move imara to imas_data-sdata .
APPEND imas_data.
ENDLOOP.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = wamas_con
TABLES
communication_idoc_control = icom_con
master_idoc_data = imas_data
COMMIT WORK.
6) Verifying Transfer of IDOCs Tcode - we05
ALE/IDOC Status Codes (outbound):
01 à IDoc Added
30 à IDoc ready for dispatch
29 à Error in ALE service Layer
12 à Dispatch ok
03 à Data passed to port ok.
Inbound Process (Receiving System) Steps:
Do the same step as you did in sending system
ü Creating IDoc
ü Defining the Segment
ü Creating Message Type
ü Assigning the Message Type
ü Defining the Logical System
ü Assigning the Logical System
ü Creating the Distribution Model
Goto Tcode - we57:
Assign function module to IDoc type
Module: Function module
Basic type:
Message type:
Direction: 2 (inbound)
Creating Inbound process code - we42
Verifying Idoc List Tcode - we05
ALE/IDOC Status Codes (Inbound):
50 à IDoc Added
51 à Application Document not posted
64 à IDoc ready to be transferred to application
62 à IDoc passed to application
53 à Application Document posted
regards,
srinivas
09-14-2007 10:27 AM
Hi Rohan,
Please clearly mention your requirement, you want to generate an IDOC or to create a IDOC. Create IDOC means, developing custom idoc in the system.
Generating an idoc in the sense, posting an idoc to required target system using standard tcodes or using custome developed programs.
for example if you want to send material data using IDOC use TCODE BD10.
but for that you need configure ALE settings in WE20 (Partner Profile), BD64(Distribution Model) etc....
09-15-2007 6:30 AM
Hi
<b>Creation of IDoc</b>
<u>To Create Idoc we need to follow these steps:</u>
1)Create Segment ( WE31)
2)Create Idoc Type ( WE30)
3)Create Message Type ( WE81)
4)Assign Idoc Type to Message Type ( WE82)
<b>Creating a Segment</b>
a)Go to transaction code WE31
b)Enter the name for your segment type and click on the Create icon
c)Type the short text
d)Enter the variable names and data elements
e)Save it and go back
f)Go to Edit -> Set Release
g)Follow steps to create more number of segments
<b>Create IDOC Type</b>
a)Go to transaction code WE30
b)Enter the Object Name, select Basic type and click Create icon
c)Select the create new option and enter a description for your basic IDOC type and press enter
d)Select the IDOC Name and click Create icon
e)The system prompts us to enter a segment type and its attributes
f)Choose the appropriate values and press Enter
g)The system transfers the name of the segment type to the IDOC editor.
h)Follow these steps to add more number of segments to Parent or as Parent-child relation
i)Save it and go back
j)Go to Edit -> Set release
<b>Create Message Type</b>
a)Go to transaction code WE81
b)Change the details from Display mode to Change mode
c)After selection, the system will give this message The table is cross-client (see d)Help for further info). Press Enter
e)Click New Entries to create new Message Type
f)Fill details
g)Save it and go back
<b>Assign Message Type to IDoc Type</b>
a)Go to transaction code WE82
b)Change the details from Display mode to Change mode
c)After selection, the system will give this message The table is cross-client (see d)Help for further info). Press Enter.
e)Click New Entries to create new Message Type.
f)Fill details
g)Save it and go back
<b>REWARD IF USEFULL</b>
regards
naresh