‎2008 May 09 6:04 PM
Hi,
Can we assign search help at runtime depending on user input? I have s drop-down box, depending on user's choice, i need to siplay different values in the search help. Can I assign search help to the screen element during runtime???
Please help.
Thanks,
Sheel
‎2008 May 09 6:15 PM
Please check fm HELP_VALUES_GET_WITH_MATCHCODE and sap standard program PPORPE01
a®
‎2008 May 09 6:10 PM
No, but you can build F4 help on the fly at runtime based off another field.
For example, in this program, the user enters the sales order number, and then when they do F4 on the line item, they can only choose from valid line item numbers.
report zrich_0002 .
parameters: p_vbeln type vbak-vbeln,
p_posnr type vbap-posnr.
at selection-screen on value-request for p_posnr.
data: begin of help_item occurs 0,
posnr type vbap-posnr,
matnr type vbap-matnr,
arktx type vbap-arktx,
end of help_item.
data: dynfields type table of dynpread with header line.
dynfields-fieldname = 'P_VBELN'.
append dynfields.
call function 'DYNP_VALUES_READ'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
tables
dynpfields = dynfields
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.
read table dynfields with key fieldname = 'P_VBELN'.
p_vbeln = dynfields-fieldvalue.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_vbeln
importing
output = p_vbeln.
select posnr matnr arktx into table help_item
from vbap
where vbeln = p_vbeln.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'POSNR'
dynprofield = 'P_POSNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = help_item.Regards,
Rich Heilman
‎2008 May 09 6:14 PM
You can use the function module F4IF_FIELD_VALUE_REQUEST in the event AT SELECTION-SCREEN ON VALUE-REQUEST for <field>. Pass the Search help you want to display to the field SEARCHHELP. So based on your logic you can pass different search helps.
Hope this is helpful.
Thanks,
Pavan
‎2008 May 09 6:15 PM
Please check fm HELP_VALUES_GET_WITH_MATCHCODE and sap standard program PPORPE01
a®