Sravani S

Sravani S

51 Articles Published

Articles by Sravani S

Page 5 of 6

What does the method indexOf(obj o) do in java?

Sravani S
Sravani S
Updated on 20-Feb-2020 220 Views

The indexOf(Object) method of the java.util.ArrayList class returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.Exampleimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String[] args) {       ArrayList arrlist = new ArrayList(5);       arrlist.add("G");       arrlist.add("E");       arrlist.add("F");       arrlist.add("M");       System.out.println("Size of list: " + arrlist.size());       for (String value : arrlist) {          System.out.println("Value = " + value);       }     ...

Read More

What does the method remove(obj o) do in java?

Sravani S
Sravani S
Updated on 20-Feb-2020 194 Views

The remove(Object) method of the class java.util.ArrayList removes the first occurrence of the specified element from this list, if it is present. If the list does not contain the element, it is unchanged.Exampleimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String[] args) {       ArrayList arrlist = new ArrayList(5);       arrlist.add("G");       arrlist.add("E");       arrlist.add("F");       arrlist.add("M");       arrlist.add("E");       System.out.println("Size of list: " + arrlist.size());       for (String value : arrlist) {          System.out.println("Value = " + ...

Read More

How to define an array size in java without hardcoding?

Sravani S
Sravani S
Updated on 19-Feb-2020 696 Views

To avoid hard coding you can read the size of the array from the user using command line arguments of the reader classes like Scanner. Then using this value create an array:Exampleimport java.util.Arrays; import java.util.Scanner; public class PopulatingAnArray { public static void main(String args[]) { System.out.println("Enter the required size of the array :: "); Scanner s = new Scanner(System.in); int size = s.nextInt(); int myArray[] = new int [size]; System.out.println("Enter the elements of the array one by one "); for(int i=0; i

Read More

In SAP ABAP, few records are skipped during parallel processing

Sravani S
Sravani S
Updated on 14-Feb-2020 383 Views

Check out on code to handle parallel processing-gv_semaphore = 0. DESCRIBE TABLE lt_itab LINES lv_lines. LOOP AT lt_itab INTO ls_itab. CALL FUNCTION 'ZABC' STARTING NEW TASK taskname DESTINATION IN GROUP srv_grp PERFORMING come_back ON END OF TASK EXPORTING ... EXCEPTIONS ... . "

Read More

Binding OData service to SAP UI5 table

Sravani S
Sravani S
Updated on 14-Feb-2020 1K+ Views

Your service end point is incorrect- var oModel = new sap.ui.model.odata.v2.ODataModel("http://admin- think:88/sap/...",{useBatch : true});.To fix this issue, you need to remove “CoreOpenAppSet()” portion of the variable which is getting passed to ODataModel constructor. You need to pass function import using ODataModel- “oModel.callFunction()”.Once function call is completed, you can bind the result using “setBindingContext” as in below code −var oPromise = oModel.callFunction("/CoreOpenAppSet"); oPromise.contextCreated().then(function(oContext) {    oView.setBindingContext(oContext); });

Read More

How can we create a MySQL stored function that uses the dynamic data from a table?

Sravani S
Sravani S
Updated on 13-Feb-2020 541 Views

MySQL Stored functions can reference tables but they cannot make use of statements that return a result set. Hence we can say that there is no SELECT query that returns result set. But we can have SELECT INTO to get rid of that. For example, we are creating a function ‘Avg_marks’ that uses the dynamic data from table named ‘Student_marks’, having following records, to calculate the average of marks.mysql> Select * from Student_marks; +-------+------+---------+---------+---------+ | Name  | Math | English | Science | History | +-------+------+---------+---------+---------+ | Raman |   95 |      89 |      85 | ...

Read More

How to use sub-package in Java?

Sravani S
Sravani S
Updated on 04-Feb-2020 1K+ Views

Subpackages are similar to sub-directories. Consider an example. The company had a com.apple.computers package that contained a Dell.java source file, it would be contained in a series of subdirectories like this −....\com\apple\computers\Dell.javaAt the time of compilation, the compiler creates a different output file for each class, interface, and enumeration defined in it. The base name of the output file is the name of the type, and its extension is .class.For example −// File Name:Dell.java package com.apple.computers; public class Dell { } class Ups { }Now, compile this file as follows using -d option −$javac -d.Dell.javaThe files will be compiled as ...

Read More

How can we import only specific columns from the text file, into MySQL table?

Sravani S
Sravani S
Updated on 04-Feb-2020 1K+ Views

Suppose if we have the values for some specific columns in the text file and MySQL table, in which we want to import the data, is having an extra column(s) then by mentioning the names of the columns in the query we can upload the values of those specific columns only. It can be understood with the help of the following example −ExampleSuppose we are having the values of columns ‘id’, ‘Name’ and ‘Salary’ only in the text file as follows −105, Chum, 11000 106, Danny, 12000Now while importing this text file into MySQL table then we need to mention ...

Read More

Storing configuration so that it doesn't transfer to database in SAP system

Sravani S
Sravani S
Updated on 30-Jul-2019 136 Views

I don’t think it can be automated so that configuration is not copied to the database. Try checking SAP Transport and Change Management detail, it could be possible by making some changes in Transport configuration.

Read More

Reading an image using SAP OData v2 in UI5 application

Sravani S
Sravani S
Updated on 30-Jul-2019 628 Views

You have to use below code:img.setSrc("/path/to/my/service/UserPhotoSet('someone@gmail.com')/$value");Here you need to replace part with original path.

Read More
Showing 41–50 of 51 articles
Advertisements