BPM on ORDER MISC

Ok. but No luck yet. Tried following: same error.


DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
DEFINE VARIABLE icustnum as integer no-undo.
DEFINE VARIABLE iordernum as integer no-undo.

{lib/PublishInfoMsg.i &InfoMsg = "'Test1'"}.

for each ttorderhed where ttorderhed.TermsCode='CC'.

assign iOrderNum=ttorderhed.OrderNum.

{lib/PublishInfoMsg.i &InfoMsg = "'Test2'"}.

RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.

FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
Customer.CustNum= ttorderhed.CustNum.
Assign miscCode = Customer.ShortChar01.
END.
RUN GetByID IN hSalesOrder(INPUT iOrderNum,
{&output_dataset_SalesOrderDataSet}).
RUN GetNewOrderMsc in
hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
Assign ttOHOrderMsc.MiscCode='FRGT'.
END.

RUN ChangeMiscCode in
hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
'OHOrderMsc').
FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
ttOHOrderMsc.FreqCode='E'.
ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
END.
RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).

RUN GetByID IN hSalesOrder(INPUT iOrderNum,
{&output_dataset_SalesOrderDataSet}).

DELETE OBJECT hSalesOrder.

end.
Decorate your code with message '1` 2 3 etc... this will put entries in
your app server log then you can see exactly where the error j is
happening. Message boxes won't work for this
On Jun 7, 2013 4:45 PM, "sanjay219@..." <sanjay219@...> wrote:

> **
>
>
> Ok. but No luck yet. Tried following: same error.
>
> DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
> DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
> DEFINE VARIABLE icustnum as integer no-undo.
> DEFINE VARIABLE iordernum as integer no-undo.
>
> {lib/PublishInfoMsg.i &InfoMsg = "'Test1'"}.
>
> for each ttorderhed where ttorderhed.TermsCode='CC'.
>
> assign iOrderNum=ttorderhed.OrderNum.
>
> {lib/PublishInfoMsg.i &InfoMsg = "'Test2'"}.
>
> RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
>
> FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
> Customer.CustNum= ttorderhed.CustNum.
> Assign miscCode = Customer.ShortChar01.
> END.
> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> {&output_dataset_SalesOrderDataSet}).
> RUN GetNewOrderMsc in
> hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> Assign ttOHOrderMsc.MiscCode='FRGT'.
> END.
>
> RUN ChangeMiscCode in
> hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
> 'OHOrderMsc').
> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> ttOHOrderMsc.FreqCode='E'.
> ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
> END.
> RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).
>
> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> {&output_dataset_SalesOrderDataSet}).
>
> DELETE OBJECT hSalesOrder.
>
> end.
>
>
>


[Non-text portions of this message have been removed]
Did you do this?
Message '1'.

Message '2'.

etc..


How far do you get? Which line of code is throwing the error?



*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Sun, Jun 9, 2013 at 2:55 PM, Jose Gomez <jose@...> wrote:

> Decorate your code with message '1` 2 3 etc... this will put entries in
> your app server log then you can see exactly where the error j is
> happening. Message boxes won't work for this
> On Jun 7, 2013 4:45 PM, "sanjay219@..." <sanjay219@...>
> wrote:
>
>> **
>>
>>
>> Ok. but No luck yet. Tried following: same error.
>>
>> DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
>> DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
>> DEFINE VARIABLE icustnum as integer no-undo.
>> DEFINE VARIABLE iordernum as integer no-undo.
>>
>> {lib/PublishInfoMsg.i &InfoMsg = "'Test1'"}.
>>
>> for each ttorderhed where ttorderhed.TermsCode='CC'.
>>
>> assign iOrderNum=ttorderhed.OrderNum.
>>
>> {lib/PublishInfoMsg.i &InfoMsg = "'Test2'"}.
>>
>> RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
>>
>> FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
>> Customer.CustNum= ttorderhed.CustNum.
>> Assign miscCode = Customer.ShortChar01.
>> END.
>> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
>> {&output_dataset_SalesOrderDataSet}).
>> RUN GetNewOrderMsc in
>> hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
>> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
>> Assign ttOHOrderMsc.MiscCode='FRGT'.
>> END.
>>
>> RUN ChangeMiscCode in
>> hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
>> 'OHOrderMsc').
>> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
>> ttOHOrderMsc.FreqCode='E'.
>> ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
>> END.
>> RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).
>>
>> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
>> {&output_dataset_SalesOrderDataSet}).
>>
>> DELETE OBJECT hSalesOrder.
>>
>> end.
>>
>>
>>
>


