so my goal is to generate some data with certain fields. My idea was to get all possible values from the field and then randomly picking values for my data.
So I want for example the possible values of a currency field:
I need to access all the values from the first column
So i can move them to an internal table and randomly pick.
How can i move the possible values of a filed into an internal table?
I will need to do this multiple times from different tables, so a unified method would be great.
You can use F4IF_FIELD_VALUE_REQUEST function module for getting search help values. You can use this function for currency like below:
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'WAERS'
suppress_recordlist = abap_true
tables
return_tab = it_return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.