Number range userexit same type of PR but  for different Plant

I would like to have the same type of PR but  for different Plant, I would like to have different Number range.
The exit  MM06E003 M06B0003 Mo=06B0004  not work for ME51N.
Any other  exits help for this

HI
Put this code in  EXIT_SAPLMEREQ_009
DATA pr_header TYPE mereq_header.
DATA pr_items  TYPE mmpur_requisition_items.
DATA pr_item   TYPE mmpur_requisition_item.
DATA: l_item   TYPE mereq_item.
DATA: l_zmm_numrange    TYPE zmm_numrange.
MOVE-CORRESPONDING eban TO l_item.
CALL METHOD im_req_header->get_items
  RECEIVING
    re_items = pr_items.
READ TABLE pr_items INTO pr_item INDEX 1.
CALL METHOD pr_item-item->get_data
  RECEIVING
    re_data = l_item.
CHECK l_item-werks = '6301'.
CALL METHOD im_req_header->get_data
  RECEIVING
    re_data = pr_header.
SELECT SINGLE * INTO l_zmm_numrange
   FROM zmm_numrange
   WHERE  werks EQ l_item-werks
     AND doc_type EQ 'PR'
     AND bsart EQ pr_header-bsart.
IF sy-subrc EQ 0.
  ex_range   =  l_zmm_numrange-numki.
ENDIF.

