Idoc Notes

of 74 /74
7/29/2019 Idoc Notes http://slidepdf.com/reader/full/idoc-notes 1/74 SAP IDoc (Intermediate SAP IDoc (Intermediate Document) Document) SAP AG 1997 The Intermediate Document (IDoc) Control record Intermediate Document type Application EDI subsystem Data record Segment Administrative Section Status record

Embed Size (px)

Transcript of Idoc Notes

  • 7/29/2019 Idoc Notes

    1/74

    SAP IDoc (IntermediateSAP IDoc (IntermediateDocument)Document)

    S A P A G 1 9 9 7

    The In term ediate Doc um ent (ID oc)

    Co ntro l record

    In termed iate D ocum ent type

    Appl icat ion

    ED I subsystem

    Data record

    S e g m e n tAdminist rat iveSect ion

    Status record

  • 7/29/2019 Idoc Notes

    2/74

    IDoc is the acronym for Interchange Document.

    This indicates a set of (Electronic) informationwhich build a logical entity.

    IDoc are Basically a small number of records inASCII format, Building a logical entity.

    SYSTEM 1

    DOCUMENT 1IDoc

    SYSTEM 2

    DOCUMENT 2

    SAP IDoc

  • 7/29/2019 Idoc Notes

    3/74

    SAP AG 1997

    IDoc Concept, General

    Open, standardized interface

    Integration of SAP application and non-SAPEDI subsystem

    Control of business process

    Rule-based outbound processing(Message Control)

    Rule-based inbound processing(Workflow Management)

    EDI subsystem SAP System R/3

    EDI message IDoc SAP document

  • 7/29/2019 Idoc Notes

    4/74

    IDoc Basic Structure An IDoc consists of a control record,

    several data records and status records. Control record and status records are the

    same for all IDoc types. Function of IDoc Elements

    Control record: Defines the content, structure,sender, receiver and status of the IDoc Data records: Defined by IDoc type (e.g.,

    segment fields)

    Status records: Log the steps the IDocmessage has gone through up to the present

  • 7/29/2019 Idoc Notes

    5/74

    S A P A G 1 9 9 7

    C o n t e n t s o f C o n t r o l R e c o r d

    I D o c - I D

    I D o c t y p e ( b a s i c , c u s t o m e r e x p a n d e d )

    L o g i c a l m e s s a g e w i t h c o d e a n d f u n c t i o n

    S e n d e r - I D

    R e c e i v e r - I D

    L a t e s t s t a t u s o f p r o c e s s i n g

    E D I s t r u c t u r e ( s ta n d a r d , v e r s i o n , m e s s a g e )

    E D I r e f e r e n c e n u m b e r s

    K e y t o m e s s a g e a r c h i v e o f E D I s u b s y s t e m

    S A P A G 1 9 9 7

    C o n t r o l R e c o r d - E D ID C

    ID o c n u m b e r

    D i r e c t io n - i n b o u n d o r o u t b o u n d

    M e s s a g e t y p e a n d v e r s i o n

    ID o c s t ru c t u r e ty p e

    R e c e i v e r p o r t /p a r t n e r t y p e /p a r t n e r n u m b e r

    S e n d e r p o r t / p a r t n e r t y p e / p a r t n e r n u m b e r

  • 7/29/2019 Idoc Notes

    6/74

    S A P A G 1 9 9 7

    Co ntents of Da ta Reco rd

    IDoc-ID

    Se g m e n t n u m b e r

    Se g m e n t n a m e

    parent segm entn u m b e r

    segm ent leve l

    ED I f ield

    ED I f ield

    . . . . .

    1 SAP s e g m e n t m a p s toone or severa l EDI

    segments Field leng ths and attr ibutes

    according to ED I standa rds

    Fie ld c ontents according toED I standards as far asappropriate

    S A P A G 1 9 9 7

    D a ta R e c o r d s - E D I D 2 A p p l ic a t io n h e a d e r in f o r m a t io n

    A pp l ic a t ion l ine i te m in form a t ion

    A p p l ic a t io n s u b - lin e in f o r m a t io n ( s c h e d u l e l in e s , p a r t n e r s ,ta x in form a t ion , te x t , e tc .. )

    S u m m a ry d a ta

  • 7/29/2019 Idoc Notes

    7/74

    SAP AG 1997

    Contents of Status Record

    IDoc-ID

    Log date and time

    Status of processing

    Detailed description of status by

    Code of message

    Text of message

    Up to four dynamic message parameters Location of exception in IDoc by segment

    Detector of exception by program and user

  • 7/29/2019 Idoc Notes

    8/74

    SAP Lab on IDoc

    Be able to understand the structureof different IDoc types

    Be able to display a specific IDoc

  • 7/29/2019 Idoc Notes

    9/74

    SAP AG 1997

    The IDoc Interface EDI Standard Independent

    ANSI X.12

    EDIFACT

    Proprietary

    EDI Subsystem Independent

    Certified EDI Subsystems

    Not limited to use of Certified subsystems

  • 7/29/2019 Idoc Notes

    10/74

    IDoc Type An IDoc type is defined through its permitted

    segments. Segments can be dependent on each other (parent

    and child segments). For example, segment E1MAKTM (Master material

    short texts /MAKT)is a child segment of

    E1MARAM (Master material general data/MARA)in IDoc type MATMAS01 (material master). Relation between IDoc and IDoc type is similar to

    the relation between XML (Extensible Markup

    Language) document and DTD (document typedeclaration) file

  • 7/29/2019 Idoc Notes

    11/74

    An IDoc type is defined by The fields it can have.

    Fields can be grouped into segments.

    Multiple segments can be grouped

    into a (parent) segments. Segments and fields form a tree

    where the leaves are fields, and

    intermediate nodes are segments

  • 7/29/2019 Idoc Notes

    12/74

    The Segment Tree of An IDoc Type

    MATMAS01 Material MasterE1MARAM

    Material Master General Data

    MSGFN

    Function

    MATNRMaterial Number

    E1MAKTMMaterial Description

    E1MVKEMSales Data

    MSGFNFunction

    MAKTXMaterial Description

    MSGFNFunction

    VRKMESales Unit

  • 7/29/2019 Idoc Notes

    13/74

    Display IDoc Type Tools->Business

    Communication->IDoc-

    >IDoc Basic->Documentation>IDocType(TC:WE60)

    Fill-in IDoc Type:

    MATMAS01 (Materialmaster data) thenclick execute button

    Click here to expand

    the node Display the segment

    name and descriptions

  • 7/29/2019 Idoc Notes

    14/74

    Display An IDoc Tools->Business

    Communication->IDoc->IDoc Basic->IDoc->Display IDoc (TC:WE02)

    In the selection screen,change the date created

    (from) to , and changethe IDoc number to128760 (MaterialMaster)

    Then click ExecuteButton, then the IDocdisplayed

    Control data Click here to display data

    records

  • 7/29/2019 Idoc Notes

    15/74

    Display An IDoc Click the arrow to

    expand thesegment folder Display fields and

    data, use scroll barand buttons todisplay more data

    Click here to

    display the statusrecords

  • 7/29/2019 Idoc Notes

    16/74

    An Integration ProblemItems

    Received

    Scan UPC

    Receiving slipCreated

    TransfersReceiving slip

    Receiving slipReceived

    Create ReceivingDocument

    ReceivingDoc created

    ReceivingSlip

    Receivingdocument

    PurchasePrice

    Warehouse

    Retail Store

    Retail Store

    PDA

    SIMS

    AYC use PDA to recordthe quantity of each itemin the vendor delivery

    PDA produces anelectronic receiving slip.

    The PDA will then sendthe receiving slip to theStore InventoryManagement System(SIMS)

    Suppose AYC use SAP asits SIMS.

    How to transform thereceiving slip into an SAPdocument?

  • 7/29/2019 Idoc Notes

    17/74

    The AYC CaseMessageSystem

    ALE SAPApplication

    Create the goodsslip documents

    Upload the documentsto Windows client

    Create themessages

    Send themessages

    Create IDoc (s)

    Receivingthe messages

    Create the goodsreceipt documents

    Processthe IDoc (s)

  • 7/29/2019 Idoc Notes

    18/74

    SAP Lab: Display IDoc Type and IDoc(10 HW points)

    Display IDoc type for PDA to CIMS dataconversion: WMMBID01(Goods movements for mobile data entry)

    As we described in the problem section: The mobileentry of goods receipts in the Inventory Managementmodule is an example of a typical customer requirement.

    Find out the data segments and fields of goods slipthat you defined in the project 2# (AYC case)

    Display IDoc: IDoc number: 128757 Find out the following information

    E1MARAM-MATNR E1MARAM-E1MAKTM-MAKTX (Segment 02)

    E1MARAM-E1MBEWM-BWKEY (Segment 07)

  • 7/29/2019 Idoc Notes

    19/74

    SAP Message Distribution

    Terms Application

    application function modules Process (create, change, delete) business transactions E.g. Goods receiving process

    ALE (Application Link Enabling)

    ALE translates external EDI messages to and from IDoc ALE supports distributed applications ALE supports message-oriented integrations

    Communication Layer: Message interface (XML, EDI)

  • 7/29/2019 Idoc Notes

    20/74

    SAP Uses ALE to Implement Message Distribution

    Sender Receiver

  • 7/29/2019 Idoc Notes

    21/74

    SAP Message Distribution

    Outbound An application function module creates a master

    IDoc The following steps are carried out in the ALE

    layer: Receiver determination: Determines receiving partner. Filtering segments: Remove segments not to be sent to the

    partner. Converting fields Version change: Converts the IDoc to be compatible with

    the SAP version of the partner.

    Dispatch Control:

  • 7/29/2019 Idoc Notes

    22/74

    SAP Message Distribution

    Inbound The following steps are carried out in the

    ALE layer: Segment filtering Field conversion Transfer control

    Serialization An application function module creates

    application documents

    E.g. the AYC receiving process

  • 7/29/2019 Idoc Notes

    23/74

    SAP AG 1997

    EDI Interface OverviewSAP R/3

    EDI Subsystem

    Communication - VAN

    R/3

    LEVEL

    O/S

    LEVEL

    Message Control Workflow

    Intermediate

    Document

    Intermediate

    Document

    Remote Function Call Remote Function Call

    EDI/ALE InterfaceEDI/ALE Interface

  • 7/29/2019 Idoc Notes

    24/74

    S A P A G 1 9 9 7

    E DI Sub system Re spon sib i lities

    Mapping

    Syntax Check Co nstruction of se rv ice

    segments

    Partner-specif icprocessing

    In terchange & funct ionalacknowledgments

    Status contro l andreport

    Real - tim e EDI

    Archiv ing

    Pa rtner prof i les

    Communicat ion

    Partne r p ro file T ran sla to r

    Communicat ion

    Archive

    EDI subsystem

  • 7/29/2019 Idoc Notes

    25/74

  • 7/29/2019 Idoc Notes

    26/74

    Implementation Guide ->sap web applicationserver -> Basis Services ->

    IDOC Interface/Electronic DataInterchange Number Ranges for IDOC (16 Digit No.)

    Transaction:OYSN

    Global IDOC Interface Parameter Transaction:WE46

    Coupling IDOC Creation to IDOC Processing Img. Settings Activate Event Receiver Linkage

    PROCESSSTATEREACHED Event is triggered RSEINBEV PROGRAM can do the same task.

    BASIC SETTINGS

  • 7/29/2019 Idoc Notes

    27/74

    COMMUNICATION

    SETTINGS Linking the SubSystem to SAP.

    One time settings.

    Setting an RFC Destination Automatically trigger subsystem

    RFC_REMOTE_EXEC.

    Transaction: SM59(SERVER_EXEC).

    Port Definition Transaction: WE21

  • 7/29/2019 Idoc Notes

    28/74

    COMMUNICATIONSETTINGS

    Used for processing IDOC/XML

    format

    XML

    Custom IDOC processing viaABAP programming interface

    ABAP-PI

    Used to connect with internetapp.

    InternetUsed for communication with R/2CPI-C

    Used for EDIFile

    Used for ALE CommunicationTRFC

    FunctionPort

  • 7/29/2019 Idoc Notes

    29/74

    Configuring Partner Profile Transaction:WE55 to add custom

    function module Configuring Partner Profile

    Transaction: WE20

    WE41 Outbound Process Codes(SelectionPrg)

    WE42 Inbound Process Codes(PostingPrg)

    Consistency Check RSECHK07 Prg

    BD82 Automatic partner profile gen.

  • 7/29/2019 Idoc Notes

    30/74

    Configuring Message Control Message Control generate and

    manage outputs from app. And controltheir timing & medium of Exchange. Condition Type- Characteristic &

    attributes of o/p itself. Procedure-set of possible o/p for an

    application

    Access Sequence(business rules rchecked)

  • 7/29/2019 Idoc Notes

    31/74

    Message Control ComponentsTransactions

    NACE

    NACO

    VK01

  • 7/29/2019 Idoc Notes

    32/74

    Processing Programs &Tables

    This Processing Prg. Exist foreach o/p medium.

    RSNASTED

    Pgm. Used to process entries inNAST table

    RSNAST00Entry of all Processing ProgramsTNAPR

    Table stores an entry for eacho/p

    NAST

    PurposeName

  • 7/29/2019 Idoc Notes

    33/74

    Testing the OutboundProcess

    Types Of Test Utilities Utilities for a sanity test Check

    Components

    Utilities to test the Process simulatesthe process.

    Sanity Test: Testing Partner Profile (WE20)

    Testing RFC Destination (SM59)

    Testing Port Definition (WE21)

  • 7/29/2019 Idoc Notes

    34/74

    Testing the OutboundProcess

    Testing Outbound Process Steps

  • 7/29/2019 Idoc Notes

    35/74

    Testing the OutboundProcess

    Verifying the generation of IDOC(WE15)

    WE02 to see the IDOC

    Verify the connection between SAP &Subsystem(WE14)

    Verify Status Reporting by thesubsystem(WE17)

  • 7/29/2019 Idoc Notes

    36/74

    Testing Inbound Process Start the inbound process by copying an

    outbound IDOC as inbound(WE12)

    Start the inbound process from an inboundtext file.(WE16).

    Start the inbound process with the inboundtest tool(WE19)

    Verifying the posting of applicationdocuments(BD87)

  • 7/29/2019 Idoc Notes

    37/74

    IDOC

    R/2

    Intranet

    ICR/OCR

    EDI

    Workflow

    ALE

    R/3

    WWW

  • 7/29/2019 Idoc Notes

    38/74

    Three categories of IDoctypes

    Basic SAP IDoc type

    Basic customer IDoc type

    Customer Extended IDoc type IDoc type = basic IDoc type + Extended

  • 7/29/2019 Idoc Notes

    39/74

    IDoc type Vs IDoc An IDoc type is the structural definition of an

    abstract business document example: P.O,

    Sales Order all allowed segments

    sequence of segments and

    repetition of segments An IDoc is the concrete document compliant

    with the rules given by its IDoc type example:

    sales order# 512.

  • 7/29/2019 Idoc Notes

    40/74

    Segment type andSegment definition Segment type is in use internally and supports

    all features of the ABAP developmentworkbench and the data resp.

    Segment definition comprises the segment

    name which is use externally as well as thesegment documentation.

    Naming conventions are controlled by the IDocdefintion tools.

    L i l d IDOC

  • 7/29/2019 Idoc Notes

    41/74

    Logical message and IDOC type

    WE82, WE57 (Inbound)

    An association is made between a logical

    message and the allowed IDoc types which canfulfill the document.

    The basic IDoc type and the extension type (ifany) and the release of the combination aregiven.

    A logical message can have more than one IDoctype associated with it.

    P C d P t d

  • 7/29/2019 Idoc Notes

    42/74

    Process Code, Port and

    Partner profile The partner profile links SAP business application

    with an EDI subsystem.

    The process code points to a business process.

    The business process controls the creation of anIDoc in outbound or the processing of an IDoc topost a business document in inbound.

    The port takes all the technical properties toaddress the other system.

  • 7/29/2019 Idoc Notes

    43/74

    Testing Tools

    Outbound IDoc testing tools

    Inbound IDoc testing tools

    Inbound status testing tools

  • 7/29/2019 Idoc Notes

    44/74

    IDoc Outbound Testing With transaction WE15 / run program

    RSNAST00 you test the creation of an IDocbased on the message control record

    this is available for MM-PUR and SD only

    With transaction WE14 / run programRSEOUT00 you test the forwarding of an IDocto the receiver system

    this is available for all applications

  • 7/29/2019 Idoc Notes

    45/74

    IDoc Inbound Testing With transaction WE12 you test the inbound

    processing of an IDoc by copying an outbound

    file, and handle the copy as an inbound file. With transaction WE16 you test the inbound

    processing of an IDoc by picking up any inbound

    file with transaction WE19 you test the inbound

    processing of an IDoc by creating the IDoc in aneditor

  • 7/29/2019 Idoc Notes

    46/74

    IDoc Status Testing

    With transaction WE17 you test processing ofthe status report

    A status report can be processed also via IDoc

    type SYSTAT01, then you proceed asdescribed in inbound testing by

    WE12, WE16, WE19

  • 7/29/2019 Idoc Notes

    47/74

    IDoc Monitoring Tools You can generate lists of IDoc according to

    different criteria

    IDoc lists, you can switch to the IDoc displayand view control, data and status records foreach IDoc

    Breakdown by time you can see how many IDocs were dispatched

    and received per hour

    you can display detailed status list for eachIDoc

  • 7/29/2019 Idoc Notes

    48/74

    Outbound Archivable Status 03 data passed to port ok 18 triggering port ok

    19 data transfer for test ok 21 error passing data for test

    31 error- no further processing

    33 original of an IDoc which was edited 38 IDoc archived

    40 error application doc. Not created in target

    sys 41 application document created in target sys

    b d h bl

  • 7/29/2019 Idoc Notes

    49/74

    Inbound ArchivableStatus

    53 application document posted

    57 test IDoc- error during application check

    68 error - no further processing

    70 original of an IDoc which was edited

    73 IDoc archived

    Extending IDOCS

  • 7/29/2019 Idoc Notes

    50/74

    Extending IDOCS

    You extend a basic IDOC type when it meets most of yourrequirements.

    You have extended the SAP screens to include custom field,such as inthe material master and customer master.The master data is to be

    distributed across several SAP systems using ALE.This situation is aperfect candidate and obvious choice for IDOC extension.

    Your business partner sends you additional information or expectsadditional information on an EDI document.This again should betaken as a case of IDOC extension.

    Advantages of Extensions

    The standard code of processing is still in use.Developments and corrections of standard code are availableautomatically.Extensions are much less effort than developments.

  • 7/29/2019 Idoc Notes

    51/74

    You create a new basic IDOC type when the standard basic IDOCtypes do not meet your business needs as is or by extending them.

    You want to synchronize master data between two SAPsystems,and this master data s not supported in the standardsystem.

    New basic IDOC types are developed especially for interface tolegacy systems or third-party products using ALE.Data to beexchanged with Legacy system is usually in a proprietary formatand does not map one to one with a standard SAP business process.

    Creating IDOCS

    Desi n uidelines to be followed durin the creation of an IDOC

  • 7/29/2019 Idoc Notes

    52/74

    Develop an IDOC type for a function,not for a specific application.For example,the ORDERS02 IDOC is designed for the order processand not specifically for the sales order entry applications.This IDOC

    is used for several documents such as purchase order, sales order ,order response and order change.

    Organize the document to contain header information,detailinformation and summary information.

    Do not repeat a segment type in an IDOC definition.For example, consider the monthly report IDOC type ZMREPT01,if it was asked to add client information to the summary as well,ourinstinct would be to attach the Z1CLDET segment to summary

    segment Z1SUMRY.SAP does not permit placing a segment typemore than once in an IDOC definition.

    Design guidelines to be followed during the creation of an IDOC

    Design guidelines to be followed during the creation of an IDOC

  • 7/29/2019 Idoc Notes

    53/74

    Use the parent-child relationship when you are going to permitseveral entries of the same type in one IDOC.

    Avoid having too many mandatory segments.Having extramandatory segments reduces the reusability of the IDOC.For example in monthly report IDOC,the weekly details segmentseems to be mandatory.Consider another process that could makeuse of this IDOC to send just employee header information and

    summary information.If the weekly segment were mandatory,thenthe IDOC would not be reusable in that way.

    Create segments that can be reused by other IDOCs.

    Do not make segments larger then 1,000 bytes. Try to split thesegments into functionally separate segments when a segmentdefinition exceeds 1,000 bytes.

    Design guidelines to be followed during the creation of an IDOC

    Design guidelines to be followed during the creation of an IDOC

  • 7/29/2019 Idoc Notes

    54/74

    Steps for creating a Basic IDOC type

    Step 1: Data analysis

    Step2: Create Data Elements

    Step3: Create Segments

    Step4: Create Basic IDOC type

    Step5: Release the segment type and Basic IDOC type

    Step6: Transport Segments and Basic IDOC types

    Design guidelines to be followed during the creation of an IDOC

  • 7/29/2019 Idoc Notes

    55/74

    In this stage you analyze data that needs to be exchanged betweenthe two processes.Develop the conceptual picture of the IDOC on apiece of paper.

    Follow a top-down approach if you are starting a business-documentlevel.Break the documents into segments and group the segments thatbelong together into a segment group.Identify fields in a segment andtheir data type.Identify any parent-child relationships.

    Follow a bottom-up approach if you are starting at the field level.You have been given a docment that contain various values that mustbe exchanged between two segments.Group the fields that arefunctionally related into segment.Group those segments in a segmentgroup and arrange them in an IDOC type.Identify any parent-child

    relationship.

    Step 1: Data analysis

    Step2: Create Data Elements

  • 7/29/2019 Idoc Notes

    56/74

    p

    The need to create new data elements is minimal because if you areextracting data from SAP to put into an IDOC, the data alreadyexists in the database and is represented by a data element.Youneed to create new data elements in following cases:

    A data element in SAP does not use one of the allowed data types

    for IDOC segments.Here is a list of allowed data types

    1> CHAR Character Strings2> CLNT Client

    3> CUKY Currency key4> DATS Date field ( YYYYMMDD ) stored aschar(8)5> LANG Language key6> NUMC Character fields with only digits

    7> TIMS Time field ( HHMMSS) stored as char(6)A field in SAP is smaller in length than the industry standard ( thisoccurrence is rare ).

    Step3: Create Segments

  • 7/29/2019 Idoc Notes

    57/74

    Step3: Create Segments

    Segments are created by using Segment Editor tool.This can bestarted by executing the transaction WE31.

    Follow these steps to create a segment:1> Execute transaction WE31.Enter the name for your segment type

    ( it must start with Z1 ) and click on create icon. The systempromptsyou with the name of the development class it uses for the

    segment.But you can override the default value.

    2> Enter the values in the various fields.You are now maintaining thefirst segment definition.The system automatically assigns a name tothe segment definition based on segment type.

    3> Save your values and generate the segment definition.Once yousave your segment return to the previous screen and enter adescription for your segment type.Click on save and you are done.

    Step4: Create Basic IDOC type

  • 7/29/2019 Idoc Notes

    58/74

    Once you have developed all the needed segment types you are readyto create the basic IDOC type.You use IDOC editor transactionWE30.

    Follow these steps to create a basic IDOC type:

    1> Execute transaction WE30,enter name for your basic IDOC type( it must start with Z ),select Basic IDOC type button and clickCreate icon.

    2> On the next screen,select the create New option and enter a

    description.Press Enter.

    3> Click on the IDOC name and click on the create icon.The systemprompts you to enter a segment type and its attributes.Chooseappropriate values and press Enter.The system transfers name of

    segment type to IDOC editor.

    Step5: Release the segment type and Basic IDOC type

  • 7/29/2019 Idoc Notes

    59/74

    When you are satisfied with your IDOC structure and segments,youcan release them formally to signify their completion and make themavailable for transport to test and production systems.

    First you release the segments,and then you release the basic IDOC

    types.

    To release a segment,execute WE31,enter segment type and chooseGoto, Release.The system enables a check box in the segmentdefinitions block.You can select the check box and save your entry.

    To release a basic IDOC type,execute transaction WE30.Enter thebasic IDOC type in the Obj.Name field and choose Extras,ReleaseType.Confirm the entry,and basic IDOC type is released.

    This step prevents further modification to basic IDOC type

    Step6: Transport Segments and Basic IDOC types

  • 7/29/2019 Idoc Notes

    60/74

    Changes to basic IDOC type and segments are automaticallyrecorded in a change request.After you transport the objects,youcan also manually retransport them from the segment editor andIDOC editor screens by choosing Segment,Transport andDevelopment Object,Transport respectively.

    Transporting a segment transports all the segment definitions anddocumentation,but transporting an IDOC does not automaticallytransport all the segments.

    Note:-If you release a basic IDOC type without releasing its segmentsand then transport the basic IDOC type,the segments are nottransported.

    p p g yp

    Extending a basic IDOC Type

  • 7/29/2019 Idoc Notes

    61/74

    To extend a basic IDOC type,you also need to understand what ispermitted and what is not.The concept of extending a basic IDOCtype means adding one or more custom segments to one or more

    existing SAP segments of a basic IDOC type.

    The formal procedure of extending a basic IDOC type is as follows:1> Start with data analysis.Identify a segment in the basic IDOC typethat needs to be extended.

    2> Create a custom segment with your fields.

    3> Create an IDOC extension that ties the custom segment to the SAPsegment which is t be extended.

    4> Tie the extension to a basic IDOC type to create an IDOC type.

    Extending a basic IDOC Type

  • 7/29/2019 Idoc Notes

    62/74

    Assume that you have extended the Purchase Order screen to includeadditional Purchase data information.

    The basic IDOC type for Purchase Order is ORDERS05.

    Step 1: Data AnalysisIn this step you analyze the basic IDOC type and identify segmentsthat need to be extended.In this example ZJONORD isa custom segment that contains user-defined fields.

    Thus ORDERS05 is extended by extending the E1EDS01 segment.The segment to be extended is called reference segment.

    St 2 C t C t S t

  • 7/29/2019 Idoc Notes

    63/74

    Step 2: Create Custom Segments

    In this step you create the custom segment ZJONORD. This segmentcontains FOUR fields and required data elements:

    Step 3: Create an IDOC extension

    You use the IDOC editor transaction WE30 to create an IDOCextension.

    (a)Enter the name for your IDOC extension in the Obj.Name field.

    This entry can be any meaningful name and does not have to startwith Z.Click on Extension type radio button and then on Create icon.

    (b)On the next screen,click on the create New button and enter adescription for your extension and linked basic type .Press Enter.

    Using WE31 create a segment that is to be added to the IDOC

  • 7/29/2019 Idoc Notes

    64/74

    Using WE31 create a segment that is to be added to the IDOC

    We30 to link the custom segment to basic type

    E t d d t t b b t f E1EDS01

  • 7/29/2019 Idoc Notes

    65/74

    Extended segment must be sub segment of E1EDS01

    WE82 To entry the new segment with related message type and

    basic type into EDIDC Table

  • 7/29/2019 Idoc Notes

    66/74

    basic type into EDIDC Table.

    VK01 create Condition element to define the output type.

    W 20 t t fil

  • 7/29/2019 Idoc Notes

    67/74

    We20 create partner profile.

    Add th E t i

  • 7/29/2019 Idoc Notes

    68/74

    Add the Extension.

  • 7/29/2019 Idoc Notes

    69/74

    Use tx SMOD to find the user exit and in tx CMOD create a project ,

    Add the user exit, Write the program in the INCLUDE to pass the

  • 7/29/2019 Idoc Notes

    70/74

    Values to segment.

  • 7/29/2019 Idoc Notes

    71/74

  • 7/29/2019 Idoc Notes

    72/74

    Tx :ME21 To create a purchase order.

  • 7/29/2019 Idoc Notes

    73/74

    WE02 to view Idoc with populated segment.

  • 7/29/2019 Idoc Notes

    74/74

    p p gm