Ansicht
Dokumentation

MEQUERY1 - Enhancement to Document Overview ME21N/ME51N

MEQUERY1 - Enhancement to Document Overview ME21N/ME51N

Fill RESBD Structure from EBP Component Structure   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

This enhancement enables you to:

  • Execute selection variants with your own queries
  • Override or remove standard queries
  • Define your own selection variants
  • Define your own display variants for your own selection variants

Using this enhancement, you can create your own selection variants for the document overview and include them in the selection menu for the selection variants. You can also use these selection variants to execute your own previously generated queries and provide existing standard selections with your own variants. Lastly, you can assign your own display variants to each selection variant.

Function exit 001:

EXIT_SAPLMEQUERY_001

In this function module, you can assign an ID in the ClassID field and a name in the Label field.

The new ID you assign must lie within the customer name range in order to avoid conflicts with existing IDs. For this reason, use a 'Z' as the first letter of the ID. This ID is needed to access the variant created.
The name is the description under which the variant is shown in the selection menu.

Note
Please note that the name is displayed on the user interface and is thus language-dependent.

It is also possible to remove the standard variants. All variants displayed are stored in the table META_TABLE.
The ClassIDs of the standard system are defined in the type group MMPUR.



Function exit 002 :

EXIT_SAPLMEQUERY_002

In this function module, you can define the relevant parameters needed for your selection variant. This function module is used for each selection variant that is used in the selection menu. On the basis of the ClassID, you can change the following parameters:

  1. ch_queryname: Name of the query that must first be generated using transaction SQ01, or use of standard SAP queries.
    In order to be able to use the standard SAP queries, it is essential to set up the global work area using the variables ch_workspace.
  2. ch_usergroup: Name of user group to which the query is assigned.
  3. ch_variant: Name of variant with which the query is to be started.
    If no variant is desired, ' ' can also be passed on.
  4. ch_handle: The display variants of the selection are to be found here.
    You can control the representation of the various selections in the document overview via different display variants. To define different display variants for different selections, you need a handle. When executing the selection variant, you can then either choose from all display variants stored unter the handle that has been passed on or set a display variant that is then used for each call.
    The handles already assigned in the standard system are 0001 for purchase orders and 0002 for requisitions. You can assign your own handles from 9000 upwards.
  5. ch_workspace: If an X is passed on here, the global work area is used and the specified query sought there. If the setting is ' ', the query is sought in the local work area. As a rule, only SAP queries are available in the global work area.

Example data is stored for each function exit. This can be invoked by displaying the components for the enhancement and then displaying the function code for the desired function module.

Purchase order (transactions ME21N / ME22N / ME23N)

If you wish to use the Drag&Drop functionality with the shopping basket, or include documents shown in the document overview in the purchase order (using the Adopt @14@ icon or by double-clicking on the document number), the field selection for the query must contain the following fields:

  • EKKO-BSTYP : Document category
  • EKKO-EBELN : Document number
  • EKPO-EBELP : Document item

If you do not include these fields in the selection, it is not possible to adopt the document in the purchase order.

Purchase requisition (transactions ME51N / ME52N / ME53N)

If you wish to use the Drag&Drop functionality with the shopping basket, or include documents shown in the document overview in the purchase requisition (using the Adopt @14@ icon or by double-clicking on the document number), the field selection for the query must contain the following fields:

  • EBAN-BANFN : Requisition number
  • EBAN-BNFPO : Requisition item

You must also define these fields as key fields.

ClassIDs used by SAP and the associated parameters:

ClassID Label Query
mmpur_dbl_po Purchase orders MEPO
mmpur_dbl_rfq RFQs MEPO
mmpur_dbl_agreemnt Contracts MEPO
mmpur_dbl_schdlagrmnt Scheduling agreements MEPO
mmpur_dbl_purchdocs Purchasing docs. (general) MEPO
mmpur_dbl_req Purchase requisitions MEBANF
mmpur_dbl_po_usr My purchase orders MEPO
mmpur_dbl_parkedpo_usr Purchase orders on hold MEPO
mmpur_dbl_req_usr My purchase requisitions MEBANF
ClassID Variant Handle Workspace
mmpur_dbl_po SAP&MEPOBEST 0001 X
mmpur_dbl_rfq SAP&MEPOANFR 0001 X
mmpur_dbl_agreemnt SAP&MEPOKONT 0001 X
mmpur_dbl_schdlagrmnt SAP&MEPOLIEF 0001 X
mmpur_dbl_purchdocs   0001 X
mmpur_dbl_req SAP&MEBANF 0002 X
mmpur_dbl_po_usr SAP&MEPOBEST 0001 X
mmpur_dbl_parkedpo_usr SAP&MEPOBEST 0001 X
mmpur_dbl_req_usr SAP&MEBANF 0002 X

All queries use the user group (User Group field) /SAPQUERY/ME.






TXBHW - Original Tax Base Amount in Local Currency   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 8923 Date: 20240425 Time: 163442     sap01-206 ( 96 ms )