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

Parameter help

Former Member
0 Likes
776

Hi All,

I have two input parameters in my report. Both have set f4 help using search help objects.

Based on the fisrt parameter's value, i need to execute a select statement and then the second parameter help list should be populated from the resultset.

How can i do this?

Thanks and Regards,

Uma

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

Hi Uma,

first read the values(of first parameter) in the selection-screen using the funciton module "DYNP_VALUES_READ" and provide f4 help for the second parameter using the function module "F4IF_INT_TABLE_VALUE_REQUEST" fill the value_tab parameter of this fm with the values based on the values retrieved from the fm "DYNP_VALUES_READ"

7 REPLIES 7
Read only

hymavathi_oruganti
Active Contributor
0 Likes
758

ex:

declare itab

data : ret_tab like ddshretval occurs 0 with header line.

parametes: a like mara-matnr,

b like mara-mbrsh .

select mbrsh from mara into table itab

where matnr = a.

at selection-screen on value-request for b.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'B'

VALUE_ORG = 'S'

CALLBACK_PROGRAM = V_REPID

TABLES

VALUE_TAB = itab RETURN_TAB = RET_TAB.

REFRESH it_pval.

read table ret_tab index 1.

IF SY-SUBRC = 0.

move ret_tab-fieldval to B.

ENDIF.

Read only

Former Member
0 Likes
759

Hi Uma,

first read the values(of first parameter) in the selection-screen using the funciton module "DYNP_VALUES_READ" and provide f4 help for the second parameter using the function module "F4IF_INT_TABLE_VALUE_REQUEST" fill the value_tab parameter of this fm with the values based on the values retrieved from the fm "DYNP_VALUES_READ"

Read only

Former Member
0 Likes
758

Use the FM 'DYNP_VALUES_READ' to read the value in the first parameter and then use the FM

sugggested above.

Read only

Former Member
0 Likes
758

Thanks a lot for all your replies. But still my f4 help list for second parameter is not getting populated. Here is my code.

  • itab "itab_product" declaration

SELECTION-SCREEN BEGIN OF SCREEN 0001.

  • Input Parameters.

parameters pa like tableA-PRODUCT_NAME Matchcode object

ZPRODUCTHELP.

parameters pb like itab_product-PRODUCT_MODEL.

SELECTION-SCREEN END OF SCREEN 0001.

CALL SELECTION-SCREEN '0001' STARTING AT 10 10.

  • select statement from tableA into itab_product

  • condition pa=tableA-field1.

AT SELECTION-SCREEN ON value-REQUEST FOR pb.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'pb'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab_product.

Where am i gone wrong?

Thanks,

Uma

Read only

0 Likes
758

RETURN_TAB = RET_TAB.

u have not given return tab.

Read only

0 Likes
758

SELECTION-SCREEN BEGIN OF SCREEN 0001.

  • Input Parameters.

parameters pa like tableA-PRODUCT_NAME Matchcode object

ZPRODUCTHELP.

parameters pb like itab_product-PRODUCT_MODEL.

SELECTION-SCREEN END OF SCREEN 0001.

CALL SELECTION-SCREEN '0001' STARTING AT 10 10.

  • select statement from tableA into itab_product

  • condition pa=tableA-field1.

AT SELECTION-SCREEN ON value-REQUEST FOR pb.

<b> DL_REPID = SY-REPID.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = DL_REPID

DYNUMB = '0001'

TABLES

DYNPFIELDS = DT_DYNPREAD

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.

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

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

ENDIF.

READ TABLE DT_DYNPREAD INDEX 1.

  • write your logic for selects

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'PB'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab_product.

try the highlighthed changes

Read only

Lakshmant1
Active Contributor
0 Likes
758

Hi Uma,

Have a look at demo programs

DEMO_DROPDOWN_LIST_BOX

DEMO_DYNPRO_F4_HELP_MODULE

Thanks

Lakshman