[Non-text portions of this message have been removed]
Yes,

Its giving error at Message '5'.

[13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure: 'UpdatePre49_A1 bo/SalesOrder.p' Line:6400) 1
[13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure: 'UpdatePre49_A1 bo/SalesOrder.p' Line:6404) 2
[13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure: 'UpdatePre49_A1 bo/SalesOrder.p' Line:6408) 3
[13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure: 'UpdatePre49_A1 bo/SalesOrder.p' Line:6412) 4
[13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure: 'UpdatePre49_A1 bo/SalesOrder.p' Line:6419) 5


for the following code:


DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
DEFINE VARIABLE icustnum as integer no-undo.
DEFINE VARIABLE iordernum as integer no-undo.

message '1'.

for each ttorderhed where ttorderhed.TermsCode='CC':

message '2'.

assign iOrderNum=ttorderhed.OrderNum.

message '3'.

RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.

message '4'.

FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
Customer.CustNum= ttorderhed.CustNum.
Assign miscCode = Customer.ShortChar01.
END.

message '5'.

RUN GetByID IN hSalesOrder(INPUT iOrderNum,
{&output_dataset_SalesOrderDataSet}).

message '6'.

RUN GetNewOrderMsc in
hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).

message '7'.

FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
Assign ttOHOrderMsc.MiscCode='FRGT'.
END.

message '8'.

RUN ChangeMiscCode in
hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
'OHOrderMsc').

message '9'.

FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
ttOHOrderMsc.FreqCode='E'.
ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
END.

message '10'.

RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).


message '11'.

RUN GetByID IN hSalesOrder(INPUT iOrderNum,
{&output_dataset_SalesOrderDataSet}).

message '12'.

DELETE OBJECT hSalesOrder.

message '13'.

end.
And waht s the error?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:06 AM, sanjay219@...
<sanjay219@...>wrote:

> **
>
>
> Yes,
>
> Its giving error at Message '5'.
>
> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6400) 1
> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6404) 2
> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6408) 3
> [13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure:
> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6412) 4
> [13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure:
> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6419) 5
>
> for the following code:
>
>
> DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
> DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
> DEFINE VARIABLE icustnum as integer no-undo.
> DEFINE VARIABLE iordernum as integer no-undo.
>
> message '1'.
>
> for each ttorderhed where ttorderhed.TermsCode='CC':
>
> message '2'.
>
> assign iOrderNum=ttorderhed.OrderNum.
>
> message '3'.
>
>
> RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
>
> message '4'.
>
>
> FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
> Customer.CustNum= ttorderhed.CustNum.
> Assign miscCode = Customer.ShortChar01.
> END.
>
> message '5'.
>
>
> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> {&output_dataset_SalesOrderDataSet}).
>
> message '6'.
>
>
> RUN GetNewOrderMsc in
> hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
>
> message '7'.
>
>
> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> Assign ttOHOrderMsc.MiscCode='FRGT'.
> END.
>
> message '8'.
>
>
> RUN ChangeMiscCode in
> hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
> 'OHOrderMsc').
>
> message '9'.
>
>
> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> ttOHOrderMsc.FreqCode='E'.
> ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
> END.
>
> message '10'.
>
>
> RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).
>
> message '11'.
>
>
> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> {&output_dataset_SalesOrderDataSet}).
>
> message '12'.
>
> DELETE OBJECT hSalesOrder.
>
> message '13'.
>
> end.
>
>
>


[Non-text portions of this message have been removed]
Can you also make sure that iOrderNum has a value?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:09 AM, Jose Gomez <jose@...> wrote:

