Internal tables let you read data from a fixed structure and stores it in-memory (working memory) in ABAP. The data is stored in a sequential manner in memory. They are basically equivalent to arrays but dynamic in nature. Since they are dynamic in nature, memory management is already taken care by ABAP. Usually, data read from database tables are stored in the internal table to exactly replicate the database tables. Work Area refers to a single row of a fixed structure. It is basically used for storing temporary data. It is commonly used while iterating over a loop.For ex. If you ... Read More
You can use the structure CXTAB_CONTROL that has the following components:INVISIBLE C(1) Flag (X or blank) for visibility of entire table control.You can use sample program: RSDEMO02 that allow you to modify properties of table control and view the results.When you use this Table control INVISIBLE, this changes the content to “xxxxxxxxxxxx” like a hidden password. If you want to hide the complete column including data and header, your code should be like this −MODULE MODIFY_100 OUTPUT. DATA wa_tabctrl TYPE cxtab_column .looping the table controlLOOP AT TABCTRL-COLS INTO WA_TABCTRL. IF WA_TABCTRL-NAME = 'POSNR'. When you get on the desired screen you ... Read More
To fix this issue, you need to add try/catch response to the code. When you don’t include an authorization header, it results in an error 401 from the server.try { CatalogService.CatalogChangeClient service = new CatalogService.CatalogChangeClient(); service.ClientCredentials.UserName.UserName = "username"; service.ClientCredentials.UserName.Password = "password"; service.ClientCredentials.SupportInteractive = true; ProductUpdate[] products = new ProductUpdate[1]; products[0] = new ProductUpdate(); products[0].ProductCode = "00001"; products[0].ProductDescription = "TestProduct"; string result = service.UpdateProducts(products); } catch (Exception exception) { Console.WriteLine(exception.Message); }
Plant maintenance (PM) status can be categorized into two status:System status and User status. System status is used by the system for recognizing business transactions for a certain object type. Ideally System status cannot be changed by Users. They are defined by SAP and hence are immutable.Whereas User status relies on how it is set in the configuration. User Status is defined as per the business requirements.To modify the User status follow the below stepsGo to SPRO → Plan Maintenance and Customer Service → Maintenance and Service Processing → Maintenance and Service Orders → General Data → User status for ... Read More
There is a function “LINES” that can be used to get the number of lines in a table. Here is the code that can be used −DESCRIBE TABLE LINES VR1The variable VR1 will contain the number of rows.
You can use WAIT to hold the program for few seconds. Here is the syntaxSyntaxWAIT UP TO 36 SECONDSHowever, you need to be careful about using it. WAIT does an implicit commit. So you need to be sure that the commit does not corrupt the database. It also releases the work process.An alternative is to use below code −CALL FUNCTION 'ENQUE_SLEEP' EXPORTING seconds = 36.
You need to add spaces after or before braces as follows −SELECT * FROM CNTRB WHERE AGE > 30 AND CNTRB > 10000 AND NOT ( FUND1 = 'value' AND FUND2 = '0' )
You can use the tempfile module to create a unique temporary directory in the most secure manner possible. There are no race conditions in the directory’s creation. The directory is readable, writable and searchable only by the creating user ID. Note that the user of mkdtemp() is responsible for deleting the temporary directory when done with it. To create a new temporary directory, use it as follows −import tempfile _, temp_dir_path = tempfile.mkdtemp() # Do what you want with this directory # And remove the directory when doneNote that you need to manually delete this directory after you're done with ... Read More
JShell is a new java shell tool released in java 9. It is the first official REPL (Read-Evaluate-Print-Loop) application. This tool helps in executing and evaluating simple java programs and logics such as statements, loops, expressions, and etc. Java REPL provides a simple programming environment in the command prompt. It can read the input, evaluate it and print the output.In the below example we can able to create a class and object in JShell using command prompt.Examplejshell> class Employee { ...> private String name; ...> Employee(String name) { ...> this.name=name; ...> } ...> ... Read More
To add a new page, you can use Control command NEW-PAGE in Transaction SE71.SyntaxNEW-PAGE [page_options] [ spool_options]EffectThis statement creates a new page in the current list and writes the subsequent list output into a spool list.In T-Code: SE38 Print Program, you can use Function Module CONTROL_FORM to call NEW-PAGE command as below −CALL FUNCTION 'CONTROL_FORM' EXPORTING COMMAND = 'NEW-PAGE' EXCEPTIONS UNOPENED = 1 UNSTARTED = 2 OTHERS = 3.
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP