SAP Basis Articles

Page 30 of 50

Creating a table in SAP system using OData service

Nancy Den
Nancy Den
Updated on 18-Dec-2019 880 Views

In order to create a table, you need to use either *.hdbdd or *.hdbtable and then expose them with xsodata.You can check for more details:https://help.sap.com/viewer/52715f71adba4aaeb480d946c742d1f6/2.0.02/en-USExampleservice namespace "HANA.Tables" {    "Schema_Name"."PAKAGE::TABLENAME" as "NAMESPACE"; }

Read More

Managing user sessions in SAP UI5 application

Daniol Thomas
Daniol Thomas
Updated on 18-Dec-2019 1K+ Views

You can make use of setTimeout and clearTimeOut functions. In order to trace the activity of the user, you can either make use of mouse move event or key press event or even both.ExampleYou can reset the timer on the occurrence of either of the two events.document.onmousemove = timeOut; document.onkeypress = timeOut; function timeOut () {    clearTimeout();    setTimeout(sessionTimeout, ); }

Read More

Fetching attribute of SAP Webdynpro component in new component

Krantik Chavan
Krantik Chavan
Updated on 18-Dec-2019 235 Views

You need to do the below steps in order to pass values from one Webdynpro component to another:Create both componentsIn the first component, create a method which will call the second componentCreate a parameter in the context of the first component which will be passedCall the first component; once the URL has been generated just append the parameter which needs to be passed.

Read More

Using subset of items present in the list in SAP Program

Smita Kapse
Smita Kapse
Updated on 18-Dec-2019 180 Views

You can use a SWITCH CASE statement to handle your scenario. This is a good choice if you know well in advance what all properties are required and what is not required. Also, it will let you to unit test your code.Otherwise, you can go for a collection like a dictionary.You can think of using HashSet or hashtable as well, it entirely depends upon the usage of the list created.

Read More

Second approach to fetch data from SAP tables without using SAP JCo

Jennifer Nicholas
Jennifer Nicholas
Updated on 18-Dec-2019 412 Views

If you need to access the SAP Tables with the help the table name and column names, then you can use the RFC RFC_READ_TABLE. It also provides external access to R/3 tables with the help of remote function calls.RFC requires following details:table name (required parameter)number of rows to skip (optional parameter)maximum number of rows to be loaded (optional parameter)

Read More

Using SQL statements in ABAP Programming and Database performance

Anvi Jain
Anvi Jain
Updated on 18-Dec-2019 351 Views

The basic principle for performance is that there should be minimal data transferred between application server and database.For your first question, I would suggest to select only the fields that are required. So, don’t use SELECT * in case you don’t require all the fields. But in specific scenarios, if you have multiple SELECT statements at various parts of your program querying the same table but different columns, it is advisable to use SELECT * as the output is stored in a buffer till your program execute. In that case, when you come to subsequent select, the system uses the ...

Read More

“Where” clause not working while updating database record in ABAP

Rishi Rathor
Rishi Rathor
Updated on 18-Dec-2019 532 Views

I think there is a syntax problem in your code. The colon in the first statement adds multiple following statements and hence updating all records in the first statement.Remove the colon in the first line and comma between SET specifiers.ExampleTry using the following statement after update:UPDATE zemployee_jat    SET prijs = zemployee_jat-prijs       naam = zemployee_jat-naam WHERE employeeid = zemployee_jat-motorid.

Read More

Naming conflict error while consuming SAP Web Service in .net

Nancy Den
Nancy Den
Updated on 18-Dec-2019 234 Views

You can fix this issue by adding Global before all calls giving the error. This has happened cos of system namespace in BAPI and Windows.ExampleAnother possible solution of this is by adding an alias for System.XML and change System.XML with SysXml as below:using SysXml = System.Xml; /// [System.Xml.Serialization.XmlElementAttribute(Form=SysXml.Schema.XmlSchemaForm.Unqualified)] public string Type {    get {       return this.typeField;       set {          this.typeField = value;       }    } }

Read More

Determining the current client in SAP using code

Jennifer Nicholas
Jennifer Nicholas
Updated on 18-Dec-2019 1K+ Views

You can find the current client in sy-mandt.ExampleHere is the code you can write for same.IF sy-mandt = ‘001’. *do A. ELSE. *Do B. ENDIF.

Read More

Getting day of the year from DD/MM/YYYY using function in SAP system

Nancy Den
Nancy Den
Updated on 18-Dec-2019 707 Views

You can do this by following line of code:DATA(l_day) = m_date - CONV d(m_date(4) && '0101' ) + 1.Where m date is the date that needs to be input as type d. Note the format of type d is YYYYMMDD.ExampleIf the above function is not present in your system, you can use the below code using simple date subtraction.DATA: l_date TYPE d, l_jan_01 TYPE d, l_day TYPE i. l_date = “your input date in YYYYMMDD format” l_jan_01 = l_date. l_jan_01+4 = '0101'. ( sets the date to first day of year) l_day = l_date - l_jan_01 + 1.

Read More
Showing 291–300 of 498 articles
« Prev 1 28 29 30 31 32 50 Next »
Advertisements