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

'F4IF_INT_TABLE_VALUE_REQUEST'

Former Member
0 Likes
1,010

Hello,

I am trying to select the F4 values and populate in the table control 2 fields.

I have defined the it_act_code as .

types: begin of ty_value_tab,

code like zpp_code-code,

sub_code like zpp_code-sub_code,

.....

....

end of value_tab.

Data: it_act_code type standard table of ty_value_tab.

DATA: h_dselc like dselc occurs 0 with header line,

h_field_tab like dfies occurs 0 with header line,

h_field_wa LIKe dfies.

refresh h_dselc.

h_dselc-fldname = 'code'.

h_dselc-dyfldname = 'tablecontrol-field 1'.

APPEND h_dselc.

h_dselc-fldname = 'subcode'.

h_dselc-dyfldname = 'tablecontrol-field 2'.

APPEND h_dselc.

Using select query i have selected all the values in it_act_code.

Call function 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'code'

dynpprog = 'zpgm1'

dynpnr = '100'

dynprofield = 'field1'

value_org = 'S'

TABLES

value_tab = it_act_code

  • field_tab = h_field_tab

return_tab = it_return

DYNPFLD_MAPPING = h_dselc

EXCEPTIONS

When i execute the FM only first value is populated in the table control, i want the subcode also gets copied

in the table . I have used the DYNPFLD_MAPPING still it is not copying in the table control fields.

Should i have to mention fieldtab for this or ?.

thanks,

kevin

6 REPLIES 6
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
869

You have to also pass the fieldtab .

e.g     ls_loto-fldname = 'CARRID'.

    ls_loto-dyfldname = 'ABC'.

    APPEND ls_loto to loto.

    CLEAR ls_loto.

     ls_loto-fldname = 'CONNID'.

    ls_loto-dyfldname = 'ABCD'.

    APPEND ls_loto to loto.

Read only

Former Member
0 Likes
869

Hello Sandeep,

I have provided the following still it is not populating , now F4 popup is not coming up.

h_field_wa-fieldname = 'CODE'.

h_field_wa-lfieldname = 'CODE'.

move h_field_wa to h_field_tab.

APPEND h_field_tab.

clear h_field_wa.

h_field_wa-fieldname = 'SUBACT_CODE'.

h_field_wa-lfieldname = 'SUBACT_CODE'.

move h_field_wa to h_field_tab.

Regards,

kevin

Read only

0 Likes
869

Are you moving the fields to control table fields .

e.g.

  • READ TABLE lt_return INDEX 1.

  • WRITE lt_return-fieldval TO p_loekz.

Read only

0 Likes
869

Now the F4 popup is not coming up . Can you explain

in the fieldtab , it should give the value_tab fieldname or ? .

thanks

kevin

Read only

0 Likes
869

Can you pls paste the exact code here .

Read only

0 Likes
869

refresh h_field_tab.

h_field_wa-fieldname = 'it_act_code-code'.

h_field_wa-lfieldname = 'it_act_code -code'.

move h_field_wa to h_field_tab.

APPEND h_field_tab.

clear h_field_wa.

h_field_wa-fieldname = 'it_act_code -sub_code'.

h_field_wa-lfieldname = 'it_act_code -sub_code '.

move h_field_wa to h_field_tab.

APPEND h_field_tab.

clear h_field_wa.

if it_act_code[] is not initial.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'code'

dynpprog = 'pgm1'

dynpnr = '100'

dynprofield = 'field1'

value_org = 'S'

TABLES

value_tab = it_act_code

field_tab = h_field_tab

return_tab = it_return

DYNPFLD_MAPPING = h_dselc

EXCEPTIONS

parameter_error = 1

no_values_found = 2

others = 3.

read table it_return into ls_return index 1.

Now it is giving dump , assign_length_0