Application Development and Automation 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: 
Read only

HELP_VALUES_GET_WITH_TABLE not populating values

Bharath84
Participant
0 Likes
578

Hi All,

I am having the below code, I am getting F4 help. But when I select any value only the last letter is populated into the selection screen field.

I am using an older version and I have to use this function module only.

data: begin of valuetab occurs 0,
       feld like t134t-mtart,
      end of valuetab,
     begin of t_mtart occurs 0,
      mtart like t134t-mtart,
      end of t_mtart.

data: fields like help_value occurs 0 with header line.

clear : fields.
refresh : fields.

fields-tabname = 'T134T'.
fields-fieldname = 'MTART'.
fields-selectflag = 'X'.
append fields.

select mtart from t134t into table t_mtart.
sort t_mtart by mtart.
delete adjacent duplicates from t_mtart comparing mtart.
delete t_mtart where mtart = 'ERSA'.
valuetab[] = t_mtart[].

call function 'HELP_VALUES_GET_WITH_TABLE'
    exporting
*         CUCOL                         = 0
*         CUROW                         = 0
         display                       = ' '

*         fieldname                     = 'MTART'
*         tabname                       = 'MARA'
*         NO_MARKING_OF_CHECKVALUE      = ' '
*         TITLE_IN_VALUES_LIST          = ' '
*         TITEL                         = ' '
*         SHOW_ALL_VALUES_AT_FIRST_TIME = ' '
*         NO_CONVERSION                 = ' '
    importing
         select_value                  = s_mtart
     tables
          fields                        = fields
          valuetab                      = valuetab
     exceptions
          field_not_in_ddic             = 1
          more_then_one_selectfield     = 2
          no_selectfield                = 3
          others                        = 4.

Awaiting your replies.

Thanks,

Haritha.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
482

Looks like you are receiving the values in the incorrect field. Based on the naming convention, it seems S_MTART is the select option. Select option is has a structure with SIGN, OPTION, LOW and HIGH.

You would need to get the value in the field S_MTART-LOW or S_MTART-HIGH.

Wrap the F4 logic in the Subroutine with a parameter and call it for Value request on both field S_MTART-LOW or S_MTART-HIGH..

Regards,
Naimesh Patel

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
483

Looks like you are receiving the values in the incorrect field. Based on the naming convention, it seems S_MTART is the select option. Select option is has a structure with SIGN, OPTION, LOW and HIGH.

You would need to get the value in the field S_MTART-LOW or S_MTART-HIGH.

Wrap the F4 logic in the Subroutine with a parameter and call it for Value request on both field S_MTART-LOW or S_MTART-HIGH..

Regards,
Naimesh Patel

Read only

0 Likes
482

Hi Naimesha,

In the Importing parameters replaced s_mtart with s_mtart-low.

problem solved....Thank u...

Thanks,

Haritha