Hi Ganesh, I have scenario, in one variable we have value: 'ABCDE' now I need first two characters only, that is 'AB', how to achieve using SQL scripts via AMDP, iam using LEFT string function, but unable to get the output... Can you provide some hints
sorry. when i click the same button that wasd occured an error [ Exception CX_SY_NO_HANDLER was raised] (as you did at 9:24 in the video.).did you know how to solve this problem. it will help me a lot.
Hello Sir, Thse questions might be funny but I wonder that when we can do all the fetching and operations through the AMDP classes itself and the internal tables of it can be used in our reports then why do we need cds views at the same time? why do we create first cds views and take data from amdp classes or table function and also in what criscumstances we need them is also a question to me Please try to eloborate When do we actully need CDS views and when AMDP classes and table function can dumped in our reports. Please try to connect it through some scenario if possible. I know there was an emergeance at your side and hope things are going good so if there is any chance please put an video on it. Thanks a lot for your contributions!
I was defined an exception handler to solved this problem. method insert_data BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT using zji_curd. DECLARE LV_CARRID1 varchar( 3 ); DECLARE EXIT handler for SQLEXCEPTION BEGIN LV_CARRID1 = 'DEF'; END;
@@just2shareji this is my code. i am sorry i was reponsed message was so late. ■ABAP.class CLASS zhk_crud_class DEFINITION PUBLIC. PUBLIC SECTION. types: tt_curd type table of zji_curd. INTERFACES if_amdp_marker_hdb. class-METHODS:insert_data,update_data,delete_data, read_data exporting value(it_data) type tt_curd. *,update_data,delete_data,read_data. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zhk_crud_class IMPLEMENTATION. method read_data BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS read-only using zji_curd. DECLARE LV_CARRID1 varchar( 3 ); DECLARE EXIT handler for SQLEXCEPTION BEGIN LV_CARRID1 = 'DEF'; END; it_data = select * from zji_curd; ENDMETHOD. method delete_data BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT using zji_curd. DECLARE LV_CARRID1 varchar( 3 ); DECLARE EXIT handler for SQLEXCEPTION BEGIN LV_CARRID1 = 'DEF'; END; DELETE FROM zji_curd WHERE ORDER_NUMBER = '1000000011'; ENDMETHOD. method insert_data BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT using zji_curd. DECLARE LV_CARRID1 varchar( 3 ); DECLARE EXIT handler for SQLEXCEPTION BEGIN LV_CARRID1 = 'DEF'; END; it_data_to_insert = select '410','1000000011','0010','USD','100' from dummy; insert into ZJI_CURD select * from :it_data_to_insert; ENDMETHOD. method update_data BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT using zji_curd. DECLARE LV_CARRID1 varchar( 3 ); DECLARE EXIT handler for SQLEXCEPTION BEGIN LV_CARRID1 = 'DEF'; END; update zji_curd set uom = 'EUR'; ENDMETHOD. ENDCLASS.