2012 Aug 29 7:01 PM
Hi experts,
in our application, i want to have some conguration parameters with values (in persistent storage) to be set by the application owner. these values determine the behaviour of the application.
few parameters are:
appl_country , possible values: Canada, UnitedStates
is_trace_enabled, possible values: X, or space
print_record_count, possible values: any integer value.
for this, i have created a table ztable_config, with fields
MANDT
PARAM_NAME (primary key), type char20
PARAM_VALUE, type char50
the user needs to enter data into this table, so created a maintence view of the table.
before giving the application to the user, i added all the param_names into the table, with blank values.
asked the user to fill appropriate values in the params in the sm30 of ztable_config.
but that did not restrict him to delete few params, that are imp for application.
he deleted by mistake, and tried to recreate but he used some different spelling etc, so finally the application developer had to get into to recreate the actual parameter.
is there any way we can restrict the user not to delete rows, but need to able to edit the non-primary key fields.
is there any better way to manage the key value pairs that can be used as config params for any application.
thanks,
Madhu
Hi experts,
in our application, i want to have some conguration parameters with values (in persistent storage) to be set by the application owner. these values determine the behaviour of the application.
few parameters are:
appl_country , possible values: Canada, UnitedStates
is_trace_enabled, possible values: X, or space
print_record_count, possible values: any integer value.
for this, i have created a table ztable_config, with fields
MANDT
PARAM_NAME (primary key), type char20
PARAM_VALUE, type char50
the user needs to enter data into this table, so created a maintence view of the table.
before giving the application to the user, i added all the param_names into the table, with blank values.
asked the user to fill appropriate values in the params in the sm30 of ztable_config.
but that did not restrict him to delete few params, that are imp for application.
he deleted by mistake, and tried to recreate but he used some different spelling etc, so finally the application developer had to get into to recreate the actual parameter.
is there any way we can restrict the user not to delete rows, but need to able to edit the non-primary key fields.
is there any better way to manage the key value pairs that can be used as config params for any application.
thanks,
Madhu
2012 Aug 29 8:16 PM
Hi Madhu,
Instead of a z-table, you could store your parameter name/value pairs in table TVARVC. We use the table for this purpose. The table can be maintained with transaction STVARV.
Cheers,
Amy
2012 Aug 29 8:45 PM
FORM ztest_before_save.
LOOP AT total.
IF <action> = 'D'.Check for authorization. ->Z authorization object
IF sy-subrc NE 0. MESSAGE e021(zxx) .
ENDIF. ENDIF.
ENDLOOP.
ENDFORM. "ZTEST_BEFORE_SAVE| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |