IDoc number range

Hi Folks,
I would like to know which configuration path in SPRO is used to define IDoc number range

Hi Imran,
  check transaction SNRO with object EDIDOC.
Regards,
Carlos.

Similar Messages

  • IDoc Number Range - Transaction Code

    Hello All,
    Hope you all are doing good. What is the transaction code for IDoc number range maintenance. Please reply.
    Regards,
    Vamsi

    Thanks for the answer, I have checked  the current number status in SNRO, After this I have generated one Idoc.
    To my observation, the IDoc number generated is much lesser than the current number in SNRO.  How is it possible.
    Is there are any settings apart from SNRO.
    Also Is there any table to check the current number of SNRO.
    Regards,
    Vamsi

  • IDOC Number Ranges

    Hi
    Where do one see at which number the idoc number range is.
    My idoc numbers are sometimes skipping a range, Why?
    200001 upto 200014, then it skiped to 201001 and then to 202001.
    If i check the number range of EDIDOC it currently shows 203000, Why?

    Number range object EDIDOC uses main memory buffering and number of numbers in buffer is 1000. When the app server is shutdown and restarted, all numbers in the buffer are gone.
    When idoc number needed, number range object is incremented by 1000 and the numbers are retrieved from buffer, that's  why you are seeing  203000 and idocs are creating in 202000 range.
    Regards
    Sridhar

  • Inspection lot number ranges skipping

    My inspection lot number ranges are skipping, those are std number ranges like 01 origin, 04 origin etc, what could be the reason for that.
    Inspn lots are getting generated and I took UD also. But certain numbers in the range got skipped.
    Eg:- Incoming inspn lot 010000000041 then it comes 010000000045
    Lot numbers 01/42, 01/43, 01/44 does not exist in sytem.
    Please suggest a way out
    Thanks
    Vineeth
    Edited by: vineeth varghese on Jul 18, 2008 11:31 AM

    Craig,
    But expert suggestion says, not to switch off buffer thru SNRO as it may affect fuctionality as you said early in this discussion.
    But I believe, this is to be relooked by SAP as number range skipping is not good (My case its skipping 5-7 numbers at a time). But I am not convinced with the reply from SAP also.
    Anyway thanks to you craig for your advice.
    SAP Note on this matter for reference of all. Thanks
    ================================
    Note: 62077
    Summary
    Symptom
    Gaps (jumps) occur when allocating internal numbers.
    The status of the number range interval does not match the number that was last assigned.
    The number assignment does not reflect the insert sequence.
    IMPORTANT: Read Notes 504875 and 678501.
    Other terms
    Document number, number range, number range object, buffering, current number level, trip number assignment, number interval, CO document, CO actual posting, inspection lot, material document, physical inventory document, production order number, planned order number, process order number, maintenance order number
    FB01, VF01, KO88, KE21, KE11, FD01, FK01, XK01, XDN1, MB01, MB0A, MB11, MB1A, MB1B, MB1C, MB31, KANK, KB11, KB13, KB14, KB41, KB43, KB44, KB21, KB23, KB24, KB31, KB33, KB34, KB51, KB53, KB54, PR01, PR02, PR03, PR04, PR05, XD01, VD01, MK01, SNUM, SM56, SNRO, VL01, VL02, CO01, CO40, CO41, VA01, MR1M, MIRO
    Reason and Prerequisites
    A large number of number range objects are buffered. When the system buffers a number range object, it does not update numbers individually in the database but reserves a preset group of numbers (depending on the number range object) in the database the first time a number is requested, and makes these numbers available to the application server in question. The following numbers can then be taken directly from the application server buffer. New numbers are not used in the database until the application server buffer has been used up.
    The effects described under "Symptom" are a direct consequence of this:
    If an application server is shut down, the numbers that are left in the buffer (that is, that are not yet assigned) are lost. As a result, there are gaps in the number assignment.
    The status of the number range interval reflects the next free number that has not yet been transferred to an application server for intermediate buffering. The current number level therefore does not display the number of the "next" object.
    The current number level (for each server) can be displayed using Transaction SM56. Call transaction SM56 and choose the menu 'Goto' -> 'Entries'. In the dialog box, enter the client, the affected number range object (for example, RK_BELEG) and possibly the required subobject (corresponds to the controlling area for the object RK_BELEG).
    If you use several application servers, the numerical sequence will not reflect the (chronological) insert sequence because the numbers are buffered separately on the individual hosts.
    Buffering the number range objects has a positive effect on performance, because the system no longer has to access the database (number range table NRIV) for each posting. Furthermore, a serialization of this table (database locking) is prevented to a large extent so that posting procedures can be carried out in parallel.
    Solution
    Since number range buffering does not cause any expressly assured qualities to be lost, no correction is required.
    If you still require continuous allocation, you can deactivate the number range buffering specifically for individual objects.
    Proceed as follows:
    - Start Transaction SNRO and enter the affected object.
    - Choose 'Change'.
    - Deactivate buffering: Choose 'Edit' -> 'Set Up Buffering' -> 'No Buffering'.
    - If you want to change the buffer size only, enter the corresponding value in the field 'No. of numbers in buffer'.
    - Save the changes.
    Please note that this change is a modification. The modification is overwritten as soon as the affected number range object is redelivered - in other words, you must check the change manually each time you import a release.
    In particular, read Note 678501, bearing in mind that changing the buffering type - if not explicitly recommended by SAP - constitutes a modification. For other possible solutions, refer to the following notes:
    179224, 599157 and 840901.
    For the the following number range objects, gaps may cause users to have doubts since they are 'expecting' a sequential numbering:
    Area CO:
    - RK_BELEG   (CO Document)
    CAUTION: Note that the problems described in Notes 20965 and 29030 may occur if you deactivate buffering.
    - COPA_IST (Document number in actual posting)
    - COPA_PLAN  (Document number in planned posting)
    - COPA_OBJ   (Profitability segment number)
    Area FI:
    - DEBITOR    (Customer master data)
    - KREDITOR   (Vendor master data)
    Area HR:
    - RP_REINR  (Trip numbers)
    Area PM, PP, PS
    - AUFTRAG    (Order number, production, process, maintenance order, network number)
    - QMEL_NR    (Number range - message)
    Area MM:
    - MATBELEG   (Material documents)
    - MATERIALNR (Material master)
    Area QM:
    - QLOSE      (Inspection lots in QM)
    - QMEL_NR    (Number range - message)
    - QMERK      (Confirmation number)
    - QMERKMALE  (Master inspection characteristics in QSS)
    - QMERKRUECK (Confirmation number of an inspection characteristic in QM results processing)
    - QMETHODEN  (Inspection methods in QM)
    - ROUTING_Q  (Number ranges for inspection plans)
    - QCONTROLCH (Quality control chart)
    Area Workflow:
    - EDIDOC     (IDocs)
    Number range buffering can be activated or deactivated at any time.
    Number range objects that have to be continuous due to legal specifications (for example, RF_BELEG, RV_BELEG), or due to a corresponding application logic must not be buffered using the buffering type 'Main memory buffering'. See also Notes 37844 (for RF_BELEG) and 23835 (for RV_BELEG).
    Header Data
    Release Status: Released for Customer
    Released on: 10.07.2007  12:57:00
    Priority: Recommendations/additional info
    Category: Consulting
    Primary Component: BC-SRV-NUM Number Range Management
    Secondary Components: CA-GTF General Application Functions
    BC-SRV-ASF-UOM Unit Management
    CO Controlling
    CO-OM-CCA Cost Center Accounting
    CO-OM-CCA-A Master Data
    CO-PA Profitability Analysis
    FI Financial Accounting
    FI-AP Accounts Payable
    FI-AR Accounts Receivable
    FI-GL General Ledger Accounting
    FI-TV Business Trip Management
    LO-MD-MM Material Master
    MM Materials Management
    MM-IM Inventory Management
    MM-IM-PI Physical Inventory
    PM Plant Maintenance
    PP Production Planning and Control
    QM Quality Management
    QM-PT Quality Planning
    QM-QN Quality Notifications
    Edited by: viny on Jul 23, 2008 9:18 AM

  • IDoc number generation is random

    We are trying to have a ALE-IDoc setup such that IDoc gets written as a text file to a application server directory.
    When we defined the port, we defined it as a file port. In the file port, we specified a folder on the SAP application server, where the file has to be created. Now when we generate the IDoc, this set up should automatically create a Idoc file in the specified folder.
    The Idoc itself is getting generated with valid data each time but the file isn't getting created always, even when the IDoc generation program is run with same data selection criteria. Interestingly, the Idocs which get written to files succesfully have a number range of 1000 and above, whereas the Idocs which couldn't get downloaded to files have a number range of 2000 and above.
    So my question is why are the numbers not serial, for both the successful and failed Idocs? Is there some setting which is forcing the system to pick the 2000 range for unsuccessful Idocs and 1000 range for successful ones? If yes, where is that setting?
    I read the following posted at another website "SAP assigns a range of Idoc numbers to each app server, so depending on which app server you hit your message will be assigned a number in that range".Can somebody validate that?
    The failed Idocs have the following status message:
    Status 02: Error passing data to port
    and the description is
    An error occurred when an outbound file was opened with 'OPEN DATASET'. The name of the outbound file is:
    /usr/sap/EQ0/put/HCM/ADP/outbound/HROT_UM_00002003 with operating system error msg.:No such file or directory

    We have resolved the problem.
    The Basis team had created the folder used for downloading the files only on one of the application servers (where the Idoc number range is 1000 and plus) but not on the other (where the Idoc number range is 2000 and plus). So when the process was hitting the application server, it couldn't locate the directory path and hence the OPEN DATASET statement was failing.
    So as soon as we created the directory, the problem got resolved.

  • Error in number range while testing inbound idoc via we19

    hi all,
    i have done all configurations but while testing the inbound idoc via we19 i am getting an error 'error in assigning number to idoc'..i checked and found that the number range object for idoc is edidoc in it number interval is defined from 1 to 99
    i dont think that anything is wrong with the number object..
    Can u tell me how dow i eliminate this error?

    Increase Higher limit the reason is when you look at current idoc number ( This idoc number already exists ) ,it will not create new idoc number.
    System will get the number from SNRO Based on IDOC Object.
    Just look at EDIDC and see the current idoc number.
    Simple example :
    I have one number - 100 ,it is already exists in database,if i insert same record to the database ,did system will accept ?
    Thanks
    Seshu

  • Idoc internal number range by SAP

    Hello,
    Whenever we create Idoc, Idoc number is generated by SAP. Can we see the number range stored by SAP to create Idoc number. [No configuration made for user number range]
    If yes, kindly let me know path in SPRO or transaction to see the same.
    Thanks,
    Madhura

    Hi,
    I checked in the system and I agree with both of you. EDIDOC is the object name used for Number range for IDOCS. Also, when I checked in SNRO the current number available over there was not the one which I get while creating new idoc. I checked the function module used to find the next number that will be given to the newly created Idoc.Include LSNR3F01 in function module NUMBER_GET_NEXT
    There is call for a C-function which gets the next number.
    CALL 'ThNoGet' ID 'BNRIV'    FIELD BNRIV
                     ID 'NO'       FIELD G_NOIVBUFFER
                     ID 'QUAN'     FIELD P_QUANTITY
                     ID 'PERCENT'  FIELD TNRO-PERCENTAGE
                     ID 'NONRSWAP' FIELD TNRO-NONRSWAP.
    KR Jaideep,

  • Transaction maintaining "number range objects" for IDOCs

    Hi everybody,
    does anybody know how to mainstain the number ranges for the different IDOC Types?
    Thansk
    Regards Mario

    Hi,
    we do not need an answer.
    Thaks

  • Number ranges for Business Partner

    Hello experts,
    Can you please guide how to define different number ranges for differenet different parner functions such Bidder and Employee.
    Presently when I create a new employee for a Business partner who has newly registered with SRM, they both are getting same range of BP number, which makes the user list very long to manage/search while creating BID/Auction invitation.
    Please guide me. Thanks in advance
    Vijay

    Hello,
    find below the settings of table T77S0 in our system. We use grouping Z4 for org units. Be aware of the fact that number range and grouping have to have the same ID in this case.
    Regards
    Wolfgang
    GRPID SEMID GSVAL      ETEXT
    HRALX HRAC  X          Activate HR Integration
    HRALX MERID X          Enter Integration Error in IDOC
    HRALX MSGRE 0          Recipient of Error Message When Creating BP
    HRALX OADBP            Business Partner of Standard Address
    HRALX OADRE            Address Necessary for Business Partner?
    HRALX OBPON ON         Integration O-BP Activated
    HRALX OBWIG X          Ignore Business Partner Warnings
    HRALX ONUMB 2          Business Partner Number Assignment (Org. Unit)
    HRALX OPROL BUP004
    HRALX OSUBG Z4         Business Partner Subgroup (Organizational Unit)
    HRALX PALEO            Log: Organizational Units in ALE
    HRALX PALEP            Log: Employees in ALE
    HRALX PBPHR OFF        Employees Are Replicated from HR System
    HRALX PBPON ON
    HRALX PCATS            Integration P-BP for CATS Activated
    HRALX PINAC            Activate ALE Distribution of Inactive Employees
    HRALX PLEVE 3          Log: Detail Level of Error Messages (1 - 5)
    HRALX PNUMB 3          Business Partner Number Assignment (Employee)
    HRALX PPROL BUP003
    HRALX PQUAL            Import Qualifications
    HRALX PRTON            Log Active
    HRALX PSUBG            Business Partner Subgroup (Employees)
    HRALX PSYNO            Log: Organizational Units in Dialog
    HRALX PSYNP            Log: Employees in Dialog
    HRALX USRAC X          Create Relationship to User

  • Create vendor in ERP R/3 with internal number range

    HI,
    When I create a new vendor from MDM in R/3 with internal number range ADRMAS is processed OK but CREMDM is in status 51 because of missing address data.
    According to sap note  1052964 (se below) ADRMAS must be the first IDOC and it should contain the vendor number, but this is not possible with internal number range. How do you overcome this problem and how do I get the vendor number back to MDM?
    ALE inbound needs the customer / vendor account number within the ADRMAS IDoc to link the ADRMAS IDoc to the follwing DEBMAS / CREMAS IDoc correctly. Therefore field <OBJ_ID> in ADRMAS segment <E1ADRMAS> must contain exactly the same value as fields <KUNNR> / <LIFNR> in the corresponding DEBMAS / CREMAS IDoc. If this value is not provided, the Business Address Service stores the address but is unable to link the address later on to the corresponding Customer / Vendor.
    Kind regards
    Jonna

    We have worked around these problems in the past.  These are the steps we took:
    1.  We created a custom program to process a CREMDM IDOC.  This custom program was pretty simple.  It called the function module to process a CREMAS IDOC (IDOC_INPUT_CREDITOR) then did a committ.  The program captured the vendor number and then called the function module (IDOC_INPUT_ADRMAS) that processes an ADRMAS IDOC (It plugged in the previously captured Vendor number in the ADRMAS).
    2.  Using this custom program, it is not necessary in PI to split the CREMDM into a CREMAS and an ADRMAS.
    3.   The last step in the custom program kicked off transaction MDMV to trigger an outbound CREMDM IDOC back to MDM.  This was necessary to update the vendor number in MDM. 
    Tom Belcher

  • SD - Billing - External Number Range

    Hi,
    I have two questions related to SD billing document numbering:-
    1. I am getting error message of [Please specify an internal number range Message no. NR752] while saving a billing document based on the delivery. I have checked only external number range box in VN01. Do I need to use any user-exit for this? If yes then there are 2 user exits available -
    a) USEREXIT_NUMBER_RANGE_INV_DATE USING US_RANGE_INTERN in program RV60AFZC
                              b) FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN in program RV60AFZZ
    but both the cases the variable is US_RANGE_INTERN which is not allowing external number range ID to pass. How this external no range works.?
    2. I have a business requirement for our Mexican company code on external alphanumeric number. There would be 3 billing types say, ZF2, YF2 and ZYF2. Mexican government provides Invoice numbers in advance.
    ZF2 Number range would be A001 to A999
    YF2 Number range would be B001 to B999
    ZYF2 Number range would be C001 to C999.
    All these Invoices would be created at same time. i.e. parallel processing. Also all these invoices would be transmitted thru EDI -IDOC. And accounting document should have same number as billing document will carry i.e. external govt provided numbers.
    How do I map this in systems. My experience says alphanumeric number range is not supported by SAP. Anybody may share his solution on this would be simply great.
    Thanks
    Subrata Das

    FORM USEREXIT_NUMBER_RANGE                                    *
          This userexit can be used to determine the numberranges for   *
          the internal document number.                                 *
          US_RANGE_INTERN - internal number range                       *
          This form is called from form LV60AU02                        *
    FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
    Example: Number range from TVFK like in standard
    US_RANGE_INTERN = TVFK-NUMKI.
    *{   INSERT         DEVK905392                                        1
    There was a need to check whether all the mandatory pricing
    conditions have been filled before creation of an invoice so that
    the invoice is released to accounting as and when it is created.
    Piece of code written below ensures the same. Field uvprs = 'X'
    in item table indicates that the item is incomplete with respect to
    pricing.
      LOOP AT xvbrp WHERE uvprs = 'X'.
        EXIT.
      ENDLOOP.
      IF sy-subrc EQ 0.
        MESSAGE e073(vf) WITH xvbrp-posnr.
      ENDIF.
    TABLES : zbd_nr_code.
    data : aa like zbd_nr_code-nr_code.
      IF sy-tcode = 'VF01'.
       SELECT SINGLE *
         FROM tvko
        WHERE vkorg = vbak-vkorg.
       IF sy-subrc EQ 0.
          SELECT SINGLE NR_CODE INTO ZBD_NR_CODE-NR_CODE
            FROM zbd_nr_code
           WHERE vkorg    = vbrk-vkorg
             AND werks    = vbrp-werks
             AND fkart    = vbrk-fkart.
          IF sy-subrc = 0 .
            us_range_intern = zbd_nr_code-nr_code.
          ENDIF.
       ENDIF.
      ENDIF.
    I feel this will help out.
    Regards

  • Idoc number from personal number in ECC

    Hi All,
    i am new to idocs ,please tell me how to get the idoc number using the personal number.

    https://help.sap.com/saphelp_nw04/helpdata/en/d5/edf15ddcdc11d1890c0000e8216438/content.htm
    01. Go to T code We09 or WE10
    02.Give date range for Created on
    03.Give direction : Inbound or outbound
    04.Give basic Type/logical message/ Port etc  ( If you know - for faster search )
    05. Now next tab is Criteria for search in data record :--
    a. You need Segment name : find out segment name from we02 thru some existing / known Idoc .
    b. Field name : Fro WE02 can get this value
    C. Once you know Segment and field name of personal number - enter all three values and execute.
    You will get respective Idoc#
    Hope this helps. Let us  know if you need further input on this.
    Best Regards/Rajesh

  • Number range issue

    Hi,
    I am trying to create idoc wherein I am getting error :
    Runtime Error          SAPSQL_ARRAY_INSERT_DUPREC
    Exception              CX_SY_OPEN_SQL_DB
    I checked the details and error is at:
    INSERT EDID4 FROM TABLE LIST_CONTAINER_CREATE
    I checked the number range for object EDIDOC and it has NRLEVEL(current no) as <b>1700</b> which is same as displayed in t-code SNRO for the object EDIDOC.
    But when I debug the issue, the next document number generated in FM 'NUMBER_GET_NEXT' is <b>1500</b>.
    How's it possible?
    In debug mode, I found below code which gets the next no.
    Include LSNR3F01.
    CALL 'ThNoGet' ID 'BNRIV'    FIELD BNRIV
                   ID 'NO'       FIELD G_NOIVBUFFER
                   ID 'QUAN'     FIELD P_QUANTITY
                   ID 'PERCENT'  FIELD TNRO-PERCENTAGE
                   ID 'NONRSWAP' FIELD TNRO-NONRSWAP.
    Can somebody clarify this and help me how to solve this short dump issue?
    Also when I check EDID4 table, it shows document nos like 1800?
    How to solve this?
    Regards,
    Yogita

    HI Yogita,
    Could you post the solution for your problem?
    Regards,
    Siva.

  • Finding an idoc number from a given sales document

    hi,
           please send me the code for the finding idoc number for a given sales document.
    it is urgent............
    thanks in advance..........

    I written the code to find the idoc number for given Purchase order number,so you can change the code depends on your requirement
    TYPE-POOLS: slis.
    tables : edid4 , edidc ,edids ,lfa1,teds2.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    DATA: s_layout TYPE slis_layout_alv.
    DATA: text11 LIKE E1EDP02.
    DATA: text111 LIKE E1MBXYI.
    DATA: s_keyinfo TYPE slis_keyinfo_alv.
    DATA: v_repid TYPE syrepid.
    DATA: V_MSGNO LIKE T100-MSGNR.
    *DATA: V_TEXT(90).
    DATA : WA_EDIDS TYPE EDIDS.
    data : begin of itab_edids occurs 0,
       user like edids-UNAME,
       date like edids-CREDAT,
       time like edids-cretim,
       idoc like edids-docnum,
      MESSAGETYPE like edidc-MESTYP,
      VENDOR LIKE EDIDC-SNDPRN,
      name like lfa1-name1,
      icon(1),
       EXPAND TYPE C,
    end of itab_edids.
    data : itab type edid4.
    data : begin of itab_edidc occurs 0,
         doc_num like edidc-docnum,
         MESSAGETYPE like edidc-MESTYP,
       IDOCTYPE like edidc-DOCTYP,
       PARTNERNUMBER like edidc-RCVPRN,
       PARTNERTYPE like edidc-RCVPRT,
      MESSAGECODE like edidc-MESCOD,
      VENDOR LIKE EDIDC-SNDPRN,
      data like edidc-credat,
    *include structure edidc.
      end of itab_edidc.
    data : begin of itab_status occurs 0,
    idoc like edids-docnum,
    date_stauus like edids-logdat,
    status_counter like edids-countr,
    staTus like edids-status,
    *descrp like teds2-descrp,
    DESCRP(70),
    ponumber like  ekpo-ebeln,
    MESS LIKE edidc-MESTYP,
    *appdoc like edids-stapa1,
    end of itab_status.
    data : text like edid4-sdata.
    DATA: text1 LIKE E1EDK01.
    data : begin of itab_teds1 occurs 0.
            include structure teds1.
    data end of itab_teds1.
    *selection-screen begin of block sb with frame title text-001.
    *select-options:
       s_rsdat for edidc-CREDAT.
    *selection-screen end of block sb.
    DATA: f_fieldcatalog TYPE slis_fieldcat_alv.
    selection-screen begin of block sb with frame title text-001.
    parameters:
           p_su radiobutton group gp1,
           p_re radiobutton group gp1,
           p_al radiobutton group gp1.
    select-options:
        s_rsdat for edids-creDAT,
        s_user for edids-uname.
    selection-screen end of block sb.
    initialization.
    PERFORM INITIALIZATION.
    start-of-selection.
    PERFORM DATA_RETRIVAL.
    PERFORM DATA_BASED_SELECTION.
    PERFORM PASSING_ALV.
    *select docnum mestyp doctyp rcvprn rcvprt mescod credat into
    *table itab_edidc from edidc
    *where credat in s_rsdat.
    *CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    *EXPORTING
    *i_program_name = v_repid
    *I_INTERNAL_TABNAME = 'ITAB_STATUS'
    *CHANGING
    *ct_fieldcat = t_fieldcatalog.
    *CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    *EXPORTING
    *i_program_name = v_repid
    *I_INTERNAL_TABNAME = 'ITAB_EDIDS'
    *CHANGING
    *ct_fieldcat = t_fieldcatalog.
    s_LAYOUT-ZEBRA = 'X'.
    *s_LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL'.
    *s_LAYOUT-TOTALS_TEXT = 'TOTAL'.
    *&      Form  INITIALIZATION
          text
    -->  p1        text
    <--  p2        text
    FORM INITIALIZATION.
    V_REPID = SY-REPID.
      s_keyinfo-header01 = 'IDOC'.
      s_keyinfo-item01 = 'IDOC'.
    *s_layout-subtotals_text = 'SUBTOTAL TEXT'.
    *s_layout-key_hotspot = 'X'.
    *s_layout-expand_fieldname = 'EXPAND'.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name         = V_REPID
                I_INTERNAL_TABNAME     = 'ITAB_STATUS'
                I_INCLNAME = V_repid
           CHANGING
                ct_fieldcat            = T_fieldcatalog
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name         = V_REPID
                I_INTERNAL_TABNAME     = 'ITAB_EDIDS'
                I_INCLNAME = V_repid
           CHANGING
                ct_fieldcat            = T_fieldcatalog
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
    f_fieldcatalog-just = 'L'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING just
    WHERE  ( fieldname = 'IDOC' OR FIELDNAME = 'STATUS_COUNTER' ).
    f_fieldcatalog-SELTEXT_L = 'Status Message'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING SELTEXT_L
    WHERE  fieldname = 'DESCRP'.
    f_fieldcatalog-TECH = 'X'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING TECH
    WHERE  fieldname = 'EXPAND'.
    f_fieldcatalog-REPTEXT_DDIC = 'Vendor Name'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING REPTEXT_DDIC
    WHERE  fieldname = 'NAME'.
    *f_fieldcatalog-REPTEXT_DDIC = 'V Code 32122'.
    *MODIFY t_fieldcatalog FROM f_fieldcatalog
    *TRANSPORTING REPTEXT_DDIC
    *WHERE  fieldname = 'VENDOR'.
    ENDFORM.                    " INITIALIZATION
    *&      Form  DATA_RETRIVAL
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_RETRIVAL.
    select  uname credat cretim docnum into  table
    itab_edids from edids
                   where credat in s_rsdat and
                          uname in s_user and
                          countr = ' '.
    select  uname credat cretim docnum from edids
    *APPENDING CORRESPONDING FIELDS OF TABLE itab_edids
                  where logdat in s_rsdat and
                         uname in s_user.
                         SELECT budat hkont belnr shkzg wrbtr FROM bsas
    *APPENDING CORRESPONDING FIELDS OF TABLE it_temp WHERE hkont = w_glacct
    *"wa_cb-gl_account
    *AND bukrs IN (so_bukrs-low)
    *AND budat < so_date-low.
      delete  adjacent duplicates from itab_edids.
      if not itab_edids[]  is initial.
         select docnum mestyp doctyp rcvprn rcvprt mescod SNDPRN credat into
        table itab_edidc from edidc for all entries in itab_edids
        where docnum = itab_edids-idoc.
      endif.
    LOOP AT ITAB_edids.
       READ TABLE ITAB_EDIDC WITH KEY  DOC_NUM = ITAB_EDIDS-IDOC.
       itab_edids-messagetype = ITAB_EDIDC-MESSAGETYPE.
       itab_edids-VENDOR = ITAB_EDIDC-VENDOR.
       MODIFY ITAB_EDIDS.
       CLEAR ITAB_EDIDS.
       ENDLOOP.
    DELETE ITAB_EDIDC WHERE MESSAGETYPE = 'ORDERS'.
    loop at itab_edids.
    read table itab_edidc with key doc_num  = itab_edids-idoc.
    if sy-subrc ne 0.
    delete itab_edids.
    endif.
    endloop.
    select docnum logdat countr status into table itab_status from edids for
       all entries in itab_edidc where docnum = itab_edidc-doc_num.
       LOOP AT ITAB_STATUS.
       READ TABLE ITAB_EDIDC WITH KEY  DOC_NUM = ITAB_STATUS-IDOC.
       ITAB_STATUS-MESS = ITAB_EDIDC-MESSAGETYPE.
       MODIFY ITAB_STATUS.
       CLEAR ITAB_STATUS.
       ENDLOOP.
      loop at itab_status.
        clear : text ,text1 , text11, text111, itab.
       select single descrp from teds2 into itab_status-descrp
                              where status = itab_status-STATUS AND
                                   LANGUA = 'E'.
       select single sdata into text from edid4 where
         DOCNUM =  itab_status-idoc and
         segnam = 'E1EDK01'.
    *MOVE: text        TO text1,
         text1-BELNR TO itab_status-ponumber.
          itab_status-ponumber = text1-belnr.
       move text+83(30) to itab_status-ponumber.
       MODIFY ITAB_STATUS.
       clear itab_status.
    IF itab_status-MESS = 'WMMBXY'.
       select single * from edid4  INTO ITAB where segnam = 'E1MBXYI' AND
                     HLEVEL = '02' AND DOCNUM = itab_status-idoc.
    MOVE  : ITAB-SDATA  TO TEXT111 ,
    text111-EBELN TO itab_status-ponumber.
    **text1-BELNR TO ponumber.
    ELSE.
    select single * from edid4  INTO ITAB where segnam = 'E1EDP02' AND
                     HLEVEL = '03' AND DOCNUM = itab_status-idoc.
    MOVE  : ITAB-SDATA  TO TEXT11 ,
    *text1-EBELN TO ponumber.
    text11-BELNR TO itab_status-ponumber.
    endif.
        MODIFY ITAB_STATUS.
        clear itab_status.
      endloop.
    ENDFORM.                    " DATA_RETRIVAL
    *&      Form  PASSING_ALV
          text
    -->  p1        text
    <--  p2        text
    FORM PASSING_ALV.
    s_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
    DATA: t_events TYPE slis_t_event.
    DATA: s_events LIKE LINE OF t_events.
    s_events-form = 'TOP_OF_PAGE'.
    s_events-name = 'TOP_OF_PAGE'.
    APPEND s_events TO t_events.
    s_layout-lights_fieldname = 'ICON'.
    sort itab_status by status_counter descending. " -
    mod3
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
           EXPORTING
                i_callback_program = v_repid
                is_layout          = s_layout
                it_fieldcat        = t_fieldcatalog
                i_callback_user_command = 'USER_COMMAND'
                i_tabname_header   = 'ITAB_EDIDS'
                i_tabname_item     = 'ITAB_STATUS'
                IT_EVENTS          = t_events
                is_keyinfo         = s_keyinfo
           TABLES
                t_outtab_header    = itab_EDIDS
                t_outtab_item      = itab_STATUS
           EXCEPTIONS
                program_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.                    " PASSING_ALV
    *&      Form  DATA_BASED_SELECTION
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_BASED_SELECTION.
    if p_su eq 'X'.
    *loop at itab_status where status = '53'.
    *select single stapa1 from edids into itab_status-appdoc
    where  docnum = itab_status-idoc and status = '53'.
    *delete itab_status where status ne '53'.
    *modify itab_status.
    *endloop.
    delete itab_status where status ne '53'.
    loop at itab_edids.
    read table itab_status with key idoc = itab_edids-idoc binary search.
    if sy-subrc ne 0.
    delete itab_edids.
    ELSE.
    *SHIFT ITAB_EDIDS-IDOC LEFT  DELETING LEADING '0'.
    MODIFY ITAB_EDIDS.
    endif.
    endloop.
    LOOP AT ITAB_STATUS WHERE MESS NE 'WMMBXY'.
    SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
    AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
    IF  WA_EDIDS-STATXT CA '&'.
    V_MSGNO = WA_EDIDS-STAMNO.
    IF V_MSGNO NE '000'. "----mod3
    CALL FUNCTION 'MESSAGE_PREPARE'
    EXPORTING
    msg_id = WA_EDIDS-STAMID
    msg_no = V_MSGNO
    MSG_VAR1 = wa_edids-stapa1
    MSG_VAR2 = WA_EDIDS-STAPA2
    MSG_VAR3 = WA_EDIDS-STAPA3
    MSG_VAR4 = WA_EDIDS-STAPA4
    IMPORTING
    MSG_TEXT = itab_status-descrp.
    CONDENSE ITAB_STATUS-DESCRP.
    ENDIF."---- mod3
    ELSE .
    ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
    ENDIF.
    *SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    *SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    LOOP AT ITAB_STATUS WHERE MESS EQ 'WMMBXY'.
    SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    ITAB_STATUS-DESCRP = 'APPLICATION DOCUMENT POSTED'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    delete adjacent duplicates from  itab_edids comparing idoc.
    elseif p_re eq 'X'.
    loop at itab_status where status = '53'.
    delete itab_edids where idoc = itab_status-idoc.
    endloop.
    loop at itab_status.
    read table itab_edids with key idoc = itab_status-idoc binary search.
    if sy-subrc ne 0.
    delete itab_status.
    endif.
    endloop.
    LOOP AT ITAB_STATUS.
    SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
    AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
    IF  WA_EDIDS-STATXT CA '&'.
    V_MSGNO = WA_EDIDS-STAMNO.
    IF V_MSGNO NE '000'. "----mod3
    CALL FUNCTION 'MESSAGE_PREPARE'
    EXPORTING
    msg_id = WA_EDIDS-STAMID
    msg_no = V_MSGNO
    MSG_VAR1 = WA_EDIDS-STAPA1
    MSG_VAR2 = WA_EDIDS-STAPA2
    MSG_VAR3 = WA_EDIDS-STAPA3
    MSG_VAR4 = WA_EDIDS-STAPA4
    IMPORTING
    MSG_TEXT = itab_status-descrp.
    CONDENSE ITAB_STATUS-DESCRP.
    endif. "-----mod3
    ELSE .
    ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
    ENDIF.
    SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    LOOP AT ITAB_EDIDS.
    SHIFT ITAB_EDIDS-IDOC LEFT  DELETING LEADING '0'.
    MODIFY ITAB_EDIDS.
    ENDLOOP.
    delete adjacent duplicates from  itab_edids comparing idoc.
    elseif p_al eq 'X'.
    delete adjacent duplicates from  itab_edids comparing idoc.
    LOOP AT ITAB_STATUS." WHERE MESS NE 'WMMBXY'.
    SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
    AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
    IF  WA_EDIDS-STATXT CA '&'.
    V_MSGNO = WA_EDIDS-STAMNO.
    IF V_MSGNO NE '000'. "----mod3
    CALL FUNCTION 'MESSAGE_PREPARE'
    EXPORTING
    msg_id = WA_EDIDS-STAMID
    msg_no = V_MSGNO
    MSG_VAR1 = WA_EDIDS-STAPA1
    MSG_VAR2 = WA_EDIDS-STAPA2
    MSG_VAR3 = WA_EDIDS-STAPA3
    MSG_VAR4 = WA_EDIDS-STAPA4
    IMPORTING
    MSG_TEXT = itab_status-descrp.
    CONDENSE ITAB_STATUS-DESCRP.
    endif. "----mod3
    ELSE .
    ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
    ENDIF.
    *SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    *SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    endif.
    LOOP AT ITAB_EDIDS.
      if p_su EQ 'X'.
      itab_edids-icon = '3'.
      elseif p_re eq 'X'.
       itab_edids-icon = '1'.
       ELSE.
       read table itab_sTATUS with  key idoc = itab_EDIDS-idoc
                                   STATUS  = '53' ."binary search.
       IF SY-SUBRC EQ 0.
        itab_edids-icon = '3'.
       ELSE.
       itab_edids-icon = '1'.
       ENDIF.
       ENDIF.
    select single name1 from lfa1 into itab_edids-name where
                lifnr = itab_edids-vendor.
    SHIFT ITAB_EDIDS-IDOC LEFT  DELETING LEADING '0'.
    MODIFY ITAB_EDIDS.
    clear itab_edids.
    ENDLOOP.
    loop at itab_status.
    SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    if itab_status-descrp is initial.
    select single descrp from teds2 into itab_status-descrp
                               where status = itab_status-STATUS AND
                                    LANGUA = 'E'.
    endif.
    MODIFY ITAB_STATUS.
    clear itab_status.
    endloop.
    sort itab_status by idoc.
    sort itab_edids by idoc.
    ENDFORM.                    " DATA_BASED_SELECTION
    *& Form TOP_OF_PAGE
    text
    FORM TOP_OF_PAGE.
    SKIP.
    ULINE.
    IF P_SU EQ 'X'.
    WRITE : / 'TITLE : SUCCESSFULLY POSTED IDOC', 50 'DATE :', SY-DATUM..
    ELSEIF P_RE EQ 'X'.
    WRITE : / 'TITLE : REJECTED IDOCS'  ,50 'DATE :', SY-DATUM.
    ELSEIF P_AL EQ 'X'.
    WRITE : / 'TITLE : ALL IDOCS' ,50 'DATE :', SY-DATUM.
    ENDIF.
    WRITE  :/9 'Successful-Green light  Unsuccessful-Red Light'.
    format color COL_TOTAL intensified on.
    WRITE : / 'NOTE  : DOUBLE CLICK TO SEE CORREPONDING IDOC AND PO'.
    WRITE :/9 'DOUBLE CLICK IDOC NO ON HEADER LIST'.
    WRITE :  'AND PO NUMBER ON DETAIL LIST'.
    format color off.
    ULINE.
    SKIP.
    ENDFORM. "TOP_OF_PAGE
    FORM user_command *
    --> UCOMM *
    --> SELFIELD *
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    DATA: WA_IDOC9 LIKE EDIDC-DOCNUM.
    DATA: SELTAB     TYPE TABLE OF RSPARAMS,
          SELTAB_WA  LIKE LINE OF SELTAB.
    RANGES : R_DATE FOR EDIDC-CREDAT." SY-DATUM.
    IF ucomm = '&IC1'.
    if SELFIELD-SEL_TAB_FIELD = 'ITAB_EDIDS-IDOC'.
    READ TABLE itab_edids INDEX selfield-tabindex.
    IF sy-subrc = 0.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = ITAB_edids-IDOC
    IMPORTING
    OUTPUT = WA_IDOC9.
    *r_date-low = itab_edids-date.
    *r_date-high = itab_edids-date.
    *r_date-SIGN = 'I'.
    *r_date-OPTION = 'BT'.
    *append r_date.
    SUBMIT RSEIDOC2  WITH DOCNUM = wa_idoc9
    WITH CREDAT in R_DATE[]  AND RETURN.
    ENDIF.
    ELSEIF SELFIELD-SEL_TAB_FIELD = 'ITAB_STATUS-PONUMBER'.
    READ TABLE itab_STATUS INDEX selfield-tabindex.
    IF sy-subrc = 0.
    SET PARAMETER ID 'BES' FIELD itab_sTATUS-PONUMBER.
    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM..
    Thanks
    Seshu

  • Two idocs with same idoc number in idx5

    We are using an idoc to file scenario where idocs are bundled using bpm and posted to ftp. here the issue is we are getting two idocs with same idoc number in idx5. due to which the file in ftp is getting overwritten.
    Could anyone suggest me what to do in this regard.

    Hi,
    >>>check your sender system is sending same IDoc twice ?
    if you send the same IDOC twice they both get different numbers as IDOC number is taken from the IDOC num range
    unless you're able to send the same IDOC twice with the same IDOC num somehow
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • Getting the information from a writable form into Excel ...

    Help! I have a writable form that was created in Adobe Acrobat Professional I would like to either post or email out this form to fellow employees. Once they fill out this form - it needs to come back to me I then need to be able to take the data fro

  • "Missing File" - try re importing the original source media

    Hi, it was there and now it is not. I have been moving events around to try and reduce the single library size which was about 800 GB and Time Machine could not back it up... Is there a library fix/repair utility out there for this new version of iMo

  • HT1689 How do I switch from US to Israeli store?

    The iTunes Store keeps asking me to switch from us to Israeli store.  Yet, under my id, a reference is made to Israeli store.  How do I get out of this quagmire?

  • Master_thing_id  and id

    Hi, Can you please let me know what is the difference between master_thing_id and id in wwv_things table? In wwv_things table, id and some other fields like siteid are a part of the primary key but in wwpob_item$ table, master_thing_id with siteid bu

  • Need to blacklist (block) a large number of domains and email addresses

    I tried to import a large number of domains into a transport rule (new/set-transportrule -name xxx -domainis $csv -quarantine $true).  I added a few domains manually and tested to make sure the rule was working.  It was.  Then I ran the cmdlet to imp