Skip to Content

Value-Help with fields of data dictionary structure

Hello guys,

is it possible to create a value-help for the fields (not the content!) of a data dictionary structure? I have my custom ddic structure Z1 with the fields A, B and C. Now I have ddic table Z2 where I want to input field-names. Therefor i have a field FIELDNAMES in this table. For this field I want as value-help the names of fields A, B and C of structure Z1. Is this possible?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 04, 2017 at 08:06 AM

    I am not aware of any standard feature to enable this, but should be easy enough to create by reading the fields with cl_abap_structdef and building your selections from that.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2017 at 08:32 AM


    - Copy function module F4IF_SHLP_EXIT_EXAMPLE in a new function module ZF4_Z1_FIELDNAMES

    - Create a new domain Z1_FIELDNAMES (same as FIELDNAMES) with ZF4_Z1_FIELDNAMES as exit search-help.

    - Create a new data element in SE11 Z1_FIELDNAMES with domain Z1_FIELDNAMES

    - Customize output RECORD_TAB from FM ZF4_Z1_FIELDNAMES at will.

    Something like :

    IF callcontrol-step = 'DISP'.
    DATA: lo_struct_descr   TYPE REF TO cl_abap_structdescr,
          lt_struct_fields  TYPE cl_abap_structdescr=>component_table.
    FIELD-SYMBOLS <struct_fields> TYPE any.
    lo_struct_descr ?= cl_abap_typedescr=>describe_by_name( 'Z1' ).
    lt_struct_fields = lo_struct_descr->get_components( ).
    LOOP AT lt_struct_fields ASSIGNING <struct_fields>.
    * Append <struct_fields>-NAME to record_tab

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Ok, worked for me. Thanks a lot until here. Now I have two detail questions.

      1) How exact is the name of the export parameter? In my table where I use my search help I have three fields which all should use the same search help. But of course I can use only one field name as export parameter. I took the first field for example. As far as I can see it now it works for the other fields as well but is it also technically correct?

      2) My goal was to avoid invalid entries. As far as I can see I now only have the search help but no value-check like in foreign keys. How can I achieve this? Also in the function to popup some custom message?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.