Define range for a parameter with reference to Login USER in selection

Hello Experts,
I have a selection screen where in I can enter a customer number (defined as parameter). I need to restrict entries depending up on the user who has loged in.
Ex: User1 customer number range 1000 to 3000
      User2 customer number range 5000 to 10000
How to achive that?
Thanks in advance,
Sandhya.

REPORT  ZSRK_064 MESSAGE-ID ZMSG.
PARAMETERS : P_KUNNR LIKE KNA1-KUNNR.
DATA : WA_USR01 LIKE USR01,
       L_MSGTXT(100).
RANGES : R_KUNNR FOR KNA1-KUNNR.
INITIALIZATION.
  IF SY-UNAME EQ 'SAPUSER'.
    R_KUNNR-SIGN = 'I'.
    R_KUNNR-OPTION = 'BT'.
    R_KUNNR-LOW = '0000001000'.
    R_KUNNR-HIGH = '0000003000'.
    APPEND R_KUNNR.
  ELSEIF SY-UNAME EQ 'KSREDDY'.
    R_KUNNR-SIGN = 'I'.
    R_KUNNR-OPTION = 'BT'.
    R_KUNNR-LOW = '0000005000'.
    R_KUNNR-HIGH = '0000010000'.
    APPEND R_KUNNR.
  ENDIF.
AT SELECTION-SCREEN ON P_KUNNR.
  IF NOT P_KUNNR IN R_KUNNR.
    CONCATENATE 'Customer No not in range' R_KUNNR-LOW 'and' R_KUNNR-HIGH INTO L_MSGTXT
    SEPARATED BY SPACE.
    MESSAGE E999 WITH L_MSGTXT.
  ENDIF.

