Program logic for IDoc

hi everyone,
I am new to IDoc. Through some forums i came to know that we need to create
segment in we30
idoctype in we31
i understand the above two
msgtype in we80
attaching msgtype to idoctype in we81
i didnt understand how to do the above two, and also i want to know what to do next..like how to do the program
my mailID is [email protected](for any materials if u have)
Regards,
Venkata
Points will be rewarded to answers given
Message was edited by:
        venkata k

One very simple code:
==============================
*abap program to generate a customized idoc and send it to the target *system.
REPORT z_b8_ale .
TABLES : ekko,ekpo.
***Data Declaration for IDOC Begin
DATA : v_master_control LIKE edidc.
DATA : BEGIN OF int_idoc_data OCCURS 0.
        INCLUDE STRUCTURE edidd.
DATA : END OF int_idoc_data.
DATA : BEGIN OF int_comm_control OCCURS 0.
        INCLUDE STRUCTURE edidd.
DATA : END OF int_comm_control.
DATA : BEGIN OF itab OCCURS 10,
       lifnr LIKE ekko-lifnr,
       ekorg LIKE ekko-ekorg,
       ekgrp LIKE ekko-ekgrp,
       kdate LIKE ekko-kdate,
       ematn LIKE ekpo-ematn,
       ktmng LIKE ekpo-ktmng,
       meins LIKE ekpo-meins,
       netpr LIKE ekpo-netpr,
       werks LIKE ekpo-werks,
       peinh LIKE ekpo-peinh,
       END OF itab.
DATA : str LIKE edidd-sdata,
       sagrnum(10) TYPE c VALUE '5500000019'.
DATA:itab1 LIKE ekko OCCURS 0 WITH HEADER LINE,
     itab2 LIKE ekpo OCCURS 0 WITH HEADER LINE.
***Data Declaration for IDOC End
****FILL_MASTER_CONTROL
CLEAR v_master_control.
v_master_control-rcvpor = 'ZPORTB8'.
v_master_control-rcvprt = 'LS'.
v_master_control-rcvprn = 'D12503'.
v_master_control-mestyp = 'ZSCHB5'.
v_master_control-idoctp = 'ZSCHIDOC'.
****FILL_IDOC_DATA
CLEAR int_idoc_data.
REFRESH int_idoc_data.
int_idoc_data-segnam = 'ZSCHDLAGR'.
SELECT single * INTO itab1 from ekko WHERE ebeln = sagrnum.
SELECT single * INTO itab2 from ekpo WHERE ebeln = sagrnum.
  MOVE itab1-lifnr TO str+0(10).
  MOVE itab1-ekorg TO str+10(4).
  MOVE itab1-ekgrp TO str+14(3).
  MOVE itab1-kdate TO str+17(8).
  MOVE itab2-ematn TO str+25(18).
  MOVE itab2-ktmng TO str+43(16).
  MOVE itab2-meins TO str+59(3).
  MOVE itab2-netpr TO str+62(13).
  MOVE itab2-werks TO str+74(5).
  MOVE itab2-peinh TO str+80(5).
int_idoc_data-sdata = str.
APPEND int_idoc_data.
write : / str.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
     EXPORTING
          master_idoc_control            = v_master_control
     TABLES
          communication_idoc_control     = int_comm_control
          master_idoc_data               = int_idoc_data
     EXCEPTIONS
          error_in_idoc_control          = 1
          error_writing_idoc_status      = 2
          error_in_idoc_data             = 3
          sending_logical_system_unknown = 4
          OTHERS                         = 5.
COMMIT WORK.
WRITE : / 'IDOC Number created : ', int_comm_control-docnum.
Regards,
Gajendra.

