Batch upload/ download SAP table data

Situation: Sometimes, we need to upload/ download customer config table to other system. Now this is the sample ABAP code . FIELD-SYMBOLS: <fs_tab_fil> TYPE STANDARD TABLE, <fs_tab_db>  TYPE STANDARD TABLE. PARAMETERS upload  RADIOBUTTON GROUP g1 . PARAMETERS download  RADIOBUTTON GROUP g1 . PARAMETERS filepath TYPE string. PARAMETERS table TYPE string LOWER CASE. DATA: answer     TYPE char1, litab_tb   TYPE REF TO data, litab_tb2  TYPE REF TO data, lc_tab_fst TYPE char1. CREATE DATA litab_tb TYPE STANDARD TABLE OF (table) WITH NON-UNIQUE DEFAULT KEY. CREATE DATA litab_tb2 TYPE STANDARD TABLE OF (table) WITH NON-UNIQUE DEFAULT KEY. ASSIGN litab_tb->* TO <fs_tab_fil>. ASSIGN litab_tb2->* TO <fs_tab_db>. AT SELECTION-SCREEN ON VALUE-REQUEST FOR filepath. DATA gt_tab TYPE STANDARD TABLE OF file_table . DATA li TYPE i. CALL METHOD cl_gui_frontend_services=>file_open_dialog CHANGING file_table = gt_tab rc         = li. IF sy–subrc <> 0. MESSAGE ‘open file path error.’ TYPE  ‘E’. ELSE. READ TABLE gt_tab INTO filepath INDEX 1. ENDIF. AT SELECTION-SCREEN. IF filepath IS INITIAL. SET CURSOR FIELD ‘FILEPATH’. MESSAGE ‘please input the required FILEPATH’ TYPE ‘E’. ENDIF. IF table IS INITIAL.

ABAP FMS to get Chinese Beijing time,China

Today, We need to get the Beijing Time in SAP system. As we know beijing is in UTC+8. So below is the sample code fms to get time.   Hope you like this. FUNCTION ZFM_GET_BEIJING_TIMES. *”———————————————————————- *”*”  *”  EXPORTING *”     VALUE(O_DATUM) TYPE  SY-DATUM *”     VALUE(O_UZEIT) TYPE  SY-UZEIT *”———————————————————————- DATA: l_tzone     TYPE sy–zonlo VALUE ‘UTC+8’, l_timestamp TYPE timestamp. GET TIME STAMP FIELD l_timestamp. CONVERT TIME STAMP l_timestamp TIME ZONE l_tzone INTO DATE o_datum TIME o_uzeit.   You can get any time zone times if

SAP ABAP SOAMANAGER Webservice config tables

Somethimes, After migaration to S4/HANA system. Part of the config of SAP ABAP WebService will changed when create services. In order to find the different. We can use below tables for SAP tcode soamanager .     SRT_CFG_DIR CONFIG_NAME=Z_IF_CRM_SOAP CONFIG_KEY=CB70DE0421AB1EDDBAE6221620731454 SRT_CFG_DIR_T CONFIG_KEY=CB70DE0421AB1EDDBAE6221620731454 SRT_RTC_DIR CONFIG_KEY=CB70DE0421AB1EDDBAE6221620731454 SRT_RTC_BNDG CONFIG_KEY=CB70DE0421AB1EDDBAE6221620731454  BINDING_KEY  = CB70DE0421AB1EDDBAE6221620737454 SRT_RTC_DATA  BINDING_KEY  = CB70DE0421AB1EDDBAE6221620737454 SRT_RTC_CFGVAL CONFIG_KEY=CB70DE0421AB1EDDBAE6221620731454

Use BAPI/FMs to delete SM12 LOCK object in SAP

Purpose:lots of object locked for a long time when the network is pool. I hate to be called to delete/Realease the SM12 lock object in the middle night. Sample Code as ABAP Source Code: DATA: lt_locks TYPE TABLE OF seqg3 . DATA ls_lock TYPE seqg3. CALL FUNCTION ‘ENQUEUE_READ’ EXPORTING *   GCLIENT               = SY-MANDT gname                 = ‘SEOCLSENQ’ *   GARG                  = ‘ ‘ *   GUNAME                = SY-UNAME *   LOCAL                 = ‘ ‘ *   FAST                  = ‘ ‘ *   GARGNOWC              = ‘ ‘ * IMPORTING *   NUMBER                = *   SUBRC                 = TABLES enq                   = lt_locks EXCEPTIONS communication_failure = 1 system_failure        = 2 OTHERS                = 3. IF sy-subrc <> 0.

error RABAX ST22 Dump,SAPSQL_IN_ITAB_ILLEGAL_SIGN

Today SAP ABAP se80 Webservice Provider error RABAX( ST22 Dump:CX_AI_SYSTEM_FAULT-UNCAUGHT_EXCEPTION)Dump SAPSQL_IN_ITAB_ILLEGAL_SIGN Checked the account and password, it is no problem. Interface parameter webservice provided, somebody changed the provide service with Camel-Case naming rule. For example: Internal View=》Service ==》Input==》 【T_MY_LOVE_BABY】CHANGED TO 【TMyLoveBaby】 Theis naming result was saved in the table:VEPFIELDREF and table VEPSTRUTYPE for web service