Similar Messages

  • How to define ranges for a keyfigure

    Hi Frnds,
    I have two keyfigures for employee experience. One for present company experience and the second for previouse experience. And I have created a calculated keyfigure for calculating the total employee experience by adding the those two keyfigures.
    Here I want to design a query using the range values for that calculated keyfiger values. And for that range i want to display count i.e the no. of employees.
    for eg:
    range   | TotalYrsof exp
    <1       |  10
    1-2      |  20
    3-5      |  30
    6-10    |   40
    So anybody pls help me in this problem.
    Here How can I define ranges for that calculated keyfigure?
    Is there any other way to define ranges?
    Thanks in advance,
    Sridhar

    Hi,
    Create a Cal.Keyfigure on Total Exp. and use that for another cal keyfigure
    Example for  <1
    Total Exp <1
    for 1-2
    Total Exp >=1 AND Total Exp <=2
    for 3-5
    Total Exp >=3 AND Total Exp <=5
    and so on...
    Thanks,

  • Pricing procedure determination for complaint document with reference to billing

    Hello Guys,
    I am configuring complaint process for project purpose and I got stuck. I need to change the pricing procedure which is determined for complaint
    document . Right now the pricing procedure is copied from Billing Document for which complaint refers to.
    I am searching a place in configuration where I could change the pricing procedure determination for complaint document with reference to billing doc.
    Could you please advise where I can find it ?
    Thank you in advance!
    Br,
    Frederic

    Hello Frederic,
    I would check the following in SPRO:
    - CRM
    - Basic Functions
    - Pricing
    - Pricing in the Business Transaction
    - Determine Pricing Procedures
    Here the pricing procedure depends on sales organization, division, distribution channel, document pricing procedure and and customer pricing procdure.
    Best regards,
    Thomas Wagner

  • Error message display for PO creation with reference to internal orders

    Sir,
    While creating PO with Tcode ME21N (item category I) with reference to ' Internal Order with Funds provided (Tcode KO12), system displaying error message  when Budget is exceeded.
    But when Funds provision is not mentioned (Funds value is initial in KO12) , error message is not being given by the system during Po creation with ME21N.
    Where should I configure in img(Tcode SPRO) , so that system will throw error mesage while creating PO without Budget Provision (Funds not mentioned ) in Internal Orders.
    Regards,
    Srinivasa Murthy

    Hi Anupam,
    The error message display as follows. (when the PO Price exceeds the Planned Funds kept for internal order)
    This error comes during PO creation Process and PO can not be saved. This error message display is correct.
    Item 001 Order 600643 budget exceeded
    Message no. BP604
    Diagnosis
    In document item 001 Order 600643, budget  for fiscal year 2009 was exceeded by 99,960,000.00 INR.
    But  my question is 'when funds have not at all been mentioned for the internal order' then system has to throw the same error as mentioned above. But it is not happening. System is allowing the PO to save which is not correct.
    Regards,
    Srinivasa Murthy

  • Exit for PO creation with reference to PR

    Hi all,
    Is there any exit/BADI which can throw an error message if a PO is being created against a PR which had no release strategy associated with it? Basically I have to prevent creation of PO if a PR has been created such that no release strategy is applicable on it.
    Thanks

    Hi Javed,
    Try User Exit MM06E005,
    Implement EXIT_SAPMM06E_012,
    PR number is passed in field TEKPO-BANFN.
    Also you go through this thread,
    Re: PO with reference to PR
    Here you will find the solution for generating an error message
    while creating PO against PR.
    Reward points if useful.
    Cheers,
    Swamy Kunche

  • BAPI / FM for Order Create with Reference

    Hi experts,
    I looking for a BAPI or any FM that can be used to create sales orders with reference. I want to create ORders with reference to other orders.
    I've tried BAPI_SALESORDER_CREATEFROMDAT1 and 2. These doesn;t work for referencing Order. Any ideas....
    Thanks a LOT
    Ron

    Hi,
    Here is list of all bapi for sales order.
    BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
    BAPI_ORDER_CHANGE_STATUS_GET Change status for order
    BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
    BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
    BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
    BAPI_SALESORDER_GETSTATUS Sales order: Display status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    BAPI_XSI_GET_VTRK_G Tracking info
    Pls reward helpful points.
    Regards,
    Ameet

  • Bapi for PO creation with reference to Purchase Requisition - PReq

    Can any one let me know if there is any BAPI to Create PO with reference to PReq. I know we can easily write a BDC for ME21 but... is there a similar functionality via BAPI's ?

    Try
    BAPI_PO_CREATE1
    check its documentation in SE37 for detail documentation..
    Enjoy SAP.
    Pankaj Singh

  • Report for gl accounts with reference to purchase order

    hi
    experts
    Is there any report which can give the gl accounts with reference to purchase order
    thnx

    Use t code ME2N and click 'Account Assignment" from application tool bar or press Shift + F12 to view PO with GL code. If GL code is not showing select from the layout.
    Rgds,
    Vijay

  • Order - create with reference - more information in Item selection ??

    Hi all:
      We are using "Copy control " from Quotation to Sales order..., it works OK.
      But we are facing a problem now... The user used to copy all Quotation as 1 SO and now they need to choose the specific items.
      So, they using  VA01 -> Create with reference -> Item selection ->  "Then Choose items"
       But the screen only has information about  "Item/Material No./Material description and Open quantiry"... not enought for user, they need more info like Plant, batch ... to choose the item....  any setting can make it??
      I have tried "Table setting" and IMG but found nothing !!
      I know we can copy all first and remove it, but is there any way we can choose them from "Item selection"...
      Thanks..

    Hi Amit
    Thanks your answer and which enhancement do you recommand ??
    if there is "easy" enhancement can do it, we might do it otherwise we will use "Copying requirements" only...
    Thanks again

  • For a PO with item catagory S user exit was not triggering

    HI SDN,
    I wrote a code for invoicing plan in EXIT_SAPLMRMP_001 for block the payment with INVOICE VERIFICATION block .
    it is working fine for a PO with item catagory Blank
    and not working for item catagory S.
    please suggest me is there any solution for this?

    y

  • Bdc for invoice parking with reference(FB60)

    Hi all,
    I am Developing a <b>RFC</b> within that i have written <b>bdc</b> code for <b>invoice parking with refernce</b> on <b>fb60 tcode</b> as there is no standard function module for this . But i am stuck in one place after parking the document it gives one<b> document number</b> in the message bar which will be further useful for posting  .
    how to catch that document number in the bdc and return it in the export parameter of trhe RFC.
    Maximum points will be allocted for any useful answer..
    thanks in advance

    You can do something like below after your call transaction to get the document number.
    do 10 times.
            wait up to 5 seconds.
            select single * from bkpf
               where belnr = belnr
                 and bukrs = bukrs
                 and gjahr = gjahr.
            subrc = sy-subrc.
            if subrc = 0.
              exit.
            endif.
    enddo.

  • External Number range for Production Order with additional logic

    Hi gurus,
    My requirement is -
    I have two products - for my Local and Export
    I have made two Order type for local and Export - say LOCL and EXPO
    My LOCL order no will start with L and EXPO with E
    I can do this with external number range set for each order type..
    Now my question is -
    My client wants Production Order in this fashion -
    L20111------
    L is local, 2011 is year, 1 is jan (1 to 9 - Jan to Sept, A - Oct, B- Nov, C - Dec) followed by a serial number
    How can we address this in SAP?
    Any clues?
    Thanks for your suggestion in advance.
    Regards,
    Srinivas

    Hai,
    You need to use User exit for this.  kindly contact your ABAP team.

  • Creating View for an extractor with reference field

    Hi All,
             Here is my requirement.
    I need to create a DB view for an extractor. I need to join 3 tables : AUFK,AFIK & AFKO.
    Table Join Conditions:
    AUFK     MANDT     =     AFIH     MANDT
    AUFK     MANDT     =     AFKO     MANDT
    AUFK     AUFNR     =     AFIH     AUFNR
    AUFK     AUFNR     =     AFKO     AUFNR
    This AUFK table has a Z field ZZACCOMPLISH(QUAN field) and it it referning to MARA-MEINS.
    I created  view  successfully with all fileds including ZZACCOMPLISH.
    But when i give the view name in RSO2, i am getting an error message that 'ZZACCOMPLISH' is refering to some other table.
    In this case i don't know how to include MEINS in ths view and There is no link between table AUFK and MARA.
    Please guide me on this.
    Regards,
    Ashok

    Could you please share how this was resolved?
    I currently have the same requirement/issue.
    Many Thanks,

  • Multiple sales price for a FG with reference to another FG

    Hi All,
    In the following scenario,we need a solution in sales pricing.
    FG Materials: A, B, C
    price of A is X when sold independently.
    price of A is Y when sold along with B in a sales order
    price of A is Z when sold along with C in a sales order
    How do you maintain pricing in the above scenario, and how it is determined is sales order?
    Pl give your suggestions if you have come across above similar situation.
    Thanks in advance.
    Regards
    Prabhu

    Hi Radha Krishna,
    If i understood correctly
    1) price of A is X when sold independently. in this case one material
    2) price of A is Y when sold along with B in a sales order in this case 2 materials A& B
    3) price of A is Z when sold along with C in a sales order in this case 2 materials A & C
    If this is the scenario, why don't you go for Higher Level BOM for 2nd ad 3rd cases.
    In first case you can maintain price for A material independently
    in 2nd, 3rd cases maintain price for BOM item ( HHHH, LLLL) by combination of A & B ( Create New material with HRH component material as A & B, (LLLL - A & C) ]
    I hope your issue may resolve... Pl revert if you have any query other wise if i understand wrongly...
    Regards,
    Duran Samna
    Edited by: Durgaprasadsana on Apr 13, 2010 9:27 AM
    Edited by: Durgaprasadsana on Apr 13, 2010 9:28 AM

  • BAPI for invoice creation with reference SalesOrder

    hi Mr Anjireddy,
    i am able to create invoice with the bapi BAPI_BILLING_CREATEMULTIPLE, here i'm giving the RefDocNo of the SalesOrder, the invoice is generated but i'm not gettting the NetValue, TaxValue.
    plz give the information for that prob,
    eswar

    Hi Vinod,
    This is just idea.
    Get Purchase Requisition details using
    <b>BAPI_REQUISITION_GETDETAIL</b> and then use <b>BAPI_PO_CREATE1</b>. I think there is no Direct BAPI.
    *******Poorna*********