Similar Messages

  • Program logic for Camparison

    Hi Guys,
       I am trying to write a logic for comparison....Can you plz help me on this....
    I have data like below.. I need to compare value which is comming from file with the data in SAP, If it fall under data maintained in sap 'Accept record' otherwise I need to reject. How can i check (write logic) for this checking....
    data maintained in SAP ,  Data from file     ,     Result
    <10               ,      <8          ,             Accept
    >5 and <10        ,      =8          ,             Accept
    >5  and <10       ,      >15         ,             Reject
    =15               ,      >10 and <30  ,            Accept
    Thanks & Regards,
    Rays
    Message was edited by: rayudu p
    Message was edited by: rayudu p

    Hi Guys,
       I am trying to write a logic for comparison....Can you plz help me on this....
    I have data like below.. I need to compare value which is comming from file with the data in SAP, If it fall under data maintained in sap 'Accept record' otherwise I need to reject. How can i check (write logic) for this checking....
    data maintained in SAP ,  Data from file     ,     Result
    <10               ,      <8          ,             Accept
    >5 and <10        ,      =8          ,             Accept
    >5  and <10       ,      >15         ,             Reject
    =15               ,      >10 and <30  ,            Accept
    Thanks & Regards,
    Rays
    Message was edited by: rayudu p
    Message was edited by: rayudu p

  • Outbound program s for idoc in ale

    hi to all abap gurus
    I have doubt regarding idocs
    we know that outbound programs are message specific  ie for each message type there is one outbound program .
    we know that orders 05  idoc transfers both purchse and sales orders data by using two
    message types .
    now my question is orders 05 is having two outbound program s ?
    pls clarify it ? thanks in advance

    hi
    we can write no. of programs for each message type that is depending on using the message type.
    we can change in the version of the programs ... which the requirements we can fullfill
    for each message type contain minimum 1 outbound program to work.....
    which is latest version that we will follows .............................................

  • Inbound logic for idoc

    hello experts,
    I have a query regarding inbound idoc.The input file is placed at application server and i need to read it and post it in SAP.My queries are:
    1. In order to create an idoc using the file, we will use program RSEINB00 which will create idoc's with status 50 and then i need to link the  correspiodning Function module in partner profile's inbound type and set it to automatic so that it gets posted into SAP? Is this correct? If yes, does it mean that there is no custom code needed for this case(Assuming that the FM linked in WE20 is standard)?
    2. Can we dynamically process the file?Meaning, as soon as the file is placed at application server is there a way to invode the program RSEINB00 automatically
    or should we run it manually ?
    Please help with the process pls as it is slightly confusing.
    Thanks,
    Prem

    yes your understanding is right and if you want the files are pulled from the server automatically then you run the report RSEINB00 in a job or you can create workflows for this.

  • Programming logic for this scenario

    hi all,
    kindly help me with this scenario:
    i have a internal table with fields like this (among others)
    OBJEK                        ATINN         CHAR                                  CHARG            CHAR1
    000000000000000031 0000000188  Batchnumber: WEEK NO. 9  0000000052
    000000000000000031 0000000189  Visualinspection: OK            0000000052
    now wht i need to do is for SAME batch number i need to concatenate the values of CHAR into CHAR1.
    that is to say that CHAR1 shud have the value "Batchnumber: WEEK NO. 9 Visualinspection: OK"
    ive right now done it using 2 different internal tables and concatenating the values. want to know if theres an easier and simpler way.
    any pointers guys??
    pk

    solved it myself
    thanks to sujatha reddy's post in the following thread:
    Re: at end of  statement
    pk
    Edited by: prashanth kishan on Jul 11, 2008 9:19 AM

  • Program Logic for showin number of red lines on the o/p screen?

    Hi
    I have an output list wherein I am settin clours on the output screen based on certain conditions like if say 2 values in my final internal table doesn't match then I am settin the colour to red also green is set.
    My requirement is that I want to show the total number of red lines on the o/p screen .
    How can I do that?
    Thanks

    what type of report ? is it ALV or Normal report ?
    if it is normal report ,then use one variable ,when ever you have red color condition ,use this variable
    data : v_data type i.
    if redcondition.
    v_data = v_data + 1.
    endif.
    display v_data ( This is total number lines )
    Thanks
    Seshu

  • Programming logic

    I want help in one programming logic.For that I make small example ,so that can explain clearly.
    public class Mainclass //(situated in package view)
    public s0,s1;
    public void runFunction()
    ...some coding and proceedings
    s0="Hi";s1"Hello";
    ......some coding
    public MainRunner
    public static void main(String a[])
    Mainclass m=new Mainclass();
    m.runFunction();
    public MainUser (situated in package Master)
    public static void main(String a[])
    Mainclass m=new Mainclass();
    System.out.println("S0:"+s0+" S1:"+s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
    In this ,I first run the MainRunner and then MainUser after compiling the classes and expect that print command of MainUser would give me -S0:Hi S1:Hello as result ,but it is yielding the null values for s0 & s1.
    What should I do in this to get hi for s0 and hello for s1.

    hi friend, plz follow the code. I think this code may be suitable for u r requirements...
    class MainUser
         public String s0,s1;
         MainUser()//Here i am using Constructor
              s0="Hi";s1="Hello";
    public class C extends MainUser
         public static void main(String a[])
              MainUser m=new MainUser();
              System.out.println("S0:"+m.s0+" S1:"+m.s1);
                        (OR)
    class MainUser
         static String s0,s1;//Here i am declaring variables as Static
         public void runFunction()
              s0="Hi";s1="Hello";
    class B extends MainUser
         public B()//Contructor
              MainUser m=new MainUser();
              m.runFunction();
    public class C extends B
         public static void main(String a[])
              B b=new B();//when i am creating new Object b then it will call B constructor
              System.out.println("S0:"+b.s0+" S1:"+b.s1);
    byeeeee

  • Long runtime of RBDMIDOC for IDoc ARTMAS

    Hi,
       We are in IS Retail. We are using IDoc to capture article master creation & changes, and to reflect those details in retail stores. For this we have created custom Z message type & assigned it to a sap standard basic idoc type ARTMAS05. We have also activated the change pointer ARTMAS. There s no issue in IDoc generation. But when we run the program RBDMIDOC for Idoc generation, it is taking hours together for execution.
       I could not find any sap note for performance improvement, whereas for MATMAS there are performance notes 863744.
       Is there any solution for runtime / performance improvement for RBDMIDOC, for idoc type ARTMAS ?
    regards,
    Nagarajan.J

    Hi,
    I am also having the similar requirement but only problem is when i try to create idoc through BD21 system is creating idoc of message type ARTMAS although I have defined bespoke message type,
    can you please tell me if in your case bespoke message type is being selected for creating idoc if yes then please let me know which config I may be missing.
    Thanks in advance for your help.
    Cheers
    Ashutosh

  • Programming Logic required for pulling the records for past month /week

    Hi All
    I need help in the SQL programming logic.
    Oracle Database Version: 10.2.0.3.0
    Requirement
    In a data warehouse environment, I need to programme for weekly and monthly automated batch jobs to insert the data from Data_tbl to Reporting_tbl for generating reports. Tables descriptions are given below.
    Table1 - Data_tbl (Source table –this table gets updated everyday).
    Record_dt     first_name     last_name
    Table2 - Reporting_tbl_(Target table)
    Cycle_dt     first_name     last_name
    1. Monthly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’
    Using the above condition in development, I am pulling the data from source table for the past month data. This will be repeated every month and it should be automated.
    i.e., if I run this report any time in dec 2008, it should pick records of dates from Nov 01st to Nov 30th 2008. if I run this report any time in Jan 2009, it should pick records of dates from Dec 01st to Dec 31st 2008.
    Date Values should be assigned for past month. Value of Cycle_dt in target table should be end date of past month like 30-nov-2008, 31-dec-2008.
    2. Weekly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’
    Here week start day is Monday and end day is Sunday.
    If I run the report between Dec 08th to Dec 14th , it should pull records of dates from Dec 01st to Dec 07th 2008.
    On Dec 15th, it should pick from Dec 08th to Dec 14th.
    Value of Cycle_dt in target table should be end date of past week like 07-Dec-2008, 14-Dec-2008.
    Please help me with the logics for both Monthly and Weekly reports.
    Thanks

    Hi,
    For the monthly report, instead of
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’say:
    Where   Record_dt >= TRUNC (ADD_MONTHS (SYSDATE, -1), 'MM')
    and     record_dt <  TRUNC (SYSDATE, 'MM')SYSDATE is the current DATE.
    TRUNC (SYSDATE, 'MM') is the beginning of the current month. (Notice the condition above is less than this date, not equal to it.)
    ADD_MONTHS (STSDATE, -1) is a date exactly one month ago, therefore it is in the previous month.
    For the weekly report, instead of:
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’say
    Where   Record_dt >= TRUNC (SYSDATE - 7, 'IW')
    and     record_dt <  TRUNC (SYSDATE, 'IW')TRUNC (dt, 'IW') is the beginning of the ISO week (Monday-Sunday) that contains dt. Again, notice the end condition is strictly less than the beginning of the current week.

  • Change Pointer Program for IDOC creation..??

    To All
    Where does the message type is assigned, which allow that type of IDOC getting created in WPMU...??
    Can COND_A be created in Change pointer Program...??
    If possible ..How...??
    Thanks
    Sumeet

    3)
    RBDMOIND to confirm whether idocs have been successfully
    dispatched to the receiver..and v can also use this program to change the status of idoc from 3 to 12....
    RSNATED is the program used for triggering IDOC for the output type..where the output medium is 6.
    And the subroutine that triggers the IDOC in the program is EDI_PROCESSING.
    RSNASTED itself determines the associated IDoc outbound function module, executes it to fill the EDIDx tables and passes the prepared IDoc to the port.
    You can call the standard processing routines from any ABAP, by executing the following call to the routine. You only have to make sure that the structure NAST is declared with the tables statement in the calling routine and that you fill the at least the key part and the routing information before.
    TABLES NAST.
    NAST-MANDT = SY-MANDT.
    NAST-KSCHL = 'ZEDIK'.
    NAST-KAPPL = 'V1'.
    NAST-OBJKY = '0012345678'.
    NAST-PARNR = 'D012345678'.
    PERFORM einzelnachricht_screen(RSNAST00).
    Calling einzelnachricht_screen determines how the message is processed. If you want to force the IDoc-processing you can call it directly:
    TNAPR-PROGN = ''.
    TNAPR-ROUTN = 'ENTRY'.
    PERFORM edi_processing(RSNASTED).
    ~~Guduri

  • Require Logic for the Program

    I have a requirement  in which I need to write a program. I need to fetch the payer data which is having KNA1-ZZDTCESS value populated(Payer which are having this field value blank no need to fetch those payer).ZZDTCESS is the cession date and this is a custom field in KNA1.Its date element is DATUM.
    Now after fetching this KNA1-ZZDTCESS value of the payer this needs to be updated to the all the sold-to-party which are attached to this payer.Sold-to-party also having this custom field.
    Finally we need to develop a batch job which will run this program to udpate the ZZDTCESS value in the Sold-to-Party.
    Can you please let anyone know how to write the logic for this program?

    Hi ,
    Thanx for the answer but the requirement is there Sold to Party customer which is having different payer.For example see below.
    SP 1000
    SH 1000
    PY 2000
    BP 1000
    Now from the PY 2000 KNA1-ZZDTCESS value nees to be updated to the sold to party 1000 KNA1-ZZDTCESS  field.Please let me know how to write the logic for that.

  • What is the Std Program for IDOC Blocking ?

    Hi friends,
    Tell me standard program for IDOC blocking.
    Thanks and Regards..
    naveen

    Hi,
    You have to write a program to do this:
    tables: edidc.
    data: idoc_status like EDI_DS occurs 0 with header line.
    parameter: docnum like edidc-docnum.
    idoc_status-logdat = sy-datum.
    idoc_status-logtim = sy-uzeit.
    idoc_status-status = '59'.
    append idoc_status.
      call function 'EDI_DOCUMENT_OPEN_FOR_PROCESS'
           exporting
                document_number = docnum.
          importing
               idoc_control    = edidc
          exceptions
               others          = 4.
    CALL FUNCTION 'EDI_DOCUMENT_STATUS_SET'
      EXPORTING
        DOCUMENT_NUMBER               = docnum
        IDOC_STATUS                   = IDOC_STATUS.
    IMPORTING
      IDOC_CONTROL                  =
    EXCEPTIONS
      DOCUMENT_NUMBER_INVALID       = 1
      OTHER_FIELDS_INVALID          = 2
      STATUS_INVALID                = 3
      OTHERS                        = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'EDI_DOCUMENT_CLOSE_PROCESS'
      EXPORTING
        DOCUMENT_NUMBER           = docnum
      BACKGROUND                = NO_BACKGROUND
      NO_DEQUEUE                = ' '
    IMPORTING
      IDOC_CONTROL              =
    EXCEPTIONS
      DOCUMENT_NOT_OPEN         = 1
      FAILURE_IN_DB_WRITE       = 2
      PARAMETER_ERROR           = 3
      STATUS_SET_MISSING        = 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.
    regards
    Aveek

  • How to write the logic for extending Idocs...

    Hi,
          Can anybody pls explain how to write the logic for extending IDOCs with an example...
          Good suggestions can be appreciated..
    Regards,
    Ram

    Hi Ram,
    Generally the IDoc user exit is called at the following places:
      1) When the control record is read.
      2) After each and every segment in the data record
      3) At the end of the data segment processing.
    The IDoc user exit interface generally imports IDOC_DATA (data record internal table) table. Now the data records in the internal table should appear in the same order as maintained while defining IDoc structure (WE30 transaction). For SAP standard segment SAP code will take care of this. For extended segment you will have to take care of this aspect by appending the Z-segment in the IDOC_DATA table.
    You can do this by:
             looping at IDOC_DATA table:
                 - Do a case-endcase fo IDOC_DATA-SEGNAM (This stores the segment 
                   structure as per the hierarchy).
                 - Within the case for "Z-segment" you can write the logic for appending
                   the Z-segment to IDOC_DATA-SDATA.
    Hope this gives some clue.
    Regards,
    Gajendra.

  • What is the internal  processing for idocs

    Dear friends this is subbu working as a abap consultant.
    can any body explain the how idocs are transfered (inbound process and outbound process)

    1.Here out bound means sender.Inbound mens --receiver.
    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..
    Re: How to create IDOC
    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
    www.sappoint.com
    --here u can find the ppts and basic seetings for ALE
    http://sappoint.com/presentation.html
    www.sapgenie.com
    http://www.sapgenie.com/ale/index.htm
    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.
    Try this..Hope this will help.
    SAP ALE & IDOC<<<<
    Steps to configuration(Basis) >>
    1. Create Logical System (LS) for each applicable ALE-enabled client
    2. Link client to Logical System on the respective servers
    3. Create background user, to be used by ALE(with authorizaton for ALE postings)
    4. Create RFC Destinations(SM59)
    5. Ports in Idoc processing(WE21)
    6. Generate partner profiles for sending system
    The functional configuration(Tcode: SALE)
    • Create a Customer Distribution Model (CDM);
    • Add appropriate message types and filters to the CDM;
    • Generate outbound partner profiles;
    • Distribute the CDM to the receiving systems; and
    • Generate inbound partner profiles on each of the clients.
    Steps to customize a new IDoc >>>
    1. Define IDoc Segment (WE31)
    2. Convert Segments into an IDoc type (WE30)
    3. Create a Message Type (WE81)
    4. Create valid Combination of Message & IDoc type(WE82)
    5. Define Processing Code(WE41 for OUT / WE42 for IN)
    6. Define Partner Profile(WE20)
    Important Transaction Codes:
    SALE - IMG ALE Configuration root
    WE20 - Manually maintain partner profiles
    BD64 - Maintain customer distribution model
    BD71 - Distribute customer distribution model
    SM59 - Create RFC Destinations
    BDM5 - Consistency check (Transaction scenarios)
    BD82 - Generate Partner Profiles
    BD61 - Activate Change Pointers - Globally
    BD50 - Activate Change Pointer for Msg Type
    BD52 - Activate change pointer per change.doc object
    BD59 - Allocation object type -> IDOC type
    BD56 - Maintain IDOC Segment Filters
    BD53 - Reduction of Message Types
    BD21 - Select Change Pointer
    BD87 - Status Monitor for ALE Messages
    BDM5 - Consistency check (Transaction scenarios)
    BD62 - Define rules
    BD79 - Maintain rules
    BD55 - Defining settings for IDoc conversion
    WEDI - ALE IDoc Administration
    WE21 - Ports in Idoc processing
    WE60 - IDoc documentation
    SARA - IDoc archiving (Object type IDOC)
    WE47 - IDoc status maintenance
    WE07 - IDoc statistics
    BALE - ALE Distribution Administration
    WE05 - IDoc overview
    BD87 - Inbound IDoc reprocessing
    BD88 - Outbound IDoc reprocessing
    BDM2 - IDoc Trace
    BDM7 - IDoc Audit Analysis
    BD21 - Create IDocs from change pointers
    SM58 - Schedule RFC Failures
    Basic config for Distributed data:
    BD64: Maintain a Distributed Model
    BD82: Generate Partner Profile
    BD64: Distribute the distribution Model
    Programs
    RBDMIDOC – Creating IDoc Type from Change Pointers
    RSEOUT00 – Process all selected IDocs (EDI)
    RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
    RSARFCEX - Execute Calls Not Yet Executed
    RBDMOIND - Status Conversion with Successful tRFC Execution
    RBDMANIN - Start error handling for non-posted IDocs
    RBDSTATE - Send Audit Confirmations
    FOr testing you can use WE19.
    There are two filtering in IDoc.
    Segment Filtering:
    Segment filtering can be achieved using T/Code BD56. Here you can suppress a whole segment irrespective of data inside it . You have to give Message Type / Sender Prrtner / Receiver Partner.
    Data Filtering:
    Data filtering can be done in dustribution model (BD64) where you can restrict whole IDOCS or partials IDOCS to be send based on data in fields inside IDOC depending on whether the segment in which you filter is at the highest level or at a lower level. For example in MATMAS if you put a filter of E1MARCM for a particular plant , only data for this plant will go and other plants will be ignored.
    Please check this link for more information.
    http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
    Reward points..

  • Pls send material for idocs in ECC 6.0

    Pls send material for idocs in ECC6.0

    Hi sitaram s ,
    IDoc
    - IDoc (for intermediate document) is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. IDocs are used for asynchronous transactions: each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database. Another SAP mechanism, the Business Application Programming Interface (BAPI) is used for synchronous transactions.
    A large enterprise's networked computing environment is likely to connect many geographically distributed computers to the main database. These computers are likely to use different hardware and/or operating system platforms. An IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another.
    IDoc types define different categories of data, such as purchase orders or invoices, which may then be broken down into more specific categories called message types. Greater specificity means that an IDoc type is capable of storing only the data required for a particular transaction, which increases efficiency and decreases resource demands.
    An IDoc can be generated at any point in a transaction process. For example, during a shipping transaction process, an IDoc may be generated that includes the data fields required to print a shipping manifest. After a user performs an SAP transaction, one or more IDocs are generated in the sending database and passed to the ALE communication layer. The communication layer performs a Remote Function Call (RFC), using the port definition and RFC destination specified by the customer model. The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system.
    Archiving Processed IDocs
    IDoc archiving is a two-step process:
    1. Archive the IDoc.
    2. After that another job will be generated. You can see in your SARA for your trigger to delete those archived IDocs.
    Have a look at transaction WE47, set "Archiving - Possible" for all statuses to be archived. Use transaction SARA with object IDoc to archive. If the above is set then all IDocs are archived the same way.
    Transaction SARA works in the following way:
    On the main screen enter IDoc as the object. Click on Customising -> Technical settings. This shows the logical filename (configured via transaction FILE & SF01) that will be used to get a filename when writing the archive files. It also shows the document type (that links to an archive via transaction 0AC0) or the archive, depending on SAP version. You can also set the size of the archive files and whether the deletion and storage jobs should execute automatically or not.
    On the main screen there are, amongst others, buttons for ARCHIVE, DELETE and MANAGEMENT. When you click on ARCHIVE you will go to a screen where you can create variants, and set the parameters for the archiving job. The EXECUTE button will schedule this job. If the "start automatic" tic for the deletion program was not set in customising, you will need to go to the DELETE button on the main screen to schedule the deletion jobs, after the archive job has finished. This schedules a job per archive file. In MANAGEMENT you will be able to see the statuses of each archive run.
    SAP Integration Using ALE(Application Linking and Enabling)
    - IDOCS -
    http://www.thespot4sap.com/Articles/SAP_ALE_IDOCS.asp
    Updating IDoc data in segments,Changing a control record of an IDoc,Getting IDocs linked to Application documents,
    Displaying and IDoc in a report,Read IDoc from Database,Creating and sending an IDoc,Update IDoc status on the database
    ALE Inbound Pre-Processing
    http://www.erpgenie.com/sapedi/idoc_abap.htm
    cheers!
    gyanaraj
    reward points if u find this helpful

Maybe you are looking for