cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ME Routing Script Problem

bince
Explorer
0 Kudos

Dear all,

We are working on routing scripts in SAP ME by using below documentation.

https://help.sap.com/docs/SAP_MANUFACTURING_EXECUTION/e1adc70af32241619335c8768a892edb/baaa9baa36ad4...

When the "Z_BAD_COMPONENT" non conformance exists, we want to scrap SFC by routing different direction. However, the below script is not working in our routing flow. Could you please help us to find error?

script:

if (NC_CODE==null) exit(false);

if (NC_CODE=="Z_BAD_COMPONENT" )

exit(true);

else

exit(false);

Best Regards,

Bünyamin İnce

Accepted Solutions (0)

Answers (1)

Answers (1)

sergiy_katerinich
Active Contributor
0 Kudos

First check for null is redundant.

Semicolon before else seems incorrect. I would use curly brackets inside if-else to make blocks clearly defined.

NC_CODE will contain value if an NC was logged right at the current pass through the routing step. If it was somewhere else, it will be empty.

Also, if you log several NCs during the pass, I'm not sure which one will be in the NC_CODE parameter, maybe the last one.

You can find more examples in SAP Notes if searching by "router script" through MFG-ME* component.