Maybe you are looking for

  • Picture not showing in "Get Info" for Podcast

    I've just created a podcast and uploaded it. The audio works just fine, but for some reason the image that I want to associate with the file doesn't show up in "Get Info". Anyone know what may be causing this? The .xml for the podcast follows: <?xml

  • How can I get iTunes 10.7 to recognize the already existing library .itl fle?

    I had to downgrade from iTunes 11 to 10.7 because v 11 could no longer sync my iPod Classic.  I uninstalled iTunes 11, reinstalled iTunes 10.7 and used the lastest .itl file from the Previous iTunes Libraries directory that was used in v10.7.  After

  • My iCloud email seems to link to both my account and someone else's. Has anyone else had this?

    I wanted to start using my icloud email but when i opened it I had the email from apple saying @icloud was reserved for me and another email which from what I can see was sent to someone elses email account ending in @me.com. Drove myself mad with th

  • DAG and availability issues

    Hi All, I'm new to all this Exchange stuff - I am currently experiencing an issue with DAG availability and receiving external emails - I think these two issues may be related somehow. First off, let me give some background. The site has a DC, Exchan

  • Problem in Edit Message Payload in AE

    Hi all, actually we have a problem with editing the message payload of a failed message in the adapter engine. Messages Editor shows "The version you want to edit is locked" Log in NWA shows "EditorDynPage: loadMessage() Thrown: com.sap.aii.mdt.api.e