Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ABAP API: Query on qualified lookup table


i need to perform a query on a qualified lookup table.

For example the master table is 'ITEMS' and the qualified lookup table is 'LOCAL_SYSTEM_DATA'.

I'd like to perform a query on the qualified text field 'LOCAL_DESCRIPTION' of the lookup table.

As a result i expect the corresponding id's of the master table 'ITEMS'.

Here's what i'm trying:

    DATA lt_query TYPE mdm_query_table.
    DATA ls_query TYPE mdm_query.
    DATA lt_result_set TYPE mdm_search_result_table.
    DATA ls_result_set LIKE LINE OF lt_result_set.
    ls_query-parameter_code = 'LOCAL_SYSTEM_DATA'. 
    ls_query-operator = 'EQ'.
    ls_query-dimension_type = MDMIF_SEARCH_DIM_QUAL.
    ls_query-constraint_type = MDMIF_SEARCH_CONSTR_LOOK.

    lv_key = 'Test 4711'. 
    append lv_key to lt_keys.

    get reference of lt_keys into ls_qualifier_query-value.
    get reference of ls_qualifier_query into ls_query-value_low.
    append ls_query to lt_query.

    CALL METHOD MR_MDM_API->mo_core_service->query
        iv_object_type_code      = 'ITEMS'
        IS_RESULT_SET_DEFINITION = ls_result_set_definition
        it_query                 = lt_query
        et_result_set            = lt_result_set.

Trying to execute the method, an exception is raised

Server return code 0x80000001: BSEI_MSG_BadParam

Can anyone help?

Thanks & Regards,


Former Member
Not what you were looking for? View more on this topic or Ask a question