ysichov / Simple-Data-Explorer

Simple Data Explorer
MIT License
46 stars 18 forks source link

No conversion routine for select options #3

Open Koch013 opened 4 days ago

Koch013 commented 4 days ago

Hi,

thanks for that tool. First I thought it didn't work, because the entered material number in my try with the table mara wasn't fetched at all. I discovered that you have to enter the material number in the internal format. So I wrote a little piece of code, that calls the conversion routine from the domain of the select option in progress at the end of your method update_sel_row and it worked as expected.

      " Get and execute domain conversion routine
      IF c_sel_row-domain IS NOT INITIAL.
        DATA ls_dd01v TYPE dd01v.

        CALL FUNCTION 'DDIF_DOMA_GET'
          EXPORTING  name          = CONV ddobjname( c_sel_row-domain )
          IMPORTING  dd01v_wa      = ls_dd01v
          EXCEPTIONS illegal_input = 1
                     OTHERS        = 2.

        IF sy-subrc = 0 AND ls_dd01v-convexit IS NOT INITIAL.
          DATA(lv_conv_exit_name) = |CONVERSION_EXIT_{ ls_dd01v-convexit }_INPUT|.
          DO 2 TIMES.
            ASSIGN COMPONENT COND string( WHEN sy-index = 1 THEN 'LOW' ELSE 'HIGH'  ) OF STRUCTURE <range> TO <field>.
            IF <field> IS INITIAL.
              CONTINUE.
            ENDIF.

            CALL FUNCTION lv_conv_exit_name
              EXPORTING input  = <field>
              IMPORTING output = <field>.
          ENDDO.
        ENDIF.
      ENDIF." c_sel_row-domain IS NOT INITIAL.

z_sde

ysichov commented 4 days ago

Thanks! The program is not finished yet. Maybe I will go on next year.