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

Regarding F4 help in Module pool Programming

Former Member
0 Likes
2,871

Hi folks,

I have created a Screen in Module pool. I have to attach a F4 help for a field. I did that using the Function Module 'F4IF_INT_TABLE_VALUE_REQUEST'. Its working fine, but the when i click the value in the window, correct field value is not coming to the screen field. I have to get the value of first field in that window, but the value of the last field is coming to the screen. I have cheked the return table in debugging. It getting the value of last field, but not the first field. I have given the correct field value in the retfield parameter. Can any body suggest me why its not coming..

Thanks and Regards,

Shyam.

12 REPLIES 12
Read only

Former Member
0 Likes
2,360

HI.

sort out the internal table before passing value to F4 help.

Regards.

Jay

Read only

Former Member
0 Likes
2,360

HI

Did you pass

VALUE_ORG = 'S' in the FM that you used. if so please post your code for the F4 Event.

Regards

Ramchander Rao.K

Read only

0 Likes
2,360

Hi Ramachander,

I have already passed 'S' to value_org.

Please find my source code below.


MODULE set_hodf4 INPUT.

  MOVE 'IT_HODF4-DEPTID' TO iretfield.

  REFRESH it_hodf4.

  SELECT DISTINCT deptid
                  bukrs
                  werks FROM zmm_ktph_hodmail INTO TABLE it_hodf4.

  DESCRIBE TABLE it_hodf4 LINES my-tfill.

  CASE my-tfill.
    WHEN '0'.
* No & entries found.
      MESSAGE i005.

    WHEN OTHERS. "Get F4 help
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
*    DDIC_STRUCTURE              = ' '
          retfield               = iretfield
*   DYNPPROG               = ' '
*   DYNPNR                 = ' '
*   DYNPROFIELD            = ' '
         window_title           = c_hod
         value_org              = 'S'
         display                = 'F'
* IMPORTING
*   USER_RESET             =
        TABLES
         value_tab              = it_hodf4
         return_tab             = f4_hod
       EXCEPTIONS
         parameter_error        = 1
         no_values_found        = 2
         OTHERS                 = 3
                .
      IF NOT f4_hod[] IS INITIAL.
        MOVE f4_hod-fieldval TO zmm_ktph_hodmail-deptid.
      ENDIF.

  ENDCASE.

ENDMODULE.                 " set_HODf4  INPUT

Thanks,

Shyam.

Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 10:33 AM

Read only

0 Likes
2,360

Hi Prasad,

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

DDIC_STRUCTURE = ' '

retfield = iretfield

DYNPPROG = sy-repid

DYNPNR = sy-dynnr

DYNPROFIELD = " pass your screen field name in Single quotes

window_title = c_hod

value_org = 'S'

display = 'F'

Read only

0 Likes
2,360

Hi,

You have to pass retfield, Dynnprog, Dynnr and value org. Try with this

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'Field Name'

dynpprog = ws_repid (Sy-repid)

dynpnr = sy-dynnr (sy-dynnr)

value_org = 'S'

TABLES

value_tab = i_zmodel_map

return_tab = v_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

Regards

sasi

Read only

0 Likes
2,360

Hi Shyam,

Please remove IT_HODF4 while assigning the iretfield.


MOVE 'DEPTID' TO iretfield.

Also you could remove display = 'F' parameter from FM

Assign program and dynpro through sy-repid and sy-dynnr.

Your FM should work well.

Revert with results.

Read only

0 Likes
2,360

Hi all,

Thanks for your suggestions.Its working now.

I have just moved 'DEPTID' TO iretfield and passed the DYNPRO and DYNNR values.

Regards,

Shyam.

Read only

Former Member
0 Likes
2,360
Read only

Former Member
0 Likes
2,360

hi

please Check return field of FM .. F4_IF.........

Regards.

Raju Mummidi

Read only

Former Member
0 Likes
2,359

1. VALUE_ORG = 'S' (Structure)

This option should be used for new developments (despite other default values).

Regards

Sasi

Read only

Former Member
0 Likes
2,359

Hi Shyam,

Do a quick Checklist if the following has been given correctly.....

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'FIELD_TO_BE_DISPLAYED/RETURNED' -> in capital letter/single quotes

dynpprog = 'CURRENT_PGM_NAME' "sy-repid

dynpnr = 'CURRENT SCREEN' "sy-dynnr

dynprofield = 'FIELD NAME OF SCREEN WHICH WILL ACCEPT VALUE FROM F4'

-> in capital letter/single quotes

value_org = 'S' -> in capital letter/single quotes

tables

value_tab = INTERNAL TABLE WITH DATA.

Regards

Byju

Read only

Former Member
0 Likes
2,359

If despite giving the correct field in retfield parameter you are not getting the right field then could you please post the code of your FM alongwith the data definitions.

That would help us to suggest you something more.