Problem with division as output is either 0 or 1 when using ifthenelse condition in ABAP program

Rishi Raj
Published on 13-Dec-2017 15:23:19
The problem is that your second parameter is 0 which is an integer, so the output always comes as an integer as ifthenelse takes data type from the second parameter. So, in your case, if the answer is less than .5, it is converted to zeroes and in case more ... Read More

Merging 2 tables with similar column name SAP HANA database

Vikyath Ram
Published on 13-Dec-2017 16:19:42
This can be done by using UNION or UNION ALL operator as followsselect id, Empl_name, DeptId from table1 union select id, Empl_name, DeptId from table2 The difference between UNION and UNION ALL is that UNION removes the duplicates while UNION ALL shows duplicates as well.

Error while selecting into field-symbol in SAP ABAP

Rishi Raj
Published on 13-Dec-2017 16:14:42
The problem is that you have not declared Field-symbol. Try using the below  ws_bkpf      TYPE bkpf_type. SELECT MANDT    INTO CORRESPONDING FIELDS OF ws_mandt UP TO 1 ROWS    FROM bkpf    WHERE belnr = '1700001016'. ENDSELECT.

Call screen on clicking the button in SAP ABAP

Vikyath Ram
Published on 13-Dec-2017 16:07:48
Please follow the steps below to make it functional.First, open the screen painterNow, double click on the button you want to make functionalAbove “Context Menu Form", you will find a field to enter Functional code where you enter the functional code.This will convert your button to functional trigger theOK code ... Read More

Using AT_FIRST be used to initialize variables used in loop in SAP ABAP

Rishi Raj
Published on 13-Dec-2017 15:57:15
There would not be much of difference in both ways. The only thing is without AT_FIRST, the counter variables will be cleared in all cases while using AT_FIRST, the counter variables will be cleared only if there is at least one execution of the loop. So, the only difference would ... Read More

Rfcabapexception error while querying a number of columns using RFC_READ_TABLE in SAP

Vikyath Ram
Published on 13-Dec-2017 15:19:30
It is not because of a number of columns but the actual total size of the fields you are querying. It should not be more than 512 bytes.  For RFC communication, the types likes DATA or STANDARD table are not supported. So the RFC_READ_TABLE function module has to convert the ... Read More

Finding minimum value across different columns in SAP HANA

Rishi Raj
Published on 13-Dec-2017 16:18:03
You need to use LEAST instead of min as below:“SELECT ID, LEAST(DAY_1, DAY_2, DAY_3) FROM ...” Please make sure that none of the values in your column in “NULL”.

Updating default value of new column in SAP system

Rishi Raj
Published on 13-Dec-2017 16:05:23
It is not good practice to update default values to a column as this will not be visible directly in the system and will not be picked by CTS. Also, there is no option in the SAP/ABAP environment of adding default values to the table column. If you choose to ... Read More

Passing data from one report to another in ABAP using SUBMIT

Vikyath Ram
Published on 13-Dec-2017 16:12:47
There doesn't seem to be any error in your syntax. Please verify if you declared the variables correctly. In case they are defined correctly, try the extended syntax check to see the error. The extended check can be done by going to PROGRAM => Check => Extended Syntax Check.

Error while using LOOP…..WHERE in SAP ABAP

Rishi Raj
Published on 13-Dec-2017 15:10:31
LOOP….WHERE condition was included recently in ABAP. Could you please verify your version?  This will work only on a version of 7.0 Ehp2 or higher.