Articles on Trending Technologies

Technical articles with clear explanations and examples

MySQL query to fetch records before currentdate + 2 weeks?

AmitDiwan
AmitDiwan
Updated on 16-Dec-2019 834 Views

For this, use the below syntax −select * from yourTableName where yourColumnName < DATE_ADD(CURDATE(), INTERVAL 2 WEEK);Note: The current date is as follows −mysql> select curdate(); +------------+ | curdate()  | +------------+ | 2019-10-20 | +------------+ 1 row in set (0.00 sec)Let us first create a table −mysql> create table DemoTable1607    -> (    -> ShippingDate date    -> )    -> ; Query OK, 0 rows affected (0.58 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1607 values('2019-10-20'); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable1607 values('2019-11-04'); Query OK, 1 row affected ...

Read More

Print screen using VBA in SAP

Swarali Sree
Swarali Sree
Updated on 16-Dec-2019 969 Views

If you are using SendKeys then avoid using it. I had used it in the past project and it seems to be inconsistent and error-prone.You can use the below snippet at the top of the module and call it wherever required.Option Explicit Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _bScan As Byte,  ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const KEYEVENTF_KEYUP = &H2 Private Const VK_SNAPSHOT = &H2C Private Const VK_MENU = &H12 Sub PrintScreen()     keybd_event VK_SNAPSHOT, 1, 0, 0  End Sub

Read More

Taking backup of schema in SAP HANA

Govinda Sai
Govinda Sai
Updated on 16-Dec-2019 501 Views

It is always recommended to back up your critical systems.ExampleFollowing SQL command can be used to export schema in HANA:EXPORT "SOURCE_SCHEMA_NAME".* AS BINARY INTO '/tmp/DESTINATION SCHEMA NAME' WITH    REPLACE;This can also be directly zipped to Linux as below:tar -czf SOURCE_SCHEMA.tgz /tmp/DESTINATION_SCHEMA/

Read More

Finding location of uploaded file using SAP GUI_upload

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 16-Dec-2019 912 Views

When you upload a file using the gui_upload function, the file is not uploaded to the Application server. The file is read from presentation layer to an internal table.ExampleFollowing code can be used to call a gui_upload function to read the file to an internet table:lv_filename = p_filebp. CLEAR lt_data_tab. IF NOT lv_filename IS INITIAL.   CALL FUNCTION 'GUI_UPLOAD'     EXPORTING       filename = lv_filename     TABLES       data_tab = lt_data_tab     EXCEPTIONS       file_open_error = 1       OTHERS = 17.   IF sy-subrc 0.     EXIT. ...

Read More

Implement Harmonic mean and Quadratic mean in MySQL?

AmitDiwan
AmitDiwan
Updated on 16-Dec-2019 183 Views

Let us first create a table −mysql> create table DemoTable1606    -> (    -> Value int    -> ); Query OK, 0 rows affected (0.55 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1606 values(5); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable1606 values(10); Query OK, 1 row affected (0.12 sec)Display all records from the table using select statement −mysql> select * from DemoTable1606;This will produce the following output −+-------+ | Value | +-------+ |     5 | |    10 | +-------+ 2 rows in set (0.00 sec)Here is the ...

Read More

Combining fields in CDS view in SAP ABAP

karthikeya Boyini
karthikeya Boyini
Updated on 16-Dec-2019 3K+ Views

With the use of SAP ABAP 7.5, you can make use of the CONCAT_WITH_SPACE function.ExampleThe above code can be simplified like this:CONCAT_WITH_SPACE( bp.name_first, bp.name_last, 1 )

Read More

Difference between SAP Crystal Reports and CR for Visual Studio

Monica Mona
Monica Mona
Updated on 16-Dec-2019 2K+ Views

Crystal Reports for Visual Studio 2010 comes free and you can develop as many reports and can host runtime engine without any cost. Now Crystal Reports has been excluded from Visual Studio by default and you need to download it free from SAP site.You can use the following link for downloading CRforVS: http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0.exeSystem RequirementsDetailsProduct PrerequisitesMicrosoft Visual Studio 2010Processor1.6 GHz or fasterMemory1GB (32-bit) or 1.1GB (64-bit) availableOperating systemsWindows 2003, Windows Vista PlatformSupportWindowsOnce you install this, you can still create a new Crystal Report Design in Visual Studio by navigating to the below path:Solution Explorer -> Right click on the Project name ...

Read More

Using SSO logon tickets in SAPUI5

karthikeya Boyini
karthikeya Boyini
Updated on 16-Dec-2019 428 Views

When your proxy has SSO token, you should use SET-COOKIE header to pass SSO token to the client.Exampleset-cookie: MYSAPSSO2=DFOKJLDM.....AJLBhHcvA%3d%3e; path=/; domain=xxxxx.sap.comIt should be passed to client browser from proxy and domain name has to be changed to the proxy as shown below:set-cookie: MYSAPSSO2=DFOKJLDM.....AJLBhHcvA%3d%3e; path=/; domain=PROXYDOMAIN.comWhen next time your browser calls to the proxy, this will include session cookie in the request header like below. The proxy will read that Cookie from HTTP request header to make calls.Cookie: MYSAPSSO2=DFOKJLDM.....AJLBhHcvA%3d%3e;

Read More

MySQL update column to NULL for blank values

AmitDiwan
AmitDiwan
Updated on 16-Dec-2019 3K+ Views

For this, you can use IF() along with UPDATE command. Let us first create a table −mysql> create table DemoTable1601    -> (    -> FirstName varchar(20) ,    -> LastName varchar(20)    -> ); Query OK, 0 rows affected (0.53 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1601 values('John', 'Doe'); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable1601 values('Adam', ''); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1601 values('David', 'Miller'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable1601 values('Chris', ''); Query OK, 1 row affected ...

Read More

Formatting date in SAP system

SAP
Ramu Prasad
Ramu Prasad
Updated on 16-Dec-2019 209 Views

You will need to apply new culture to the existing thread as shown below:ExampleDateTime now = DateTime.Now; Console.WriteLine(now); CultureInfo sapCulture = new CultureInfo("en-US", true); sapCulture.DateTimeFormat.ShortDatePattern = "ddMMyyyy"; //sapCulture.DateTimeFormat.FullDateTimePattern =    sapCulture.DateTimeFormat.ShortDatePattern + " HH-mm-ss"; sapCulture.DateTimeFormat.LongTimePattern = "HH-mm-ss"; //sapCulture.DateTimeFormat.ShortTimePattern = "HH-mm-ss"; System.Threading.Thread.CurrentThread.CurrentCulture = sapCulture; //System.Threading.Thread.CurrentThread.CurrentUICulture = sapCulture; Console.WriteLine(now);

Read More
Showing 56051–56060 of 61,297 articles
Advertisements