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

at selection-screen on value request

Former Member
0 Likes
1,023

Hi,

I am filling a internal table by appending some values. Now I want to see this entries as my F4 help. I am using FM 'F4IF_INT_TABLE_VALUE_REQUEST'.

But I am not getting these values.

Plesae help

Regards,

Jeetu

9 REPLIES 9
Read only

Former Member
0 Likes
999

The Function Module that you specified provides an F4 help that returns the values that have selected in an internal table.

This FM(Function Module) is quite useful when you are programming your own F4 help for a field.

the following example may be of some help to you:

DATA: lf_repid LIKE sy-repid,

lf_dynnr LIKE sy-dynnr,

lf_dynprofield LIKE help_info-dynprofld,

lf_retfield LIKE dfies-fieldname.

MOVE sy-repid TO lf_repid.

MOVE sy-dynnr TO lf_dynnr.

MOVE 'PA_DPROF' TO lf_dynprofield.

MOVE 'PROFILNAME' TO lf_retfield.

PERFORM prepare_gt_value_tab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = lf_retfield

dynpprog = lf_repid

dynpnr = lf_dynnr

dynprofield = lf_dynprofield

value_org = 'S'

TABLES

value_tab = it_value_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

I hope this helps.

************************************

In the function module F4IF_INT_TABLE_VALUE_REQUEST,

there is return_tab parameter in TABLES, pass a table of type ddshretval

after the function module, read the value from return_table and pass it to the alv and then refresh alv display.

The selected row in the alv is obtained from row id "es_row_no-row_id"

Check this example for any issues.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'PARENT'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'PARENT'

stepl = 0

window_title = text-016

value_org = 'S'

TABLES

value_tab = gt_parent

return_tab = gt_ret_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE i022(zconvobj).

ENDIF.

READ TABLE gt_ret_tab INTO gs_ret_tab INDEX 1.

  • do the required in the alv using gs_ret_tab

Regards,

Pavan

Read only

Former Member
0 Likes
999

Hi ,

in order to do that First you have to catch the screen values and use the

Function module which you have specified.

Thanks,

Srinivas

Read only

Former Member
0 Likes
999

Hi

Check these threads

Regards

Raj

Read only

Former Member
0 Likes
999

hi Jeetu

modify ur internal table after filling values. then u will see them

regards

ravish

<b>plz dont forget to reward points if useful</b>

Read only

0 Likes
999

Hi Ravish,

Please see my code below.

It is not working. I am getting the screen but not the four values.

PARAMETERS: p_ext_no TYPE crmt_external_activity_id OBLIGATORY , "External Number Range

p_ord_ty type ty_order_type-order_type . "Order Type

*SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ord_ty.

gw_order_type-order_type = 'Service Tickets'.

APPEND gw_order_type TO gt_order_type.

gw_order_type-order_type = 'Interaction Records'.

APPEND gw_order_type TO gt_order_type.

gw_order_type-order_type = 'Sales Order'.

APPEND gw_order_type TO gt_order_type.

gw_order_type-order_type = 'Refund Orders'.

APPEND gw_order_type TO gt_order_type.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'ORDER_TYPE'

  • PVALKEY = ' '

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_ORD_TY'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

DISPLAY = 'F'

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

value_tab = gt_order_type[]

  • FIELD_TAB =

RETURN_TAB = return

  • DYNPFLD_MAPPING =

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3

Read only

0 Likes
999

Hi Jeetu,

Try after commenting below lines

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_ORD_TY'

Regards,

Atish

Read only

0 Likes
999

Hi All,

Still it is not working. Can anybody tell me what is the problem?

Regards,

jeetu

Read only

0 Likes
999

Try like below code..and check how u have declatred the internal table for value tab.

report ztest.

DATA t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE..

parameters: P_vbeln like kna1-kunnr.

----


at selection-screen on value-request for p_vbeln.

data: begin of t_ship occurs 0,

ord_type type cHAR20,

end of t_ship.

DATA t_return_Ship LIKE ddshretval OCCURS 0 WITH HEADER LINE..

t_ship-ord_type = 'T1'.

append t_ship.

t_ship-ord_type = 'T2'.

append t_ship.

t_ship-ord_type = 'T3'.

append t_ship.

*select kunnR from KNA1 into table t_ship

**where KUNNR = KUAGV-KUNNR and "C

*Where KUNNR = 'A123653'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'ORD_TYPE'

  • PVALKEY = ' '

DYNPPROG = SY-REPID

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

value_org = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

value_tab = t_ship

  • FIELD_TAB =

return_tab = t_return_SHIP

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3

.

IF sy-subrc = 0.

p_vbeln = t_return_SHIP-fieldval.

ENDIF.

Message was edited by:

Sumi Vasu

Read only

0 Likes
999

Hi Jeetu,

Can you show me the internal table declaration of gt_order_type which you have used for the search help.There you have to give the order type field as referring the dicitionary field.If you simply declare it as Character field then search help will not come.