> And waht s the error?
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Mon, Jun 10, 2013 at 10:06 AM, sanjay219@... <sanjay219@...
> > wrote:
>
>> **
>>
>>
>> Yes,
>>
>> Its giving error at Message '5'.
>>
>> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6400) 1
>> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6404) 2
>> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6408) 3
>> [13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure:
>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6412) 4
>> [13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure:
>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6419) 5
>>
>> for the following code:
>>
>>
>> DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
>> DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
>> DEFINE VARIABLE icustnum as integer no-undo.
>> DEFINE VARIABLE iordernum as integer no-undo.
>>
>> message '1'.
>>
>> for each ttorderhed where ttorderhed.TermsCode='CC':
>>
>> message '2'.
>>
>> assign iOrderNum=ttorderhed.OrderNum.
>>
>> message '3'.
>>
>>
>> RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
>>
>> message '4'.
>>
>>
>> FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
>> Customer.CustNum= ttorderhed.CustNum.
>> Assign miscCode = Customer.ShortChar01.
>> END.
>>
>> message '5'.
>>
>>
>> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
>> {&output_dataset_SalesOrderDataSet}).
>>
>> message '6'.
>>
>>
>> RUN GetNewOrderMsc in
>> hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
>>
>> message '7'.
>>
>>
>> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
>> Assign ttOHOrderMsc.MiscCode='FRGT'.
>> END.
>>
>> message '8'.
>>
>>
>> RUN ChangeMiscCode in
>> hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
>> 'OHOrderMsc').
>>
>> message '9'.
>>
>>
>> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
>> ttOHOrderMsc.FreqCode='E'.
>> ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
>> END.
>>
>> message '10'.
>>
>>
>> RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).
>>
>> message '11'.
>>
>>
>> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
>> {&output_dataset_SalesOrderDataSet}).
>>
>> message '12'.
>>
>> DELETE OBJECT hSalesOrder.
>>
>> message '13'.
>>
>> end.
>>
>>
>>
>
>


[Non-text portions of this message have been removed]
You have a period in the back of the For Each Custoemr instead of a colon..


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:10 AM, Jose Gomez <jose@...> wrote:

> Can you also make sure that iOrderNum has a value?
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Mon, Jun 10, 2013 at 10:09 AM, Jose Gomez <jose@...> wrote:
>
>> And waht s the error?
>>
>>
>> *Jose C Gomez*
>> *Software Engineer*
>> *
>> *
>> *
>> *T: 904.469.1524 mobile
>> E: jose@...
>> http://www.josecgomez.com
>> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
>> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
>> <http://www.josecgomez.com/professional-resume/> <http://www.josecgomez.com/feed/>
>> <http://www.usdoingstuff.com>
>>
>> *Quis custodiet ipsos custodes?*
>>
>>
>> On Mon, Jun 10, 2013 at 10:06 AM, sanjay219@... <
>> sanjay219@...> wrote:
>>
>>> **
>>>
>>>
>>> Yes,
>>>
>>> Its giving error at Message '5'.
>>>
>>> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
>>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6400) 1
>>> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
>>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6404) 2
>>> [13/06/10@10:04:15.131-0400] P-005212 T-002276 1 AS -- (Procedure:
>>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6408) 3
>>> [13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure:
>>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6412) 4
>>> [13/06/10@10:04:15.178-0400] P-005212 T-002276 1 AS -- (Procedure:
>>> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6419) 5
>>>
>>> for the following code:
>>>
>>>
>>> DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
>>> DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
>>> DEFINE VARIABLE icustnum as integer no-undo.
>>> DEFINE VARIABLE iordernum as integer no-undo.
>>>
>>> message '1'.
>>>
>>> for each ttorderhed where ttorderhed.TermsCode='CC':
>>>
>>> message '2'.
>>>
>>> assign iOrderNum=ttorderhed.OrderNum.
>>>
>>> message '3'.
>>>
>>>
>>> RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
>>>
>>> message '4'.
>>>
>>>
>>> FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
>>> Customer.CustNum= ttorderhed.CustNum.
>>> Assign miscCode = Customer.ShortChar01.
>>> END.
>>>
>>> message '5'.
>>>
>>>
>>> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
>>> {&output_dataset_SalesOrderDataSet}).
>>>
>>> message '6'.
>>>
>>>
>>> RUN GetNewOrderMsc in
>>> hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
>>>
>>> message '7'.
>>>
>>>
>>> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
>>> Assign ttOHOrderMsc.MiscCode='FRGT'.
>>> END.
>>>
>>> message '8'.
>>>
>>>
>>> RUN ChangeMiscCode in
>>> hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
>>> 'OHOrderMsc').
>>>
>>> message '9'.
>>>
>>>
>>> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
>>> ttOHOrderMsc.FreqCode='E'.
>>> ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
>>> END.
>>>
>>> message '10'.
>>>
>>>
>>> RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).
>>>
>>> message '11'.
>>>
>>>
>>> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
>>> {&output_dataset_SalesOrderDataSet}).
>>>
>>> message '12'.
>>>
>>> DELETE OBJECT hSalesOrder.
>>>
>>> message '13'.
>>>
>>> end.
>>>
>>>
>>>
>>
>>
>


