-   AFS/DDC/OLE: Function servers (
-   -   Unable to get error message in AFS call (

VishalMistry 21st August 2017 13:13

Unable to get error message in AFS call
Hi all,

I want to bulk update order system system (tiitm001.osys) to MRP. For this I am passing a text file that contains list of items.

I am deliberately passing an item with MPS order system to check if the system returns same error message as if I am working with Item master session (tiitm0101m000). But, If I check value of error.desc, it remains empty. In fact when I try to change the order system directly through session, I get the error message "Item found in MPS". My code is as given below:

stpapi.put.field("tiitm0101m000", "tiitm001.osys", str$(tcosys.mrp))"tiitm0101m000", error.desc)

Can anybody guide me how to get the error message ?


mark_h 21st August 2017 14:06

Have you tried stpapi.get.mess.code? Are you sure it is an error and not just a warning?

VishalMistry 21st August 2017 14:26

Hello Mark,

Yes. It is an error. I tried to execute the session directly and change the order system, it gave an error message and reverted back to old order system.

I tried to check the value of error as well as mess.
mess = stpapi.get.mess.code("tiitm0101m000", error)

Both are empty after


mark_h 21st August 2017 15:14

Have you tried stpapi.update versus save?

VishalMistry 21st August 2017 15:36

Hi Mark,

My problem got solved after replacing with stpapi.update call.

Thank you for your guidance.


All times are GMT +2. The time now is 07:39.

©2001-2018 - -