Similar Messages

  • Guide in configuring number range by billing type in SD

    Hi gurus,
    Hope you can assist me in configuring number ranges by billing type (e.g. F2, G2, L2, etc) in SD.  Our Accounting people find it hard to account the completeness of the transactions because we are only using one range for the RV (SD docs).  We would like to setup a separate series per billing type.
    Your immedaite assistance is highly appreciated.
    Frances

    Dear Frances,
    1st Part
    Go to, T. Code: SNRO
    Insert, Object: RV_Beleg
    and Click Tab: Number ranges (just above the Field: Object)
    On to next screen, Click Tab: Intervals (with pencil-icon)
    Here, maintain your Number ranges, that you wanna assign to your Billing Doc. Types, i.e. F2, G2, L2 etc..
    2nd Part
    Go to, T. Code: SM30
    Insert, Table/View:
    and click Tab: Maintan (down, at screen)
    On to next screen, maintain entries as:
    Sales Org + Dist. Chnl + Sales Doc. Type (i.e. Billing Doc.) + IntNR (as maintained in 1st Step)
    Best Regards,
    Amit

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Different Production order number ranges with same order type

    Dear Friends,
    I am working on live project implementation.I am having four manufacturing plants.I am having one order type say PPLE, I am having two different versions say CM and CN.Now my requirement is can I maintain  two different number ranges for same order types within single plant .
    number ranges should be like,
    Plant          Version     Number ranges
    1210            CM           CM121008...
    1210            CN            CN121008
    1220            CM           CM121008
    1220             CN           CN121008
    and so on.here first two digit should be version,then plant and year followed by order number .
    Regards,
    Manoj Jadhav

    Hi manoj,
    You cant have two different number ranges for an order type in internal number range, but in external number range you can have two diffrent number ranges
    for example for one order you can start with CM1210080001 and other starting from CN1210080001.
    Just convince the client to have external number range
    Regards,
    Srini

  • Assign number range to Doc type

    Hi
    I have created a  new doc type - i am not sure for which co code business has to assign it... how can i create a new number rnage without co code specification... I know i can assign new no range thru OBA7, but let me know where to create it without co code specification
    Thnx in adv

    Hi,
    If I understand you correctly, you want to create one number range for a document type that can be used by all company codes. Eg Doc Type ZA created. Number range assigned is 10000  to 20000. You want all company codes (1000, 2000, 9000 - 3 company codes in  your system )to use the same number range.
    Here is my question
    1. When a document is created (irrespective of companycode), system should pick the next document number. Eg co.code 1000 creates document number 10351, then if a document is created in co code 2000, system should pick 10352 as document number. Am I correct?
    These type of continous numbering is not possible for FI postings, but they are possible for Material documents, CO documents.
    I am thinking of a different way to get this. Create all these document number range in each company code and make them as externally assigned. Then while saving a document, based on some abap coding that you write, pick the last number used in all company codes and populate the next document number to save.
    Hope this is what you want.
    Bye
    Vijay

  • Number Ranges In Order Type

    Hi All,
    I created a order type copying an existing one  with a object class of overhead costs assigning a number range. When i transport it in to production the number range has not been assigned. After that i deleted the created order type and re created it manuall. Same problem occuring. Plz advice why this is happening and suggest me an answer.
    Thanks,
    Ama

    No. Ranges alwas you can create in the repective clients as these are not transportable properly.
    So, please go to KOT2_OPA
    select your order type and double click it
    Click on change intervals button and assign the number ranges.
    If you want to create a new number range, please go to KONK
    Click on maintain groups
    inside Interval --maintain.
    assign this no. range to your order type, if you want.
    Rgds
    Murali. N

  • Assignment of number range to order type

    Hi all,
    Please help me out of this. How can i assign number range to the order type?
    Regards
    Kaisar

    Co82 let us say order number range maintenance
    let us say you have created a new order type and you want to assign a new number range
    In CO82..
    Menu path  Group -->maintain
    In maintain number range group screen,
    Group --> insert
    Give text and from number and to number 
    say text = new order
    range - 100000000000 to 199999999999 (tick ext check box if the range is external number range-manual input)
    click on +
    You can see your group at the end of list
    In Not assigned group your new order type will be present
    Place the curser on that order type and fallow the menu path as below
    Edit -->select element
    Select NEW order number range group check box
    edit --> assign element group.
    Now the number range is assigned to the new order. Save it, You will get a pop up, just ignore it.
    I hope it will help you

  • Number range of  accounting document for different plants

    whenever a billing document is created in SD (using the T-code VF01); an accounting document will be simultaneously created in the FI module. one document type(TS,number range---60:1 to 9999 ) have four  plants .different plants have own number range and sequential document number .
    eg: doc. type   num.range    fr       to           plant cty       co code
             TS           61            1        1000       PLANT_1      3100
                            62           1001    2000       PLANT_2      3100
                            63           2001    3000       PLANT_3      3100
                            64           3001    4000       PLANT_4      3100
    How can that carry out this function ?
    thank you for your help !

    Hi leung,
      As Mr.Rohit has mentioned it has to be done with the z table and the available user exit.
    Wht we have done is.we have created no ranges in obj rv_beleg.Eg
    AA   0000000001 to 0000099999
    AB   0000100000 to 0000199999
    AC   0000200000 to 0000 299999.
    Using the user exit we have created a Z table.And assignd for this ombination in the Ztable.
    Plant X   Billing type A   AA
    Plant Y   Billing Type A  AB
    Plant Z    Billing type A  AC
    Once this combination matches the appropriate invoice no range gets picked up.
    Regards,
    K.Vivek

  • Different execution plan for same query but for different condition value

    Hi All,
    I'm facing a strange situation where same query for different condition not working.
    1--
    Select  top 10 * from revenuefact(nolock) 
    where feecode ='OW4'
    2--
    Select  top 10 * from revenuefact(nolock)
    where feecode ='BTE'
    1st query is returning result easily but 2nd query is taking too long. Column
    feecode has already Non-clustered index and Clustered index is also available for another col RevenueSID.
    I was surprised when checked the query execution plan for both the above queries  which is quite different (as per attached below). Can anyone suggest me the reason behind it.
    And solution for the same. One more thing that data for feecode BTE is inserting through different source instead of others feecode and table contains more than 300 million rows.

    When I speak with people inside Microsoft who work with the optimizer, the refuse to accept the work "bug" when a query produces the correct result, but with a suboptimal plan. They prefer to use the word "limitation".
    The limitation here is that when the optimizer compares two plans, it only looks at the estimated cost. As far as I know, it does not perform any analysis from the perspective "what if the statistics are wrong"? They do provide the hint OPTIMIZE
    FOR UNKNOWN, but that does not work then there is a constant as in this case.
    The optimizer will surely distinguish between TOP 10 and TOP 10000000. With the latter, you have all reason to expect a Clustered Index Scan no matter which value you search for - unless you pick a value for which the histogram indicates that there are no
    rows.
    Interesting enough, I was able to reproduce the situation in my Northgale database, which is an inflated version of Northwind, and where statistics should be accurate.
    SELECT TOP 10 * FROM Orders WHERE EmployeeID = 8
    results in a CI scan, and so does also EmployeeID = 7, and even 5. There are only 2292 rows out of a total of 344305 rows. If I try EmployeeID 808 for which there are 1797, the optimizer goes for the index seek.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Condition type to block pricing for particular plants

    Dear All,
    We have one Sales Organisation under which 40 plants are there. I want to block a condition type for 10 plants. Please suggest me what are the different alternatives to do that?

    Dear Suresh,
    As your Condition Type is used in almost 30 plants mean it would be determined by Condition Access.
    Now as you know a Access Sequence would be assigned to the Condition Type & subsequently Condition Tables are assigned to Assequence Seq, to search for Condition Records.
    Now include Plant as one of the search strategy in your Access Sequence / Condition Tables. Then maintain Condition Records for 30 plants in which you require this Condition Type.
    For rest of the 10 plants as there is no Condition Record, the Condition Type would be be determined for these Plants.
    Hope this helps...
    Thanks,
    Jignesh Mehta

  • Invoice Split for same customer but for different output types

    Hi Gurus,
    I have a requirement from the customers. A new output type has to be created with reference to the old type and for this output type a new driver program and SAP script was created with reference to the old one.They wants  invoice split to be happened based on item level PO number. That was done successfully.
    This invoice split logic  was written in the billing routine  RV60C901(Customized).
    But now they came back with a issue that the invoice split  should be done  only if they use the new output  type but not for the old one. That means for the same customer for one output type invoice split should be done based on item level po number and for one output type it should not. How can this be controlled for a particular
    output type?
    This output types will not be used in the billing routine as the split happens at the sales order level. Is there any configuration that allows split for a particular output type.
    Please suggest me how to proceed???

    Hi,
    In the invoice split routine check if it is possible to find the output type making use of field symbols.
    Just check in debug if the variable for output type is available as follows:-
    (Program Name)variable name.
    Regads,
    Ankur Parab

  • My iPod lists same artist several times but with different tunes.

    I tried everything including changing names for all entries and sorting but in vain. Anybody know the solution ?

    Try right clicking on the name of the messed up song in you iTunes. Click "Get info." Change the "Album Artist" name to the same name as the "Artist" or to whatever you desire. Then, resync your iPod and the problem should be fiexed.

  • HT201272 Why can't I download my already bought music from iTunes to my phone when it is the same apple I'd but a different device

    I bought my music on iTunes and downloaded it with my other iPod. I know how a phone and when I download the music from the already purchased area it states that I can't download it anymore because I have I wait 90 days to download

    Was that new device used with a different AppleID recently?
    iTunes Store: Associating a device or computer to your Apple ID - http://support.apple.com/kb/HT4627 -  In connection with, "When you turn on iTunes Match or Automatic Downloads, or when you download past purchases on an iOS device or computer, that device or computer becomes associated with your Apple ID." "Your Apple ID can have up to 10 devices and computers (combined) associated with it. Each computer must also be authorized using the same Apple ID. Once a device or computer is associated with your Apple ID, you cannot associate that device or computer with another Apple ID for 90 days." - Additionally instructions for "Removing an associated device or computer from an Apple ID"

  • Make Condition exclusion type to be active for different condition records

    Hi
    We are currently using three condition types in the pricing procedure.
    Say for eg. YWBP- F Charges, YADJ -C charges and YHDG-Handling fee
    We have set condition exclusion for the combination of YWBP and YHDG and
    YADJ and YHDG.
    YHDG condition type has two condition records.. say for eg. 512 and 596.
    The materials defined for 512 condition records is YAU and YAX and for 596 is YAV.
    Now my question is that whenever condition types YADJ  gets picked up fo  YAU, YAX  and YAV then condition type YHDG shouldnot get picked up. (The above condition exclusion group will perfectly caters to this requirement.) but now the cache is the business has a requirement that
    When ever condition type YWBP gets picked up for the material 'YAV', then the condition type 'YHDG'  (with 596 table condition records) should also get pick up in the sales order.
    Is there any way to achieve this with current settings of condition exclusion indicator.
    Thanks in advance.

    Hello Vicky
    Not knowing the relationship between ZCPD and ZDUT, it is hard to answer your question.  I am not sure how ZDUT is affected by ZCPD.
    By your  description, there is a requirement in the pricing procedure that is setting the exclusion indicator to X for ZCPD under certain conditions. May be that is not a right solution for your situation.
    I would suggest using condition exclusion groups and then assigning condition exclusion group to the pricing procedure to meet your requirement. Let ZCPD be in  group 1, all other conditions that you want excluded when ZCPD is present  ( but not ZDUT) in group 2. Then use the exclusive option while assigning to the pricing procedure.
    All these config steps can be found here:
    SPRO/IMG/Sales and Distribution/Basic Functions/Pricing/Condition Exclusion/Condition Exclusion For Groups Of Conditions
    Link: http://help.sap.com/erp2005_ehp_04/helpdata/EN/93/7432eb546011d1a7020000e829fd11/frameset.htm
    Hope this helps.

  • Same JSF page being shown for different command links

    Hi
    I have two command links and as per navigation-rules, both of them go to the same page "Common.jsp" which has a <jsp:include> to include another file which is gets from session.
    Each command link specifies its own JSP page to be included (in common.jsp) and adds them to the sesion.
    After selecting one command link the desired page is showing up fine...
    However if I come back and select the second command_link, it shows the same page again.
    It does not even go to the action_listener of the second command_link.
    Is there any way to force it go to the actionlistener of the command_link where I can specify a different page in the session... ?
    Thanks

    Hi
    I have two command links and as per navigation-rules,
    both of them go to the same page "Common.jsp" which
    has a <jsp:include> to include another file which is
    gets from session.
    Each command link specifies its own JSP page to be
    included (in common.jsp) and adds them to the sesion.
    After selecting one command link the desired page is
    showing up fine...
    However if I come back and select the second
    command_link, it shows the same page again.
    It does not even go to the action_listener of the
    second command_link.
    Is there any way to force it go to the actionlistener
    of the command_link where I can specify a different
    page in the session... ?
    What do you mean by "specify a different page in the session"? An <h:command_link> always goes back to the page it was originally rendered from, and expects the action invoked by the command to determine where to go next. If you really want to go to different pages, you should either make the action method return different results (i.e. trigger different navigation rules) or consider using <h:output_link> instead, where you can define the destination URL yourself.
    Craig McClanahan
    Thanks

Maybe you are looking for

  • Moving an iTunes library from PC to Mac

    Hi I'm trying to move an iTunes library from a PC to a Mac and failing miserably. Have tried various methods from the internet, but none seem to work. I've consolidated the PC library, copied the files to an external hard drive, but it's the last par

  • Intercompany reconciliation by business area (ICR)

    Dears, Our consolidation process is based on business areas (one reporting entity in our consolidation tool corresponds to one business area in SAP). Our target is to adapt SAP ICR to this configuration : currently,  in transaction FBICS3, SAP is ret

  • Show files in browser with JSF

    Hi, I'm trying to show several kinds of files in browser, but I still haven't been successful in it, it only show the binarys in browser. This my portion of code where I'm working it. In the example I'm trying too show a pdf's file but it could be, j

  • How to hide parameters values from address way?

    Hello! I have a servlet with a simple Authorization Form. I want to send the inputted values of login and password to the second servlet and I want to go to that second servlet. I see the inputted values of login and password in the address way of th

  • Opening jpg and pdf with Adobe?

    I have installed Adobe Reader X, Air and Acrobat but since then the pdfs no longer open automatically and I dont know how to get the to do so. While trying to fix it, I mistakenly confirmed an "open with" for jpgs also with Adobe. And now I cant open