Characteristic's own input screen - Part 1 - Convert Values To Float
Some time ago I presented how I get data from classifications to reference data variable ( or table). If you feel comfortable with my method then we can go further. I had a task to update some characteristic values from ALV grid, this would be not a problem at all if the characteristics would be defined from the begriming, but they weren't. In that case I couldn't just add needed fields to fieldcatalog and call FM to update characteristics when save button was pressed. I realized I need dynamic structure for ALV which will call standard screen for characteristic update. If this could be done then I could omit carrying about type of characteristics (date, number, char ) and if it is single o multiple type. So I started to dig in SAP, debug standard functions and I was finally able to prepare all needed functions.
- method to copy data from my reference data structure to screen values
Add a comment
Scan program for authority-check
Extend allowed runtime of a program
- Call commit work whenever you want to reset the counter of running time for your transaction (especially if you haven't done any update into database tables)
- If commit work doesn't work or you don't want to use it at the moment then you could use FM TH_REDISPATCH with the check_runtime parameter equal to 0.
- You could also you FM SAPGUI_PROGRESS_INDICATOR for the same purpose but keep in mind that showing indicator too often can slower your program.
Although it's nice to know this possibility my advice is to not to use it very often as the less time you have for program run the more optimized code you can provide, so it's really something that you use if you do not have other choice and you agreed that with your system admins.
Custom selection-screen fields for MD07/MS07
Selection Screen - Part1 - Parameters
Call standard F4 search help with customized parameters

Endless loop in BADI ME_PROCESS_PO_CUST
How to select proper configuration entry

Copy routing (create on a base of existing one)
Classifications - Part 4 - example of use

Classifications - Part 3 - get all objects assigned to class
i_class type klah-class -> class number
i_classtype type klah-klart -> class type
i_key_date type sy-datum default sy-datum -> key date for classification
value( et_objects ) type standard table of clobjekte -> table of objects assigned to class
et_data type ref to data -> table with characteristics data for all objects assigned to class
e_tablestr type ref to cl_abap_tabledescr -> table type structure
e_structure type ref to cl_abap_structdescr -> structure
fetch_values_error
structure_error
Classifications - Part 2 - Get Object Details
i_object type bapi1003_key-object -> key of object to be classified
i_class type klah-class -> class number
i_classtype type klah-klart -> class type
i_objecttable type bapi1003_key-objecttable optional -> name of database table for object
i_key_date type sy-datum default sy-datum -> key date for classification
i_structure type ref to cl_abap_structdescr optional -> structure
et_objvaluesnum type tt_bapi1003_alloc_values_num -> table with num characteristics
et_objvalueschar type tt_bapi1003_alloc_values_char -> table with char characteristics
et_objvaluescurr type tt_bapi1003_alloc_values_curr -> table with curr characteristics
e_data type ref to data -> filled structure for object with all characteristics
fetch_values_error -> error while trying to receive object characteristics value
structure_error -> structure has wrong fields
Classifications - Part 1 - prepare structure for class data
i_classtype klah-class-> class number
i_classtypetype klah-klart ->class type
i_key_datetype sy-datum default sy-datum-> key date for class
e_structuretype ref to cl_abap_structdescr-> structure for our class
et_datatype ref to data -> table created on a base of class structure
e_tabletype ref to cl_abap_tabledescr-> table type for our class
class_classtype_fetch_error
error_creating_table
characteristics_error
Create XLSX/MHTML file from internal table in background
So what am I doing here.... firstly I check if the fieldcatalog was passed. If not then I create it on a base of internal table with usage of cl_salv_table and cl_salv_controller_metadata=>get_lvc_fieldcatalog. After I finally have the fieldcatalog I create result table with sort and filter criteria if they were passed. To do that I use class cl_salv_ex_util. At the end result table is transformed to xstring with method cl_salv_bs_tt_util=>if_salv_bs_tt_util~transform. So you're receiving at the end of the method an xstring file so you can do what you want with it, for example send via mail to the user, or save it on local PC (like in the example found at the end). The most important is that you can use this method in a background so you can prepare some jobs for your programs and send results of them to the users!
it_fieldcat type lvc_t_fcat optional -> field catalog for list viewer control
it_sort type lvc_t_sort optional -> alv control: table of sort criteria
it_filt type lvc_t_filt optional -> alv control: table of filter conditions
is_layout type lvc_s_layo optional -> alv control: layout structure
i_xlsx type flag optional -> create xlsx file?