vineetu1
8th March 2006, 08:26
Hi All,

I am in process of automating auto-creation of Sales Order - Sales invoice from a text file. (Basically this text file is an output from some other s/w)

I am stuck in one particular situation..which is as follows.

We are using the functionality of Signal Codes to block use of any item.

For e.g. particular item X it has been blocked for all use by assigining a signal code in Item master.

As a result, when the AFS is tyring to insert the item in Sales order lines, it is prompting a message and not proceeding further. The AFS hangs here.

In such a situation I want to flash appropriate message to the user (i.e. Error, need to attend the order manually !!) and abort creating ths Sales order and proceed creating next Sales order.

How can this be handled ?

csecgn
9th March 2006, 18:15
Maybe something like this:

...

retins = stpapi.insert("tdbow4102m000", TRUE, e.mess)

if retins
then
| Order OK
error.in.order = FALSE
...
else
mess("...", 1, e.mess)

retrec = stpapi.recover("tdbow4102m000", e.mess)

error.in.order = TRUE
endif

if error.in.order
then
| next order, Errorhandling, ???
endif
...

We don't use then standard session for order entry. Our session has some special options we need only for AFS (but it's the same script like manual order entry).

hth

Regards
csecgn

mark_h
13th March 2006, 17:00
I usually try to prevent errors from occuring - I would just do a quick query against the item master. If there is a signal code send the user a message, then skip processing this record and go get the next record.