Number range - update

Dear Experts,
I have created one number range, initially it should appear in the screen but if the user clicks no in popup then the number range it should get reduced since it is not used, kindly find the below codes,
DATA: RC         LIKE INRI-RETURNCODE,
      NUMBER(10) TYPE C,
      YEAR       LIKE INRI-TOYEAR,
      QUAN       LIKE INRI-QUANTITY.
data : Category type CRMC_ACT_CATEGOR-CATEGORY.
   QUAN              = 1.
   Category    = 'Z22'.
   CALL FUNCTION 'NUMBER_GET_NEXT'
        EXPORTING
           OBJECT           = 'ZTEST'
           NR_RANGE_NR      = '01'
           SUBOBJECT        = Category
        IMPORTING
           RETURNCODE       =  RC
           QUANTITY         = QUAN
           NUMBER           = NUMBER.
data : lv_ans type c.
   CALL FUNCTION 'POPUP_TO_CONFIRM'
     EXPORTING
      TITLEBAR                    = 'Are you sure'
       text_question               = 'Are you sure'
      DEFAULT_BUTTON              = '1'
      DISPLAY_CANCEL_BUTTON       = ' '
    IMPORTING
      ANSWER                      = lv_ans.
if lv_ans = '1'.
   Write :/ 'Next available number is: ', Number, RC.
   else.
*here we have to reduce the number range - 1.
*here can we use f.s's like,
NUMBER_RANGE_ENQUEUE
NUMBER_RANGE_INTERVAL_UPDATE
NUMBER_RANGE_DEQUEUE
NUMBER_RANGE_UPDATE_CLOSE
Kindly guide me how to proceed here
     write : /'not allowed'.
     endif.

Hi srinivas,
I have created one screen, where this number range should appear initially, then based on action performed if he saves then that number range should be considered and it has to be stored in ztable, if cancelled we should not consider that number range, so what i did is if cancelled i am using this logic to reset the number range,
clear : lv_nrlevel.
select single nrlevel from  NRIV into lv_nrlevel     where OBJECT = 'ZTEST' and SUBOBJECT = 'Z22'.
  lv_nrlevel = lv_nrlevel - 1.
  update nriv set nrlevel = lv_nrlevel where   OBJECT = 'ZTEST' and SUBOBJECT = 'Z22'.
Waiting for your responses,
Thanks and Regards,
thirukumaran. R

