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 selction screen values

Former Member
0 Likes
774

Hi ,

In my report there are two parameter

1. country

2.airport code

when i enetred country , then the airport will display the corresponding airports and description only,

there is a table where i get the country , airports and descriptions,

Please suggest how to solve this

regards,

krishna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
751

Hi Krishna,

you can use FM

F4IF_INT_TABLE_VALUE_REQUEST

select first all the details into a table

and pass that into 'value_tab'

field name

program name

and value_org = 'S'

should also be declared.

Regards,

Talwinder

4 REPLIES 4
Read only

Former Member
0 Likes
752

Hi Krishna,

you can use FM

F4IF_INT_TABLE_VALUE_REQUEST

select first all the details into a table

and pass that into 'value_tab'

field name

program name

and value_org = 'S'

should also be declared.

Regards,

Talwinder

Read only

Former Member
0 Likes
751

Hi Krishna,

In the Event

AT SELECTION-SCREEN ON VALUE-REQUEST FOR Country.

Fill table with Airport and Description based on country selected.

To fill F4 help for Airport, Use FM

F4IF_INT_TABLE_VALUE_REQUEST

EXPORTING

retfield = 'AIRPORT'

tables

value_tab = Itab

RETURN_TAB = it_return

Lokesh

Read only

Former Member
0 Likes
751

Hi,

as per my understanding you have to provide the F4 help for airport based on the country code entered, if my guess is correct follow the below procedure.

write the code in "at selection-screen on value-request for airport"

1) use the function module "DYNP_VALUES_READ" function module to capture the country entered on the selection screen.

2) select the airports based on the country code entered.

3) us the function moduel "F4IF_INT_TABLE_VALUE_REQUEST" to display the airport list in list of possible window.

Refer the below code you will understand.

here i am taking material and material description, based on the entered material i am fetching the material description on F4 help.

TABLES: mara.

DATA:

BEGIN OF x_matnr OCCURS 0,

matnr LIKE mara-matnr,

maktx like makt-maktx,

END OF x_matnr.

DATA:

l_dynprofld TYPE help_info-dynprofld,

l_matnr(7) TYPE c VALUE 'P_MATNR',

l_prog TYPE sy-repid,

l_dynnr TYPE sy-dynnr.

PARAMETERS: p_matnr LIKE mara-matnr,

p_maktx like makt-maktx.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_maktx.

PERFORM f_get_values.

FORM f_get_values.

DATA: i_return LIKE ddshretval OCCURS 0,

i_dynpfields like DYNPREAD occurs 0 with header line,

l_repid like sy-repid.

l_repid = sy-repid.

i_dynpfields-fieldname = 'P_MATNR'.

APPEND I_DYNPFIELDS.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = l_repid

dynumb = '1000'

tables

dynpfields = i_dynpfields .

IF sy-subrc = 0.

READ TABLE I_DYNPfields INDEX 1.

IF SY-SUBRC = 0.

CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'

EXPORTING

input = I_DYNPfields-FIELDVALUE

IMPORTING

OUTPUT = I_DYNPfields-FIELDVALUE.

select matnr maktx from makt into table x_matnr

where matnr = I_DYNPfields-FIELDVALUE.

ENDIF.

ENDIF.

IF NOT X_MATNR[] IS INITIAL.

l_prog = sy-repid.

l_dynnr = sy-dynnr.

l_dynprofld = l_matnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MAKTX'

dynpprog = l_prog

dynpnr = l_dynnr

dynprofield = l_dynprofld

value_org = 'S'

TABLES

value_tab = x_matnr

return_tab = i_return.

IF sy-subrc NE 0.

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

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

ENDIF.

ENDIF.

ENDFORM. " F_GET_VALUES

Reward if useful.

Thanks,

Sreeram.

Edited by: Sreeram Prasad on Jan 3, 2008 11:38 AM

Edited by: Sreeram Prasad on Jan 3, 2008 11:39 AM

Read only

Former Member
0 Likes
751

See this URL: