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 not returing a value

Former Member
0 Likes
4,215

Hi All,

I have a specific code below which gives me a return value for the screen field. However, if I include the table wich contains the LABEL name of the hitlist in F4, there is no return value.

I am using the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.


 TYPES:  BEGIN OF final2,
         field  TYPE char10,
         field2 TYPE char40,
         END OF final2.
DATA:    final_tab1 TYPE TABLE OF final2,
         ret_tab LIKE TABLE OF ddshretval.
DATA: it_field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'DDIF_NAMETAB_GET'
    EXPORTING
      tabname   = 'ZBPORG'
    TABLES
      dfies_tab = it_field_tab.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'FIELD'
      dynpprog    = progname
      dynpnr      = dynnum
      dynprofield = 'ZSDYN_LIADEF-BP_NUMBER'
      window_title = 'BP/Org Number'
      value_org   = 'S'
    TABLES
      value_tab   = final_tab1
*      field_tab   = it_field_tab.
      RETURN_TAB  = ret_tab.

Note that if I remove it_field_tab, a return value is displayed in the field. But the problem is that the column label in the hitlist contains F001 and Char instead of the desired labels (Org_Unit and Description). Thus, I need to include it_field_tab for the label. Unfortunately, no value is being returned/displayed in the screen field.

Would you know the possible problem in this scenario?

I would like to ask your help on this guys. Message replies are well appreciated.

Thank you.

RE

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,364
TYPES:  BEGIN OF final2,
         field  TYPE char10,
         field2 TYPE char40,
         END OF final2.

Change your Definition of the internal table , try to refer the field Orgunit data element , instead of Char10. and remove it_Field_Tab.

Don't use generic types, use relevant data element for defining the fields of internal table.

Hi All,

I have a specific code below which gives me a return value for the screen field. However, if I include the table wich contains the LABEL name of the hitlist in F4, there is no return value.

I am using the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.


 TYPES:  BEGIN OF final2,
         field  TYPE char10,
         field2 TYPE char40,
         END OF final2.
DATA:    final_tab1 TYPE TABLE OF final2,
         ret_tab LIKE TABLE OF ddshretval.
DATA: it_field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'DDIF_NAMETAB_GET'
    EXPORTING
      tabname   = 'ZBPORG'
    TABLES
      dfies_tab = it_field_tab.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'FIELD'
      dynpprog    = progname
      dynpnr      = dynnum
      dynprofield = 'ZSDYN_LIADEF-BP_NUMBER'
      window_title = 'BP/Org Number'
      value_org   = 'S'
    TABLES
      value_tab   = final_tab1
*      field_tab   = it_field_tab.
      RETURN_TAB  = ret_tab.

Note that if I remove it_field_tab, a return value is displayed in the field. But the problem is that the column label in the hitlist contains F001 and Char instead of the desired labels (Org_Unit and Description). Thus, I need to include it_field_tab for the label. Unfortunately, no value is being returned/displayed in the screen field.

Would you know the possible problem in this scenario?

I would like to ask your help on this guys. Message replies are well appreciated.

Thank you.

RE

10 REPLIES 10
Read only

former_member215917
Active Participant
0 Likes
2,364

Hi Reymar,

After calling FM with it_field_tab, you can try calling 'DYNP_VALUES_UPDATE' for updating specific fields with values from value table. This FM is used when we need to update more than one field.

Let me know if it helps.

Gouri.

Read only

0 Likes
2,364

Hi Gouri,

I tried your suggestion but unfortunately, there is still no value returned. Even before updating the screen, the ret_tab table doesn't contain a value. Thus, there will be no field value to be updated in the screen.

Thanks for your assistance.

Regards,

RE

Read only

0 Likes
2,364

Hi Raymar,

Can you try passing VALUE_ORG = 'C' instead of 'S'? Then may be you will be able to return values and you can try callling FM 'DYNP_VALUES_UPDATE' to update.

Gouri.

Read only

