10-08-2007 9:59 AM
Hi All,
I need to create some message type and assign it to some idoc type , and i need to create process code and inbound function module for this.
Can some one please help me in this regard.
Thanks ,
Hem
10-08-2007 10:03 AM
Hi Hem,
go thru the below information.
IDOCs:
- IDOC is an 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.
An IDOC is created as a result of executing an Outbound ALE or EDI process.
In an inbound ALE or EDI process, an IDOC serves as input to create an application document.
-When an IDOC is created in the system , an unique number(16 Digits) is assigned to it.
This number is unique with in the client.
- IDOCs are independent of the sending and receiving systems.
- IDOCs are independent of the direction of data exchange.
- In the IDOCs, data is stored in text format.
- IDOC will wait until the Remote System is Active.
*IDOC Definition Components
-
- Basic Idoc Type: Basic Idoc type defines the structure and format of the business document
that is to be exchanged between two systems. Basic Idoc type can refer to an SAP provided
basic IDOC type or a customer developed basic IDOC type.
- A basic IDOC type has the following characteristics:
Name : A basic Idoc type can be assigned upto a thirty character name.
List of permitted segments: The segments make up the IDOC structure.
Hierarchy of segments : The hierarchy of segments specifies the physical sequence and
any parent - child relationship in the segments.
Mandatory Vs Optional Segments : When used in the IDOC type, each segment has
an attribute that defines whether the segment is option or mandatory.
Minimum/Maximum range for each segment: It defines the maximum and minimum
number of timesa data record corresponding to a segment cn exist in an IDOC.
- Segments : A segment defines the format and structure of a data record.
Segments are reusable componets. A segment consists of various fields that represent data
in data record.
IDOC Run time components:
-
- A unique IDOC number 16 digits is allocated.
- One control record is attached to the IDOC.
- Segments translate into data records.
- Status records are attached.
- Sytax rules are checked.
IDOC Record Types:
-
1. Control Record : The control record contains all of the control information about an IDOC,
this information basically includes the IDOC number, sender and receiver information,
and information such as the message type it represents and the IDOC type.
- there is only one control record per IDOC.
- The stucture of the control record is the same for all the IDOCs and is defined by SAP.
- The structure of the control record is defined by the data dictionary structure EDI_DC40.
- The control record is stored in the EDIDC table.
2. Data Record : Data records contain the application data. A data record has two sections
Administrative Section and a Data section.
- The Administrative section cotain the segment name, client, IDOC number, segment number,
hierarchy level information.
- The Data section of a data record is a stram of 1000 bytes where the actual data resides.
- The data record is defined by the data dictionary structure EDI_DD40.
- Data records for IDOCs stored in the EDID4 table.
3. Status Record : Status records are attaced to an IDOC throughout the process as
the IDOC achieves different milestones or encounters an error. At every milestone a statu code,
date and time are assigned.
- Status codes 01 to 49 are reserved for OUtbound process, 50 and above are reserved for
inbound processes.
Message Type: Identifies what type of information transformed between logical systems or partners.
Message type is not a local object type , it is transportable.
Port : A Port defines the medium in which data is exchanged between the two systems in
the ALE process, IDocs are transferred via memory.
1. TRFC ports are used for ALE communicaion.
2. File Ports used by EDI
3. CPI-C ports used to communicate with R/2 systems.
4. Internet ports used to connect with Internet Applications.
5. ABAP-PI ports used to process data via the ABAP programming interface.
6. XML ports used to process files in XML format.
Partner Profiles:
A partner profile has three views, which maintain different parameters for the partner.
1. The General Parameters View : Values are stored in table EDPP1.
2. The Outbound Parameters view : Values are stored in table EDP13, except for the
Message control parameter , which are stored in table EDP12.
3. The Inbound Parameters View: Values are stored in table EDP21.
Transaction Codes :
WE31- Segment Creation
WE30 - IDOC structure
WE81 - Message type creation
WE82 - Link between Message type and IDOC type.
WE21 - Creation of POrt
WE20 - Partner Profile creation
WE19 - Test tool for IDOC Processing.
SALE - ALE (Application Linking and Enabling) settings
Go through the link for basics related to IDOCs:
http://help.sap.com/saphelp_nw04/helpdata/en/0b/2a6cdd507d11d18ee90000e8366fc2/plain.htm
Check these links.
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
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
Please check this PDF documents for ALE and IDoc.
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
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
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
Check these out..
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
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
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
go trough these links.
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
http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
Thanks,
Reward If Helpful.
10-08-2007 10:05 AM
hi
CATSDB CUSTOM IDOC TRANSFERMATION BETWEEN 2 DIFFERENT APPLICATION SERVERS
For this scenario Client 800 of application server SAPADM is the Sender and client 800 of application server SAP-REMOTE is the Receiver
1. Creating Logical Systems
o Login using 800 client
o Go to T. Code SALE
o Expand Sending and Receiving Systems
o Expand Logical Systems
o Click on Define Logical System
o Click on New Entries
o Create CATSSENDER, ECC Logical Systems
o Save and come back
o Assign the CATSSENDER Logical System to client 800 of Application Server SAPADMAssign the ECC Logical System to client 800 of Application Server SAP-REMOTE
2. Creating the RFCs
o Go to T. Code SM59
o Expand R/3 Connections
o Enter RFC Name as CATSSENDER
o Connection Type as 3
o Language as EN
o Client as 800
o User as SAPUSER
o Password as YESV13
o Target host as SAPADM
o Click on Remote logon button to test the RFC
o Enter RFC Name as ECC
o Connection Type as 3
o Language as EN
o Client as 800
o User as SAPUSER
o Password as YESV123
o Target host as SAPADM
o Click on Remote logon button to test the RFC
3. Creating the Message Type
o Go to T. Code WE81
o Click on change, continue
o Click on New Entries button
o Give message type as ZCATSTIME and description
o Save and back
4. Creating the Segment
o Go to T. Code WE31
o Give segment name as ZSEGMENTTIME
o Enter Short Text
o Enter the Field Name and Data Element in the text boxes
o Save, continue,
o Click on Edit -> Set Release
5. Creating the Basic IDOC Object
o Go to T. code WE30
o Give obj. name as ZTIMEIDOC
o Click on create
o Select create new radio button, give description and continue
o Select the IDOC obj name and click on create button
o Enter the segment name which is create earlier
o Select the check box if you want to make the segment mandatory
o Enter 1 in minimum number 99999 in maximum number, continue
o Save and backo Click on Edit -> Set Release
6. Creating Customer Distribution Model
o Go to T. Code BD64
o Click on change and Create model view button
o Enter the short text and Technical name as CATSSENDER
o Select the model and click on Add Message Type Button
o Give the Sender as CATSSENDER,
o Receiver as ECC,
o Message Type as ZCATSTIME
o Select the model view & click on Environment -> Generate Partner Profiles
o Select Transfer IDOC Immediately and Trigger Immediately radio buttons
o Click on Execute
o You should get a list in green color which means it executed successfully.
o Back to main screen, select the model view
o Click Edit->Model view->Distribute
o Click on continueo
You should get a list saying model view is distributed successfully.
7. Checking the Port
o Go to T. Code WE21
o Expand Transactional RFC
o Find the port from the list which is created using BD64 for ECC (Receiving system) RFC Destination.
8. Checking the Partner Profiles.
o Go to T. Code WE20
o Expand Partner Type LS
o Select the Partner profile ECC
o Double click on Message Type ZCATSTIME in Outbound parmtrs.
o Check Receiver Port is assigned correctlyo
Check the Basic type as your Basic IDOC object.
9. Assigning the Message Type to Basic IDOC Object
o Go to T. Code WE82
o Click on Change & continue, New Entries button
o Give the Message type as ZCATSTIME
o Give Basic Type as ZTIMEIDOC
o Release as 4.6C
o Save and back10. Creating Inbound Function Module (Posting Program)
o Go to T. Code SE37
o Create a function Module ZCATSDB_TIMESHEET_SURESH
o Set the Processing type as Remote Enabled Module and mode as start immed, in Attributes Tab.
o Import Parameters
P_WORKDATE LIKE CATSDB-WORKDATE
P_COUNTER LIKE CATSDB-COUNTER
P_LSTAR LIKE CATSDB-LSTAR
o Export Parameters
o Tables
S_PERNR LIKE ZCATSPERNR
[PERNR is select option parameters in ZCUSTOMIDOC report program so that it should be passed to function module ZCATSDB_TIMESHEET_SURESH in tables section. And also in tables section we used ZCATSPERNR, which is a global structure, which contains four fields as
Ø SIGN
Ø OPTION
Ø LOW
Ø HIGH]
o Exceptions
o Source Code
FUNCTION zcatsdb_timesheet_suresh.
*"----
-
""Local interface:
*" IMPORTING
*" VALUE(P_WORKDATE) LIKE CATSDB-WORKDATE
*" VALUE(P_COUNTER) LIKE CATSDB-COUNTER
*" VALUE(P_LSTAR) LIKE CATSDB-LSTAR
*" TABLES
*" S_PERNR STRUCTURE ZCATSPERNR
*"----
-
TABLES: catsdb, edidc, edidd. " using structures of catsdb, edidc, edidd
CONSTANTS: c_doctyp TYPE edidc-idoctp VALUE 'ZTIMEIDOC', " idoc type
c_segnam TYPE edidd-segnam VALUE 'ZSEGMENTTIME', "segment type
c_mestyp TYPE edidc-mestyp VALUE 'ZCATSTIME'. " message type
*001 comment begin
creating internal tables with out header lines for catsdb, edidc, edidd and also
- work areas
*001 comment end
DATA: it_edidc TYPE edidc OCCURS 0, " control internal table with out header line
it_edidd TYPE edidd OCCURS 0, " data internal table with out header line
wa_catsdb TYPE it_catsdb1, " work area for it_catsdb internal table
wa_edidc TYPE edidc, " work area for it_edidc internal table
wa_edidd TYPE edidd, " work area for it_edidd internal table
wa_zsegmenttime TYPE zsegmenttime, " work area for zsegment internal table
v_occmax TYPE idocsyn-occmax,
v_nbseg TYPE i.
CLEAR wa_catsdb. " clears work area of catsdb
CLEAR wa_edidc. " clears edidc work area
*002 comment begin
Save the message type and the basic IDoc type in the control segment.
*002 comment end
MOVE c_mestyp TO wa_edidc-mestyp. " assigning custom message type to edidc workarea
MOVE c_doctyp TO wa_edidc-idoctp. " assigning custom idoc type to edidc workarea
*003 comment begin
Retrieve the maximum number of segments in the basic IDoc type.
*003 comment end
SELECT MIN( occmax ) FROM idocsyn INTO v_occmax WHERE idoctyp EQ c_doctyp AND segtyp EQ c_segnam.
*004 comment begin
Save the whole CATSDB table content in the IT_ZCATSDB internal table.
*004 comment end
SELECT pernr workdate lstar counter FROM catsdb INTO CORRESPONDING FIELDS OF TABLE it_catsdb WHERE pernr IN s_pernr AND workdate EQ p_workdate.
*005 comment begin
Create a data segment for each line of IT_ZCATSDB.
*005 comment end
IF sy-subrc EQ 0.
LOOP AT it_catsdb INTO wa_catsdb WHERE pernr IN s_pernr.
MOVE-CORRESPONDING wa_catsdb TO wa_zsegmenttime.
CLEAR wa_edidd.
MOVE c_segnam TO wa_edidd-segnam.
MOVE wa_zsegmenttime TO wa_edidd-sdata.
APPEND wa_edidd TO it_edidd.
CLEAR wa_catsdb.
CLEAR wa_zsegmenttime.
ENDLOOP.
ELSE.
MESSAGE 'NO DATA FOUND FOR GIVEN SELECTION' TYPE 'I'.
ENDIF.
*006 comment begin
Count the number of data segments.
*006 comment end
DESCRIBE TABLE it_edidd LINES v_nbseg.
*007 comment begin
If the number of data segments exceeds the maximum allowed number,then display an error message.
*007 comment end
IF v_nbseg GT v_occmax.
MESSAGE 'IDOC ERROR Message' TYPE 'E000'.
ENDIF.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' " for creating an catsdb idoc
EXPORTING
master_idoc_control = wa_edidc
OBJ_TYPE = ''
CHNUM = ''
TABLES
communication_idoc_control = it_edidc
master_idoc_data = it_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFUNCTION.
Save, check and activate
111. Assigning the Inbound Function Module to Basic Type & Message Type
o Go to T. Code WE57
o Click on change, continue, continue and New Entries Button
o Enter the Module as ZCATSDB_TIMESHEET_SURESH Type as "F"
o Basic Type as ZTIMEIDOC
o Message Type as ZCATSTIME
o Direction as 2
o Save and back
Now Login in 800 client of Application Server SAP-REMOTE
12. Assigning the Inbound Function Module in ALE Table
o Go to T. Code BD51
o Click on continue, New Entries button
o Give the Inbound Function Module ZCATSDB_TIMESHEET_SURESH
o Give Input t. as 0 (zero)
o Save and back13. Creating Process Code
o Go to T. Code WE42
o Click on Change, New Entries Button
o Give Process Code name as ZCATSDB, give Description & Save
o Select Processing with ALE Services Radio button
o Select Processing by Function Module Radio button
o Click the ALE Table (arrow Icon) in Identification
o Give the Function Module Name ZIDOC_INPUT_ZBAPI_STUD_MAS
o Give maximum number of repeats 0
o Save and back, back
o Select the process code from the list & click on Logical Messages Icon
o Give the Message Type as ZCATSTIME
o Save & Back, Save & Back, Save & Back
14. Changing the Customer Distribution model in receiving system
o Go to T. Code BD64
o Click on change and Create model view button
o Enter the short text and Technical name as CATSECC
o Select the model view & click on Environment -> Generate Partner Profiles
o Select Transfer IDOC Immediately and Trigger Immediately radio buttonso Click on Execute You should get a list in green color which means it executed successfully.15. Assigning the Process Code to Message Type in Receiving System
o Go to T. Code WE20
o Expand Partner Type LS
o Select the Partner Profile CATSSENDER
o Double click on Message Type ZCATSTIME in Inbound parmtrs.
o Give the Process Code as ZCATSDB
o Click on Trigger Immediately Radio button
o Save & Back
Save & Back
16. Creating the Selection Program (Outbound Program)
- Login in client 800.
- Go to T. Code SE38
- Create a Report Program as ZCUSTOMIDOC with the following code
REPORT ZCUSTOMIDOC
NO STANDARD PAGE HEADING.
TABLES:catsdb. " using structure of cats db table
*000 comment begin
this selection screen contains one select option and one parameter
*000 comment end
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS pernr FOR catsdb-pernr.
PARAMETER: workdate LIKE catsdb-workdate,
LSTAR like catsdb-LSTAR,
COUNTER like catsdb-counter.
SELECTION-SCREEN: END OF BLOCK b1 .
DATA: wa_val TYPE i.
wa_val = pernr-high - pernr-low.
*001 comment begin
calling custom function module
*001 comment end
CALL FUNCTION 'ZCATSDB_TIMESHEET_SURESH'
EXPORTING
p_workdate = workdate " passing workdate parameter
p_LSTAR = LSTAR
p_counter = counter
TABLES
s_pernr = pernr. " passing pernr select option
IF sy-subrc EQ 0.
MESSAGE i000(zaluri) WITH 'IDOCS CREATED FOR EMPLOYEES BETWEEN' pernr-low ' AND ' pernr-high .
MESSAGE i000(zaluri) WITH 'IDOCS CREATED FOR EMPLOYEES BETWEEN' PERNR-LOW 'TO' PERNR-HIGH.
gives information message if idocs are created for given employees
ELSE.
MESSAGE e000(zaluri) WITH 'NO IDOCS CREATED FOR EMPLOYEES' pernr-low 'TO' pernr-high. " gives error message
" if idoc is not created
17. Transferring the CATSDB records from sender Application Server SAPADM to receiver Application Server SAP-REMOTE
- Execute Report Program ZCUSTOMIDOC
- Give the Range of PERSONNEL NO'S, Date, Activity Type, Counter to Transfer
- Give Message Type as ZCATSTIME
- Give Receiver Logical system as ECC
- Execute
- You should get the IDOC Number
- Take the IDOC Number and go to T. Code WE05 & Execute
- In Outbox you can see the IDOC Status
- Select the status record in left side window
- Double click on the Status record in right side window- You can see the Control Record, Data Record and Status Records for that IDOC
If the ICON is green and the status code is 3, it means the IDOC is passed to PORT Successfully
18. SENDING IDOCS FROM APPLICATION SERVER SAPADM
TO APPLICATION SERVER SAP-REMOTE USING WEDI
- Go to T. Code WEDI & execute or T. Code WE19
- Give idoc number it is generated recently
- Continue & double click on segment to view data in segment
- Click on EDIDC to give port, partner no, message type, partner
type of receiver. [For sender no need to give any port no leave it as
blank]
- Click on Standard Outbound Processing button and click continue
- You will get a message as idocs successfully transferred
Now Login in Receiver 800 client
- Go to T. Code WE05 & Execute
- You can see the status record in left side window
- If the status no is 53 and color is green, it means the IDOC is posted to Application successfully.
- You can see the Log Information by double clicking on the status record in right side window.
- Now in left side window, you can see the Control Record, Data Record & Status Record of the IDOC
- Now go to T. Code SE16
- Give the table name CATSDB & press F7
- See the contents of the table
- The table is updated with the catsdb records transferred from 800 client with our selection program.
regards
Nagesh.Paruchuri
10-08-2007 10:07 AM
Hi
Data Creation in Idoc
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
IDoc is a intermediate document to exchange data between two SAP Systems.
*IDocs are structured ASCII files (or a virtual equivalent).
*Electronic Interchange Document
*They are the file format used by SAP R/3 to exchange data with foreign systems.
*Data Is transmitted in ASCII format, i.e. human readable form
*IDocs exchange messages
*IDocs are used like classical interface files
IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
FOr testing you can use WE19.
How to create idoc?
*WE30 - you can create a IDOC type
For more information in details on the same along with the examples can be viewed on:
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
http://www.sappoint.com/presentation.html
http://www.allsaplinks.com/idoc_search.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.erpgenie.com/sapedi/idoc_abap.htm
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Check these out..
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
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
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
go trough these links.
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
http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
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...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
imp links
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
--here u can find the ppts and basic seetings for ALE
http://sappoint.com/presentation.html
http://www.sapgenie.com/ale/index.htm
Outbound:
Step 1. Application document is created when transaction is saved.
2. Message control is invoked.
3. Messages are processed by system.
4. Messages are Edited (if desired).
5. Output (ALE / EDI) is checked
6. Validate against Message control record from Partner Profile
7. Application Document is saved.
8. Entry NAST table is created for every selected output program
along with Medium & Timing.
9. Check for Process Immediately .
If (yes)
Determine Processing Program from TNAPR Table.
ELSE
Execute RSNASTED Program.
10. Read Partner Profile to determine Process Code.
11. Process Code points to the Function Module & Invoked.
12. IDoc is generated.
13. Check for ALE Request.
if (Yes)
Perform Filters, Conversions, Version Changes etc.
Else.
IDoc is stored in DATABASE.
INBOUND:
Step 1. EDI Subsystem creates an IDoc file from EDI Messages
2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.
3. Data in Control Record is validate against the Partner Profile.
4. IDoc is generated in Database and syntax check is carried out.
5. IDoc file is deleted once file read.
6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.
7. Check for Process Immediately.
If NO
Execute RBDAPP01 Program
Else
Read Process Code from Partner Profile
Process Code Points to Function Module
Application Document Posted.
further help:
check url
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/ale/configuration.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapdevelopment.co.uk/training
And also u can get lots of inof from the below link.
http://www.sapgenie.com/ale/why_ale.htm
Regards
vasu