cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with FMS on Issue for Production Quantity

joseph_antony
Explorer
0 Kudos
152

Hello,

I have created below fms on Issue for Production document which is not getting triggered on its own:

SELECT CASE
WHEN CAST($[$13.1880000004.0] AS INT) = 4
THEN CAST($[$13.87.0] AS DECIMAL(18,4))
ELSE 0.0001
END

Scenario: If the selected row item is a resources or rowtype = 290, then it should populate .0001 in quantity field.

I want this to be triggered when a production order is selected on the issue for production document.

Can anyone please suggest what corrections to make in this fms or suggest a better query to get this fms working?

Regards,

Joseph

 

 

 

Accepted Solutions (0)

Answers (4)

Answers (4)

LoHa
Active Contributor
0 Kudos

Hi Joseph,

if you would have tested your query as described, you would had found out that it is not working, and perhabs fixed it on your own.

The right query is 

SELECT CASE
WHEN CAST($[$13.1880000004.0] AS INT) = 4
THEN CAST(REPLACE($[$13.87.0],',','.') AS Numeric(18,4))
ELSE 0.0001
END

At the end it is perhabs not possible that it will run automatically (like copy to function in documents) because the form is already filled by SAP. Perhabs you find another field that can trigger it.

Otherwise the User has to click on the magnifying glass manually

regards Lothar

LoHa
Active Contributor
0 Kudos

Hi

when I try the query as decribed i got this

Test FMS.png

No result.

The fields you are using are

Test FMS 2.png

The second field is greyed out.

Which field do you use your FMS?

Provide a screenshot of it

Test FMS 3.png

regards Lothar

joseph_antony
Explorer
0 Kudos
The FMS is assigned in the quantity field. I want the quantity to set as .0001 if the item type is resource. If the item type is item, then it shoudl be the planned quantity from IGE1. Hope this helps. Regards,
LoHa
Active Contributor
0 Kudos

At first please test your FMS as described.

Check if there is a result or error message.

Second provide a screenshot how you configurated your FMS

joseph_antony
Explorer
0 Kudos
I have posted this thread only after testing the fms. There is no error. Its just that the value .0001 is not getting auto populated for resources when the production order number is changed. If you have a test database, you can copy paste the fms and try in your environment and you will see that the fms is working fine without any errors. Its just that its not getting refreshed automatically.
LoHa
Active Contributor
0 Kudos

Hi Joseph,

you can test your FMS by yourself. Open the Form and klick in the field where the magic should happen.

Then go through the menu to your query, then the variables will be filled with the data and you can see what went's wrong

FMS Test.png

regards Lothar

joseph_antony
Explorer
0 Kudos
Hey Lothar,
joseph_antony
Explorer
0 Kudos
Hi Lothar,
joseph_antony
Explorer
0 Kudos
Hi Lothar, Unfortunately, the magic isnt happening! I have to click on the magnifying lens to populate the values where as it has been set to auto refresh when order number changes. Any suggestions to make it work as soon as the production order is selected? Regards, Joseph
LoHa
Active Contributor
0 Kudos
Can you provide a screenshot of the value you added in you FMS
joseph_antony
Explorer
0 Kudos
Hi Lothar, The fms is in the original post. I just want the quantity to be set as .0001 when the item type is 290 which is a resource. Any suggestions? Regards, Joseph