0 Likes
2,364

Hi Gouri,

There are still no returned values after changing the VALUE_ORG to 'C'.

Thanks!

Regards,

RE

Read only

0 Likes
2,364

Hi Reymar, Have a look at the sample program. It works . change accordingly.

REPORT zvenkat_f4_for_parameters MESSAGE-ID zmsg .
*&---------------------------------------------------------------------*
" Declaration part
*&---------------------------------------------------------------------*
TYPES:
   BEGIN OF t_t001w,
     werks       TYPE t001w-werks,
     name1       TYPE t001w-name1,
   END OF t_t001w,
   t_return_tab  TYPE ddshretval.
DATA:
    w_t001w      TYPE t_t001w,
    w_return_tab TYPE t_return_tab.
DATA:
    i_t001w      TYPE STANDARD TABLE OF t_t001w,
    i_return_tab TYPE STANDARD TABLE OF t_return_tab.
*&---------------------------------------------------------------------*
"SELECTION-SCREEN
*&---------------------------------------------------------------------*

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS :p_werks TYPE t001w-werks,
            p_name1 TYPE t001w-name1.
SELECTION-SCREEN END OF BLOCK b1.

*&---------------------------------------------------------------------*
" AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
  PERFORM f4_help_for_palant.

*&---------------------------------------------------------------------*
*&      Form  f4_help_for_palant
*&---------------------------------------------------------------------*
FORM f4_help_for_palant.

  DATA:
      w_dynpfields TYPE dynpread,
      i_dynpfields LIKE STANDARD TABLE OF dynpread.

  IF i_t001w[] IS INITIAL.
    SELECT werks name1
    FROM t001w
    INTO TABLE i_t001w.
  ENDIF.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'WERKS'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'P_WERKS'
      value_org   = 'S'
    TABLES
      value_tab   = i_t001w
      return_tab  = i_return_tab.

  READ TABLE i_return_tab INTO w_return_tab INDEX 1.
  p_werks = w_return_tab-fieldval.

ENDFORM.                    " f4_help_for_palant
Thanks Venkat.O

Read only

0 Likes
2,364

Hi Venkat,

My code above also works just the same with your suggested code. However, I am not sure if your code displays the Column Label of the values when an F4 function is performed.

I'm expecting to have F4 hitlist values with this format:

BP_ORG_NUMBER Description

1010101010 Org Unit 1

1010101012 Org Unit 2

Without using the field_tab, my F4 displays like this and the selected value is displayed in the screen field:

F0001 Char

1010101010 Org Unit 1

1010101012 Org Unit 2

Using the field_tab, value_tab and return_tab, the F4 displays the correct column label; however, the selected value is not displayed in the screen field.

Thanks and regards,

RE

Read only

Former Member
0 Likes
2,365
TYPES:  BEGIN OF final2,
         field  TYPE char10,
         field2 TYPE char40,
         END OF final2.

Change your Definition of the internal table , try to refer the field Orgunit data element , instead of Char10. and remove it_Field_Tab.

Don't use generic types, use relevant data element for defining the fields of internal table.

Read only

0 Likes
2,364

Hello, Vijay,

Thank you very much!

It worked.

Regards,

RE

THANKS EVERYONE!

Edited by: Reymar Ellazo on Jun 30, 2009 6:40 PM

Read only

MarcinPciak
Active Contributor
0 Likes
2,364

Hi,

What does final_tab1 hold? It seems that you are trying to show empty table. Populate this table with entries from it_field_tab .

Regards

Marcin

Read only

asik_shameem
Active Contributor
0 Likes
2,364

Hi

In the internal table FINAL2 give reference field (NOT char10 or CHAR40). The description you get in F4 help comes from data element level of the reference field.

So do like this.

TYPES:  BEGIN OF final2,
         field  TYPE char10,     " Refer the data element for description something like MARA-MATNR or ZBPORG-FIELD
         field2 TYPE char40,    " Refer the data element for description
         END OF final2.