Similar Messages

  • Quant number range problem

    Hi,
    I can see the latest quant number is 172 via tcode LS26, but current number  in the customzing of quant number range definition is 170, so the errors occurred when the system tried to create TR, so what's the problem with the number range update?
    Kindly please advise.
    Thanks.

    Hi Jürgen L,
    Thanks.
    I've changed the current number range to a higher number, but I got the following error message when performing stock transfer
    ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC
    Another thing is, I transport all the WM setting including number range from DEV system into QA system twice, before that I've already perfom stock transfer in QA system.
    Kindly please advise

  • Automatic update of number ranges in FBN1 is not getting processed

    Automatic update of number ranges in FBN1 (current status) level is not getting processed.
    Tried posting a customer payment document in the system though number ranges are maintained for the year 2015 the number ranges are not overlapped last year all documents are closed but still the numbers are not been picked automatically in FBN1 kindly help in this issue

    Hello Rajesh
    Please verify if number ranges are maintained correctly, verify same using transaction OBA7. Also ensure that external assignment is unchecked in FBN1. Share screenshots if possible.
    Regards
    Aniket

  • Internal number ranges  for accounting documents are not updating

    Dear Experts,
    We are existing user of SAP 4.6 C , are facing probelm while posting accounting document , the accounting document number ranges are not getting updated.
    When I post first document it got alloted first number from the interval when i post another document the system showing message Document Number XXXXXXX is already assigned to other document.
    And we have checked through T.C FBN1 and checked the number ranges where first document didn't showing in the alloted number range status.
    Early reply can be highly appreciated.
    thanking you.
    Regards,
    Y.Kiran Babu.

    hi Rajesh,
    check if any document exists with that number in table BKPF. Also check: the number (current number) you see in FBN1 should be the highest existing document number in BKPF (inside the range).
    ec

  • Status of number range has not updated

    HI GURUS!
    I read a lot of similar questions as mine. But I didn't find the correct answer for my problem.
    The issue is: after I uploaded the Vendor master with LSMW, the status of the number range is still 0!
    So I have to change it manually. What should be the problem? Is it possible that problem is in the NUMBER_GET_NEXT fm?
    Thanks in advance,
    Gábor

    Hi!
    The number range for vendors is internal! If I change the status after migration, in the XK01 transaction the system gives the correct next number. But how can it possible that the status has not updated after uploading?
    Best regards,
    Gábor

  • Document Number range autmatically getting updated

    Hi,
    I m in SAP ECC 6.0 and new GL concept is activated. I am posting a document. Document number is generated. But the update error is given. When i saw the document number range status in document number in general ledger view, the document number is updated to further 100 numbers.
    For example:
    Before document was psoted, current document status was 1800000100.
    But after the document was posted, current document status was 1800000200.
    Let me know why SAP is behaving in such a way. The above error is seen only in "Define Document Number Ranges for General Ledger View" and not in "Define Document Number Ranges for Entry View"

    Here is SAP help text on buffering field.
    Buffer flag
    This ID determines whether the number intervals are buffered for assignements and checks.
    Use
    The number interval buffer is in the Shared Memory of the application server. Each buffer is used to store the external number intervals and a certain number (subinterval) of the internal number intervals. If the numbers of an internal number interval are used up, numbers are taken from the database via the number range server. The status of the number interval in the database is increased by the number of numbers fetched to the buffer.
    Dependencies
    When buffering number intervals, gaps may result in number assignment. Buffering is therefore not possible for applications, which require continuous number assignment.
    Try removing the buffer, reset all transaction data (OBR1) and retest postings.  If transaction data cannot be deleted, you should set the current number in SNRO to the most recent document number in BKPF/FAGLFLEXA and retest the postings.

  • View Table to update Physical Inventory Number Range.

    Hi,
    I am looking for the 'View Table' Name to update Physical Inventory Number Range in OMMB transaction.
    I will have to do it using SM30 as OMMB is display only.
    Thanks

    Hi,
    OMBT still cant help me because I dont have write access on this client.
    Are you aware on how to get the View Table to Maintain Number Ranges for Physical Inventory?
    Thanks,
    Rohit.

  • Number Range Status updating wrongly

    We have a problem in our PRD server.
    when we create a customer master the Current number is not getting updated correctly.
    EG, when we create a customer it is giving number as 4 but the status is getting updated and the current number also as 8.
    Pls help

    Dear,
    Please check whether the same number range is assigned to more than one customer acct group or what thourhg following path.
    SPRO->IMG->Financial Accounting(New)->Accounts Receivables and Accounts Payable->Customer Accounts->Master Data->Preparation for Creating Customer Master Data->Assign Number Ranges to Customer Account Groups.
    Reply if the same matter..............
    Thnx,

  • Number range not update CIN error message Excise group.... does not exist

    Hi Guru,
    We have created new excise group in SPRO> tax on goods movement/India>basic setting>maintain excise group successfully.
    My problem is, when we have update the number range (J1I9) for  same excise group, system give the error message Excise group .... does not exist.
    Please help on top priority.
    Regards
    BK GAIKWAD

    Sir,
    i have allready updated the same & also one thing is more, i have aal the above chnages in development server & then transport the same request to quality server.
    in development server it is work fine only in quality server it is not display. please help
    Regards
    BK GAIKWD

  • How to assign numbers in external number range?

    Dear experts,
    Since NUMBER_GET_NEXT can only be used to assign numbers in internal number range, how to assign numbers in external number range?
    So far, I only know the NUMBER_CHECK function module to deal with external number ranges and it only check a number whether it lies in any external number range or not, but it doesn't update any number range status. What I need is a function module like NUMBER_GET_NEXT that supports external number range.
    Thanks in advance.
    Regards,
    Haris
    Edited by: harissahlan on Oct 19, 2011 5:44 AM

    With external number range, there is no updating of the number range objectt. The only thing you need to know is whether the number you wish to assign is allowed according to the external number range. And also check if there isn't already an object/document with the same number in the database.

  • Number Range issues with sales orders in CRM and R/3

    Hi,
    We are currently using CRM4.0. I have sales orders created in R/3 and they are replicated into CRM.  These sales orders can only be created in R/3.  I have given them a number range of 0000000001 and 0005899999, however we have reached the number 0005899999 so we increased the internal number range for the sales orders in R/3 to 0009499999, however we forgot to update the number range for the corresponding sales transaction type in CRM so we are getting the following error in CRM:
    +Enter a business transaction number between 0000000001 and 0005899999
    Message no. CRM_ORDERADM_H532
    Diagnosis
    You have attempted to enter a transaction number which is not allowed for the transaction type.
    Procedure
    Enter a number between  &1 and &2. Make sure that you issue a number which has not already been issued.+
    We have now updated the CRM number range to match that in R/3 to 0000000001 and 0009499999 but we are still getting the error above on our existing sales orders in CRM.  I thought that increasing this number range it will remove the error but when I open sales orders in CRM the error is still there. 
    Is there any way to remove this error message?  Any tips or advice would be much appreciated.
    Please note we've already checked the post Re: Number Range Problem and note 427289.
    Kind Regards
    JoJo

    Hi Sirisha,
    The solution depends on the exact issue you are facing.
    The CRM Sales Order is created OK, but you only see the error when you open the Sales Order?
    If this is the case, then you can follow the steps below:
    1. Find the Message ID and Message No for the error message
    2. Use Program - CRM_MESSAGES_DELETE to delete error messages from the error producing Sales Orders.
    Let me know if this is not the issue you are facing.
    Regards,
    Nelson

  • Message no. 8I766 Number Ranges are not maintained For Extended Withholding

    Dear All,
    I am facing the following problem when i am trying to generate the withholding tax certificate
    1.) Message no. 8I766 Number Ranges are not maintained For Extended Withholding Tax 
         Number Ranges are not maintained for Business Place and Section. Check entries in tables J_1iewt_cert  (for Business Place) or J_1iewt_cert_n (for Section Code) and j_1iewt_certno  in EWT.
    I have checked all the above tables and found that the entries are maintained
    2) When i am trying for print priview and then print its generating spool request and the certificate is getting saved -
    > here the following problems are faced
          A) . TDS Number is not coming
          B).Details Of the tax deductor ( Name , Adress , TDS Circle , TAN & PAN is not coming Where       to update these details
          C) In Amount Paid / Credited Column - Some fixed amount is comming irrespective of the actual amount credited
    Please help me in soving the above issues
    Thanks & Regards
    Arun.R

    Hi
    You need to maintain Section Code wise number range . Go to Sm30 Select Table J_1IEWT_CERT_N and maintain it.
    Thanks
    GG

  • Excise invoice number ranges

    Hi
    I want to define number ranges for particular sales document type. Am aware we can do it through Tcode SNRO. But pls guide me step wise what field to  selct from drop down .
    /BEV1/EMLG     Empties Update Sequence Number
    /BEV3/CHAB     Number Range for Settlement Runs
    /BEV3/CHBK     Number Range for Purchase Control Results
    /BEV3/CHBU     Number Range for Posting Document
    /BEV3/CHEG     Number Range for Supplementary Documents
    /BEV3/CHEV     Sequence Number of BTEs Used in Contract Handling
    /BEV3/CHLE     Sequence Number of Amount when Entering External Amount
    /BEV3/CHOB     Number Range for Objects in the Beverage Industry
    /BEV3/CHSO     CH Assortment Number
    /BEV3/CHVA     Number Ranges for Contract Statement
    /BEV3/CHVD     Contract Handling Document Number
    /DSD/FSR     DSD: Run Number of Final Settlement
    /DSD/ME_CO     Number Range Cockpit
    /DSD/ME_CP     Customizing Cockpit
    /DSD/ME_KY     DSD Mobile Key
    /DSD/PR_NR     Number Range for MDSD Promotion Numbers
    Regards
    Suvin

    hi,
    In SNRO , Give object type RV_BELEG. In that you maintan your number range.
    swapnil

  • Objects related to SD for excise invoice number range

    Dear gurus,
    Kindly provide the objects related to excise invoice number range  for SD module to be updated for  new financial year.
    [ for ex. j_1excloc ]
    Regards
    R.Rajendran

    provide the objects related to excise invoice number range for SD
    Following objects should be maintained in SNUM
    J_1IARE1:::::::ARE1 Doc No object based on Series Group
    J_1IARE3:::::::ARE3 Doc No object based on Series Group
    J_1IDEPINV:::::Excise Invoice Number for Depot Invoices
    J_1IEXCEXP:::::Export excise invoice number range
    J_1IEXCINV:::::Excise invoice number
    J_1IEXCLOC:::::Local excise invoice numebr range
    J_1IEXINEX:::::Excise invoice number for export
    J_1IINTPR2:::::Despatch serial number
    thanks
    G. Lakshmipathi

  • Same number range for two different series groups?

    Dear all,
    There are two scenarios
    1.Normal export under bond case, series group is 20 and number range maintained,running number is 300016
    2.Another scenario,where ARE1 document generation for Deemed exp customer(already customised) , series group is 30.
    But, client requirement is , for this second scenario also, system should pickup running number range of series group 20(under bond case)  as per excise legal requirement
    Ie running number is for series group 20 is 300016
    For the above deemed exp case (second scenario)it should pickup 300017
    And again when they do under bond case(first scenario), it should pick up 300018 like that
    Is it possible to maintain the same number range for two different series groups(20 and 30)?
    Even if you maintain the same number range for 30, as per running number range of 20
    Will the system update simultaneously the same number range for 20 and 30 series groups?
    Please suggest the way.

    With two different series groups, it is not possible to have the same number range. Even if you maintain it, they will be treated independently.
    Normally, you should not use different series groups if the same number range has to be used. In fact, the concept of series group has been developed to ensure that number ranges can be maintained separately.
    Regards,
    Aroop

