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

Two columns display in F4 help

Former Member
0 Likes
1,670

Hello,

I want to display two columns mainly A(value) and B(Description) by pressing button F4 on field A.

I have written code and filled table value_tab with both these two field's value. But I am getting only one column in the F4 help.

I am using F4IF_INT_TABLE_VALUE_REQUEST fm for F4 help. Please help.

        • Filling Internal table

LOOP AT gt_domain INTO ls_domain.

lw_f4_value-A = ls_domain-domvalue_l.

lw_f4_value-B = ls_domain-ddtext.

APPEND lw_f4_value to lt_f4_value.

CLEAR: lw_f4_value, ls_domain.

ENDLOOP.

          • Calling FM

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'A'

value_org = 'S'

callback_program = l_repid

TABLES

value_tab = lt_f4_value

return_tab = lt_retab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

1 ACCEPTED SOLUTION
Read only

surajarafath
Contributor
0 Likes
1,146

you try like this...

LOOP AT..
    LT_value_TAB-A = AAA.
   LT_value_TAB-B = BBB.
    APPEND LT_value_TAB.
  ENDloop.
  sort lt_value_tab by A B.
  delete adjacent duplicates from lt_value_tab.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = 'A'
            DYNPPROG    = gd_repid
            DYNPNR      = '1000'
            DYNPROFIELD = 'PA_'
            VALUE_ORG   = 'S'
            DISPLAY     = ' '
       TABLES
            value_tab   = lt_value_tab.

2 REPLIES 2
Read only

surajarafath
Contributor
0 Likes
1,147

you try like this...

LOOP AT..
    LT_value_TAB-A = AAA.
   LT_value_TAB-B = BBB.
    APPEND LT_value_TAB.
  ENDloop.
  sort lt_value_tab by A B.
  delete adjacent duplicates from lt_value_tab.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = 'A'
            DYNPPROG    = gd_repid
            DYNPNR      = '1000'
            DYNPROFIELD = 'PA_'
            VALUE_ORG   = 'S'
            DISPLAY     = ' '
       TABLES
            value_tab   = lt_value_tab.

Read only

Former Member
0 Likes
1,146

For field B, I was not using any data element for declaration. I was using only char60. That was creating problem. Now, i have used a data element and problem has resolved.

Thanks

Arpit