Dear friends,
When I use the class cl_sql_statement to insert data into oracle, use the method set_param_table to do the mass insert. it can insert multiple data one time, but the value inserted is miss half every column.
such as I insert one data like: open 2016
then in oracle the data store like this : op 20
this is my code:
data: temp1 TYPE REF TO data,
con_ref TYPE REF TO cl_sql_connection,
sql1 TYPE REF TO cl_sql_statement.
CREATE OBJECT sql1
EXPORTING
con_ref = con_ref.
lw_test-col1 = '88'.
lw_test-col2 = lw_data-gjahr.
lw_test-col3 = lw_data-monat.
lw_test-col4 = lw_data-dms_view.
lw_test-col5 = lw_data-bukrs.
lw_test-col6 = lw_data-hkont.
lw_test-col7 = lw_data-hfm_icp.
lw_test-col8 = lw_data-hfm_c1.
lw_test-col9 = lw_data-hfm_c2.
lw_test-col10 = lw_data-hfm_c3.
lw_test-col11 = lw_data-hfm_c4.
lw_test-col12 = lw_data-amount.
lw_test-col13 = lw_data-ATTRIBUTE1.
lw_test-col23 = 1000.
APPEND lw_test to lt_test.
lw_test-col1 = '89'.
APPEND lw_test to lt_test.
GET REFERENCE OF lt_test INTO temp1.
sql1 = con_ref->create_statement( ).
sql1->set_param_table( temp1
).
lv_res = sql1->execute_update( stmt ).
after I insert my data into oracle, the data will miss half value, so can anyone help me with this case?
Thanks for your sincerely answer!