Maybe you are looking for

  • How to use column with linkToItem in the Basic Table view style mode

    Hi I have already changed a normal column that I made to a column with linkToItem as follows. <viewfields> <FieldRef Name="MyColumn" linkToItem="TRUE"> and it worked. But this column works only at the default view style mode in my case. Does anyone k

  • FW800 and Airport conflicting

    I posted this at the end of a thread started a few months ago and got nothing. So here's a second try at getting some help. Bottom line: FW800 and Airport don't like each other on my 24-inch iMac. I tried a WD MyBook Pro 500GB external drive and the

  • BlackBerry Protect - too many active devices error

    Hi guys, I've been doing one-to-one exchanges with my service provider due to hardware issues. Each time I get a new handset, i activate it with my BB Protect but now there's this error coming out and I've deleted the devices from the BlackBerry Prot

  • Face Recognition Problem in PSE 12

    I am having a problem with face recognition with PSE 12/Windows 8.1. It is a new install, at first all went well. I could enter names and they were immediately accepted. As faces repeated recognition was working and I could click the green arrow and

  • Itunes could not synced with my iphone

    I don't know what's happened, the itunes gave the following error message : " itunes COULD NOT SYNC CONTACTS(CALENDAR) TO IPHONE BECAUSE THE SYNC SERVER FAILED TO SYNC TO PHONE" i cant sync my iphone with my outlook 2007 cause of that. thanks.