2015 Dec 14 1:15 PM
Hi,
SELECT EBELN, INFNR,
MATKL,
COALESCE( s~INFNR, s~MATKL ) AS ABCD
FROM EKPO AS s
UP TO 20 ROWS
INTO TABLE @DATA(lt_result).
I am Using the previous code to test.
But if s~INFNR is null and s~MATKL consists value, then also blank is displaying in ABCD column.
Need clarification.
-Sabarna
2015 Dec 17 8:19 AM
In the field INFNR there is never a null value but an empty value. So you can not use coalesce here because infnr is always set
SELECT * FROM EKPO WHERE INFNR = '' ... returns a lot of results
SELECT * FROM EKPO WHERE INFNR is null ... returns no results
So in your case you should use matkl if infnr = ''
Best regards, Andreas
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |