Inbound iDoc search

Hi Experts,
I need to search in SAP all inbound iDocs of a certain type and status, and extract the value they have in a certain segment. In this way I have to process over 100.000 iDocs.
I've seen I can get a table view in we02 or we07 that I can extract, but only with few iDocs (no more than 600) because otherwise I get a timeout.
Do you know any other way of retreiving this information?
Thanks!
Neil

hi Niel,
go to se16 browser --> enter table EDIDC--> enter direction 2--> and execute..    "For no of indound records
go to se16 browser --> enter table EDIDS--> enter direction 2--> and execute..    "For numbre of indound records and their status
you will get the all information abot the ibound idocs
regards,
Prabhudas

Similar Messages

  • Error while trying to post inbound idoc of message type COND_A

    Hi,
    I am getting error while trying to post inbound idoc of message type COND_A.
    If I left Usage & Condition field of segment E1KOMG then 'Table not available' idoc message is coming
    and if providing value in above fields then dump is coming.
    How to solve ?
    Plz do reply
    Thanks
    Mohit

    I do not see any reason why you would need to use COND_A04  if COND_A01 is working.
    What if you could get COND_A04 to post and you would face the same result as in COND_A01?
    If SAP does not check wrong values, then you have to do it yourself, or you report an incident at SAP (after you have searched for OSS notes that may have fixed this error already)
    For example OSS Note 1169998 - IDoc: KONP-LIFNR values not checked
    fixed a situation where the vendor number was not validated.

  • Inbound idoc

    Hi,
    here i am picking the file from APPS and also inbound IDOC creation.
    just anyone check my code and give some suggestions in the areas of impovemet technically.
    thanks
    report  znsd007.
    *tables : zih001, zid001.                                     
    tables: zstbm_lots, zstbm_stages, zibmordertype.
    data: t_zstbmlot like zstbm_lots occurs 0 with header line,
          t_zstbmstage like zstbm_stages occurs 0 with header line.
    parameters :
       fromdir    like     rsmrgstr-path lower case default
    '/apps/MQBridge/idocmsgs/',
       fromfile   like rsmrgstr-name  lower case default '*.txt',
       todir      like rsmrgstr-path lower case default
    '/apps/MQBridge/idoctemp/',
       tofile     like edi_path-pthnam lower case no-display,
       procdir    like rsmrgstr-path lower case default
    '/apps/MQBridge/idocproc/',
       procfile   like edi_path-pthnam lower case no-display,
       toport     like edipo-port no-display.
    constants:  c_tst(7) value 'IBM_TST',
                c_bi(6) value 'IBM_BI',
                c_mrk(7) value 'IBM_MRK',
                c_sbt(7) value 'IBM_SBT'.
    data: w_tst(1) type c,
          w_bi(1) type c,
          w_mrk(1) type c,
          w_sbt(1) type c,
          w_err(1) type c,
          w_processcd(20) type c.
    data :
    file_list     like     rsfillst occurs 100 with header line,
    pattern     like     rsmrgstr-name,
    tmpfile(128),
    begin of in1 occurs 100,
      dir(128),
      file(128),
      data(63000) occurs 0,       
    data(1063) occurs 0,
    end of in1,
    str(63000),                   
    *str(1063),
    str2 like str,
    *outfile(63000) occurs 100 with header line,
    *outfile(128),
    crtl like edi_dc40,
    *counter type i,                                             
    segment like edi_dd40-segnam,                              
    segment_no(6) type n,                                      
    data like edi_dd40-sdata,                                  
    productid_ecid(25),                                        
    edidd40 like edi_dd40.
    field-symbols : <fs2>,<fs>.
    data:   messtab like bdcmsgcoll occurs 0 with header line.
    start-of-selection.
    break-point.
      perform getfile_list tables file_list using fromdir fromfile.
      delete file_list where type = 'directory'.
      toport = 'FILE'.
      loop at file_list.
        perform getfile tables in1 using file_list.
      endloop.
      sort in1 by dir file.                                    
      check not in1[] is initial.
      loop at in1.
        at new file.                                          
          concatenate todir '/' in1-file  into tofile.
          replace '//' with '/' into tofile.
          condense tofile no-gaps.
          open dataset tofile for output in text mode encoding default.
          if sy-subrc ne 0.                                   
            message e168(j4) with tofile.                      
          endif.                                               
    Copy the populated dataset to be saved into a processed directory
          concatenate procdir '/' in1-file  into procfile.
          replace '//' with '/' into procfile.
          condense procfile no-gaps.
          open dataset procfile for output in text mode encoding default.
          if sy-subrc ne 0.                                    
            message e168(j4) with procfile.                    
          endif.                                               
          clear : edidd40, crtl.
          crtl-tabnam     = 'EDI_DC40'.
          crtl-mandt      = sy-mandt.
          crtl-docrel     = '620'.
          crtl-direct     = '02'.
          concatenate 'SAP' sy-sysid into crtl-rcvpor.
          crtl-rcvprt     = 'LS'.
          crtl-rcvprn     = 'SSD_PN0001'.
          crtl-mestyp     = 'ZCPAOC'.                          
          crtl-idoctyp    = 'ZCPAOC01'.                        
          crtl-sndpor     = 'SSD0000001'.
          crtl-sndprt     = 'LS'.
          crtl-sndprn     = 'SSD_PN0001'.
          transfer crtl to : procfile.
          clear segment_no.                                    
        endat.                                                 
        refresh t_zstbmlot.
        refresh t_zstbmstage.
        loop at in1-data into str.
          clear edidd40.
          edidd40-mandt = sy-mandt.
          check not str is initial.
          search str for ','.
          if sy-subrc = 0.                                     
            segment = str+0(sy-fdpos).                        
            sy-fdpos = sy-fdpos + 1.                           
            data = str+sy-fdpos.                               
            case segment.
              when 'ZSTBM_LOT'.
                clear t_zstbmlot.
                split data at ',' into t_zstbmlot-aufnr
                                       t_zstbmlot-ordertype
                                       t_zstbmlot-plant
                                       t_zstbmlot-productid
                                       t_zstbmlot-ec
                                       t_zstbmlot-lotlabel
                                       t_zstbmlot-other_lot_label1
                                       t_zstbmlot-orderqty
                                       t_zstbmlot-customercd
                                       t_zstbmlot-srcevendor
                                       t_zstbmlot-waferid
                                       t_zstbmlot-lotowner
                                       t_zstbmlot-lottype
                                       t_zstbmlot-prty
                                       t_zstbmlot-planstart
                                       t_zstbmlot-planfinish
                                       t_zstbmlot-linecodejc
                                       t_zstbmlot-qualitycod
                                       t_zstbmlot-poi
                                       t_zstbmlot-poi_text
                                       t_zstbmlot-cot
                                       t_zstbmlot-cot_text
                                       t_zstbmlot-lotprodtyp
                                       t_zstbmlot-productcd
                                       t_zstbmlot-familycd
                                       t_zstbmlot-lot_cmmnt
                                       t_zstbmlot-devassem
                                       t_zstbmlot-devassemtx
                                       t_zstbmlot-numdevices
                                       t_zstbmlot-date_of_mfg
                                       t_zstbmlot-pur_order
                                       t_zstbmlot-process_cd.
                append t_zstbmlot.
                edidd40-segnam = 'ZSTBM_LOT'.
                edidd40-hlevel = '2'.                          
                segment_no = segment_no + 1.                   
                edidd40-segnum = segment_no.                   
                edidd40-sdata  = t_zstbmlot.
              when 'ZSTBM_STAGE'.
                clear t_zstbmstage.
               split data at ',' into t_zstbmstage-stage.
                move data to t_zstbmstage-stage.
                append t_zstbmstage.
                edidd40-segnam = 'ZSTBM_STAGE'.
                edidd40-hlevel = '3'.
                edidd40-psgnum = segment_no.
                edidd40-sdata = t_zstbmstage.
            endcase.                                           
            transfer edidd40 to : procfile.
          endif.                                               
        endloop.
        t_zstbmlot-date_of_mfg = t_zstbmlot-date_of_mfg(8).
    Determine the order type here using t_zstbmstage and t_zstbmlot
    and update order type int t_zstbmlot.
        clear w_tst. clear w_bi. clear w_mrk. clear w_sbt. clear w_err.
        clear w_processcd.
        loop at t_zstbmstage.
          if t_zstbmstage-stage = c_tst.
            w_tst = 'X'.
          elseif t_zstbmstage-stage = c_bi.
            w_bi = 'X'.
          elseif t_zstbmstage-stage = c_mrk.
            w_mrk = 'X'.
          elseif t_zstbmstage-stage = c_sbt.
            w_sbt = 'X'.
          endif.
        endloop.
        if t_zstbmlot-process_cd = 'SubStock Release' or
           t_zstbmlot-process_cd = 'SUBSTOCK RELEASE'.
          w_processcd = 'SUBSTOCK RELEASE'.
        endif.
        select single * from zibmordertype
               into zibmordertype where
               ibm_tst = w_tst and
               ibm_bi = w_bi and
               ibm_mrk = w_mrk and
               ibm_sbt = w_sbt and
               processcd = w_processcd.
        if sy-subrc = 0.
          t_zstbmlot-ordertype = zibmordertype-ordertype.
        else.
          write: 'Order type not determined for lot label:',
                  t_zstbmlot-lotlabel.
        endif.
    Put into zih001 to create idoc
        clear : edidd40, crtl.
        crtl-tabnam     = 'EDI_DC40'.
        crtl-mandt      = sy-mandt.
        crtl-docrel     = '620'.
        crtl-direct     = '02'.
        concatenate 'SAP' sy-sysid into crtl-rcvpor.
        crtl-rcvprt     = 'LS'.
        crtl-rcvprn     = 'SSD_PN0001'.
        crtl-mestyp     = 'ZCPAOC'.
        crtl-idoctyp    = 'ZCPAOC01'.
        crtl-sndpor     = 'SSD0000001'.
        crtl-sndprt     = 'LS'.
        crtl-sndprn     = 'SSD_PN0001'.
        transfer crtl to : tofile.
        clear : edidd40.
        edidd40-segnam =  'ZIH001'.
        edidd40-mandt = sy-mandt.
        edidd40-hlevel = 1.
        edidd40-sdata = t_zstbmlot.
        transfer edidd40 to : tofile.
        check not in1-data[] is initial.
        at end of file.                                        
          close dataset : procfile, tofile.
          call function 'EDI_DATA_INCOMING'
            EXPORTING
              pathname = tofile
              port     = toport.
          check sy-subrc = 0.
        Remove file from idocmsgs directory after idoc processing
          clear tmpfile.
          concatenate in1-dir '/' in1-file  into tmpfile.
          replace '//' with '/' into tmpfile.
          condense tmpfile no-gaps.
          delete dataset tmpfile.
        endat.                                                 
      endloop.
    form getfile_list tables intab1 structure rsfillst using inval1 inval2 .
      call function 'SUBST_GET_FILE_LIST'
        exporting
          dirname            = inval1
          filenm             = ''
          pattern            = inval2
        tables
          file_list          = intab1
    EXCEPTIONS
      ACCESS_ERROR       = 1
      OTHERS             = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    "getfile_list
    *&      Form  getfile
          text
         -->P_FIELD_LIST  text
    form getfile  tables intab1 structure in1
                  using    inval structure file_list.
      data : xfile(128).
      clear xfile.
      concatenate inval-dirname '/' inval-name  into xfile.
      replace '//' with '/' into xfile.
      open dataset xfile for input message messtab
                              in text mode encoding default.
      check sy-subrc = 0.
      clear : str, intab1. refresh intab1-data.
      do.
    replace ALL OCCURRENCES OF
            cl_abap_char_utilities=>horizontal_tab
                       in xfile with space.
    replace all occurrences of '#' in xfile with space.
    replace all occurrences of ':' in xfile with space.
    replace all occurrences of '_' in xfile with space.
        read dataset xfile into str.
    replace all occurrences of '#' in str with space.
    replace all occurrences of ':' in str with space.
    replace all occurrences of '_' in str with space.
        if sy-subrc <> 0.
          exit.
        endif.
        intab1-file = inval-name.
        intab1-dir  = inval-dirname.
        append str to intab1-data.
      enddo.
      if not intab1-data[] is initial.
        append intab1.
      endif.
      close dataset xfile.
    endform.                    " getfile
    form showdata changing inval indat.
      data : xxtab like sval occurs 100 with header line,
               ff0(100), ff1(30), ff2(30),  yesno.
      inval = indat.
      do.
        assign component sy-index of structure inval to <fs>.
          Z1STB_HDR TO <FS>.
        if sy-subrc <> 0. exit. endif.
        describe field <fs> help-id ff0.
        split ff0 at  '-' into ff1 ff2.
        clear xxtab.
        xxtab-tabname = ff1. xxtab-fieldname = ff2. xxtab-value = <fs>.
        append xxtab.
      enddo.
      call function 'POPUP_GET_VALUES_USER_HELP'
        EXPORTING
          popup_title     = 'Enter Order Information'
        TABLES
          fields          = xxtab
        EXCEPTIONS
          error_in_fields = 1
          others          = 2.
      if sy-subrc <> 0 .
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    "showdata

    hi
    i can see views are increasing inmy post. bu ti am not unable to see any when i enter. where are the views stored for this thread. now i am just clicking the reply to this thread.
    please let me know where can i see th eviews.
    thanks

  • Purchase Order triggering Sales Order using Inbound Idocs

    Hi All,
    Can any one explain the flow of Purchase Order triggering Sales Order using Inbound Idocs..??
    Thanks & Regards
    Anoop

    Use search tool to find sample like Integrating MM & SD Modules in Same Client to Create Sales order in Supplying Company Code Using PO raised in Receiving Company Code By I-Doc Message Type ORDERS Part1,  Part 2 and Part 3.
    Regards,
    Raymond

  • Custom inbound Idoc error handling/ Workflow

    Dear Experts,
            I have a requirement where in I created a custom inbound idoc, but now i need to handle the errors in the workflow and notify the users thru workflow on an error.
    Can some one please provide me a step by step guide on how to create a organizational unit, position and assign users to the position... and any other steps that need to be configured to notify the user on the error.
    I'm pretty new to all these organizational uints and workflow related stuff. Any step by step would really be helpful.
    Thanks for your time.
    -Amit.
    Moderator message: sorry, these forums cannot replace proper training, if there is step by step guides out there, then please use the search functions.
    Edited by: Thomas Zloch on Oct 31, 2010 11:50 AM

    Vittal,
    1. If your requirement is for a SAP Standard Basic Message type and a Z extension: Then you simply have to find out the 'Standard Task' associated with basic type. You shouldn't worry about extensions. The standard task will be triggered at input error.
    2. If your requirement is for a Z basic type i.e. you have created a customer IDOC for a custom processing: There are many dependencies on how you can achieve this. Firstly, you need to know how you're are processing this Z_IDOC. Are you using a standard FM or custom workflow or custom FM? There should be some triggering event within the processing of this Z_IDOC which will raise a certain flag when the error you want to capture happens (or when there is a generic error). You can configure this event in binding objects to trigger a workflow task. If you take a look at any standard tasks, you'll get an idea how the triggering event happens.
    Once the workflow task (you can use custom task or use a standard task i.e. by triggering a standard event within the IDOC processing program) is triggered, you can either send it to SAP inbox, e-mail, trigger another processing etc. This is altogether another story.
    So bottomline: For custom IDOC processing, you need to trigger an event when error happens. This can be a custom event or a standard event. This event should be linked to a task (custom/standard - check in SWETYPV). Bind all of these in PFTC. Once the task is triggered, you can do whatever you want to do with it.

  • Transaction to see result of inbound idoc ( XI to SAP R3) ?

    Hi,
    may i know the transaction to  see whether the inbound idoc has created the record ?
    i'm sending idoc from XI to ECC.
    Farah

    Hello Farah ,
    You can check the inbound idoc status in R3 using WE02/We05. In case want to do a search on idoc based on the timings , message type , target system etc use WE09 . Do remember to mention the search field like MATNR for material idoc , KUNNR for customer idoc or LFA1 for vendor idoc etc.
    Idoc in status 53 means success and staus 51 failure.
    Hope that helps!
    Cheers
    Binoy
    Edited by: Binoy Thomas on Apr 24, 2008 7:33 PM
    Edited by: Binoy Thomas on Apr 24, 2008 7:34 PM

  • Retrigger an Inbound IDoc to Become an Outbound from PoSDM to ECC

    Dear PoSDM Experts,
    I'm trying to browse and search for solutions on whether retriggering the inbound IDoc to an outbound IDoc from PoSDM to ECC without changing its details and had no luck.  The scenario has no aggregation and it is merely passing through PoSDM. I understand it doesn't seem practical because we can point the IDoc directly to ECC without passing PoSDM. The full scenario is an inbound IDoc is created in PoSDM coming from PI and the same IDoc will be triggered and pushed to ECC without changing the details. Sample IDoc would be WPUUMS, WPUBON and WPUTAB.
    Please let me know if the above scenario is possible without enhancement. If it is possible, kindly provide me how I should execute it in PoSDM.
    Kind regards,
    Mark

    Hi Mark,
    Well if that is the case then I will suggest you to go with custom development.
    Create Z tables for storing Inbound IDoc data  in POS DM.
    Write FM to process your inbound IDocs in POS DM Z tables.
    Write FM to generate your outbound IDocs from POS DM Z tables.
    Thanks,
    Vikrant.

  • Inbound idoc number

    Hi,
    Is there any way to get the inbound idoc number which created the sales order in the system.
    I have the sales order no. form that i want know the inbound idoc number which created this sales order.
    I am looking for any FM or Tables.
    Thanks,
    Patil

    Hi..
    Table EDID4 stores the Data records of an IDOC.
    You can search for SDATA field to get the Sales doc no.
    Try this Sample code
    report ztest1.
    tablEs edid4.
    data : it_data type table of edid4 with header line.
    PARAMETERS : P_MATNR TYPE MARA-MATNR DEFAULT '100-100'.
    DATA : V_pattern type string.
    CONCATENATE '%' P_MATNR '%' INTO V_PATTERN.
    SELECT   * FROM EDID4 into  table it_data
      WHERE  
      segnam = 'E1EDK01'  "To check the Segment name
      and  SDATA LIKE V_PATTERN
    LOOP AT IT_DATA. 
      WRITE: IT_dATA-DOCNUM.
    ENDLOOP.
    <b>Reward if Helpful</b>

  • Find the Inbound IDOC

    Hi Experts,
    I have a requirement to get the Inbound IDOC for particular PO. I have used the following method:
    http://forums.sdn.sap.com/thread.jspa?threadID=1082790
    That means using tables:
    A) SRRELROLES
    B) IDOCREL
    This is working for most of the cases except if the inbound IDOC is amended by the sender ( ex:- requested quantity changed ).
    1. If inbound IDOC received without any changes, it will be there in SRRELROLES as roletype = 'INBELEG'.
    2. If inbound IDOC received with changes it is not there in SRRELROLES.
    Could you please help me to resolve this issue?
    Thanks,
    Chaminda

    Hi,
    Thanks for your help.
    anyway, finally i had to use the time consuming way as there is no any other way.
    1. Get all the ORDRSP Idocs from EDIDC based on the selected date range
    select docnum status
          into table lt_edidc
          from edidc
         where credat in p_date1 and
               mestyp = 'ORDRSP'.
        if sy-subrc eq 0.
          sort lt_edidc.
    2. Get all segment data records for the control records
          select mandt docnum counter segnum segnam psgnum hlevel dtint2 sdata
            from edid4
            into table lt_edid4
             for all entries in lt_edidc
           where docnum = lt_edidc-docnum and
                 segnam = 'E1EDK02'.
    3. to imporve the performance, i have used BINARY SEARCH when search back the IDOC from PO.
    Thanks,
    Chaminda
    Edited by: chamindakrat on Feb 17, 2012 12:07 AM

  • Inbound IDoc Usetr-Exit

    Hi All,
    I am trying to find an userexit for the Inbound Idoc.
    <b>Basic type : COPAGN01.</b>
    If anyone has used any user exit for the COPAGN01 kindly let me know.
    Best Regards,
    Manish

    Hi,
    Go to SPRO and find enhancements idoc, it will show u both exit available for idoc.
    Or goto se84-> enhancements find the idoc keyword search. It will give u the desired result.
    Hope this will work for u.

  • Error Inbound IDOC for WP

    Hi,
    We are loading Inbound IDOC message type WPUBON and we got an error from transaction code WPER, it is saying : Generation successful, but you must call up the function again.
    IDOC was successfully generated and I attempted to re-process it and OK.
    Any idea where is the error located ?
    thanks !
    Chika

    Hi
    DESADV is the message type. Idocs are attched to the Message type
    you can search or list down the idoc types in Transaction WE30.
    If you want to the idoc types attached to message type DESADV you can find in WE57
    The idoc types attached to DESADV are
    DELVRY01 - Function module - IDOC_INPUT_DESADV1
    DELVRY02 -Function module - IDOC_INPUT_DESADV1
    DELVRY03 -  Function module - IDOC_INPUT_DESADV1
    Thanks & Regards
    Kishore
    Edited by: Kishore Kumar Chiluka on Apr 23, 2008 1:25 PM

  • Inbound IDOC extension

    Hi,
    iam working on an inbound IDOC TPSSHT01, i need to add an extrta field and segment , so i create an data element and  Z segment and add the field in the segment
    i have to copy the TPSSHT01 to a ZTPSSHT01 and do the IDoc extension ,
    i have to copy the function module IDOC_INPUT_SHIPPL to Z_IDOC_INPUT_SHIPPL
    Can any body let me know what are the steps that i have to follow to process the inbound idoc with the above requirment
    Cheers,
    Sai

    Hi ,
          Follow this procedure .
    In bound Idoc…
    Step 1: Create segment
    a.     T.code WE31
    b.     Enter a new segment type and press create button
    c.     Give a short text
    d.     Enter the field names say FIELD NAME : MATNR ;; DATA ELEMENT: CHAR(18)
    e.     Save the segment   (zkrishseg)
    Step 2: Create IDOC type
    a.     T.code WE30
    b.     Enter a new IDOC type name
    c.     Choose the basic type and press the create button.
    d.     Choose the create new option button and enter a description and press enter
    e.     Place the cursor on the type name and then press create button.
    f.     Enter the segment name created in step 1 and check the mandatory segment check box
    g.     Enter minimum number and maximum number as 1 and press enter.
    h.     Then save the IDOC type.   (zkrishtyp)
    Step 3: Create message type
    a.     T.code WE81
    b.     Press change button.
    c.     Press new entries button.
    d.     Enter a message type and short text and press save button. (zkrishmsg)
    Step 4: Assign message type to IDOC type.
    a.     T.code WE82
    b.     Press change button
    c.     Press new entries button.
    d.     Enter the created message type, IDOC type and version release (46B or 46C)
    Step 5:  Create a function module for inbound. (Z_IDOC_KRISH_INBOUND)
    Step 5A: Create characteristics of inbound FM.
    a.     T.code BD51
    b.     Click ‘New entries’
    c.     Enter the IDOC function module name and 1(individual type) in ‘input t.’.
    d.     Save it.
    Step 6: Assignment of FM to log, message and type.
    a.     T.code WE57
    b.     Go for change mode and click ‘new entries’.
    c.     In processing by…enter FM name and enter ‘F’ as type.
    d.     Enter basic type (idoc type-zkrishtyp) and message type (zkrishmsg) in the respective text boxes.
    e.     Choose the direction as 2 – Inbound.
    f.     Save the data.
    Step 7. : Creation of inbound process code.
    a.     T.code WE42
    b.     Go to change mode and click ‘create entries’.
    c.     Enter a new process code and description (zidockrish)
    d.     Enter the FM name in the identification text box
    e.     Choose processing with ALE service
    f.     Choose processing by FM and click Save button
    g.     In the next screen, select the FM name and click save button
    Step 7a : Creation of inbound process code.
    h.     T.code SM59
    i.     Select ‘R/3 connection’  and click ‘create’.
    j.     Enter all system related things(for Eg. Connection type as ‘3’, Target host as ‘SAP04’,
    Description , and Logon  details and save.
    Step 8:  Define a port
    a.     T.code WE21
    b.     Click on Transactional RFC and press the ‘Create’ button
    c.     Enter a port name and description. (ztestkrish)
    d.     Choose the release type.
    e.     Choose the RFC destination.
    f.     To create RFC destination…go to SPRO and search RFC destination…and create.
    g.     Save the data.
    Step 9. Define logical system
    a.     T.code SALE
    b.     Click down the sending and receiving systems
    c.     Click down the logical systems
    d.     Choose Define logical system.
    e.     Go for new entries.
    f.     Enter a new name and description and save it. (zkrishlog)
    Step 10. Create partner profile
    a.     T.code  WE20
    b.     Choose partner type LS and click create.
    c.     Enter the logical system name in partner number
    d.     Then Save …. Here Type is ‘US’.
    e.     click + icon(create inbound parameter) in the bottom. Note: Two table control subscreens will appear.  One for inbound and the other for outbound.  Click + icon in inbound area.
    f.     Enter the message type, process code and save the data.
    Step 11. Checking the Idoc
    a.     T.code WE19,
    b.     Choose radio Basic type , enter the type name(zkrishtyp) and press execute button.
    c.     Click on EDIDC Number.
    d.     Enter partner Number, Partner type, Port Number for sender and recipient ( data remains same here for sender and recipient)
    e.     Enter Message type and press ENTER.
    f.     Click on empty space corresponding to SEGMENT name and enter Paarameters like MATNR, WERKS and CHARG etc….
    g.     Click standard inbound properties here…  and press enter… see the result….
    h.     T.code WE02
    i.     Enter IDOC number press ENTER see the status.
    Function Module in Inbound
         Import Parameters
         INPUT_METHOD           LIKE BDWFAP_PAR-INPU              Inbound method for the IDoc inb 
    MASS_PROCESSING     LIKE BDWFAP_PAR-MASS            Flag: Mass processing 
    Export Parameters        
    WORKFLOW_RESULT     LIKE      BDWF_PARAM-RESULT          Final value of method          
    APPLICATION_VARIABLELIKE      BDWF_PARAM-APPL_VAR  Variable to be used by 
    IN_UPDATE_TASK      LIKE      BDWFAP_PAR-UPDATETASK       Flag: Application has 
    CALL_TRANSACTION_DONLIKE      BDWFAP_PAR-CALLTRANS        Flag: Application 
    tables
         IDOC_CONTRL         LIKE      EDIDC                       Control record (IDoc)       
    IDOC_DATA              LIKE      EDIDD                       Data record (IDoc)          
    IDOC_STATUS          LIKE      BDIDOCSTAT           ALE IDoc status (subset of al
    RETURN_VARIABLES    LIKE      BDWFRETVAR    Assignment of IDoc or documen
    SERIALIZATION_INFO  LIKE      BDI_SER                Serialization objects for one
         Source code
    FUNCTION ZASHOKMODULE.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
    *"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
    *"  EXPORTING
    *"     VALUE(WORKFLOW_RESULT) LIKE  BDWF_PARAM-RESULT
    *"     VALUE(APPLICATION_VARIABLE) LIKE  BDWF_PARAM-APPL_VAR
    *"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
    *"     VALUE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS
    *"  TABLES
    *"      IDOC_CONTRL STRUCTURE  EDIDC
    *"      IDOC_DATA STRUCTURE  EDIDD
    *"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
    *"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
    *"      SERIALIZATION_INFO STRUCTURE  BDI_SER
    data: begin of w_data occurs 0.
           include structure edidd.
    data: end of w_data.
    data: wa_data like ZASH1.
    data : i_data like standard table of wa_data initial size 0.
    *tables : zhemal1.
    data : begin of wa_zhemal1.
            include structure zhemal1.
    data : end of wa_zhemal1.
    data : i_ZHEMal1 like standard table of wa_ZHEMal1 initial size  0.
    read table idoc_data with key SEGNAM = 'ZASH1'.
    loop at  IDOC_DATA into  W_DATA where segnam = 'ZASH1'.
      WA_DATA = W_DATA-SDATA.
      wa_data  = w_data-sdata.
      append wa_data to i_data.
    endloop.
    MOVE IDOC_DATA-DOCNUM TO IDOC_STATUS-DOCNUM.
        IDOC_STATUS-MSGID = 'ZABC'.
        IDOC_STATUS-STATUS = 53.
        IDOC_STATUS-MSGTY = 'S'.
        IDOC_STATUS-MSGNO = '001'.
        APPEND IDOC_STATUS.
    LOOP AT i_data into wa_data.
    wa_ZHEMal1-VBELN = wa_data-VBELN.
    wa_ZHEMal1-POSNR = wa_data-POSNR.
    wa_ZHEMal1-MATNR = wa_data-MATNR.
    wa_ZHEMal1-MATWA = wa_data-MATWA.
    wa_ZHEMal1-MATKL = wa_data-MATKL.
    append wa_ZHEMal1 to i_ZHEMal1.
    insert ZHEMal1 from table  i_ZHEMal1 accepting duplicate keys .
    ENDLOOP.
    ENDFUNCTION.
    For Out bond  Steps are
    1.     Create segment
    2.     Create Type
    3.     Create Message Type
    4.     Assign message Type to Idoc Type.
    5.     Create Port
    6.     Define Logical systems.
    7.     Define Partner profile.
    8.     Create a Report program.
    Report program Out bond
    REPORT ZASH1 .
                  Outbound standalone idoc creation                      *
    Program Name : Y_VENMAST_OUTBOUND_STANDALONE                         *
    Description  : Outbound standalone idoc creation for training        *
                   to Unilever offshore team members                     *
    Created by   : Satyam Computer Services Ltd.                         *
    Created on   : 04.01.2002                                            *
                           Modification Log                              *
    Developer           Date            Transport #   Details            *
    Subramony         04.01.2002                                         *
    Tables Declaration                                                   *
    TABLES : zhemal1.
    Internal table declaration                                           *
    data : i_zhem1 Like standard table of zhem1 with header line.
    data : control_record_out like edidc.
    *data: p type p decimals 2,
         c(10) type c.
    start-of-selection.
        p = '3.14'.
        c = p.
        overlay c with '0000000000000'.
      write c.
    DATA : BEGIN OF I_EDIDD OCCURS 0.
            INCLUDE STRUCTURE EDIDD.
    DATA : END OF I_EDIDD.
    DATA : BEGIN OF I_EDIDC OCCURS 0.
            INCLUDE STRUCTURE EDIDC.
    DATA : END OF I_EDIDC.
    DATA : BEGIN OF I_zhemal1 OCCURS 0,
                VBELN LIKE zhemal1-VBELN,
                POSNR LIKE zhemal1-POSNR,
                MATNR LIKE zhemal1-MATNR,
                MATWA LIKE zhemal1-MATWA,
                MATKL LIKE zhemal1-MATKL,
           END OF I_zhemal1.
    SELECT-OPTIONS : S_vbeln FOR zhemal1-vbeln .
    START-OF-SELECTION.
      PERFORM F_GET_zhemal1.
    END-OF-SELECTION.
    Building Control record
    CONTROL_RECORD_OUT-MESTYP = 'ZASH1'.
    CONTROL_RECORD_OUT-IDOCTP = 'ZASH1'.
    CONTROL_RECORD_OUT-RCVPRT = 'LS'.
    CONTROL_RECORD_OUT-RCVPRN = 'ZASH1'.
    CONTROL_RECORD_OUT-sndPRT = 'LS'.
    CONTROL_RECORD_OUT-sndPRN = 'ZASH1'.
    PERFORM F_PROCESS_OUTPUT.
    *PERFORM F_FILL_EDIDD.
    PERFORM F_CREATE_IDOC.
    Form  F_GET_Y1COTU110                                                *
    FORM F_GET_zhemal1.
      SELECT VBELN  POSNR MATNR MATWA MATKL
             FROM ZHEMAL1
             INTO TABLE I_ZHEMAL1
             WHERE VBELN IN S_VBELN.
    ENDFORM.                    " F_GET_zhemal1
    Form f_process_output                                                *
    FORM F_PROCESS_OUTPUT.
      LOOP AT I_zhemal1.
      I_zhem1-VBELN = I_zhemal1-VBELN.
      I_zhem1-POSNR = I_zhemal1-POSNR.
      I_zhem1-MATNR = I_zhemal1-MATNR.
      I_zhem1-MATWA = I_zhemal1-MATWA.
      I_zhem1-MATKL = I_zhemal1-MATKL.
      i_edidd-segnam = 'ZASH1'.
        i_edidd-sdata  = I_zhem1.
        append i_edidd.
        clear i_edidd.
      ENDLOOP.
    ENDFORM.                    " f_process_output
    Form  f_create_edidc                                                 *
    FORM F_CREATE_IDOC.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
           EXPORTING
                MASTER_IDOC_CONTROL            = CONTROL_RECORD_OUT
           TABLES
                COMMUNICATION_IDOC_CONTROL     = I_EDIDC
                MASTER_IDOC_DATA               = I_EDIDD
           EXCEPTIONS
                ERROR_IN_IDOC_CONTROL          = 1
                ERROR_WRITING_IDOC_STATUS      = 2
                ERROR_IN_IDOC_DATA             = 3
                SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
                OTHERS                         = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        LOOP AT I_EDIDC.
          WRITE :/ 'IDoc Generated  :' , I_EDIDC-DOCNUM.
        ENDLOOP.
        COMMIT WORK.
      ENDIF.
    ENDFORM.                               " f_create_idoc
    Please reward if useful.

  • Trying to change Inbound IDOC to Outbound IDOC for testing....

    Hi Friends,
    I am trying to do the following
    1) In our legacy system SAP R/3 3.1H we have received an IDOC from our partner. This has been stored correctly.
    2) We now need the same functionality in our SAP R/3 4.6C system so I have created the IDOC type + segments accordingly. I have also set up the partner profiles
    3) We need test data but our partner can not send yet so the only other way is to send this INBOUND IDOC from 3.1H to 4.6C.
    4) HOWEVER, i have tried everything to do this like using WE19 to edit the idoc, but I can not process it for OUTBOUND processing.... You can in 4.6C but there is no option in 3.1H.
    HELP!! Rewards

    Hi Friend,
            The test programs allow you to skip certain sections of the processing chain between applications to localize errors. However, they can also be used to simulate an entire business process (for example, purchase order on the customer side with posting of the purchase order on the vendor side) in an SAP System (without any other systems). For this reason, the test programs are an important tool for configuring the IDoc Interface and defining new IDoc types.
    Use
    You can use the test tool to generate an IDoc manually and send the IDoc for either inbound or outbound processing. You are not restricted to a specific port type. You can start with an IDoc type (an “empty” IDoc) or use an old IDoc as a template and edit the IDoc, that is, add segments or change data. This is a good way to test new IDoc types, in particular.
    You can forward your new IDoc for standard inbound processing (checking partner profiles and so on). You can also call a function module directly. You can therefore test new function modules for new IDoc types.
    Activities
    ·        Start the test tool with SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Test Tool (WE19). You can use a template for your test IDoc.
    You can choose IDoc types as a template, either directly or according to a specific message type. You can use the F4 Help for IDocs used as a template, which searches for IDocs by selection criteria, in the same way, for example, to IDoc Display. When an IDoc file is used as a template, the IDocs are read from this file and are available to you for selection. A default value for the IDoc file gives you the system using your test port which you can enter in IDoc Administration . This test port must therefore be of the “file“ type. The default file is the inbound file entered there.
    ·        You generate the IDoc using .
    The IDoc is displayed as a tree structure. If you do not use a template to create the IDoc type, at least one more segment must be added.
    ·        To create segments in the form of tree nodes (colored fields) place the cursor on an existing node (for example a control record at the top) and choose .
    You can cut, paste or copy individual segments or entire segment groups by positioning the cursor on the relevant segment and selecting the required action from the Edit menu.
    ·        Click on the white fields to change data in the segments.
    In the case of the control record, only the fields which are relevant for standard inbound processing are displayed. Do not forget the required entries in the partner profiles if you want to send the IDoc for standard inbound processing! You can also change all of the control record data by choosing All fields in the edit screen.
    In the All fields editor screen you must enter the non-language specific partner function (for example AG for vendor). This is the only screen in the IDoc Interface in which the partner function is not translated into your language (in English AG becomes vendor VD) - in the partner profiles or in the IDoc display the field is always translated. Thus, you see the partner functions here in the way they are saved in the database. This is a unique value in the SAP System and therefore protected against mistakes.
    ·        The additional procedure depends on whether you want to test inbound or outbound processing.
    Test: Outbound Processing from MC
    Use
    Use this test program if you have chosen the Message Control module and want to test generation of an outbound IDoc from an existing message status record (table NAST).
    Prerequisites
    You must be able to post the application documents which are to be converted into IDocs by the Message Control module correctly so that a message status record can be generated. In the case of the Materials Management (MM) and Sales and Distribution (SD) components, the following entries are required:
    ·        Customer or vendor records
    ·        Material records
    ·        Info records
    ·        MC condition record: The output medium 6 (for EDI) must be entered here. The condition records are maintained as “messages” from the respective application.
    The appropriate file ports and partner profiles must exist in the IDoc Interface.
    Outbound processing must be stopped when the message status record has been generated to allow the test program to intervene. To do so, you must set the Message Control dispatch time to “1” (output with selection run) in the corresponding condition record in the application. This test program, therefore, is simply used to start a selection run which retrieves the Message Control records and sends them for further outbound processing. The program is report RSNAST00, which is also generally scheduled with dispatch time 1 in live operation.
    Activities
    Once the application document has been posted, outbound processing stops after the message status record has been generated and is triggered again by the test program. Choose SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Outbound ® Outbound from MC.
    Errors are stored in the Message Control processing log (document header) and in the status records of the IDocs. The status records, however, are only available if the IDoc was successfully generated.
    Use
    This test program selects one or more outbound IDocs and forwards them to the external system. You can choose the IDocs according to various criteria (for example, recipient or business message).
    Prerequisites
    You require outbound IDocs which were generated without errors (no error status). The partner profiles, therefore, must be maintained completely.
    Outbound processing must stop when the outbound IDocs have been generated to allow the test program to intervene. You can check this by setting the output mode to “Collect IDocs” in the partner profile for the IDoc Interface. If you now generate an outbound IDoc for the partner (for example, using the application or the test tool), the IDoc is only generated in the SAP System and is not forwarded to the external system. This test program, therefore, is simply used to start a selection run which retrieves your IDoc(s) and sends them to the external system. The program is report RSEOUT00, which is also generally scheduled with the output mode “Collect IDocs” in live operation.
    Activities
    You start the test program by choosing SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Outbound ® Outbound from IDoc (WE14).
    You can decide whether the output mode is set to “Start subsystem” or “Do not start subsystem” in the partner profile. This defines whether the external (sub) system processes the IDocs further.
    Use
    This program is used to test whether status confirmations for an outbound IDoc are sent correctly from the external system to the SAP System. The port type here must be set to “File”.
    Prerequisites
    A correct status file which can be generated by an EDI subsystem, for example, is required. The status file must refer to an existing outbound IDoc in the SAP System. You can also generate such a status file yourself.
    The sender port must be recognized by the receiving system. The port must therefore be maintained as a port of type “File” in the port definition for the IDoc Interface. The entry for the inbound file must also be given here.
    Features
    The SAP System reads the status file. The IDoc number contained in the file refers to the outbound IDoc, to which the status confirmation relates. The confirmed statuses are “credited” to the relevant IDoc in the form of status records in the SAP System.
    Activities
    Start the test program with SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Status ® Edit Status File (WE17) and pass the inbound port, name and directory of the file. These entries overwrite the standard values which you have stored in IDoc administration using the test port.
    Test: Inbound Processing: Modified Outbound File
    Use
    This program converts an outbound file with IDocs to a correct inbound file and sends the new file for inbound processing. The outbound file is not modified and can therefore be used more than once. The port type here must be set to “File”.
    Prerequisites
    You need a correct outbound file, for example, a file which is generated by the test tool or using a standard outbound processing. In this case, a port of the type “File” must be specified in the partner profile for the IDoc Interface, so that the IDoc(s) can be written to a file.
    The sender port must be recognized by the receiving system. The port must therefore be maintained as a port of type “File” in the port definition for the IDoc Interface. The entry for the inbound file must also be given here.
    Features
    The program imports sender and recipient data as input parameters from the user. The program reads the IDoc file and changes the corresponding entries in the IDoc control record. The changed data is written to a second IDoc file at the operating system level.
    Standard inbound processing is then triggered;
    ·        Reading the modified file
    ·        Generating the IDoc(s) in the SAP System
    ·        Processing in the application
    Activities
    Start the test program with SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Inbound ® Inb. Mod. Outb. File (WE12).
    Set the sender and recipient data, as well as the outbound file and the inbound file to be generated (path and name). Your entries for the inbound file overwrite the standard values which you have stored in IDoc administration.
    The recipient in this case is the SAP System. The port is used for identification purposes:
    ·        SAP (for example RSMITH
    Test: Inbound Processing: Original Inbound File
    Use
    This program reads an inbound file and sends the file for inbound processing. If all data has been successfully read, the file is deleted.
    Prerequisites
    You require a correct inbound file. In this case, correct means that the:
    ·        Sender and recipient in the control record are correct
    ·        Direction in the control record is set to 2 (inbound)
    ·        Client in the control record and data records are correct or empty
    The sender port must be recognized by the receiving system. The port must therefore be maintained as a port of type “File” in the port definition for the IDoc Interface. The entry for the inbound file must also be given here.
    Features
    The program reads the IDoc(s) from the inbound file and sends them for standard inbound processing (with processing within the application).
    The file is deleted after being read successfully!
    Activities
    Start the test program with SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Inbound ® Inb. Orig. Inb.File (WE16) and pass the following data:
    ·        Inbound port
    ·        Name and directory of the file
    These entries overwrite the standard values, which you have stored in IDoc Administration using the test port.
    Thanks

  • BDC and Inbound IDoc

    Hi
    I need your help to guide me for inbound Idoc process,
    in my porject client is sending data with standard idoc and PI is middleware converting into file and sending to us then am using BDC and uploading data,
    but now client asking why i cant use Idoc only ( standard or custom )  to upload data   why BDC ?
    here i need your help to understand how much extra  effort i need to put if i use  idoc and how to use inbound idoc process ? am new to this. 
    points will be there for sure
    Thanks
    Palak

    Hi ,
    For the inbound IDOC , u refer this ..Every thing for the inbound will start with
    IDOC_INPUT* .
    search based one we have so many inbound idoc's in SAP...
    For the programming we need to consider that these tables..
    EDIDD, EDIDC .
    loop at control table.
    loop at edidd.
       write the logic here...(required logic)
      endloop.
    endloop.
    after that we need to send the IDOC status to the application layer.
    Regards,
    Bharani

  • WF-BATCH user locks up inbound IDoc processing

    Hi Experts!
    We have an issue with our inbound IDoc processing randomly being locked by the WF-BATCH user.  I have searched SAP Notes, and the only thing I could find was on Note 519420, it said to check the default settings for date format and decimal notation format in SU01.  All looked fine, except for the decimal notation which was 1.234,567.89, instead of 1,234,567.89.  If I changed this, would this fix the problem?  Any suggestions would be greatly appreciated.  Thank you in advance. 
    WC

    WF-BATCH - is an ID in SAP which processes batch workflow tasks.
    So if your IDOC posting triggers workflow task - it's going to be processed by WF-BATCH.

Maybe you are looking for

  • Deleting Lion and re-installing Leopard/Snow Leopard

    I have a 1st generation MBA which is running really slowly with Lion.  I have a bootable USB with Snow Leopard on it, but am wondering if I wipe the disk and do a clean install, can I then restore files and software from my Time Machine?  I've a feel

  • Radio button names disappear in Fields menu

    I'm having this very odd experience in which the names of radio buttons I've created and grouped randomly disappear in the Fields menu. That probably doesn't describe it too well, so here's what I'm seeing: Notice how there's a gap between "Choice1"

  • 'Invalid Public Movie Atom' after moved movies across HDD's

    hi all. im kind of freaking out because i have just lost over 1TB of movies when purchasing a new usb HDD. now all i did was copy the movies from 1 USB hdd to another USB hdd and now they won't work, i get the error 'Invalid Public Movie Atom' or 'th

  • Update from 02 regarding Micro Sim.(UK)

    If you have pre-ord a new I Phone 4 from Apple you can go into a 02 shop from Monday to collect your micro sim, you will have to take your confirmation email from apple of your pre-order to show them. This has just been posted on my facebook page fro

  • ORA-01652: unable to extend temp segment by 32 in tablespace TEMP

    Hi, we are getting this error, but we have much free space in TEMP tablespace...... is this due to full table scans??? or due to sorting... or why we get this for temporary tablespace.... what internally happens while running one query related to tem