Skip to main content

SAP CRM: Get field descriptions for search fields

Submitted by Stefan Barsuhn on

In WebUI, say you have a search attribute OBJECT_ID that is labelled "Object ID" on the UI search screen. How do you retrieve that label "Object ID" at runtime (i.e. to output an error message for mandatory field check)?

Simply call

me->get_possible_fields( ).

inside the implementation class methods (i.e. DO_PREPARE_OUTPUT etc.)

BTW, in all other contexts, to get the text representation of a technical field (say you are reading field communication type, and the technical value (result of get_property_as_string()) is TEL) simply call

lr_bol->get_property_text() 

on the same BOL object where you called get_property_as_string() to get the human-readable representation "Telephone". Supply the attribute name and, optionally, the key (in case you're not getting the text-representation of the current value).

Tags