Krantik Chavan

Krantik Chavan

176 Articles Published

Articles by Krantik Chavan

Page 5 of 18

How to remove array element in MongoDB?

Krantik Chavan
Krantik Chavan
Updated on 14-Mar-2026 927 Views

To remove array elements in MongoDB, you can use the $pull operator along with $in for multiple values or direct value matching. The $pull operator removes all instances of a value or values that match a specified condition from an existing array. Syntax db.yourCollectionName.update({}, {$pull:{yourFirstArrayName:{$in:["yourValue"]}, yourSecondArrayName:"yourValue"}}, {multi:true} ); Sample Data Let us create a collection with a document to understand the concept better ? db.removeArrayElement.insertOne({ "StudentName":"Larry", "StudentCoreSubject":["MongoDB", "MySQL", "SQL Server", "Java"], "StudentFavouriteTeacher":["John", "Marry", "Carol"] }); ...

Read More

MongoDB $push in nested array?

Krantik Chavan
Krantik Chavan
Updated on 14-Mar-2026 1K+ Views

The $push operator adds elements to an array field. To push into a nested array (an array inside another array), use the $ positional operator to identify the matched parent array element, then target the nested array with dot notation. Sample Data db.nestedArrayDemo.insertOne({ "EmployeeName": "Larry", "EmployeeSalary": 9000, "EmployeeDetails": [{ "EmployeeDOB": new Date("1990-01-21"), "EmployeeDepartment": "ComputerScience", "EmployeeProject": [ ...

Read More

Update MongoDB field using value of another field?

Krantik Chavan
Krantik Chavan
Updated on 14-Mar-2026 2K+ Views

In MongoDB, you can update a field using the value of another field in the same document. There are two main approaches − using the aggregation pipeline with $set (MongoDB 4.2+) or using $addFields with $out for writing results to a collection. Method 1: Update with Aggregation Pipeline (MongoDB 4.2+) Use updateMany() with an aggregation pipeline to set a field based on other fields ? // Create sample data db.studentInformation.insertOne({ "StudentFirstName": "Carol", "StudentLastName": "Taylor" }); // Update: create FullName from FirstName + LastName db.studentInformation.updateMany( ...

Read More

Retrieve only the queried element in an object array in MongoDB collection?

Krantik Chavan
Krantik Chavan
Updated on 14-Mar-2026 363 Views

To retrieve only the matching element from an object array in MongoDB, use the $elemMatch projection operator or the $ positional projection operator. Both return only the first array element that matches the query condition. Create Sample Data db.objectArray.insertMany([ { "Persons": [ {"PersonName": "Adam", "PersonSalary": 25000}, {"PersonName": "Larry", "PersonSalary": 27000} ] ...

Read More

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

Krantik Chavan
Krantik Chavan
Updated on 13-Mar-2026 212 Views

Yes, it is possible to write at the end of a report without clearing the current screen in SAP ABAP. You can achieve this by using the MODIFY LINE statement, which allows you to update specific lines on the screen without clearing the entire display. Using MODIFY LINE Statement The MODIFY LINE statement enables you to modify existing lines in the output list without affecting other content on the screen. This is particularly useful when you want to append information or update specific parts of your report output. Basic Syntax The basic syntax for using MODIFY ...

Read More

IMPORTING, EXPORTING and CHANGING Keywords in ABAP

Krantik Chavan
Krantik Chavan
Updated on 13-Mar-2026 5K+ Views

IMPORTING transfers a value from the caller to the called method by passing an actual parameter. EXPORTING is just opposite to what IMPORTING does. It passes value from the method to caller. CHANGING is transferring the value from caller to method by a variable which is processed or changed and the changed value is passed back to the caller. Thus it combines both IMPORTING and EXPORTING function. CHANGING Parameter Syntax There are a couple of ways in which CHANGING can be used − CHANGING myvar CHANGING VALUE(myvar) By using CHANGING myvar, the ...

Read More

Using SSIS to load data from SQL Server to SAP BW

Krantik Chavan
Krantik Chavan
Updated on 13-Mar-2026 512 Views

When considering data integration from SQL Server to SAP BW, while SSIS (SQL Server Integration Services) is a powerful ETL tool, it may not be the most optimal choice for this specific integration scenario due to compatibility and complexity challenges. Recommended Alternatives to SSIS Instead of using SSIS for SQL Server to SAP BW data loading, consider the following two more suitable options − SAP BW standard anyDB source system − This native SAP solution provides ...

Read More

Fetching attribute of SAP Webdynpro component in new component

Krantik Chavan
Krantik Chavan
Updated on 13-Mar-2026 256 Views

You need to do the below steps in order to pass values from one Webdynpro component to another: Create both components In the first component, create a method which will call the second component Create a parameter in the context of the first component which will be passed Call the first component; once the URL has been generated just append the parameter which needs to be passed Step-by-Step Implementation Step 1: Creating Context Parameter in First Component In your first component's context, ...

Read More

Using SAP connector 3.0 on an MVC application

Krantik Chavan
Krantik Chavan
Updated on 13-Mar-2026 328 Views

When working with SAP connector 3.0 in an MVC application, you may encounter issues when trying to set values in table parameters. A common solution is to try adding a new row before calling SetValue. Adding Rows to SAP Table Parameters To properly add data to a table parameter in SAP connector 3.0, you need to append a new row first and then set the values. Here's the correct approach − employeeHoli.Append(); employeeHoli.SetValue("ColumnName", "0000345"); Understanding Table Parameters When you ...

Read More

How to detect the dragleave event in Firefox when dragging outside the window with HTML?

Krantik Chavan
Krantik Chavan
Updated on 13-Mar-2026 218 Views

You need to track which elements dragenter and dragleave had been triggered on. Listening dragenter and dragleave on an individual element will capture not only events on that element but also events on children. The main challenge with detecting dragleave events in Firefox when dragging outside the window is that these events fire for both the target element and its children. To solve this, we create a collection that tracks all elements that have received dragenter events and removes them when dragleave occurs. Creating a Custom Drag Hover Plugin Here's a jQuery plugin that properly handles drag ...

Read More
Showing 41–50 of 176 articles
« Prev 1 3 4 5 6 7 18 Next »
Advertisements