Is String a primitive data type or an object in Java?

Amit Sharma
Updated on 30-Jul-2019 22:30:20

906 Views

String is not a primitive data type. Java.lang package provides the String class therefore, it is an object type. You can create a string variable directly like any other variables as −String s = "myString";(or)By instantiating the string class using the new keyword as −String s = new String("myString");Example Live Demoimport java.util.Scanner; public class StringExample { public static void main(String args[]){ Scanner sc = new Scanner(System.in); System.out.println("Enter a sting value:"); String str = sc.nextLine(); System.out.println(str.getClass()); } }OutputEnter a sting value: hello class java.lang.String

Single query vs multiple queries to fetch large number of rows in SAP HANA

Smita Kapse
Updated on 30-Jul-2019 22:30:20

1K+ Views

Single query would always be better than the multiple queries. The number of rows does not impact much on performance. It is the way query is written and the data to be fetched which makes the difference. Also, the table should be indexed.

Changing Parameters on the screen in SAP

Arjun Thakur
Updated on 30-Jul-2019 22:30:20

289 Views

You can do this by going to Menu.Navigate to Goto->Text Elements->Selection Text

Length of XSTRING variable from an SAP function module.

Lakshmi Srinivas
Updated on 30-Jul-2019 22:30:20

442 Views

You can fetch the length of XSTRING variable using xstrlen( l_abc_xstring ) where l_abc_xstring is the XSTRING variable.

Reading latest measurement point in SAP RFC

Anil SAP Gupta
Updated on 30-Jul-2019 22:30:20

413 Views

There is a Function Module: MEASUREM_DOCUM_RFC_SINGLE_002 that you can use to read documents if keys are known. When there is no RFC module to get a list of $foo according to a set of selection criteria, it is possible to use RFC_READ_TABLE to get the keys from db directly.Function Module MEASUREM_DOCUM_RFC_SINGLE_002: RFC Measurement document: Individual processing, Change/Display or ReadUseWith use of this RFC, following remote calls can be used:Remote dialog (WITH_DIALOG_SCREEN = 'X')Remote dialog in display mode (EDIT_MODE = ' ')Remote dialog in change mode (EDIT_MODE = 'X')Remote reading of measurement document data (WITH_DIALOG_SCREEN = ' ')NotesApart from when an ... Read More

Creating Attribute and Analytic view as persistent model in SAP HANA

Anil SAP Gupta
Updated on 30-Jul-2019 22:30:20

93 Views

This is possible as all views can be created as persistent in SAP HANA. You need to get XMS representation creating attributeview, .analyticview, .calculationview file and activate it.In your case I think you need to check details of your Analytic view and if there is some path that you need to modify.

Creating Attribute and Analytic view as persistent model in SAP HANA

Anil SAP Gupta
Updated on 30-Jul-2019 22:30:20

92 Views

This is possible as all views can be created as persistent in SAP HANA. You need to get XMS representation creating attributeview, .analyticview, .calculationview file and activate it.In your case I think you need to check details of your Analytic view and if there is some path that you need to modify.

Looping through a dynamic table in SAP

Rahul Sharma
Updated on 30-Jul-2019 22:30:20

282 Views

You have to use Runtime Type Identification RTTI and assign the component name of structure To .Please refer to below link for more details:https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/index.htm

How to convert Java Array/Collection to JSON array?

Sravani S
Updated on 30-Jul-2019 22:30:20

7K+ Views

Google provides a library named org.json.JSONArray and, following is the maven dependency to add library to your project. com.googlecode.json-simple json-simple 1.1 The JSONArray class of the org.json package provides put() method. Using this method, you can populate the JSONArray object with the contents of the elements.Exampleimport org.json.JSONArray; public class ArrayToJson { public static void main(String args[]) { String [] myArray = {"JavaFX", "HBase", "JOGL", "WebGL"}; JSONArray jsArray = new JSONArray(); ... Read More

Writing at the end of report without clearing current screen in SAP ABAP

Krantik Chavan
Updated on 30-Jul-2019 22:30:20

87 Views

Yes, it is possible. You would require using MODIFY LINE

Advertisements