‎2005 Jun 29 2:53 PM
Hi,
I am looking for a function module which will give the list of available F4 check values for a given characteristic field when I pass the field name to it.
Thanks.
Tushar.
‎2005 Jun 29 3:19 PM
Hi Tushar,
Take a look at FM 'DD_SHLP_CALL_FROM_DYNP'.
Regards,
Erwan.
‎2005 Jun 29 3:34 PM
Are you referring to a VC characteristic?
* Enter a characteristic name in the P_ATNAM field.
* Then do F4 on the P_ATWRT field.
report zrich_0002 .
parameters: p_atnam type cabn-atnam,
p_atwrt type cawn-atwrt.
at selection-screen on value-request for p_atwrt.
* Internal Table for storage location help
data: begin of help_char occurs 0,
atwrt type cawn-atwrt,
atwtb type cawnt-atwtb,
end of help_char.
data: dynfields type table of dynpread with header line.
dynfields-fieldname = 'P_ATNAM'.
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_ATNAM'.
select * into corresponding fields of table help_char
from cabn
inner join cawn
on cabn~atinn = cawn~atinn
inner join cawnt
on cawn~atinn = cawnt~atinn
and cawn~atzhl = cawnt~atzhl
where cabn~atnam = dynfields-fieldvalue.
delete adjacent duplicates from help_char comparing atwrt.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'ATWRT'
dynprofield = 'P_ATWRT'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = help_char.
Regards,
Rich Heilman