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: 

AT SELECTION-SCREEN.

Former Member
0 Kudos

Hi Experts,

I have created a Select-Options. Inside AT SELECTION SCREEN on VALUE REQUEST for this field I have fired a query then display it through F4IF_INT_TABLE_VALUE_REQUEST. BUt while pressing the F4 when I am giving the exact value it is showing me the F4 help and when I am passing 0000 it is not firing the query. Thats why F4 help is not displaying in this case.

Can anybody help me why it is happening and what I can do to solve it?

Thanks in Advance....

5 REPLIES 5

Former Member
0 Kudos

Just check the query when it is getting executed by putting a break-point and also check the internal table you had passed to the function module.

Regards,

Midhun Abraham

Edited by: Midhun Abraham on Sep 30, 2008 8:51 AM

Former Member
0 Kudos

Populate internal table for F4 help in event INITIALIZATION not in AT SELECTION-SCREEN.

Regards,

Aparna.

former_member755502
Participant
0 Kudos

Hi,

"BUt while pressing the F4 when I am giving the exact value it is showing me the F4 help and when I am passing 0000 it is not firing the query" Please clarify this part of your query... I have not understood...

Subhankar
Active Contributor
0 Kudos

Hi

please check the sample code..

REPORT Z_TEST_SUBHA4.

DATA: progname TYPE progname.

CONSTANTS:

c_check TYPE char01 VALUE 'X' . " Flag

SELECT-OPTIONS:

s_prog FOR progname " Program Name

NO INTERVALS .

  • F4 help fom program name

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prog-low.

  • Read the selection screen value dynamically

PERFORM sub_read_dynamic_value.

  • F4 help fom program name

PERFORM sub_f4help_program_name USING s_prog-low.

FORM sub_read_dynamic_value .

  • Local data declaration

DATA: l_wa_dynp TYPE dynpread, "Work area for dynamic read

l_i_dynp TYPE STANDARD TABLE OF dynpread

INITIAL SIZE 0. "Internal table for dynamic read

l_wa_dynp-fieldname = 'S_PROG-LOW'. "Field name

APPEND l_wa_dynp TO l_i_dynp.

CLEAR : l_wa_dynp.

  • Get the selection screen value dynamically

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid " Program name

dynumb = sy-dynnr " Screen number

TABLES

dynpfields = l_i_dynp

EXCEPTIONS

invalid_abapworkarea = 1

invalid_dynprofield = 2

invalid_dynproname = 3

invalid_dynpronummer = 4

invalid_request = 5

no_fielddescription = 6

invalid_parameter = 7

undefind_error = 8

double_conversion = 9

stepl_not_found = 10

OTHERS = 11.

IF sy-subrc = 0.

  • Put the screen value in the select-options

READ TABLE l_i_dynp INTO l_wa_dynp INDEX 1.

s_prog-low = l_wa_dynp-fieldvalue.

ENDIF.

ENDFORM.

FORM sub_f4help_program_name USING p_prog TYPE progname.

  • Local data declaration

DATA: l_object_typ TYPE seu_obj. " Object type

  • Set object type as program

l_object_typ = 'PROG'.

  • Get F4 help

CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'

EXPORTING

object_type = l_object_typ

object_name = p_prog

suppress_selection = c_check

without_personal_list = c_check

IMPORTING

object_name_selected = p_prog

EXCEPTIONS

cancel = 1

wrong_type = 2

OTHERS = 3.

  • SY-SUBRC check is not required

ENDFORM.

I think it will solve your problem

hymavathi_oruganti
Active Contributor
0 Kudos

"BUt while pressing the F4 when I am giving the exact value it is showing me the F4 help and when I am passing 0000 it is not firing the query. "

By the above you mean paasing value into the select query right?

ok, the problem is you are not getting F4 help when you pass 0000 right?

Are you sure there is some data in the table (from which you are fetching using select query) with the value equal to "0000" ?

please check that.