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

Amit Sharma
Updated on 30-Jul-2019 22:30:20
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
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
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
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
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

What is the difference between class variables and instance variables in Java?

Johar Ali
Updated on 30-Jul-2019 22:30:20
Following are the notable differences between Class (static) and instance variables. Instance variables Static (class) variables Instance variables are declared in a class, but outside a method, constructor or any block. Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block. Instance variables are created when an object is created with the use of the keyword 'new' and destroyed when the object is destroyed. Static variables are created when the program starts and destroyed when the program stops. ... Read More

Creating Attribute and Analytic view as persistent model in SAP HANA

Anil SAP Gupta
Updated on 30-Jul-2019 22:30:20
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.

What are wrapper classes in Java?

mkotla
Updated on 30-Jul-2019 22:30:20
Wrapper classes are those whose objects wraps a primitive data type within them.In the java.lang package java provides a separate class for each of the primitive data types namely Byte, Character, Double, Integer, Float, Long, Short.At the time of instantiation, these classes accept a primitive datatype directly, or in the form of String.Wrapper classes provide methods to, convert primitive datatypes within them to String objects and, to compare them with other objects etc.Using wrapper classes, you can also add primitive datatypes to various Collection objects such as ArrayList, HashMap etc. You can also pass primitive values over a network using ... Read More

Creating Attribute and Analytic view as persistent model in SAP HANA

Anil SAP Gupta
Updated on 30-Jul-2019 22:30:20
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
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
Advertisements