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: 

FM: HELP_VALUES_GET_WITH_TABLE

Former Member
0 Kudos
245

Hi all,

I have been trying to use HELP_VALUES_GET_WITH_TABLE function module showing currency data, as happens on infty0008, but whem search-help pops up, on the amount column all I can see is: 20.202.020.202,02.

How is the trick here? How do I show actual values?

Tks anyway.

1 REPLY 1

Former Member
0 Kudos
53

Dear Debora,

You can use the below code:

DATA : v_dataum TYPE sy-datum.
CALL FUNCTION 'F4_DATE'
 EXPORTING
   DATE_FOR_FIRST_MONTH               = SY-DATUM
*   DISPLAY                            = ' '
*   FACTORY_CALENDAR_ID                = ' '
*   GREGORIAN_CALENDAR_FLAG            = ' '
*   HOLIDAY_CALENDAR_ID                = ' '
*   PROGNAME_FOR_FIRST_MONTH           = ' '
 IMPORTING
   SELECT_DATE                        = v_datum
*   SELECT_WEEK                        = SELECT_WEEK
*   SELECT_WEEK_BEGIN                  = SELECT_WEEK_BEGIN
*   SELECT_WEEK_END                    = SELECT_WEEK_END
* EXCEPTIONS
*   CALENDAR_BUFFER_NOT_LOADABLE       = 1
*   DATE_AFTER_RANGE                   = 2
*   DATE_BEFORE_RANGE                  = 3
*   DATE_INVALID                       = 4
*   FACTORY_CALENDAR_NOT_FOUND         = 5
*   HOLIDAY_CALENDAR_NOT_FOUND         = 6
*   PARAMETER_CONFLICT                 = 7
*   OTHERS                             = 8
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

...

Help Regarding FM 'HELP_VALUES_GET_WITH_TABLE'

http://www.sap-img.com/abap/attach-a-search-help-to-the-screen-field.htm

Use this functionality to get help.

*-- Set up fields to retrieve data


tables: t001w.
 
DATA: lc_werks      LIKE t001w-werks,
      ltab_fields LIKE help_value OCCURS 0 with header line,
 
      BEGIN OF ltab_values OCCURS 0,
        feld(40) TYPE c,
      END OF ltab_values.
 
*-- Set up fields to retrieve data
  ltab_fields-tabname    = 'T001W'.
  ltab_fields-fieldname  = 'WERKS'.
  ltab_fields-selectflag = 'X'.
  APPEND ltab_fields.
 
  ltab_fields-tabname    = 'T001W'.
  ltab_fields-fieldname  = 'NAME1'.
  ltab_fields-selectflag = space.
  APPEND ltab_fields.
 
*-- Fill values
  select * from t001w.
    ltab_values-feld = t001w-werks.
    append ltab_values.
    ltab_values-feld = t001w-name1.
    append ltab_values.
  endselect.
 
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
     EXPORTING
          fieldname                 = 'WERKS'
          tabname                   = 'T001W'
          title_in_values_list      = 'Select a value'
     IMPORTING
          select_value              = lc_werks
     TABLES
          fields                    = ltab_fields
          valuetab                  = ltab_values
     EXCEPTIONS
          field_not_in_ddic         = 01
          more_then_one_selectfield = 02
          no_selectfield            = 03.

Regards,

Naveen.