CL20N is an enjoy T-code because of that BDC will not work properly.
BAPI to change or create value is BAPI_OBJCL_CREATE this BAPI will not update in table, to get data updated in table we have to use BAPI commit BAPI_TRANSACTION_COMMIT along with BAPI_OBJCL_CREATE.
Sample code.
REPORT YTEST_CL20N.
* data
data: lw_object type OBJNUM,
lc_table type TABELLE,
lw_class type KLASSE_D,
lw_cltype type KLASSENART.
*table
data: li_valuesnum type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_NUM WITH HEADER LINE,
li_valueschar type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CHAR WITH HEADER LINE,
li_valuescurr type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CURR WITH HEADER LINE,
li_return type STANDARD TABLE OF BAPIRET2.
*
concatenate 'SZ' 'A9' into lw_object.
CONDENSE lw_object.
lc_table = 'T16FS'.
lw_class = 'PR_OVERALL_RELEASE'.
lw_cltype = '032'.
* character
li_valueschar-CHARACT = 'PR_DOCUMENT_TYPE'.
li_valueschar-VALUE_CHAR = 'ZI02'.
append li_valueschar.
clear: li_valueschar.
*Currency
li_valuescurr-CHARACT = 'PRVALUE1'.
li_valuescurr-VALUE_FROM = '0'.
li_valuescurr-VALUE_TO = '4999'.
li_valuescurr-CURRENCY_FROM = 'SAR'.
li_valuescurr-CURRENCY_TO = 'SAR'.
APPEND li_valuescurr.
CLEAR: li_valuescurr.
* NUMERIC
li_valuesnum-CHARACT = 'ZEMER_PRIO'.
li_valuesnum-VALUE_FROM = '1'.
append li_valuesnum.
clear: li_valuesnum.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = lw_object
objecttablenew = lc_table
classnumnew = lw_class
classtypenew = lw_cltype
TABLES
allocvaluesnum = li_valuesnum
allocvalueschar = li_valueschar
allocvaluescurr = li_valuescurr
return = li_return.
BREAK-POINT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
.
* data
data: lw_object type OBJNUM,
lc_table type TABELLE,
lw_class type KLASSE_D,
lw_cltype type KLASSENART.
*table
data: li_valuesnum type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_NUM WITH HEADER LINE,
li_valueschar type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CHAR WITH HEADER LINE,
li_valuescurr type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CURR WITH HEADER LINE,
li_return type STANDARD TABLE OF BAPIRET2.
*
concatenate 'SZ' 'A9' into lw_object.
CONDENSE lw_object.
lc_table = 'T16FS'.
lw_class = 'PR_OVERALL_RELEASE'.
lw_cltype = '032'.
* character
li_valueschar-CHARACT = 'PR_DOCUMENT_TYPE'.
li_valueschar-VALUE_CHAR = 'ZI02'.
append li_valueschar.
clear: li_valueschar.
*Currency
li_valuescurr-CHARACT = 'PRVALUE1'.
li_valuescurr-VALUE_FROM = '0'.
li_valuescurr-VALUE_TO = '4999'.
li_valuescurr-CURRENCY_FROM = 'SAR'.
li_valuescurr-CURRENCY_TO = 'SAR'.
APPEND li_valuescurr.
CLEAR: li_valuescurr.
* NUMERIC
li_valuesnum-CHARACT = 'ZEMER_PRIO'.
li_valuesnum-VALUE_FROM = '1'.
append li_valuesnum.
clear: li_valuesnum.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = lw_object
objecttablenew = lc_table
classnumnew = lw_class
classtypenew = lw_cltype
TABLES
allocvaluesnum = li_valuesnum
allocvalueschar = li_valueschar
allocvaluescurr = li_valuescurr
return = li_return.
BREAK-POINT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
.
Please find CL20N screen