Application Development 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: 

How to read F4 pop-up field values?

Former Member
0 Kudos

Hi,

We are using "Z" match code in the program. When press F4 from pop-up having fileds like material and plant. We have to capture those two field values in the program.

Can any body have idea, how to fulfill the above requirement?

Regards,

Suuresh Kumar.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Please try this code:



 CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' <---- Use this FM or the your 'Z' FM
       EXPORTING
            retfield     = 'field name'
            dynpprog     = gv_repid
            dynpnr       = sy-dynnr
            window_title = text-002
            value_org    = 'S'
       TABLES
            value_tab    = gt_f4table
            return_tab   = gt_matnr_returned.

  IF sy-subrc EQ 0.
    IF NOT gt_matnr_returned[] IS INITIAL.
      READ TABLE gt_matnr_returned INTO gs_matnr_returned INDEX 1.
      p_matnr = gs_matnr_returned-fieldval.  <- --------------------- Your parameter where you want to capture the value.
    ENDIF.
  ENDIF.

Please let me know if your problem persists...

4 REPLIES 4

former_member583013
Active Contributor
0 Kudos

Use DYNP_VALUES_UPDATE FM after calling the "Z" F4...

Greetings,

Blag.

Former Member
0 Kudos

Hi,

Could any body help me to resolve my problem please?

Regards,

SK.

Former Member
0 Kudos

Hi,

Please try this code:



 CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' <---- Use this FM or the your 'Z' FM
       EXPORTING
            retfield     = 'field name'
            dynpprog     = gv_repid
            dynpnr       = sy-dynnr
            window_title = text-002
            value_org    = 'S'
       TABLES
            value_tab    = gt_f4table
            return_tab   = gt_matnr_returned.

  IF sy-subrc EQ 0.
    IF NOT gt_matnr_returned[] IS INITIAL.
      READ TABLE gt_matnr_returned INTO gs_matnr_returned INDEX 1.
      p_matnr = gs_matnr_returned-fieldval.  <- --------------------- Your parameter where you want to capture the value.
    ENDIF.
  ENDIF.

Please let me know if your problem persists...

Former Member
0 Kudos

Hi Sneha,

Thanks for your quick response. I am working on 3.1i version. Above FM will not available in the 3.1i.

I am trying to find alternate FM in the 3.1i version.

Regards,

SK.