Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Table values not getting displayed

former_member189845
Active Participant
0 Kudos

Hi all,

I've created serach help for the input parameter and in internal table the values are getting. But when i pass the same internal table to function module and press a search help the values are not getting displayed.

  types: begin of zst,
       lang(2) type c,
       title(30) type c,
       title_medi(30) type c,
       end of zst.

data: lt_zst type table of zst,
      wa type zst.

parameters: cube(30) type c.

at selection-screen on value-request for cube.

select   langu title title_medi from TSAD3T into table lt_zst where langu = sy-langu.

IF sy-subrc eq '0'.

  sort lt_zst by title.

ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ''
      RETFIELD               = 'title'
*   PVALKEY                = ' '
*    DYNPPROG               = sy-repid
*    DYNPNR                 = sy-dynnr
*   DYNPROFIELD            = ''
*   STEPL                  = 0
*      WINDOW_TITLE           = ''
*   VALUE                  = ' '
      VALUE_ORG              = 'S'
*    MULTIPLE_CHOICE        = 'X'  "allows you select multiple entries from the popup
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             = ld_ret
    TABLES
      VALUE_TAB              =  lt_zst
*    FIELD_TAB              = lt_field
*      RETURN_TAB             = it_return
*   DYNPFLD_MAPPING        =
   EXCEPTIONS
     PARAMETER_ERROR        = 1
     NO_VALUES_FOUND        = 2
     OTHERS                 = 3.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Siva,

Try the following :

  TYPES: BEGIN OF zst,
     lang(2) TYPE c,
     title(30) TYPE c,
     title_medi(30) TYPE c,
     END OF zst.



  DATA: lt_zst TYPE TABLE OF zst,
             wa TYPE zst.

  DATA ls_dfies LIKE dfies.
  DATA lt_dfies LIKE TABLE OF dfies.

  SELECT   langu title title_medi FROM tsad3t INTO TABLE lt_zst WHERE langu = sy-langu.
  IF sy-subrc EQ '0'.
    SORT lt_zst BY title.
  ENDIF.

  CALL FUNCTION 'DDIF_FIELDINFO_GET'
    EXPORTING
      tabname        = 'TSAD3T'
      fieldname      = 'TITLE'
      lfieldname     = 'TITLE'
    IMPORTING
      dfies_wa       = ls_dfies
    EXCEPTIONS
      not_found      = 1
      internal_error = 2
      OTHERS         = 3.
  APPEND ls_dfies TO lt_dfies.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'TITLE'
      value_org       = 'S'
    TABLES
      value_tab       = lt_zst
      field_tab       = lt_dfies
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

Hopefully it helps!!!!

7 REPLIES 7

Former Member
0 Kudos

Hello Siva,

Try the following :

  TYPES: BEGIN OF zst,
     lang(2) TYPE c,
     title(30) TYPE c,
     title_medi(30) TYPE c,
     END OF zst.



  DATA: lt_zst TYPE TABLE OF zst,
             wa TYPE zst.

  DATA ls_dfies LIKE dfies.
  DATA lt_dfies LIKE TABLE OF dfies.

  SELECT   langu title title_medi FROM tsad3t INTO TABLE lt_zst WHERE langu = sy-langu.
  IF sy-subrc EQ '0'.
    SORT lt_zst BY title.
  ENDIF.

  CALL FUNCTION 'DDIF_FIELDINFO_GET'
    EXPORTING
      tabname        = 'TSAD3T'
      fieldname      = 'TITLE'
      lfieldname     = 'TITLE'
    IMPORTING
      dfies_wa       = ls_dfies
    EXCEPTIONS
      not_found      = 1
      internal_error = 2
      OTHERS         = 3.
  APPEND ls_dfies TO lt_dfies.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'TITLE'
      value_org       = 'S'
    TABLES
      value_tab       = lt_zst
      field_tab       = lt_dfies
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

Hopefully it helps!!!!

0 Kudos

Hi Saravana,

Thanks for your reply. Yeah it works. But may i know why the code i've posted its not working ?? and that too the same one below is working fine. The below 've taken from SDN only.

  parameters: p_ebeln type ekko-ebeln.

TYPES: BEGIN OF t_ekko,
  ebeln TYPE ekpo-ebeln,

END OF t_ekko.

