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

4IF_INT_TABLE_VALUE_REQUEST doesn't update selection screen

Former Member
0 Likes
3,011

Hello,

I'm having an issue with FM F4IF_INT_TABLE_VALUE_REQUEST' where it doesn't return the value to the screen field after I select a value from the list. I'm trying to use the FM to automatically update the screen field from which this custom search help was evoked.

~~~ I DO NOT want to use return_tab as I will need to update more than 1 field on the selection screen as my next step.

Here is the code:

SELECTION-SCREEN BEGIN OF LINE.

PARAMETER p_kunde TYPE vbcom-kunde.

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_kunde.

    PERFORM get_customer.

FORM get_customer.

  DATA: BEGIN OF lt_conf OCCURS 0,

    sortl TYPE kna1-sortl,

    pstlz TYPE kna1-pstlz,

    ort01 TYPE kna1-ort01,

    name1 TYPE kna1-name1,

    kunnr TYPE kna1-kunnr,

  END OF lt_conf.

  lv_syrepid = sy-repid.

  lv_sydynnr = sy-dynnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

*     DDIC_STRUCTURE         = ' '

      retfield               = 'KUNNR'

*     PVALKEY                = ' '

     dynpprog               = lv_syrepid

     dynpnr                 = lv_sydynnr

     dynprofield            = 'P_KUNDE'

     STEPL                  = 0

*     WINDOW_TITLE           =

*     VALUE                  = ' '

     value_org              = 'S'

*     MULTIPLE_CHOICE        = ' '

*    DISPLAY                = ' '

*     CALLBACK_PROGRAM       = ' '

*     CALLBACK_FORM          = ' '

*     MARK_TAB               =

*   IMPORTING

*     USER_RESET             =

    TABLES

      value_tab              = lt_conf

*      field_tab             =  lt_fields

*      dynpfld_mapping       = lt_mapp

ENDFORM.

Help is very much appreciated!

Hello,

I'm having an issue with FM F4IF_INT_TABLE_VALUE_REQUEST' where it doesn't return the value to the screen field after I select a value from the list. I'm trying to use the FM to automatically update the screen field from which this custom search help was evoked.

~~~ I DO NOT want to use return_tab as I will need to update more than 1 field on the selection screen as my next step.

Here is the code:

SELECTION-SCREEN BEGIN OF LINE.

PARAMETER p_kunde TYPE vbcom-kunde.

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_kunde.

    PERFORM get_customer.

FORM get_customer.

  DATA: BEGIN OF lt_conf OCCURS 0,

    sortl TYPE kna1-sortl,

    pstlz TYPE kna1-pstlz,

    ort01 TYPE kna1-ort01,

    name1 TYPE kna1-name1,

    kunnr TYPE kna1-kunnr,

  END OF lt_conf.

  lv_syrepid = sy-repid.

  lv_sydynnr = sy-dynnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

*     DDIC_STRUCTURE         = ' '

      retfield               = 'KUNNR'

*     PVALKEY                = ' '

     dynpprog               = lv_syrepid

     dynpnr                 = lv_sydynnr

     dynprofield            = 'P_KUNDE'

     STEPL                  = 0

*     WINDOW_TITLE           =

*     VALUE                  = ' '

     value_org              = 'S'

*     MULTIPLE_CHOICE        = ' '

*    DISPLAY                = ' '

*     CALLBACK_PROGRAM       = ' '

*     CALLBACK_FORM          = ' '

*     MARK_TAB               =

*   IMPORTING

*     USER_RESET             =

    TABLES

      value_tab              = lt_conf

*      field_tab             =  lt_fields

*      dynpfld_mapping       = lt_mapp

ENDFORM.

Help is very much appreciated!

16 REPLIES 16
Read only

Former Member
0 Likes
2,863

Hi,

May I know where do you put your selection from table KNA1?

select * from kna1 into corresponding fields of table lt_conf up to 20 rows.

   lv_syrepid = sy-repid.

   lv_sydynnr = sy-dynnr.

Jake.

Read only

0 Likes
2,863

Hi Jake,

Sorry I omitted this part but it does work correctly - I do get the list with correct values where the user can select the value.

The part that doesn't work is when they select a line the FM doesn't return it into the selection screen.

Thanks,

Roman

Read only

0 Likes
2,863

Try to put the selection back. I think this will work because I tried it.

Read only

0 Likes
2,863

Jake, I meant I omitted this portion in this posting. I have that in my code and I get the values in the list. The problem is that the FM does not return the value selected into the dynpro screen's filed which in this case is Selection screen.

Thanks

Read only

Former Member
0 Likes
2,863

Your code does work..Just need to put the code for data selection .

Read only

0 Likes
2,863

Hi,

Like I said in my intial question - I do not want to use return_tab. The FM is supposed to automatically return the value selected into the selection screen, that's why I specify:

     dynpprog               = lv_syrepid

     dynpnr                 = lv_sydynnr

     dynprofield            = 'P_KUNDE'

Please read the full description for the FM here:

http://help.sap.com/saphelp_470/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm

It claims to have that functionality but it doesn't work for me!

Thanks,

Roman

Read only

Former Member
0 Likes
2,863

Read the following WIKI with good example

http://wiki.sdn.sap.com/wiki/display/ABAP/ON+VALUE-REQUEST+event

Read only

0 Likes
2,863

Krupa's link is the best example. You can see the reference link and close this thread.

Ram

Read only

