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 add f4 help in module pool

Former Member
0 Kudos
7,162

How to add f4 help in module pool

10 REPLIES 10

Former Member
829

You have to code in POV event.



_IN SCREEN FLOW LOGIC_

PROCESS BEFORE OUTPUT.
...........................................
.........................................

PROCESS AFTER INPUT.
...........................................
.........................................

PROCESS ON VALUE-REQUEST.	
FIELD field_name MODULE module_name.

_IN ABAP PROGRAM_

MODULE module_name INPUT.

SELECT field_name FROM database_table INTO TABLT ITAB.

* Now call the Function module F4IF_FIELD_VALUE_REQUEST and pass ITAB in value_tab parameter.

ENDMODULE.

Ex:



*&---------------------------------------------------------------------*
*& Report  DEMO_DROPDOWN_LIST_BOX                                      *
*&---------------------------------------------------------------------*

REPORT demo_dropdown_list_box.

*&---------------------------------------------------------------------*
*& Global Declarations                                                 *
*&---------------------------------------------------------------------*

* Screen Interfaces

TABLES sdyn_conn.
DATA   ok_code TYPE sy-ucomm.

* Global data

TYPES: BEGIN OF type_carrid,
         carrid type spfli-carrid,
         carrname type scarr-carrname,
       END OF type_carrid.

DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.


*&---------------------------------------------------------------------*
*& Processing Blocks called by the Runtime Environment                 *
*&---------------------------------------------------------------------*

* Event Block START-OF-SELECTION

START-OF-SELECTION.
  CALL SCREEN 100.

* Dialog Module PBO

MODULE status_0100 OUTPUT.
  SET PF-STATUS 'SCREEN_100'.
ENDMODULE.

* Dialog Modules PAI

MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.

*

MODULE user_command_0100 INPUT.
  CASE ok_code.
    WHEN 'SELECTED'.
      MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
  ENDCASE.
ENDMODULE.

* Dialog Module POV

MODULE create_dropdown_box INPUT.

  SELECT carrid carrname
                FROM scarr
                INTO CORRESPONDING FIELDS OF TABLE itab_carrid.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield        = 'CARRID'
            value_org       = 'S'
       TABLES
            value_tab       = itab_carrid
       EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
  IF sy-subrc <> 0.
    ...
  ENDIF.


krishnendu_laha
Active Contributor
0 Kudos
829

Hi Friend,

In the specified screen code under PROCESS ON VALUE-REQUEST event,

fetch data from DDIC table (which you need for display), and use F4IF_INT_TABLE_VALUE_REQUEST.

Hope it will solve your problem.

Regards

Krishnendu

former_member188827
Active Contributor
0 Kudos
829

u can use fms:

F4IF_INT_TABLE_VALUE_REQUEST

F4IF_FIELD_VALUE_REQUEST

plz reward points if dis helps

Former Member
0 Kudos
829

hi,

In module pool when u r creating the text box. go to the attributes of it and directly give the dictionary name there....

suppose if u want refer matnr.... givee MARA-MATNR in the name...then it 'll get u the f4 help.

Thanks

Arunprasad.P

Former Member
0 Kudos
829

hi,

if u want value from database then u can create search help through SE11 and attach that to that field of screen on which u want F4...

but if u want ur own value then u need to take POV event....

write like this in screen logic after PAI..

PROCESS ON VALUE-REQUEST.

FIELD ifmtp-form_type MODULE fm_drop.

MODULE fm_drop INPUT.

CLEAR ifmtp.

REFRESH ifmtp.

ifmtp-form_type = 'C'.

APPEND ifmtp.

ifmtp-form_type = 'F'.

APPEND ifmtp.

ifmtp-form_type = 'H'.

APPEND ifmtp.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'FORM_TYPE'

value_org = 'S'

TABLES

value_tab = ifmtp.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDMODULE. " fm_drop INPUT

reward if usefull.......

Edited by: Dhwani shah on Mar 6, 2008 11:37 AM

Former Member
0 Kudos
829

Hi,

Refer program DEMO_DYNPRO_F4_HELP_MODULE.

Regards,

Charumathi.B

Former Member
0 Kudos
829

Hi,

Thanks for solution.

now it is showing f4 help but the selected value is not being displaying in the i/p text box on which f4help is provided.

please suggest then it will resolve the whole problem.

Former Member
0 Kudos
829

Hi,

Hoping you dint release the request yet..

goto SE09...

menu option Request/task->complete check> show inactive objects

you have an activate button on the popup..

hope it helps.

santhosh

former_member204244
Active Participant
0 Kudos
829

Hi,

I have one issue where I have to Create f4 help For a field present on SAP standard screen.

Please advice how to do that.

Can i dynamically set Search help in any screen-exit of the standard screen?

Please help.

Thanks,

Ishani

former_member196651
Contributor
0 Kudos
829

Hi Ishani,

Can you please open a new thread and ask? This question is asked almost 6 years ago.

Regards,

Abijith