[Non-text portions of this message have been removed]
The error is : Record not found.

Exception caught in: Epicor.Mfg.BO.SalesOrder

Error Detail
============
Message: Record not found.
Type: Error
Program: Server/bo/SalesOrder.p
Method: GetByID
Table: OrderHed
Row:
Field:



Stack Trace
===========
at Epicor.Mfg.Proxy.SalesOrderImpl.Update(SalesOrderDataSet ds)
at Epicor.Mfg.UI.Adapters.SalesOrderAdapter.Update()
at Epicor.Mfg.UI.App.SalesOrderEntry.Transaction.Update()
Also, when I open an existing order and add a new line, no error is showing up.(Also, no misc charge line is created).

What does that mean? Is that because when we create a new order, the ordernum is set to zero till it is saved. So, no value is added to iordernum.?? So, How can I check if a value is passed to iordernum?
By the time you add a line the order header has been saved.


Sent from my U.S. Cellular® Smartphone

-------- Original message --------
From: sanjay219@...
Date: 06/10/2013 9:14 AM (GMT-06:00)
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BPM on ORDER MISC

Also, when I open an existing order and add a new line, no error is showing up.(Also, no misc charge line is created).

What does that mean? Is that because when we create a new order, the ordernum is set to zero till it is saved. So, no value is added to iordernum.?? So, How can I check if a value is passed to iordernum?



[Non-text portions of this message have been removed]
Yeah this should iony fire when there is a new line not in the intial save.
If there is no error when you open an existing order check the log and see
how many messages are you gettting and how far.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:15 AM, Joshua Giese <
jgiese@...> wrote:

> **
>
>
> By the time you add a line the order header has been saved.
>
> Sent from my U.S. Cellular� Smartphone
>
>
> -------- Original message --------
> From: sanjay219@...
> Date: 06/10/2013 9:14 AM (GMT-06:00)
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: BPM on ORDER MISC
>
> Also, when I open an existing order and add a new line, no error is
> showing up.(Also, no misc charge line is created).
>
> What does that mean? Is that because when we create a new order, the
> ordernum is set to zero till it is saved. So, no value is added to
> iordernum.?? So, How can I check if a value is passed to iordernum?
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Only till message 1.

06/10@10:31:26.584-0400] P-005212 T-002276 1 AS -- (Procedure: 'UpdatePre49_A1 bo/SalesOrder.p' Line:6400) 1



DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
DEFINE VARIABLE icustnum as integer no-undo.
DEFINE VARIABLE iordernum as integer no-undo.

message '1'.

for each ttorderhed where ttorderhed.TermsCode='CC':

message '2'.

assign iOrderNum = ttorderhed.OrderNum.

{lib/PublishInfoMsg.i &InfoMsg = iordernum}.

message '3'.

RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.

message '4'.

FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
Customer.CustNum= ttorderhed.CustNum:
Assign miscCode = Customer.ShortChar01.
END.

message '5'.

RUN GetByID IN hSalesOrder(INPUT iOrderNum,
{&output_dataset_SalesOrderDataSet}).

message '6'.

RUN GetNewOrderMsc in
hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).

message '7'.

FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
Assign ttOHOrderMsc.MiscCode='FRGT'.
END.

message '8'.

RUN ChangeMiscCode in
hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
'OHOrderMsc').

message '9'.

FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
ttOHOrderMsc.FreqCode='E'.
ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
END.

message '10'.

RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).


message '11'.

RUN GetByID IN hSalesOrder(INPUT iOrderNum,
{&output_dataset_SalesOrderDataSet}).

message '12'.

DELETE OBJECT hSalesOrder.

message '13'.

end.
Hmm is your terms code CC? on those orders? You can't do this in pre
processing if its the first time you save the order you'll have to move it
to Post Proc... Move it to post proc and try again.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:33 AM, sanjay219@...
<sanjay219@...>wrote:

