Skip to Content

[Domain]Text table of a Value table

Hi,

I read this old post regarding values for a particular domain.

FM for reading Value Table for a domain

I did the same and it works quite well. Now, I would like to get the texts associated to the values and I am facing an issue.

First, the value table :

- is in fact a view (in my case /BI0/MCOUNTRY)

- might not have a text table or is not linked to the text table

Thus, how to programatically get the text table (the better would be to retrieve it from the domain directly if possible).

I post here the code I use:

   CALL FUNCTION 'DDIF_DOMA_GET'
        EXPORTING
          name          = o_domain
          langu         = i_langu
        IMPORTING
          dd01v_wa      = wa_dd01v
        EXCEPTIONS
          illegal_input = 1
          OTHERS        = 2.

      IF sy-subrc = 0 AND wa_dd01v-entitytab IS NOT INITIAL.
        CALL FUNCTION 'DDIF_FIELDINFO_GET'
          EXPORTING
            tabname        = wa_dd01v-entitytab
            langu          = 'E'
          TABLES
            dfies_tab      = ta_valuetab_dfies
          EXCEPTIONS
            not_found      = 1
            internal_error = 2
            OTHERS         = 3.

*       A domain has a value table if only one of the key field
*       belongs to this domain
        LOOP AT ta_valuetab_dfies ASSIGNING <fs_dfies>
                                  WHERE domname = o_domain.

          w_valuetab_field = <fs_dfies>-fieldname.
          EXIT.
        ENDLOOP.
        IF sy-subrc = 0.
          CREATE DATA ta_entries TYPE TABLE OF (o_type).
          ASSIGN ta_entries->* TO <ft_entries>.

          SELECT DISTINCT (w_valuetab_field) FROM (wa_dd01v-entitytab)
                                             INTO TABLE <ft_entries>.
          IF sy-subrc = 0.
            LOOP AT <ft_entries> ASSIGNING <fs_entry>.
              APPEND INITIAL LINE TO o_values ASSIGNING <fs_ddlb_value>.
              <fs_ddlb_value>-name  = <fs_entry>.
              <fs_ddlb_value>-value = <fs_entry>.
            ENDLOOP.
          ENDIF.
        ENDIF.

      ENDIF.

Thanks in advance.

Best regards,

Guillaume

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jun 09, 2006 at 02:20 PM

    Hi,

    can you try this FM <b>DDUT_TEXTTABLE_GET</b>, pass the table name and get the textable name.

    Regards

    vijay

    Add a comment
    10|10000 characters needed characters exceeded

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.