cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Hana FMS query problem

Former Member
0 Kudos

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"]

Accepted Solutions (0)

Answers (2)

Answers (2)

eralper_yilmaz
Participant

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

Former Member
0 Kudos

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]
kothandaraman_nagarajan
Active Contributor
0 Kudos

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