‎2006 Jan 31 8:58 AM
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
‎2006 Jan 31 9:11 AM
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"
‎2006 Jan 31 9:04 AM
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.
‎2006 Jan 31 9:11 AM
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"
‎2006 Jan 31 9:11 AM
Use the FM 'DYNP_VALUES_READ' to read the value in the first parameter and then use the FM
sugggested above.
‎2006 Jan 31 9:50 AM
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
‎2006 Jan 31 9:59 AM
‎2006 Jan 31 10:16 AM
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
‎2006 Jan 31 11:03 AM
Hi Uma,
Have a look at demo programs
DEMO_DROPDOWN_LIST_BOX
DEMO_DYNPRO_F4_HELP_MODULE
Thanks
Lakshman