> **
>
>
> Only till message 1.
>
> 06/10@10:31:26.584-0400] P-005212 T-002276 1 AS -- (Procedure:
> 'UpdatePre49_A1 bo/SalesOrder.p' Line:6400) 1
>
>
> DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
> DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
> DEFINE VARIABLE icustnum as integer no-undo.
> DEFINE VARIABLE iordernum as integer no-undo.
>
> message '1'.
>
> for each ttorderhed where ttorderhed.TermsCode='CC':
>
> message '2'.
>
> assign iOrderNum = ttorderhed.OrderNum.
>
> {lib/PublishInfoMsg.i &InfoMsg = iordernum}.
>
>
> message '3'.
>
> RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
>
> message '4'.
>
> FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
> Customer.CustNum= ttorderhed.CustNum:
>
> Assign miscCode = Customer.ShortChar01.
> END.
>
> message '5'.
>
> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> {&output_dataset_SalesOrderDataSet}).
>
> message '6'.
>
> RUN GetNewOrderMsc in
> hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
>
> message '7'.
>
> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> Assign ttOHOrderMsc.MiscCode='FRGT'.
> END.
>
> message '8'.
>
> RUN ChangeMiscCode in
> hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
> 'OHOrderMsc').
>
> message '9'.
>
> FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> ttOHOrderMsc.FreqCode='E'.
> ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
> END.
>
> message '10'.
>
> RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).
>
> message '11'.
>
> RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> {&output_dataset_SalesOrderDataSet}).
>
> message '12'.
>
> DELETE OBJECT hSalesOrder.
>
> message '13'.
>
> end.
>
>
>


[Non-text portions of this message have been removed]
Yes it is.
Ok. Let me try that.

