Skip to Content
0

SAP Hana FMS query problem

Jan 17 at 11:42 AM

39

avatar image
Former Member

Hello all,

I have the following query that I use in a FMS to populate a column named location (names of cities).

It works well until the city '015' is selected, then nothing is populated in the columns. I want to force '010' to be populated when '015' is selected in the header. For all other values, the column populates well.

What could be the problem?

SELECT (CASE T0."U_Location" WHEN '015' THEN '010' ELSE T0."U_Location" END) AS "Location"FROM OINV T0 WHERE T0."U_Location" = $[OINV."U_Location"]
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

ERALPER YILMAZ Jan 17 at 12:08 PM
1

There seems to be no problem with the query

I tried as follows and it works without a problem

SELECT 
    (CASE T0."U_Location" 
        WHEN '015' THEN '010' 
        ELSE T0."U_Location" 
    END) AS "Location"
FROM OINV AS T0 
WHERE 
    T0."U_Location" = '015'

You can just use the parameter value in the SELECT list to see if the parameter value is being passed as you are expecting

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for the answer.

Actuall made a mistake I wanted the trigger to be a header field change for location. The below query also fails for '015' as it doesnt put in '010'

SELECT 
(CASE WHEN $[$U_Location.0.0] = '015' THEN '010' ELSE T0."U_Location" END) AS "Location"
FROM OINV T0 WHERE T0."U_Location" = $[$U_Location.0.0]
0
Nagarajan K Jan 17 at 01:52 PM
0

Hi,

Your requirement is not clear.From your FMS i can see you are taking value from OINV_Location and updating same value to same field.

For better understanding, share your invoice document here.

Regards,

Nagarajan

Share
10 |10000 characters needed characters left characters exceeded