cancel
Showing results for 
Search instead for 
Did you mean: 

Attributes of Main Entity missing in USMD_SEARCH customizing

former_member196830
Active Participant
0 Kudos
604

Dear gurus,

I'm configuring a customizing for USMD_SEARCH for a Custom Data Model following the help page here:
http://help.sap.com/saphelp_mdg80/helpdata/en/10/0649523e85d130e10000000a44538d/content.htm

When I'm adding the fields to the Selection screen UIBB configuration, I only see the Key fields from my Data Model and I don't have the option of adding the Attribute fields.

For the Resultset UIBB all of them are visible. Have you had experienced this before? Am I missing something that had to be configured beforehand?

Thanks for your help in advance,

Boris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Boris ,

It should automatically show attributes also .  please once gain generate data model specific structures once again and try . Check if you have generated already search application structure and also regenerate all other structures .

former_member196830
Active Participant
0 Kudos

It's very weird,

The structures are generated properly and they have all the attributes in. I checked the ZXX_S_ES_<Entity> structures and they look just fine.

Adding Mrityunjai's code to the feeder class goes through the iterations and adds the attributes forcefully into the internal table lt_component, but at the Configuration screen they still don't appear.

All I see there is the key fields.

I checked the GENIL_MODEL_BROWSER and the attributes for Search are there, the query structures, the names, everything is there.

I'm still open to ideas.

former_member196830
Active Participant
0 Kudos

I figured it out... In the feeder class parameters I was setting up a value for the Search Mode = DB

This was causing the issue and preventing me from having the list of attributes appear.

As soon as I deleted this value and refreshed the configuration page, they all appeared in the list of available values.

Thanks for your help guys, it lead me to the right ideas and I learned new things

Cheers,

Boris

former_member196830
Active Participant
0 Kudos

Well, It seems I figured out one piece of he puzzle... The Attributes now appear in the configuration screen but they still don't show up in the actual view.

Here is what I have in my Configuration for the UI

And when I hit the Additional Functions -> Test menu item I loose all attributes again and only the key fields remain:

Any thoughts on that?

Thanks,

Boris

former_member219747
Participant
0 Kudos

Hi Boris,

This will be difficult to comment.

Have you configured the feeder class for the search results properly?

Pls check all parameters are maintained correctly for the feeder class.

I will advise to put breakooints inside methods process_event and get_data of the feeder class and then check the execution of steps and the data flow.

Regards,

Mrityunjai

former_member219747
Participant
0 Kudos

Pls share what you have coded in PROCESS_EVENT.

Regards,

Mrityunjai

former_member196830
Active Participant
0 Kudos

Hi guys,

I have not coded anything yet. I'm just using the standard feeder class CL_USMD_SEARCH_GUIBB_DQUERY.

Just for testing what you suggested I copied this class into Z* class and added the code you suggested. I did set a breakpoint and the execution was stopping and assigning the values, but no effect on the screen.

Not sure if that's of any help though...

Cheers,

Boris

former_member196830
Active Participant
0 Kudos

Regarding the Search Results (not the Selection Query), I get the results properly when I do the search... I believe it's configured properly.

former_member219747
Participant
0 Kudos

Okay so take some more efforts.

Add the below lines of code along with the custom codes above.

CHECK lines( lt_components ) <> lines( me->mo_struct_rtti->components ).

TRY .
me
->mo_global_context->get_value(
EXPORTING iv_id   = cl_bs_bp_ovp_assist=>gc_context_id-filter_criteria
IMPORTING ev_data = lt_filter_criteria
).
LOOP AT lt_filter_criteria INTO ls_filter_criterion.
DELETE lt_components WHERE name = ls_filter_criterion-search_attribute.
ENDLOOP.
CATCH cx_bs_ct_core.
CLEAR lt_filter_criteria.
ENDTRY.

me
->mo_struct_rtti = cl_abap_structdescr=>create( lt_components ).


Add the fields on the UI and try.


Regards,

Mrityunjai

former_member196830
Active Participant
0 Kudos

Hello Mrityunjai,

This would only help make the fields available for the FPM configuration. Our previous code suggestion also did that.

Unfortunately, when it comes to displaying it on the screen the fields disappear.

Regards,

Boris

former_member219747
Participant
0 Kudos

No Boris, the below piece of code is an executed and running piece of code.

Sorry for the read statement above-


ls_component-name = 'ZZ********'.
ls_component
-type = cl_abap_elemdescr=>get_c( p_length = 25 ).
APPEND ls_component TO lt_components.


ls_component-name = 'ZZ********'.
ls_component
-type = cl_abap_elemdescr=>get_c( p_length = 25 ).
APPEND ls_component TO lt_components.


CHECK lines( lt_components ) <> lines( me->mo_struct_rtti->components ).

TRY .
me
->mo_global_context->get_value(
EXPORTING iv_id   = cl_bs_bp_ovp_assist=>gc_context_id-filter_criteria
IMPORTING ev_data = lt_filter_criteria
).
LOOP AT lt_filter_criteria INTO ls_filter_criterion.
DELETE lt_components WHERE name = ls_filter_criterion-search_attribute.
ENDLOOP.
CATCH cx_bs_ct_core.
CLEAR lt_filter_criteria.
ENDTRY.

me
->mo_struct_rtti = cl_abap_structdescr=>create( lt_components ).

After this these fields will be available in UI configuration and you need to add these custom attributes to the search criteria.

This configuration and fields additions will be specific to the entity.

if you have a single custom entity, surely this will be available afterwards configuration on load of the page.

Else on the load of the page to see your configured search criteria, you need to select the entity for which you configured the search criteria before from the above drop down (Search Method).


Regards,

Mrityunjai

former_member196830
Active Participant
0 Kudos

Thank you for your help Mrityunjai,

I figured out what I was missing. It was to specify the list of fields in my access class (since I'm using Reuse Active area mode).

I just added the list of fields I need in method GET_QUERY_PROPERTIES and everything worked just fine.

Best regards,

Boris

Answers (1)

Answers (1)

former_member219747
Participant
0 Kudos

Hi Boris,

In your feeder class of this custom data model in method CREATE_STRUCT_RTTI,

please add the below lines of code for all the attribute fields-

Name here will be your attribute field name and length as required.

Let me know if this works out for you.

Regards,

Mrityunjai