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

RE : F4 functionality

Former Member
0 Likes
796

hi ,

plz tell me how to add f4 help functionality to a text field in a screen in module pool program. ie., the input should be given by selecting from the list of entries from the database table for that particular field.

Thanks & Regards,

Syam.

7 REPLIES 7
Read only

Former Member
0 Likes
772

Check this sample.

DEMO_DYNPRO_F4_HELP_MODULE

Read only

0 Likes
772

Hello vijay ,

i have seen ur program but i can get a nice understanding of it . So i request you to suggest if there is any other possibility.

Thanks & Regards,

Syam

Read only

0 Likes
772

For Getting the F4 Help in Module pool

1. we have to use Flow logic event POV

Assume that you have a field on screen CARRID

PROCESS ON VALUE-REQUEST.

FIELD CARRID MODULE VALUE_CARRIER.

2. Implement the Module.

MODULE value_carrier INPUT.
"First get the Data to an internal table from some ZTABLE or standard table. then you have to pass the table to this function.
  SELECT  carrid connid
    FROM  spfli
    INTO  CORRESPONDING FIELDS OF TABLE values_tab
    WHERE carrid = field_value-fieldvalue.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = 'CARRID'  "<---retun field from table
            dynpprog    = sy-repid
            dynpnr      = sy-dynnr
            dynprofield = 'CARRID' " <---screen field
            value_org   = 'S'
       TABLES
            value_tab   = values_tab. "<---Internal table for F4 help

ENDMODULE.

follow the steps and Provide the F4 for your fields.

Read only

Former Member
0 Likes
772

Hi,

just follow these steps for F4 help in Module Pool

Define module like this in PAI of your screen

zmoufpmas1-mouno is my screen field

getmouno is my module name.


PROCESS ON VALUE-REQUEST.
  FIELD zmoufpmas1-mouno MODULE getmouno.

*double click on getmouno this module.

*and code like below.


*******************************************************************
MODULE getmouno INPUT.

  DATA choice TYPE sy-tabix.

* select values for display in F4 help popup

    SELECT mouno FROM zmoufpmas1 INTO TABLE  it_mouno WHERE delflag <> 'X'.

  CALL FUNCTION 'POPUP_WITH_TABLE'
    EXPORTING
      endpos_col   = 19
      endpos_row   = 20
      startpos_col = 10
      startpos_row = 2
      titletext    = 'MoU No.'
    IMPORTING
      choice       = choice
    TABLES
      valuetab     = it_mouno[] 
    EXCEPTIONS
      break_off    = 1
      OTHERS       = 2.
  IF sy-subrc = 0.
*assigning selected value to  screen field 
 zmoufpmas1-mouno = choice.  

  ENDIF.

ENDMODULE.

Thanks,

Murugan.B

Read only

0 Likes
772

hi ,

u r program is ok , but i need clarity and regarding

getmouna and z____-mouna , what r they ?

what should be the text field name on the screen for ur sample program given ?

Thanks & Regards,

Syam.

Read only

0 Likes
772

Hi,

zmoufpmas1-mouno is my screen field which i gave in tht text element in screen...its just an example, instead of this u can use ur own variable..

getmouno is my module name. this also an example instead u can use your own module name.

Thanks

Murugan.B

Read only

Former Member
0 Likes
772

HELLO ,

THANKS FOR ALL ABAPERS.

SYAM