--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> Hmm is your terms code CC? on those orders? You can't do this in pre
> processing if its the first time you save the order you'll have to move it
> to Post Proc... Move it to post proc and try again.
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Mon, Jun 10, 2013 at 10:33 AM, sanjay219@...
> <sanjay219@...>wrote:
>
> > **
> >
> >
> > Only till message 1.
> >
> > 06/10@10:31:26.584-0400] P-005212 T-002276 1 AS -- (Procedure:
> > 'UpdatePre49_A1 bo/SalesOrder.p' Line:6400) 1
> >
> >
> > DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.
> > DEFINE VARIABLE miscCode AS CHARACTER NO-UNDO.
> > DEFINE VARIABLE icustnum as integer no-undo.
> > DEFINE VARIABLE iordernum as integer no-undo.
> >
> > message '1'.
> >
> > for each ttorderhed where ttorderhed.TermsCode='CC':
> >
> > message '2'.
> >
> > assign iOrderNum = ttorderhed.OrderNum.
> >
> > {lib/PublishInfoMsg.i &InfoMsg = iordernum}.
> >
> >
> > message '3'.
> >
> > RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
> >
> > message '4'.
> >
> > FOR EACH Customer WHERE Customer.Company=CUR-COMP AND
> > Customer.CustNum= ttorderhed.CustNum:
> >
> > Assign miscCode = Customer.ShortChar01.
> > END.
> >
> > message '5'.
> >
> > RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> > {&output_dataset_SalesOrderDataSet}).
> >
> > message '6'.
> >
> > RUN GetNewOrderMsc in
> > hSalesOrder({&input-output_dataset_SalesOrderDataSet}, iOrderNum,0).
> >
> > message '7'.
> >
> > FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> > Assign ttOHOrderMsc.MiscCode='FRGT'.
> > END.
> >
> > message '8'.
> >
> > RUN ChangeMiscCode in
> > hSalesOrder({&input-output_dataset_SalesOrderDataSet},INPUT
> > 'OHOrderMsc').
> >
> > message '9'.
> >
> > FOR EACH ttOHOrderMsc WHERE ttOHOrderMsc.RowMod='A':
> > ttOHOrderMsc.FreqCode='E'.
> > ttOHordermsc.DocMiscAmt= ttOHordermsc.DocMiscAmt + 10.
> > END.
> >
> > message '10'.
> >
> > RUN Update in hSalesOrder({&input-output_dataset_SalesOrderDataSet}).
> >
> > message '11'.
> >
> > RUN GetByID IN hSalesOrder(INPUT iOrderNum,
> > {&output_dataset_SalesOrderDataSet}).
> >
> > message '12'.
> >
> > DELETE OBJECT hSalesOrder.
> >
> > message '13'.
> >
> > end.
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
i moved it to post-processing. This Time its new error :(

OHOrderMsc record not available.

Exception caught in: Epicor.Mfg.BO.SalesOrder

Error Detail
============
Message: OHOrderMsc record not available.
Type: Error
Program: Server/bo/SalesOrder.p
Method: ChangeMiscCode
Table: OHOrderMsc
Row:
Field:



Stack Trace
===========
at Epicor.Mfg.Proxy.SalesOrderImpl.Update(SalesOrderDataSet ds)
at Epicor.Mfg.UI.Adapters.SalesOrderAdapter.Update()
at Epicor.Mfg.UI.App.SalesOrderEntry.Transaction.Update()
But it reached till message 8, in error log!!!

06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6430) 1
[13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6434) 2
[13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6467) 3
[13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6471) 4
[13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6478) 5
[13/06/10@10:44:48.452-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6483) 6
[13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6488) 7
[13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1 bo/SalesOrder.p' Line:6494) 8
ok i really need to know how far the code is getting so please tell me how
far it got every time using thee message '1'... etc.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:46 AM, sanjay219@...
<sanjay219@...>wrote:

> **
>
>
> i moved it to post-processing. This Time its new error :(
>
> OHOrderMsc record not available.
>
>
> Exception caught in: Epicor.Mfg.BO.SalesOrder
>
> Error Detail
> ============
> Message: OHOrderMsc record not available.
> Type: Error
> Program: Server/bo/SalesOrder.p
> Method: ChangeMiscCode
> Table: OHOrderMsc
>
> Row:
> Field:
>
> Stack Trace
> ===========
> at Epicor.Mfg.Proxy.SalesOrderImpl.Update(SalesOrderDataSet ds)
> at Epicor.Mfg.UI.Adapters.SalesOrderAdapter.Update()
> at Epicor.Mfg.UI.App.SalesOrderEntry.Transaction.Update()
>
>
>


[Non-text portions of this message have been removed]
Do you have a Misc Code called 'FRGT'.?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:47 AM, sanjay219@...
<sanjay219@...>wrote:

> **
>
>
> But it reached till message 8, in error log!!!
>
> 06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6430) 1
> [13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6434) 2
> [13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6467) 3
> [13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6471) 4
> [13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6478) 5
> [13/06/10@10:44:48.452-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6483) 6
> [13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6488) 7
> [13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6494) 8
>
>
>


[Non-text portions of this message have been removed]
It reached till message 8, in error log!!!

06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure: 'UpdatePost30_A1
bo/SalesOrder.p' Line:6430) 1
[13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
'UpdatePost30_A1 bo/SalesOrder.p' Line:6434) 2
[13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
'UpdatePost30_A1 bo/SalesOrder.p' Line:6467) 3
[13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure:
'UpdatePost30_A1 bo/SalesOrder.p' Line:6471) 4
[13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure:
'UpdatePost30_A1 bo/SalesOrder.p' Line:6478) 5
[13/06/10@10:44:48.452-0400] P-007760 T-007396 1 AS -- (Procedure:
'UpdatePost30_A1 bo/SalesOrder.p' Line:6483) 6
[13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure:
'UpdatePost30_A1 bo/SalesOrder.p' Line:6488) 7
[13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure:
'UpdatePost30_A1 bo/SalesOrder.p' Line:6494) 8
are you sure you hve a misc code called FRGT?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Mon, Jun 10, 2013 at 10:50 AM, sanjay219@...
<sanjay219@...>wrote:

> **
>
>
> It reached till message 8, in error log!!!
>
> 06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1
> bo/SalesOrder.p' Line:6430) 1
> [13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6434) 2
> [13/06/10@10:44:47.858-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6467) 3
> [13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6471) 4
> [13/06/10@10:44:47.889-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6478) 5
> [13/06/10@10:44:48.452-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6483) 6
> [13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6488) 7
> [13/06/10@10:44:48.467-0400] P-007760 T-007396 1 AS -- (Procedure:
> 'UpdatePost30_A1 bo/SalesOrder.p' Line:6494) 8
>
>
>


[Non-text portions of this message have been removed]