Steps in IN-BOUND IDOC?

Hi Experts,
I know that the EDI Out Bound Process comprises of the following. steps
Selection Program
Message Control
The Port Definition
The RFC Destination
The Partner Profile
So, pls let me know the same in the same manner (broder way) for IN BOUND IDOC?
Thank you

Moderator message - Please search before asking - post locked
Rob

Similar Messages

  • Out bound IDOC creation

    Hi experts,
    I am given a task to create an out bound IDOC which would be input to TIBCO, which must be triggered every time Good issue transaction is completed by either VT02N or VL02N transaction up pressing SAVE.
    IDOC is to have fields from Customize tables apart from standard SAP tables, so was asked to create an own IDOC ( eg: Z--Idoc).
    Please tell me how to create the idoc, and also the method to trigger it and how to populate the IDOC ( program etc).
    Use full inputs would be promtly rewarded.
    Regards,
    Ram.

    Hi
    Creation of Custom IDOc type and message Type
    First Create Partner Profile(WE20 Tcode) and Port Definition in WE19 Tcodes.
    take the Basis help to create them.
    1.First create segments in WE31 Tcode with the required dataelements
    2.Create the Basic Idoc Type in WE30
       release the Segments and IDOC type.
    3.Create Message type in We81
    4.Assign the message type to IDOC type in WE82 T code
    5.Create the process code in We41 (for Outbound) WE42 (for Inbound)
    6.Create A fun module in SE37 starting with ZIDOC_OUTPUT_.. by copying some Inbound (for    Inbound) Outbound Fun module
    7.Create  Workflow setting if needed ..
    8. Assign the fun module to Idoc Type, Message Type and WF object (if it is there0
    9.Define setting for fun module in BD51
    10.In BD51 Define the settings for Fun module..
    10.Assign the Processs Code to Fun mod`ule
    Outbound Interface
    PROCESS DIAGRAM for Outbound Interface
    1. Analyse Hierarchy Levels
    2. Create New segment
    3. Create New IDoc Type
    4. Create New Message Type
    5. Link Message with IDoc Type
    6. Create an entry in EDP13 via transactions WE20 and BD64
    7. Populate the Custom IDoc via ABAP Program
    7b Error Handling
    7c. Send Status Email
    8. Test the Population of the Custom IDoc
    Step 1 – Analyse Hierarchy Levels:
    Analyse the data relationships being processed in the interface. Define the appropriate hierarchical Parent-to-Child relationships.
    Navigate to transaction code WEDI
    Transaction WEDI displays the IDOC main menu. This allows navigation around the various development and control areas to create a customised IDOC.
    Step 2 – Create a new segment:
    via wedi : Development - IDOC Segments or Transaction code WE31.
    • Enter segment name and click on Create.
    ? The name of the segment type must start with Z1 , and have a maximum of eight characters.
    • Enter description and enter the relevant field names and data elements.
    ? The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.
    • Save the segment and enter Person Responsible and Processing Person .
    • Go to Edit and Set Release.
    • Repeat this procedure for each new Segment in the IDOC.
    Step 3 – Create a new IDOC Type
    via wedi Development - IDOC Types or Transaction WE30.
    • Enter segment name (starting with Z), click on Basic Type and then Create.
    • Create as new, enter Person Responsible and Processing Person and enter description.
    • On ‘Create Basic Type’ screen decide where segments should be inserted and go to Edit/Create Segment.
    • Complete relevant fields in the Maintain Attributes screen:
    • From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
    • The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
    • The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
    • Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a ‘Child’.
    • When IDOC created return to initial screen. Go to Edit and Set Release.
    • Go to Transaction WE60 to view the IDoc Type you have created.
    Step 4 – Create new Message Type
    via wedi Development - Message Types or Transaction WE81.
    • Display/Change and click on New Entries
    • Create a new Message Type and Save.
    Step 5 – Link Message Type to IDOC Type
    via wedi Development - IDOC Type/Message or Transaction WE82.
    • Display/Change and then click on New Entries.
    • Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
    Step 6 – Create an entry in EDP13 via transactions WE20 and BD64.
    The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
    • WE20 – Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
    • BD64 – Create a Model View, Enter Sender and Receiver Ports, Attach Message Type. Go to ‘Environment’ on Menu and click on Generate Partner Profiles and generate (not save) profile.
    Step 7 – Populate the custom IDOC via ABAP Program
    See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.
    • Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.
    • The control record is filled into a structure like EDIDC. The message type and the Idoc type for the Idoc must be populated into the eddic structure.
    - PERFORM populate_Control_structure USING c_mestyp
    c_SEGMENT_type1.
    • The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure.
    - PERFORM transfer_Parent_data_to_seg.
    • The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.
    - PERFORM master_idoc_distribute.
    • NOTE: This function module is only called for stand alone programs and Shared Master Data programs (SMD). It is not called when using extensions or output determination.
    • The ALE Layer handles the sending of the IDOC to the receiving system.
    • Error Handling (see Step 7b).
    • Commit work.
    Project Specific
    Step 7b – Error Handling• Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.
    • Declare a structure of type ‘MCMAILOBJ’ for sending instructions.
    • Enter values for the internal table based on structure ‘MCMAILOBJ’
    • For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module ‘MC_SEND_MAIL’.
    • Enter values in the following parameters: -
    MS_MAIL_SENDMODE = ‘B’ (Batch Mode)
    MS_MAIL_TITLE = 'Mail Title'
    MS_MAIL_DESCRIPTION = ‘Error description’ (e.g. MATNR not given)
    MS_MAIL_RECEIVER = ‘Name of Receiver’ (To be determined)
    MS_MAIL_EXPRESS = ‘E’ (Express Delivery)
    MS_MAIL_DLINAME = Leave Blank
    MS_MAIL_LANGU = 'E' (Language)
    MS_MAIL_FUNKOBJ_NAME = Leave Blank
    TABLES
    MS_MAIL_CONT = I_MCMAILOBJ
    Note:
    It has to be determined separately for each interface how these errors and mail notifications are to be grouped – dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure.
    When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)
    Step 7c – Send status mail
    • Append to table I_MCMAILOBJ details of the time the interface was processed, how many Idocs were created and how many of these produced a status of 03.
    • Select the user to receive the mail from ZINT_RECEIVER, using the name of the program as a key (SY-CPROG).
    • Use function Module ‘MC_SEND_MAIL’ to send a mail to the user containing the contents of I_MCMAILOBJ at the end of the interface processing.
    Step 8 – Test the population of the custom IDOC
    via wedi IDoc - Display IDoc or Transaction WE02.
    • Enter your message type and execute.
    • Status should be green, double click on one of the Idocs you have created to view its contents.
    • If a problem has occurred click on Status which will give you a description of the error.
    • Drop down Data Records arrow and this should list the data in the IDoc in the correct hierarchical structure.
    • Click on each individual segment and view the content to check that the correct data has been read.
    • If you have UNIX access by using AL11 you can view the file that you have created.
    Note:
    For some interfaces it may be valid to send an empty file to SAP. This empty file is converted to the custom IDOC format expected by SAP. This custom IDOC will contain dummy information. In the inbound processing code, if the dummy information is identified then the processing of the IDOC is considered to be complete and the IDOC should then be assigned a successfully processed status of 53, even though it has not been processed at all.
    Regards
    Anji

  • Out Bound IDOC Status 03

    Hi,
    Can any one let me know about the out bound IDOC ststuses.
    In our system the Out bOund IDOC's are being in status 03, they are not moving to 12. Can any one please let me know why it is not moving to status 12.
    Regards,
    Ravi G

    Hi
    Please execute RBDMOIND program you will get change status 03 to 12
    Thanks,
    Murali

  • Idoc Status error 29 for Out bound Idoc( Receiver of IDoc is its own logic)

    I try to create the Out bound Idoc with messag type WMMBXY ( basic Idoc type - WMMBID02 ).
    which is configured with the out put type XXXX in VT01N( shippment creation). But I am getting the error status 29 in the Idoc.
    Only I am passing the sender, receiver port , partner type and partner function to the communication structure.
    Could you please tell me , what is the issue with the partner type configuration .

    Hi,
    Error 29 occurs when there is an incomplete or no partner profile maintained.
    Check whether you have done the correct partner profile settings in WE20 outbound parameters.
    For the partner no defined in Idoc check whether there is an entry(under partner type LI, KU or LS)
    with correct message type WMMBXY  and Idoc type WMMBID02. Also check for message function code.
    Regards,
    Savitha

  • Outbound idoc( billing )--- from where Out bound idoc fetching data

    Hi gurus,
    Some one explains me. from where does out bound idoc(billing) fetches data into control records and data records?.
    Is it from Order or billing document?
    Thanks
    Seegal

    Hi,
    If your IDOC is getting generated from Billing document,the data in control records and data records should be fetched from billing document.You can get data from Sales Order as well.Check with your ABAPer.
    Regards,
    Krishna.

  • Out bound idoc creation urgent!!!!!!!!!!!!

    Hi experts,
              I am given a task to create an out bound IDOC which would be input to TIBCO, which must be triggered every time Good issue transaction is completed by either VT02N or VL02N transaction up pressing SAVE.
              IDOC is to have fields from Customize tables apart from standard SAP tables, so was asked to create an own IDOC ( eg: Z--Idoc).
             Please tell me how to create the idoc,  and also the method to trigger it and how to populate the IDOC ( program etc).
              Use full inputs would be promtly rewarded.
    Regards,
    Ram.

    Sample code in the below:
    REPORT zhefrn_idoc_extract_fi LINE-SIZE 160.
    Purpose
    This program extracts FI postings and create IDOCs
    Description
    An IDOC of type ACC_GL_POSTING01 is created from the extracted
    FI-data.
    *- Extract data from BKPF and BSEG
    *- Build the IDOC control record. Use structure EDIDC.
    *- Build and internal table of structure EDIDD with IDOC segments.
    EDIDD contains some keyfields, but the data segment field is simply
    one string, as EDIDD is used for all type of IDOC’s. To simplify the
    process of building this string,  use the SAP datastructures with the
    same name as the segment. E.g for segment E1BPACHE08 use structure
    E1BPACHE08.
    *- Use function module MASTER_IDOC_DISTRIBUTE to create the IDOC’s.
    Remember to commit.
    Important: This program can not handle multiple documents, so all
    postings must have the same key (Company code, currency code,
    postingdate, document date) so that they can be posted in the same
    document. *If the program should handle multiple documents, data
    should be split *according to the key, and an IDOC created for each
    document.
    Standard types
    TABLES:
      bkpf,  "Accounting Document header
      bseg.  "Accounting Document Segment
    TEDS1. "IDoc status values
    Standard types
    TYPES:
      BEGIN OF st_bkpf,
        bukrs LIKE bkpf-bukrs,
        belnr LIKE bkpf-belnr,
        gjahr LIKE bkpf-gjahr,
        blart LIKE bkpf-blart,
        bldat LIKE bkpf-bldat,
        budat LIKE bkpf-budat,
        monat LIKE bkpf-monat,
        waers LIKE bkpf-waers,
      END OF st_bkpf,
      BEGIN OF st_extract,
        bukrs LIKE bkpf-bukrs,
        belnr LIKE bkpf-belnr,
        gjahr LIKE bkpf-gjahr,
        blart LIKE bkpf-blart,
        bldat LIKE bkpf-bldat,
        budat LIKE bkpf-budat,
        monat LIKE bkpf-monat,
        waers LIKE bkpf-waers,
        hkont LIKE bseg-hkont,
        bschl LIKE bseg-bschl,
        shkzg LIKE bseg-shkzg,  "Debit/credit indicator
        dmbtr LIKE bseg-dmbtr,
        wrbtr LIKE bseg-wrbtr,
        dmbe2 LIKE bseg-dmbe2,
      END OF st_extract.
    Table types
    TYPES: tt_bkpf     TYPE STANDARD TABLE OF st_bkpf,
           tt_extract  TYPE STANDARD TABLE OF st_extract,
           tt_edidd    TYPE STANDARD TABLE OF edidd,
           tt_edidc    TYPE STANDARD TABLE OF edidc.
    Internal tables
    DATA:
    G/L Doc header
      gi_bkpf     TYPE tt_bkpf,
    G/L extracted data
      gi_extract  TYPE tt_extract,
    IDOC segment data
      gi_edidd    TYPE tt_edidd,
    Return table
      gi_communication_idoc_control TYPE tt_edidc.
    Global variables
    DATA:
    WA for internal tables
      g_bkpf      TYPE st_bkpf,
      g_extract   TYPE st_extract,
      g_edidd     LIKE edidd,
    *-- IDOC structures:
    IDOC control record
      g_idoc_control_record LIKE edidc,
    G/L document header
      g_e1bpache08 LIKE e1bpache08,
    G/L Account Line Items
      g_e1bpacgl08 LIKE e1bpacgl08,
    Line Item Currency Fields
      g_e1bpaccr08 LIKE e1bpaccr08,
    Return table from MASTER_IDOC_DISTRIBUTE
      g_communication_idoc_control LIKE edidc.
    Selection screen
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME.
    SELECT-OPTIONS: a_bukrs FOR bkpf-bukrs,
                    a_budat FOR bkpf-budat,
                    a_hkont FOR bseg-hkont,
                    a_usnam FOR bkpf-usnam DEFAULT 'WMHEFRN'.
    PARAMETERS:     p_create AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME.
    IDOC control record - Receiver
    PARAMETERS:
      p_rcvpor  LIKE edidc-rcvpor DEFAULT 'PORT-HFN', "Rec. Port
      p_rcvprn  LIKE edidc-rcvprn DEFAULT 'WMHEFRN',  "Rec. Partn. number
      p_rcvprt  LIKE edidc-rcvprt DEFAULT 'US',       "Rec. Partn. type.
      p_rcvpfc  LIKE edidc-sndpfc DEFAULT '§§'.       "Partner function
    SELECTION-SCREEN END OF BLOCK 2.
    SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME.
    IDOC control record - Sender
    PARAMETERS:
      p_sndpor  LIKE edidc-sndpor DEFAULT 'SAPC46', "Send. Port
      p_sndprn  LIKE edidc-sndprn DEFAULT 'WMHEFRN',  "Send. Partn.number
      p_sndprt  LIKE edidc-sndprt DEFAULT 'US'.       "Send. Partn. type.
    p_sndpfc  LIKE edidc-sndpfc DEFAULT '§P'.       "Send. Partn. funct.
    SELECTION-SCREEN END OF BLOCK 3.
    Start of selection
    START-OF-SELECTION.
      PERFORM initialize.
      PERFORM extract_data.
      PERFORM build_idoc_control_record.
      PERFORM build_idoc_segments.
      IF p_create = 'X'.
        PERFORM create_idocs.
      ENDIF.
      PERFORM write_report.
    *&      Form  INITIALIZE
    FORM initialize.
      REFRESH: gi_bkpf,
               gi_extract,
               gi_edidd.
      CLEAR: g_idoc_control_record.
    ENDFORM.                    " INITIALIZE
    *&      Form  EXTRACT_DATA
    Extract FI postings to internal table gi_extract
    FORM extract_data.
    Read BKPF
      SELECT  bukrs
              belnr
              gjahr
              blart
              bldat
              budat
              monat
              waers
        FROM bkpf
        APPENDING CORRESPONDING FIELDS OF TABLE gi_bkpf
        WHERE bukrs IN a_bukrs AND
              budat IN a_budat AND
              usnam IN a_usnam.
      LOOP AT gi_bkpf INTO g_bkpf.
        SELECT hkont
               bschl
               shkzg
               dmbtr
               wrbtr
               dmbe2
          FROM bseg
          INTO CORRESPONDING FIELDS OF g_extract
          WHERE bukrs = g_bkpf-bukrs AND
                belnr = g_bkpf-belnr AND
                gjahr = g_bkpf-gjahr.
          MOVE-CORRESPONDING g_bkpf TO g_extract.
          APPEND g_extract TO gi_extract.
          CLEAR g_extract.
        ENDSELECT.
      ENDLOOP.
      SORT gi_extract BY belnr.
    ENDFORM.                    " EXTRACT_DATA
    *&      Form  WRITE_REPORT
    Writes a report showing the selected data, and generated IDOCs
    and errors
    FORM write_report.
      WRITE: / 'Extracted data' COLOR COL_GROUP INTENSIFIED ON.
      LOOP AT gi_extract INTO g_extract.
        AT NEW belnr.
          SKIP 1.
          FORMAT COLOR COL_GROUP INTENSIFIED ON.
          WRITE: 'Document', g_extract-belnr.
          FORMAT RESET.
          NEW-LINE.
        ENDAT.
        WRITE: /
          g_extract-bukrs,
          g_extract-belnr,
          g_extract-gjahr,
          g_extract-blart,
          g_extract-bldat,
          g_extract-budat,
          g_extract-monat,
          g_extract-waers,
          g_extract-hkont,
          g_extract-bschl,
          g_extract-shkzg,
          g_extract-dmbtr,
          g_extract-wrbtr,
          g_extract-dmbe2.
      ENDLOOP.
    Write generated IDOCS
      ULINE.
      SKIP 2.
      WRITE: / 'Generated IDOCs' COLOR COL_GROUP INTENSIFIED ON.
      WRITE: / g_idoc_control_record.
      LOOP AT gi_edidd INTO g_edidd.
        WRITE: / g_edidd-segnam(10) COLOR COL_KEY, g_edidd-sdata(140).
      ENDLOOP.
    Write staus codes returned from function module MASTER_IDOC_DISTRIBUTE
      IF p_create = 'X'.
        ULINE.
        SKIP 2.
        WRITE: / 'Returncoides from function module MASTER_IDOC_DISTRIBUTE'
                  COLOR COL_GROUP INTENSIFIED ON.
        LOOP AT gi_communication_idoc_control INTO
                g_communication_idoc_control.
    Find error message
    select single
    from TEDS1
          WRITE: / g_communication_idoc_control-docnum,
                   g_communication_idoc_control-status.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " WRITE_REPORT
    *&      Form  BUILD_IDOC_CONTROL_RECORD
    The IDOC control record contains message type, port and
    partnerinformation
    FORM build_idoc_control_record.
      g_idoc_control_record-mestyp = 'ACC_GL_POSTING'.   "Message type
      g_idoc_control_record-idoctp = 'ACC_GL_POSTING01'. "IDOC type
    Receiver
      g_idoc_control_record-rcvpor = p_rcvpor. "Port
      g_idoc_control_record-rcvprn = p_rcvprn. "Partner number
      g_idoc_control_record-rcvprt = p_rcvprt. "Partner type
      g_idoc_control_record-rcvpfc = p_rcvpfc. "Partner function
    Sender
      g_idoc_control_record-sndpor = p_sndpor. "Port
      g_idoc_control_record-sndprn = p_sndprn. "Partner number
      g_idoc_control_record-sndprt = p_sndprt. "Partner type
    g_idoc_control_record-sndpfc = p_sndpfc. "Partner function
    ENDFORM.                    " BUILD_IDOC_CONTROL_RECORD
    *&      Form  BUILD_IDOC_SEGMENTS
          text
    -->  p1        text
    <--  p2        text
    FORM build_idoc_segments.
      DATA: l_transdate(8) TYPE c,
            l_itemnr TYPE i.
      CLEAR l_itemnr.
      LOOP AT gi_extract INTO g_extract.
      Build data - The structures from the underlying BAPI are used to
      simplify thje work of building the data part of the IDOC
    *-- Document header segment E1BPACHE08
    *-- The document header should only be generated in the first loop
        CLEAR g_edidd.
        IF sy-tabix = 1.
          CLEAR g_e1bpache08.
          g_edidd-segnam = 'E1BPACHE08'.
          g_edidd-segnum = 1.
          g_e1bpache08-obj_type   = 'BKPFI'.
          g_e1bpache08-obj_key    = '127387347'.
          g_e1bpache08-obj_sys    = 'APOCLNT800'.
          g_e1bpache08-username   = 'WMHEFRN'.
          g_e1bpache08-header_txt = 'Humle er godt'.
          g_e1bpache08-comp_code  = g_extract-bukrs.
          g_e1bpache08-fisc_year  = g_extract-gjahr.
          g_e1bpache08-doc_date   = g_extract-budat.
          g_e1bpache08-pstng_date = g_extract-bldat.
          g_e1bpache08-trans_date = sy-datum.
          g_e1bpache08-fis_period = g_extract-monat.
          g_e1bpache08-doc_type   = 'SA'.
          MOVE g_e1bpache08 TO g_edidd-sdata.
          APPEND g_edidd TO gi_edidd.
        ENDIF.
    *-- Line item segment E1BPACGL08
        CLEAR g_e1bpacgl08.
        CLEAR g_edidd.
        l_itemnr = l_itemnr + 1.
        g_edidd-segnam               = 'E1BPACGL08'.
        g_edidd-segnum = 2.
        g_e1bpacgl08-itemno_acc      = l_itemnr.
        g_e1bpacgl08-gl_account      = g_extract-hkont.
        g_e1bpacgl08-pstng_date      = g_extract-bldat.
        g_e1bpacgl08-item_text       = 'Halli Hallo'.
        MOVE g_e1bpacgl08 TO g_edidd-sdata.
        APPEND g_edidd TO gi_edidd.
    *-- Line Item Currency Fields segment E1BPACCR08
        CLEAR g_e1bpaccr08.
        CLEAR g_edidd.
        g_edidd-segnam          = 'E1BPACCR08'.
        g_edidd-segnum = 3.
        g_e1bpaccr08-itemno_acc = l_itemnr.
        g_e1bpaccr08-curr_type  = '00'.
        g_e1bpaccr08-currency   = g_extract-waers.
        IF g_extract-shkzg = 'H'.
          g_extract-dmbtr = g_extract-dmbtr * -1.
        ENDIF.
        CALL FUNCTION 'CURRENCY_AMOUNT_IDOC_TO_SAP'
             EXPORTING
                  currency    = g_extract-waers
                  idoc_amount = g_extract-dmbtr
             IMPORTING
                  sap_amount  = g_e1bpaccr08-amt_doccur.
        MOVE g_e1bpaccr08 TO g_edidd-sdata.
        APPEND g_edidd TO gi_edidd.
      ENDLOOP.
      SORT gi_edidd BY segnum.
      LOOP AT gi_edidd INTO g_edidd.
        g_edidd-segnum = sy-tabix.
        MODIFY gi_edidd FROM g_edidd.
      ENDLOOP.
      SORT gi_edidd BY segnum.
    ENDFORM.                    " BUILD_IDOC_SEGMENTS
    *&      Form  CREATE_IDOCS
      Create IDOCS
    FORM create_idocs.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
           EXPORTING
                master_idoc_control            = g_idoc_control_record
           TABLES
             communication_idoc_control     = gi_communication_idoc_control
                master_idoc_data               = gi_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 'I' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
      Remember to commit !
        COMMIT WORK.
      ENDIF.
    ENDFORM.                    " CREATE_IDOCS
    Process outbound IDOCs
    Process the outbound IDOCs using program RSEOUT00. The program can be executed from SE38. The IDOC should now have status code 03 Data passed to port OK.
    Create inbound IDOCs
    The inbound IDOC can be created from the outbound IDOC using transaction WE12 Modification of Outbound file Triggering inbound Procg. The name of the target file is not important, but it must not have the same name as the source file.
    Note that the program returns an error, but an inpund IDOC is created.
    Source and Sender
    The source file must have the same name and path as the outbound file in the partner profile. In this example it is created in the TMP directory which seem to exist in the root directory.
    Recipient
    Process inbound IDOCs
    The inbound IDOC should now have staus code 64. Use program RBDAPP01 to process the inbound IDOC.
    Please give me reward points If it is useful.
    Thanks
    Murali Poli

  • Sales Order no and IDOC No Link table for Sales Out bound IDOC ORDRSP

    Hi Friends
    How to find Sales Order no and IDOC No Link table for Sales Out bound IDOC ORDRSP.
    Thanks in Advance.
    SR

    Hi
    If the idoc is managed by message, the link are stored in GOS (Obeject Service)
    U can try to use the function module NREL_GET_NEIGHBOURHOOD
    If you put
    IS_OBJECT-OBJKEY = <sales document>
    IS_OBJECT-OBJTYPE = <business object> (I think BUS2032)
    the function returns the idoc
    or if you put
    IS_OBJECT-OBJKEY = <idoc number>
    IS_OBJECT-OBJTYPE = <business object> (I think IDOC)
    the function returns the sales order
    You can investigate that function module in order to find out the tables
    Max

  • Step-by step procedure for INBOUND IDOC (VENDOR CREATE / CHANGE)

    Hi ,
    Can any body provide me the step-by-step procedure for Inbound IDOCS.
    As i'm new to this i need the the clarification between Inbound & outbound idocs.
    How can we differentiate both?
    where to define outbound & where to define Inbound?
    ( If possible Please explain me the procedure for  Vendor Create through INBOUND IDOCS )
    Thanks in advance..

    Hi,
    Ale Technology is SAPu2019s technology to support distributed yet integrated processes across several SAP systems.
    Outbound Process:
    ALE Outbound Process in SAP sends data to one or more SAP Systems. It involves four steps.
    1. Identify the need of IDoc: This step starts upon creating a application document, can relate to a change to a master data object.
    2. Generate the Master IDoc: The document or master data to be sent is read from the database and formatted into an IDoc format. This IDoc is called as a Master IDoc.
    3. Generate the Communication IDoc: The ALE Service layer generates a separate IDoc from the Master IDoc for each recipient who is interested in the data. Separate IDocs are generated because each recipient might demand a different version or a subset of the Master IDoc. These recipient-specific IDocs are called Communication IDocs and are stored in the database.
    4. Deliver the Communication IDoc: The IDoc is delivered to the recipients using an asynchronous communication method. This allows the sending system to continue its processing without having to wait for the destination system to receiver or process the IDoc.
    Inbound Process:
    The inbound process receives an IDoc and creates a document in the system.
    1. Store the IDoc in the database: The IDoc is received from the sending system and stored in the database. Then the IDoc goes through a basic integrity check and syntax check.
    2. Invoke the Posting Module: The control information in the IDoc and configuration tables are read to determine the posting program. The IDoc is then transferred to its posting program.
    3. Create the Document: The posting program reads the IDoc data and then creates a document in the system. The results are logged in the IDoc.
    Over view of IDocs:
    IDoc is a container that is used to exchange data between any two processes. The document represented in an IDoc is independent of the complex structure SAP uses to store application data. This type of flexibility enables SAP to rearrange its internal structure without affecting the existing interface.
    IDoc interface represents an IDoc Type or IDoc data. IDoc Type represents IDocu2019s definition and IDoc Data is an instance of the IDoc Type.
    IDoc Types:
    IDoc type structure can consist of several segments, and each segment can consist of several data fields. The IDoc structure defines the syntax of the data by specifying a list of permitted segments and arrangement of the segments. Segments define a set of fields and their format.
    An IDoc is an instance of an IDoc Type and consists of three types of records.
    i. One Control record: each IDoc has only one control record. The control record contains all the control information about an IDoc, including the IDoc number, the sender and recipient information, and information such as the message type it represents and IDoc type. The control record structure is same for all IDocs.
    ii. One or Many Data records: An IDoc can have multiple data records, as defined by the IDoc structure. Segments translate into data records, which store application data, such as purchase order header information and purchase order detail lines.
    iii. One or Many Status records: An IDoc can have multiple status records. Status record helps to determine whether an IDoc has any error.
    Message in IDoc Type:
    A Message represents a specific type of document transmitted between two partners.
    Outbound Process in IDocs:
    Outbound process used the following components to generate an IDoc. A customer model, and IDoc structure, selection programs, filter objects, conversion rules, a port definition, an RFC destination, a partner profile, service programs, and configuration tables.
    The Customer Model:
    A customer model is used to model a distribution scenario. In a customer model, you identify the systems involved in a distribution scenario and the message exchanged between the systems.
    Message control:
    Message control is a cross application technology used in pricing, account determination, material determination, and output determination. The output determination technique of Message control triggers the ALE for a business document. Message control separates the logic of generating IDocs from the application logic.
    Change Pointers:
    The change pointers technique is based on the change document technique, which tracks changes made to key documents in SAP, such as the material master, customer master and sales order.
    Changes made to a document are recorded in the change document header table CDHDR, and additional change pointers are written in the BDCP table for the changes relevant to ALE.
    IDoc Structure:
    A message is defined for data that is exchanged between two systems. The message type is based on one or more IDoc structures.
    Selection Program:
    Is typically implemented as function modules, are designed to extract application data and create a master IDoc. A selection program exists for each message type. A selection programu2019s design depends on the triggering mechanism used in the process.
    Filter Objects;
    Filter Objects remove unwanted data for each recipient of the data basing on the recipients requirement.
    Port Definition:
    A port is used in an outbound process to define the medium in which documents are transferred to the destination system. ALE used a Transactional RFC port, which transfers data in memory buffers.
    RFC Destination:
    The RFC destination is a logical name used to define the characteristics of a communication link to a remote system on which a function needs to be executed.
    Partner Profile:
    A partner profile specifies the components used in an outbound process(logical name of the remote SAP system, IDoc Type, message type, TRFC port), an IDocu2019s packet size, the mode in which the process sends an IDoc (batch versus immediate), and the person to be notified in case of error.
    Service Programs and Configuration Tables:
    The outbound process, being asynchronous, is essentially a sequence of several processes that work together. SAP provides service programs and configuration tables to link these programs and provide customizing options for an outbound process.
    Process flow for Distributing Transactional Data:
    Transactional data is distributed using two techniques: with Message control and without message control.
    Process flow for Distributing Master Data:
    Master data between SAP systems is distributed using two techniques: Stand alone Programs and Change Pointers.
    Triggering the Outbound Process via Stand-Alone Programs:
    Stand-Alone programs are started explicitly by a user to transmit data from one SAP system to another. Standard Programs for several master data objects exist in SAP. Ex. The material master data can be transferred using the RBDSEMAT program or transaction BD10.
    The stand-alone programs provide a selection screen to specify the objects to be transferred and the receiving system. After the stand-alone program is executed, it calls the IDoc selection program with the specified parameters.
    Triggering the Outbound Process via Change Pointers:
    The change pointer technique is used to initiate the outbound process automatically when master data is created or changed.
    A standard program, RBDMIDOC, is scheduled to run on a periodic basis to evaluate the change pointers for a message type and start the ALE process for distributing the master data to the appropriate destination. The RBDMIDOC program reads the table TBDME to determine the IDoc selection program for a message type.
    Processing in the Application Layer:
    The customer distribution model is consulted to make sure that a receiver has been defined for the message to be transmitted. If not, processing ends. If at least one receiver exists, the IDoc selection program reads the master data object from the database and creates a master IDoc from it. The master IDoc is stored in memory. The program then calls the ALE service layer by using the function module MASTER_IDOC_DISTRIBUTE, passing the master IDoc and the receiver information.
    Processing in the ALE Interface Layer:
    Processing in the ALE Layer consists of the following steps:
    u2022 Receiver Determination: The determination of the receiver is done through Customer Distribution Model.
    u2022 IDoc Filtering: if an IDoc filter is specified in the distribution model for a receiver, values in the filter are compared against the values in the IDoc data records. If a data record does not meet the filter criteria, it is dropped.
    u2022 Segment Filtering: For each sender and receiver combination, a set of segments that are not required can be filtered out.
    u2022 Field conversion: Field values in data records are converted by using the conversion rules specified for the segment.
    u2022 Version change for segments: Segments are version-controlled. A new version of a segment always contains fields from the preceding version and fields added for the new version. Release in IDoc type field of the partner profile to determine the version of the segment to be generated.
    u2022 Version change for IDocs: IDocs are also version controlled. The version is determined from the Basic Type field of the partner profile.
    u2022 Communication IDocs generated: The final IDoc generated for a receiver after all the conversions and filtering operations is the communication IDoc. One master IDoc can have multiple communication IDocs depending on the number of receivers identified and the filter operations performed. IDoc gets the status record with a status code of 01 (IDoc Created).
    u2022 Syntax check performed: IDoc goes through a syntax check and data integrity validation. If errors found the IDoc get the status of 26 (error during syntax check of IDoc u2013 Outbound). If no errors found the IDoc gets the status 30 (IDoc ready for dispatch u2013 ALE Service).
    u2022 IDoc dispatched to the communication Layer: In the ALE process, IDocs are dispatched using the asynchronous RFC method, which means that the sending system does not await for data to be received or processed on the destination system. After IDocs have been transferred to the communication layer, they get a status code 01 (Data Passed to Port OK).
    Processing in the Communication Layer:
    To dispatch an IDoc to a destination system, the system reads the port definition specified in the partner profile to determine the destination system, which is then used to read the RFC destination. The RFC destination contains communication settings to log o to the remote SAP system. The sending system calls the INBOUND_IDOC_PROCESS function module asynchronously on the destination system and passes the IDoc data via the memory buffers.
    Inbound Process in IDocs:
    An inbound process used IDoc structure, posting programs, filter objects, conversion rules, a partner profile, service programs, and configuration tables to post an application document from an IDoc.
    Posting Program:
    Posting programs, which are implemented as function modules, read data from an IDoc and create an application document from it. A posting program exists for each message. Each posting program is assigned a process code. A process code can point to a function module or a work flow. In the standard program process codes always point to a function module.
    Ex. The posting program for message type MATMAS is IDOC_INPUT_MATMAS which has a process code MATM.
    Workflow:
    A workflow represents a sequence of customized steps to be carried out for a process. The workflow management system is used to model the sequence, identify information required to carry out the steps and identify the person responsible for the dialog steps.
    Partner Profile;
    A partner profile specifies the components used in an inbound process (partner number, message type, and process code), the mode in which IDocs are processed (batch versus immediate), and the person to be notified in case of errors.
    Process flow for the Inbound process via a Function Module:
    In this process, IDocs are received from another system and passed to the posting function module directly.
    1. Processing in the communication Layer:
    The IDOC_INBOUND_ASYCHRONOUS program, triggered as a result of an RFC from the sending system, acts as the entry point for all inbound ALE processes. The IDoc to be processed is passed as an input parameter. Control is transferred to the ALE/EDI layer.
    2. Processing in the ALE/EDI Interface Layer:
    u2022 Basic integrity check: A basic integrity check is performed on the control record.
    u2022 Segment Filtering and conversion: Filtering out unwanted segments and carry out any required conversion of field values.
    u2022 Creation of Application IDoc: The application IDoc is created and stored in the database and a syntax check is performed. If there are errors it gets status code of 60 (Error during Syntax check of IDoc u2013 Inbound). At this point a tangible IDoc, which can be monitored via one of the monitoring transactions, is created and the IDoc gets status code 50 (IDoc Added).
    u2022 IDoc Marked ready for Dispatch: IDoc gets the status code 64 (IDoc ready to be passed to application).
    u2022 IDoc is passed to the posting program: The partner profile table is read. If the value of the Processing field is set to Process Immediately, the IDoc is passed to the posting program immediately using the program RBDAPP01.
    3. Processing in the Posting Module:
    The process code in the partner profile points to a posting module for the specific message in the IDoc. The posting program implemented as a function module either calls a standard SAP transaction by using the Call Transaction command for posting the document or invokes a direct input function module.
    The results of execution are passed back via the function moduleu2019s output parameters. If the posting is successful IDoc gets the status code 53 (Application Document Posted) or it gets status code 51 (Error: Application Document Not Posted).

  • Steps required for Sender IDOC adapter PI 7.0

    Hi all,
    My basis guy has installed SAP EHP1 for PI7.0 for handling the idoc packaging(sending idocs in packs)...
    Please can any one let me know the further settings required in PI after it has been installed...
    and even when i open the sender IDOC in comminication channel in ID i am able to see only 3 options
    Transport prtocol, message protocol,Adapter engine...
    But i am not able to see the other fields...
    Can any one help me...
    Thanks and Regards,
    sridhar

    Hi Michael,
    Thanks for your reply..
    I searched for the docs in many ways.. but couldnt find proper information regarding the IDOC packaging with sender IDOC adapter and steps required...
    Could you please let me know  if i can get the book in Singapore since our project, because almost 90% interfaces are related to IDOC...
    And request you if you can share me the steps required in PI to confirgure IDOC packaging for EHP1...
    Regards,
    Sridhar Reddy
    Edited by: sridhar reddy kondam on Jun 15, 2009 4:35 AM

  • What are the steps to create an idoc in the system?

    Hi all,
    Could you give me the steps for the idoc creation..Please give step by step procedure only and if possible point me to related files or threads.
    Thanks,
    Charles.

    Hi,
    Check this link
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    Thanks,
    Naren

  • Steps for configuring Outbound Idoc OILSHI01

    Hi experts,
        can anybody tell me the steps how to configure an Outbound IDOC.
        It is better if somebody can take Shipment IDOC of IS-Oil - OILSHI01.
        if not anything else will also do.
        Kindly give me steps in detailed. Since i have never done this. Including 
        distribution modle (BD64). in which case it generates the Automatic Partner
        profiles.?
    <REMOVED BY MODERATOR>
    Regards,
    Umesh
    Edited by: Alvaro Tejada Galindo on Apr 21, 2008 3:08 PM

    Hi Umesh,
    Sorry for the late reply. Let me clear your couple of misconceptions first.
    Every idoc is an application idoc. That is, if an idoc is not attached to any application, then it doesnt make business sense to generate that idoc.
    Secondly, an idoc is outbound or inbound depending upon its communication direction w.r.t. the sender system. If the idoc is going out from lets say R/3 system (where you are creating distribution model), then its an outbound idoc and if its coming inside, then its inbound idoc.
    Now the further steps:
    Since its a transactional data idoc, we dont generally go for change pointer activation. Kindly read the documentation to get more idea (if you dont have any then send me your mail id, i will send you a very good document). For transaction data, we use output type to trigger an idoc. Following are the steps to trigger an outbound idoc through output type.
    However, remember that in this case, you need help of your functional consultant at every point so that you can clearly determine your application definations and configuration.
    1. Go to transaction NACE. There you can see all the generic applications listed. Find out the one relavant to your idoc type from the functional person. If you select your relavant aplication, and click on the "Output types", you will see a list of all the output types for each business transaction defined for that application.
    2. Again, ask your functional consultant, as to which output type is configured for your  business transaction. Select that output type and go to "Processing routines".
    3. There you will be able to see different ways in which the idoc can be triggered. Most of the time , we use processing routine "A (Distribution (ALE))". There you will also see the report which will trigger the idoc.
    4. All the above mentioned customization is to be done by the functional consultant (or by technical after strictly seeking the permission). Once the output type is set, you go to the business application (IS-oil) which is triggering your idoc.
    There, you will see the option of generating delivery (or something similar, again only the person who has worked on the application can tell that). there you can populate the idoc. 
    Once the idoc is populated by the application, there are couple of ways of triggering the idoc.
         a. trigger the idoc on saving the doucment.  this triggers idoc as soon as you save the idoc.
         b. Collect for mass processing. For this you need to run the report RSNASTED after the idocs are populated to trigger them.
         c. Collect for application specific posting. For this , you need to know the transaction, specific to your business data to trigger the idoc and all you need to do is just run that transaction.
    Hope you got the points mentioned above. Kindly go through them carefully and then give me your mail id. I will send you one good document which will clear your understanding.
    Hope this was helpful.
    <REMOVED BY MODERATOR>
    Cheers,
    Karan
    Edited by: Alvaro Tejada Galindo on Apr 21, 2008 3:09 PM

  • Out Bound / In Bound IDOC Succes full status in R3

    Hi Frnds,
    I am sending IDOC from OUT BOUND.
    Its succes full wts the Status in R/3 12 or 3. How to check in R/3.
    I am sending IDOC from IN BOUND.
    Its succes full wts the Status in R/3 ??. How to check in R/3.
    Can any one explain the process..
    Regards,
    Raj

    Hi,
    Outbound IDOCs
    Code      Error      Event Severity      SAP Meaning
    02      Yes      Error      Error passing data to port
    03      No      Error if transaction SM58 indicates an RFC transmission error      Data pass to port OK
    04      Yes      Error      Control information of EDI subsystem
    05      Yes      Error      Translation
    06      No      Harmless      Translation
    07      Yes      Error      Syntax check
    08      No      Harmless      Syntax check
    09      Yes      Error      Interchange handling
    10      No      Harmless      Interchange handling
    11      Yes      Error      Dispatch
    12, 13, 14      No      Harmless      OK
    15      Yes      Warning      Interchange acknowledgement negative
    16      No      Harmless      Functional acknowledgement
    17      Yes      Warning      Functional acknowledgement negative
    18      No      Harmless      Triggering EDI subsystem
    20      Yes      Error      Triggering EDI subsystem
    22      No      Harmless      Dispatch OK, acknowledgement still due
    23      Yes      Error      Retransmission
    24      No      Harmless      Control information of EDI subsystem
    25      Yes      Warning      Processing despite syntax error
    26      Yes      Error      Syntax check
    27      Yes      Error      ALE error
    29      Yes      Error      Error in ALE services
    30      No      Harmless      Ready for dispatch (ALE)
    31      No      Harmless      IDOC is marked for deletion
    33      No      Harmless      Original of an IDOC which was edited
    34      Yes      Error      Error in control record of IDOC
    36      Yes      Error      Timeout error; electronic signature not performed
    37      Yes      Error      IDOC added incorrectly
    38      No      Harmless      IDOC archived
    39      No      Harmless      Receive confirmed
    40      Yes      Error      Application document not created in target system
    41      No      Harmless      Application document created in target document
    Inbound IDOCs
    Code      Error      Event Severity      SAP Meaning
    51, 52      Yes      Error      Posting error
    53      No      Harmless      Posting successful
    54      Yes      Error      Error during formal application check
    55      No      Harmless      Formal application check
    56      Yes      Error      IDOC with error added
    60      Yes      Error      Syntax error
    61      Yes      Warning      Processing despite syntax error
    62      No      Harmless      IDOC passed to application
    63      Yes      Error      Error passing IDOC to application
    64      No      Harmless      IDOC ready to be passed to application
    65      Yes      Error      ALE error
    68      No      Harmless      IDOC is marked for deletion
    70      No      Harmless      Original of an IDOC which was edited
    73      No      Harmless      IDOC archived
    Regards
    Seshagiri

  • Out bound Idoc for IE01

    Dear All
    I am trying to send the equipment details via idoc from SAP to outside,
    Could you please help me in getting to know what standard idoc or message type
    I can use and where I can trigger the idoc.
    Amol Sonaikar

    Hi,
    Check this link for details :
    http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
    check these steps :
    1.Go to the Data Element of the field and check whether change doucment option is checked or not .
    2.change the value of the field and check the entries in CDHDR and CDPOS.here u can check the change document object and table .
    3.check BDCP table also incase of ALE.The program RBDMIDOC generates IDOc when there is an entry in BDCP.
    if not check the following config
    1.BD61- change pointers activated -generally
    2.BD50 -Activate change pointers for ur message type
    3.BD52 - add the triggering fields and corresponding tables and change document object.
    Please check the entries in BDCP table ,if u find the entries execute the program RBDMIDOC
    Regards
    Appana
    *Reward Points for useful answers

  • Out bound idoc for debmas

    Can any one send me sample program for
    DEBMAS Idoc outbound proces with change pointers

    Hi,
    Check this link for details :
    http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
    check these steps :
    1.Go to the Data Element of the field and check whether change doucment option is checked or not .
    2.change the value of the field and check the entries in CDHDR and CDPOS.here u can check the change document object and table .
    3.check BDCP table also incase of ALE.The program RBDMIDOC generates IDOc when there is an entry in BDCP.
    if not check the following config
    1.BD61- change pointers activated -generally
    2.BD50 -Activate change pointers for ur message type
    3.BD52 - add the triggering fields and corresponding tables and change document object.
    Please check the entries in BDCP table ,if u find the entries execute the program RBDMIDOC
    Regards
    Appana
    *Reward Points for useful answers

  • Steps to write Inbound Idoc program

    Hi All
    can any body send me steps to write sample inbound idoc program
    1) from which tables i have to fetch data.
    2) wat should be the status before processing idoc and wat   is  the expected status.
    Like a complete real time program with explanation.
    along with program.
    Thanks & Regards,
    Vinay

    U have to transfer the inbound idoc to the o.s.layer.
    Then u have to sen via EDI subsystem to the Business partner.
    U have to carry out the same steps u will do in EDI outbound process..
    Reward if helpful.

Maybe you are looking for