Former Member
0 Likes
2,863

Hi,

Like I said in my initial question - I do not want to use return_tab. The FM is supposed to automatically return the value selected into the selection screen, that's why I specify:

     dynpprog               = lv_syrepid

     dynpnr                 = lv_sydynnr

     dynprofield            = 'P_KUNDE'

Please read the full description for the FM here:

http://help.sap.com/saphelp_470/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm

It claims to have that functionality but it doesn't work for me!

Thanks,

Roman

Read only

Former Member
0 Likes
2,863

Clarification: this question is about FM updating dynpro screen and is not about how to use the FM. In the end of the FM there is another function that is supposed to update the screen but it doesn't do anything in my case. I tried running this function exclusivelly in my program and it doesn't work. Please do not post examples of how to use this FM.

Thanks,

Roman

Read only

former_member213851
Active Contributor
0 Likes
2,863

Hi,

You can try below code for returning values to selection screen after selecting from F4 help:

FORM show_f4_help .

   DATA  : dyfields LIKE dynpread OCCURS 1 WITH HEADER LINE.

   REFRESH tlaufk.

   tlaufk-laufk = space.

   tlaufk-sign  = 'I'.

   APPEND tlaufk.

   CALL FUNCTION 'F4_ZAHLLAUF'

     EXPORTING

       f1typ            = 'I'

       f2nme            = 'F110V-LAUFD'

     IMPORTING

       laufd            = f110v-laufd

       laufi            = f110v-laufi

       nothing_selected = xf4_c1

     TABLES

       laufk            = tlaufk.

   s_laufd = f110v-laufd.

   dyfields-fieldvalue  = f110v-laufi.

   dyfields-fieldname = 'S_LAUFI'.

   APPEND dyfields.

   CALL FUNCTION 'DYNP_VALUES_UPDATE'

     EXPORTING

       dyname     = sy-cprog

       dynumb     = sy-dynnr

     TABLES

       dynpfields = dyfields.

ENDFORM.                    " SHOW_F4_HELP

Here for selected LAUFD (Run date ) the corresponding Identification number will be returned back on the screen.

Read only

0 Likes
2,863

Hi Sachin,

I tried your code and it did not help. The 'DYNP_VALUES_UPDATE' fm actually is a part of the first module ('F4_ZAHLLAUF') and is a part of the module I'd tried to use as well (4IF_INT_TABLE_VALUE_REQUEST).

However, the 'DYNP_VALUES_UPDATE' does not update the screen. I think this is the culprit though.

Thanks,

Roman

Read only

0 Likes
2,863

hi Roman,

You have to call the above form in the At selection screen event as follows :

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_laufd.

   PERFORM show_f4_help.

also check whether you have declare tlaufk as follows :

DATA:    BEGIN OF tlaufk OCCURS 1.

         INCLUDE STRUCTURE ilaufk.

DATA:    END OF tlaufk.

Read only

Former Member
0 Likes
2,863

Hi,

Well, I tried your exact code and this is fully working on my side...

Here is what I've done:

REPORT ztest.

SELECTION-SCREEN BEGIN OF LINE.
PARAMETER p_kunde TYPE vbcom-kunde.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_kunde.
  PERFORM get_customer.

*&---------------------------------------------------------------------*
*&      Form  get_customer
*&---------------------------------------------------------------------*
FORM get_customer.
  DATA: lv_syrepid TYPE syrepid,
        lv_sydynnr TYPE sydynnr.

  DATA: BEGIN OF lt_conf OCCURS 0,
    sortl TYPE kna1-sortl,
    pstlz TYPE kna1-pstlz,
    ort01 TYPE kna1-ort01,
    name1 TYPE kna1-name1,
    kunnr TYPE kna1-kunnr,
  END OF lt_conf.

  FIELD-SYMBOLS <f> LIKE LINE OF lt_conf.

  APPEND INITIAL LINE TO lt_conf ASSIGNING <f>.
  <f>-sortl = 'ABC'.
  <f>-pstlz = '1000'.
  <f>-ort01 = 'Test'.
  <f>-name1 = 'Name test'.
  <f>-kunnr = '123456'.

  APPEND INITIAL LINE TO lt_conf ASSIGNING <f>.
  <f>-sortl = 'XYZ'.
  <f>-pstlz = '1050'.
  <f>-ort01 = 'Test2'.
  <f>-name1 = 'Name test2'.
  <f>-kunnr = '654321'.

  lv_syrepid = sy-repid.
  lv_sydynnr = sy-dynnr.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'KUNNR'
      dynpprog    = lv_syrepid
      dynpnr     
= lv_sydynnr
      dynprofield
= 'P_KUNDE'
      stepl       = 0
      value_org   = 'S'
    TABLES
      value_tab   = lt_conf.
ENDFORM.                    "get_customer

If this is not working, maybe you have an issue with your SAP kernel?

Cheers,

Manu.

Read only

0 Likes
2,863

Hi Manu,

That's exactly what I have and it doesn't work. I found an old note where this problem was reported. However, it has been resolved in 6.1 and my SAP environement is 700 kernel.

I can see that SAP programs do use the same fm successfully. The difference is that SAP never use selection screens and they have DDIC structure for each screen.

Thanks,

Roman

Read only

0 Likes
2,863

Hi,

Then I guess this can be solved with a newer kernel release... mine is 720 with a Pkg. level 214... and no issue at all... Unfortunately, I don't think we can help you further...

Cheers,

Manu.