Skip to Content
avatar image
Former Member

SAP Hana FMS query problem

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"]
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 17 at 12:08 PM

    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

    Add comment
    10|10000 characters needed 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]
  • Jan 17 at 01:52 PM

    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

    Add comment
    10|10000 characters needed characters exceeded