DATA: it_ekko TYPE STANDARD TABLE OF t_ekko,
      wa_ekko TYPE t_ekko,
      it_return type STANDARD TABLE OF DDSHRETVAL,
      wa_return like line of it_return.

**************************************************************
*at selection-screen
at selection-screen on value-request for p_ebeln.

  select ebeln

    from ekko
    into TABLE it_ekko.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = 'EKKO'
      RETFIELD               = 'EBELN'
*   PVALKEY                = ' '
*    DYNPPROG               = sy-repid
*    DYNPNR                 = sy-dynnr
*   DYNPROFIELD            = 'EBELN'
*   STEPL                  = 0
      WINDOW_TITLE           = 'Ekko Records'
*   VALUE                  = ' '
      VALUE_ORG              = 'S'
*    MULTIPLE_CHOICE        = 'X'  "allows you select multiple entries from the popup
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             = ld_ret
    TABLES
      VALUE_TAB              = it_ekko
*    FIELD_TAB              = lt_field
      RETURN_TAB             = it_return
*   DYNPFLD_MAPPING        =
   EXCEPTIONS
     PARAMETER_ERROR        = 1
     NO_VALUES_FOUND        = 2
     OTHERS                 = 3.

  READ TABLE it_return into wa_return index 1.
  p_ebeln = wa_return-fieldval.

0 Kudos

Hello Siva,

Its bcoz TITLE is not the only primary key in TSAD3T where as  EBELN is the primary key in EKKO

Rgrds,

Sravan

0 Kudos

I just modified your code a little and it gives the values appropriately:

  TYPES: BEGIN OF zst,          "changed this to dictionary types
     lang TYPE spras,
     title TYPE ad_title,
     title_medi TYPE ad_titletx,
     END OF zst.

DATA: lt_zst TYPE TABLE OF zst,
      wa TYPE zst.

PARAMETERS: cube TYPE ad_title.          "dictionary type

AT SELECTION-SCREEN ON VALUE-REQUEST FOR cube.
  SELECT langu  title title_medi FROM tsad3t INTO TABLE lt_zst WHERE langu = sy-langu.
  IF sy-subrc EQ '0'.
    SORT lt_zst BY title.
  ENDIF.
 
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'TITLE'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'CUBE'
      value_org       = 'S'
    TABLES
      value_tab       = lt_zst
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

Regards,

Kumud

0 Kudos

Hi,

  In your code, title is in small letter  just change to capital  'TITLE' and check your same code.

regards,

zafar

0 Kudos

Hi Sivaramakrishnan ,

I will tell you the exact reason why the field value was not displaying.

I faced a similar issue recently.

In your below code :

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

*   DDIC_STRUCTURE         = ''

      RETFIELD               = 'title'

*   PVALKEY                = ' '

*    DYNPPROG               = sy-repid

*    DYNPNR                 = sy-dynnr

*   DYNPROFIELD            = ''

*   STEPL                  = 0

*      WINDOW_TITLE           = ''

*   VALUE                  = ' '

      VALUE_ORG              = 'S'

*    MULTIPLE_CHOICE        = 'X'  "allows you select multiple entries from the popup

*   DISPLAY                = ' '

*   CALLBACK_PROGRAM       = ' '

*   CALLBACK_FORM          = ' '

*   MARK_TAB               =

* IMPORTING

*   USER_RESET             = ld_ret

    TABLES

      VALUE_TAB              =  lt_zst

*    FIELD_TAB              = lt_field

*      RETURN_TAB             = it_return

*   DYNPFLD_MAPPING        =

   EXCEPTIONS

     PARAMETER_ERROR        = 1

     NO_VALUES_FOUND        = 2

     OTHERS                 = 3.

You need to provide the value for    DYNPROFIELD            =  in the export parameter of FM F4IF_INT_TABLE_VALUE_REQUEST

and here it will be  DYNPROFIELD = 'cube'

Because you are defining search help for this field (cube) and this Function Module uses  field specified in DYNPROFIELD parameter to Output the selected option from Search Help options disaplayed.

In the above SDN example the same thing is specified as

p_ebeln = wa_return-fieldval

its just equivalent as writing DYNPROFIELD            = 'p_ebeln' in FM.


0 Kudos

Bulls Eye