9M2TPT / N6HM / M0HIK
All my ramblings about amateur radio, SAP/ABAP, and gadgets/gizmos.
Thursday 30 May 2024
TOUCHTAB report, regenerate all ABAPs related to changed/modified structure
Monday 28 February 2022
Calling MS SQL Stored Procedure from ABAP
One of the few things sometime coming up in your ticket request. Calling stored procedure from ABAP to remote SQL server.
How do we send the NULL value? It seems sending the ind_ref with -1 solve this.
TYPES: BEGIN OF ty_input, orderid(50), materialid(50), description(80), user1(50), user2(50), END OF ty_input, BEGIN OF ty_output, orderid(50), END OF ty_output. DATA: ls_input TYPE ty_input, ls_output TYPE ty_output. CONSTANTS: gc_null TYPE int2 VALUE '-1'. * Create db connection DATA(lr_sql_connection) = cl_sql_connection=>get_connection( 'MSSQL' ). DATA(lr_statement) = lr_sql_connection->create_statement( ). DATA(lo_struct) = CAST cl_abap_structdescr( cl_abap_typedescr=>describe_by_data( ls_input ) ). DATA(lt_comp) = lo_struct->get_components( ). CLEAR: ls_input. ls_input-orderid = 'ABC123'. ls_input-materialid = 'MAT01'. ls_input-description = 'Order for MAT01'. * Input fields LOOP AT lt_comp INTO DATA(ls_comp). ASSIGN COMPONENT ls_comp-name OF STRUCTURE ls_input TO FIELD-SYMBOL(<cell>). IF <cell> IS INITIAL. lr_statement->set_param( data_ref = REF #( <cell> ) ind_ref = REF #( gc_null ) "Send NULL if field has no value inout = cl_sql_statement=>c_param_in ). ELSE. lr_statement->set_param( data_ref = REF #( <cell> ) inout = cl_sql_statement=>c_param_in ). ENDIF. ENDLOOP. * Output fields lr_statement->set_param( data_ref = REF #( ls_output-orderid ) inout = cl_sql_statement=>c_param_out ). TRY. lr_statement->execute_procedure( proc_name = 'ST_ADDORDER' ). WRITE: / 'OrderID: ', ls_output-orderid. CATCH cx_sql_exception INTO DATA(lx_00). DATA(lv_exception) = | An exception occurred with SQL_MESSAGE = { lx_00->sql_message }|. WRITE: / lv_exception. ENDTRY. * Close db connection lr_sql_connection->close( ).
Sunday 24 January 2021
Reviving my WX station, now with RTL-SDR.
I've setup my WX station (Maplin version of WH1080) for quite sometime now but since last year, it went down due to few reasons. One of it, because the problem with the intermediary software between the WX base station and aprs server. Anyway, the outdoor unit still out there, transmitting it data over 433.920Mhz freq.
Had a bit of time yesterday, and I've received the BNC to SMA jumper cables that I ordered through Shoppe few days back, so no reason not to go ahead with this. My Raspberry 4 mini-server is under-load anyway, and the RX only multi-coupler given by Weerut has been laying down collecting dust for quite sometime.
What needed to get the SDR to receive the WX data from WH1080 is a software called rtl_433. This software runs on my Raspbian without a problem and it could actually receive many other devices that use 433MHz frequency.
To get started, I was using the instructions found in :
GitHub - matthewwall/weewx-sdr: weewx driver for software-defined radio
Few things needed to be changed since the rtl_433 has been updated, WH1080 support has changed too. The weewx-sdr won't work out of box. The following changes still not available in the final code.
To be able to send the output into aprs, I'm using the setup that I've had since 2015. This extension is a modified code, not written by me but it works great my setup. My write up on the weewx2aprx can be found here.
9M2TPT / KT2O / M0HIK: Getting your WX station out to RF using weewx + aprx
My current setup as below ( yes, I'm using multi-coupler for my setup which is connected to Diamond D190).
Oh am going to redo the power into the multi-coupler, it kind of dangerous using the croc-clip for it for sure :)
Friday 17 July 2020
SAP Smartforms - Add T&C Pages
- Create two global variables (flags), e.g. GV_FLAG1 and GV_FLAG2.
- In the main window, after you've done all the processing, you need to create a program lines, here we set the first flag, GV_FLAG1 = 'X'. No conditions need to be added or ticked.
- After the above program lines, create a COMMAND and this is to be set to jump to the T&C page.
- In your secondary window (e.g. footer printed at last page), under the conditions tab, do a check on GV_FLAG1 EQ 'X' and GV_FLAG2 NE 'X'. Do not set any additional event/condition.
- Create a program line in the secondary window, make it the last one after all other processing, here you set the second flag, GV_FLAG2 = 'X'. Important, no condition needed and any event should be unticked.
Thursday 25 June 2020
Debugging error from VF01
All errors found in the log will need to go through the above routine. Hope this helps! I've been enjoying doing this stuff for more than 20 years! Hope you too! :)
Wednesday 12 June 2019
Debugging SAP ERMS rules
SAP provides a tool which you could use to debug this auto response rules. The transaction CRM_ERMS_LOGGING is very helpful. But before we could use this transaction, we need to know the work item ID.
Anyway, here are the steps I used in my debugging:
1. Use SOST, find the response that was sent out, note the date/time
2. Use SWIA, this will return you with work item ID, fill in the time period based on (1) and the task = TS00207915 (ERMS service manager)
3. Put a break point at your auto response implementation
4. Use CRM_ERMS_LOGGING, enter the work item ID and un-tick "Do not execute actions"
5. Execute and you'll be brought to the break point you left in (3)
Tuesday 19 February 2019
Retrieving older version of sapscript
2.1 Extras - Other Requests - Add
2.2 Put transport request, client and click on transport again.
TOUCHTAB report, regenerate all ABAPs related to changed/modified structure
I was working on S4HANA OnPremis and tried to do an enhancement to BP's additional info structure by appending fields, but decided that ...
-
Was looking for the best AC wifi router to replace my Buffalo WHR-G300NH and found that TP-Link has just released an Archer C7 V2 which has ...
-
I've come across many posting on the Internet (via google search), people asking on how to debug a DMEE for payment program. One of the ...
-
I've just subscribed to Astrill vpn service with a thought that they've openwrt scripting works as per the old twitter post that say...