Query on ME21N transaction Exits?

Hi Experts,
       My requirement is when the user enters into transaction me21n and create the purchase order.
   For example There are two users User1 and User2.
            For User1 having the purchase group PGR1 and in this PGR1, suppose 5 materials are there namely 1,2,3,4,5.
           For User2 having the purchase group PGR2 and in this PGR2, suppose 5 materials are there namely a,b,c,d,e.
    If User1 logs into the system and enter the transaction ME21n. There he give the Purchase Group PGR1. For this group only the materials entered. Other Purchase group materials are not aloowed.
        Please guide me how to do this requiremnts.
I thougt we can do this requirments by using BADIs or EXITs.
But i dont how to do that.  Please guide me how to do.
            Thanks in Advance
Thanks and Regards
Siri......

Hi it is restricted in the Purchase Group level.But my requiremnt is, It does nt alowes the other Ourchase group materials
        But it aloowing ..
How to do
Please guide me...

Similar Messages

  • Grayout of  component screen  fields in ME21N transaction

    Hi experts,
       I have a problem while creating subcontracting PO i want to gray out the fields of component screen...in ME21N transaction...is it possible through the screen varient or else should i go for exit  ??...could u please help me in finding  the right procedure...........
    Best Regards,
    shanker

    Go to the screen where u want to make the changes.
    Click on System -> Status. Double click on the screen Number (like 1121).
    Then on the PBO module screen click on 'Layout'. You will go to graphical screen painter.
    Then DOUBLE CLICK on the column/field you want to gray out and on Attribute part, Program Input -> Not possible .(save + activate)
    You will need an Access Key to change the standard SAP Screen...
    Fawaz

  • Item level Info record PO text field in Purchase Order Me21n transaction

    Hello All,
    I have to enter some information in the PO info record text field (which is in Item level Texts tab of ME21n transaction ) using an user-exit at the time of creation/change of purchase Order.
    Does anyone knows the user-exit and how to update the text field ?
    Any help is really appreciated
    Thanks
    Ricky

    Check with : Enhancement : MM06E005
    Function module : EXIT_SAPMM06E_017
    This user exit will trigger when you enter the data in item level(Both creation and change)

  • RSCRM: Query date with customer exit variable

    Hi All,
    Is there any way to run the RSCRM transaction with a query with a customer exit variable for a date characteristic?
    The issue is that the query ran ok but the variable is not being updated when the RSCRM query is running with a background job or a process chain.
    Thanks in advance
    EV

    I do not think you can select Customer Exit variable, if you see the type is selected to Char Value Variables and it is not editable.
    It would be suggested to go for Customer Exit procesing type for your text variable.
    Cheers,
    Neel.

  • Capture error messages in message log in ME21n transaction

    Hello friends,
    i have a question here.I have created a Z-table which contain data about material groups which will not be used for the particular plant.when we create a PO now ,i am checking for each line item whether the material group entered for each line item exists in Z-table or not.If exists then throw a message 'XXXXXXXX.'
    as this is an enhancement to Me21n transaction , i am using User exit EXIT_SAPMM06E_012 .Now my problem is for each line item i am checking for condition and throwing a message.My requirement is show up all messages(for eg : If more than 1 line item contain errors for the same condition) in the message log of the transaction ME21n screen.I dont think we can do this in the User exit as showing up messages in ME21n is standard functionality
    Could anyone please give any idea how to achieve this??
    Thanks in advance!

    Hi,
    You may write to application error log or call screen to show error log in user exit.
    Cheers.
    ...Reward if useful.

  • Me21n User-Exit / BADI

    Hi all,
    Anybody knows an User-Exit / BADI to use when you click over SAVE icon on me21n transaction?
    I have a 4.6 version...
    Thanks!

    Dear Julian,
    First you would need to find all the available enhancements. The ABAPer would check what are all the enhancements getting triggered when save button is pressed in ME21N by putting break-points.
    Please check this sample program from other thread to find BADI and enhancement for a given transaction code. You just need to create a custom program in your system by cut and paste below codes.
    REPORT ZTEST.
    TABLES: TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA: JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA: FIELD1(30).
    DATA: V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS: P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA: WA_TADIR TYPE TADIR.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    ENDCASE.
    Alternatively, you can do the following:
    1. For what ever transaction u want the enhancement .. just check for the System-->status (menu) and find out the PROGRAM name....
    2. Double click on to the program name and go inside the program (Abap editor)
    3. Search for "Call Customer-function " ... and u'll get some search results .. If u get results then u have enhancement in that tcode .....
    4. Then it actually calls a Function module .... copy the Function module name .... go to SE80 (object navigator) click on "Repository Information system" then Customer Enhancements .... Give the Function module name in the "Components" field and click Execute ....
    ull get a list of Enhancements related to that Componene....
    5. Choose which ever enhancement will suit ur business need ..
    6. Go to CMOD... create a project .... assign ur enhancement ... and then code ur logic.... activate ur enhancement in CMOD ....... Ur Buisness need will be solved...
    For a user exit......
    Finding whether there is any User Exit or not for tcode VA42
    1. For what ever transaction u want the user exit .. just check for the System-->status (menu) and find out the PROGRAM name.... ( The program name would be for our scenario "SAPMV45A" )
    2. Double click on to the program name and go inside the program (Abap editor)
    3. Search for the word "USEREXIT" .... u ll find all the user exits in the search result .. and find ur's then ...
    Regards,
    Naveen.

  • User_Exit (Condition Class) for ME21N Transaction

    Hello Gurus !!.
    I need one User_Exit for the ME21N Transaction what
    is activate into the moment of Conditions Class input
    (tax), the idea is to take one value of one Z table, make
    one calculate betwen Z table Value and Condition Class tax
    whose result will be return to the Value of Condition.
    Thank Very Much for yours help.

    Hi,
    You can try any one of the user exit;
    MM06E005 - Customer fields in purchasing document
    MEQUERY1 - Enhancement to Document Overview ME21N/ME51N
    Bye,
    Muralidhara

  • Read the table row data and dispaly it in the ME21n transaction

    Hi All,
    i'm new to ABAP and OO ABAP .Please somebody help me out for my req. My req is , when i double click on the table row which is having PO details , then that data  should be displayed in the ME21n transaction. please some on tell me how to achive this using SALV class..
    thanks,
    Rajeev.

    Hi rajeev bikkani ,
    you can use the events 'Double_click' in alv. below given the code, try out.
    class lcl_list_event_handler definition.
    PUBLIC SECTION.
    methods on_double_click
          for event double_click of cl_gui_alv_grid
            importing e_row .
    endclass.
    class lcl_list_event_handler implementation.
    method on_double_click.
    call transaction 'ME21N'.
    ENDMETHOD.
    ENDCLASS.
    before executing the method SALV.
    write code    
      set handler obj2(reference for lcl_list_event_handler) ->on_double_click
                    for obj1(referenece for cl_gui_alv_grid).

  • Lsmw for me21n transaction

    Hi ,
    I had a problem while doing lsmw for me21n transaction. My problem is how to handle table control in that. can any one send some screen shots or link, how to do table control
    Thanks & Regards,
    sreehari
    Moderator Message: Search for available information on the web before posting
    Edited by: kishan P on Sep 3, 2010 9:51 AM

    Hi ,
    I had a problem while doing lsmw for me21n transaction. My problem is how to handle table control in that. can any one send some screen shots or link, how to do table control
    Thanks & Regards,
    sreehari
    Moderator Message: Search for available information on the web before posting
    Edited by: kishan P on Sep 3, 2010 9:51 AM

  • SAP Query in SQVI transaction

    Hi All,
    I have created a Query in SQVI transaction, How to assign a transaction code for it.
    Thanks in advance
    Raju

    hi,
    follow the link:
    http://help.sap.com/saphelp_erp2005/helpdata/en/b7/26ddebb1f311d295f40000e82de14a/frameset.htm
    you will get full information about SAP Query.
    There is no SQV1 transaction.
    SQ01 --> maintain query
    SQ02 --> maintain info set
    SQ03 --> maintain user groups
    he SAP Query application is used to create reports not already contained in the default. It has been designed for users with little or no knowledge of the SAP programming language ABAP.
    SAP Query offers users a broad range of ways to define reports and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    The SAP Query comprises five components: Queries, InfoSet Query, InfoSets, User Groups and Translation/Query.
    hope this may help you,
    regards,
    srinivas

  • ME21N User Exit to automatically display the print preview

    Hi All
    Does anyone know of way to invoke the Purchase Order Print Preview Option <u>automatically</u> once the user selects the save button as part of the ME21N transaction ?
    This is required so that the end user must perform a visual check on the PO just before the purchase order is saved.
    We are already the standard print preview button working in ME21N. 
    Thanks
    Donnacha

    Hi Donnacha!
    Pravat pinned out the main problem: when you want to display something before saving, then it's anything else but not the printout of the PO. The printout goes for the saved values - but you require a display before saving. So you have to develop a complete own display (which can be done of course).
    Regards,
    Christian

  • How do I...Mimic Replacement Path with Query using Customer Variable Exits?

    Hello SDN:
    We are on BW 3.5 SP16.
    We are currently using a replacement path Query(RP) with variables
    to populate a variable in another Query(T).
    The problem we are having is with performance.
    The entry of variables in replacement path Query(RP) is optional (This is necessary there cannot be required values)
    When results from Replacement Path Query are small performance is fine. (e.g. 10 seconds)
    When results from Replacement path query are large performance suffers. (e.g. 1+ minutes)
    Users are free to leave the replacement path variables empty resulting in a large set of data to be replaced. This is the worst performance case.
    We would like to discover a way to conditionally execute the replacement path query. That is if users do not enter values for the replacement Query(RP) variables do not execute the replacement path query(RP).
    Does anyone know if this is possible within reason and in customer exit space?
    We have reviewed the situation from all angles and the requirement for the replacement path FUNCTIONALITY and the freedom for the user to leave variable values blank remains.
    I've been searching and reading SDN and SAP notes for about a week and do not find threads which address this situation.
    We are also exploring Customer variable exits to mimic replacement path functionality
    (different topic subject="How do I...Mimic Replacement Path with Query using Customer Variable Exits?")
    Any help will be appreciated
    Many thanks
    David Schuh

    My appologies-I posted this message with the wrong subject. I will repost it with appropriate subject.
    dave schuh

  • JUMP (RSBBS) from a query on a transaction(local)

    Hi,
    Can You help me ?
    I want to do a jump from a query on a transaction RSDMD (on local system).But particullary, I want to put in parameter the data  (doc number) with wich I jumped.
    So How I have to define the assignement detail in RSBBS for the transaction RSDMD?
    Because, for the moment I have a popup where I must fill the name of my charactéristic and after the number of my doc number (for example), and it's with the doc number that I do my jump.
    But, I don't want to fill characteristic and doc number, I want that it's automaticaly...
    Thank you for your help...
    Carine.

    Calling the RRI with a transaction or an ABAP/4 Report as the receiver is done with the RRI
    from the SAP NetWeaver Application Server. This is possible in an ERP system, a CRM
    system or within the BI system. The selections are prepared by the BI system that does not
    recognize the transaction or the report. The assignment is transferred from the RRI of the
    SAP NetWeaver Application Server using inverse transformation rules. There must also be a
    complete chain from the DataSource of the source system to the InfoSource, through
    transformations up to the InfoProvider. This does not mean that data absolutely has to be
    loaded using this chain. If this chain does not exist, the RRI cannot transfer the selections to
    the source system. Calling the RRI only works for fields with dictionary reference. For ABAP reports, this means that the parameter has to be PARAMETERS param LIKE <table_field>
    For transactions, this means that the Dynpro has to have a dictionary reference. Not every
    transaction can be called with the RRI of the SAP Application Server.
    These are the steps to do this
    If you want to jump from a Web application to a transaction or ABAP/4 report using the
    RRI, an ITS for the target system has to be assigned beforehand.
    ● The value of the input field to be supplied must be known at the time of the jump (for
    example by entering a single value on the selection screen of the sender or by the
    cursor position at the time of the jump).
    ● Sender and receiver fields that correspond to one another generally must link to the
    same data element or at least to the same domain, otherwise the values cannot be
    assigned to one another.
    ● The assignment of sender and receiver fields must always be a 1:1 assignment. For
    example, the transactions called from the start screen cannot have two input fields of
    the same data type. Then it is not clear which of the fields is to be supplied, which
    means neither of them is supplied.
    ● There has to be a complete chain from the DataSource of the source system to the
    InfoSource, through update rules up to the target.
    Proceed as follows after you have created the sender-receiver assignment as described
    above.
    1. As the type, choose Table Field. The columns Field Name, Data Element, Domain and
    Set-/Get Parameter become input ready.
    2.  Specify the field name, data element, domain and parameter ID for the receiver
    transaction. You need to know this information because input help is not available. You
    can usually find the parameter ID in the ABAP dictionary entry for the data element.
    If this does not always make jumping to the transaction possible, it may be necessary to
    program a short ABAP start program. For more information on how to do this, see SAP Note
    number 383077

  • Problem in changing SAP query ME80FN  in transaction SQ01

    Hi,
    I  have added two new fields in list layout of the transaction ME80FN. When I execute this transaction it is executing ABAP QUERY REPORT ME80FN.
    I added two new fields in infoset SAPQUERY/ME80FN via transaction SQ02.
    Then trying to change the QUERY ME80FN via transaction in SQ01. It is saying locked by some user.
    Can any one help me how to resolve this what to be done.
    Thanks,
    JWala

    Hi
    I found this in another forum. It  is simple to do it:
    1. Go to SQ02 transaction (Infoset: Initial Screen)
    2. Select or Highlight the Infoset corresponding to the query.
    3. Go to --> Query Directory --> (you will see the infoset in the name being displayed) Execute.
    4. Select the Query you would want to unlock.
    5. Click on Cancel Edit lock button or Edit --> Cancel edit lock or Shift + F6
    Done...!!!! Query is unlocked
    José M Mercado

  • BEX Query to ABAP Transaction Code

    Hi,
    RRI from BEX Query to ABAP Transaction Code When I Right clivk and select GOTO on my Delivery order
    say 120012 It shd directly go into tht particular DO The transaction code is vl33n
    but when i give ABAP Transaction as reciever object it only goes to the initial screen of query where we manually need to give the DO Number It does not show the DO 120012 directly
    thx,
    amar

    Hi Amar
    Try doing Assigning Infoobject to R/3 field in Assignment details RSBBS transaction:
    Check below thread for explaination
    Re: RRI -  Selection was not Restrcited
    Ravi

Maybe you are looking for