Question Status

Suggested Answer
Bindu asked a question on 2 Apr 2015 6:42 AM

Hi,

I am facing the issue with the SOP duplicate document number in GP 2010.
When i create an new order the master number is duplicated.
I created a stored proc to get the next available master number, but my issue is
I don't when and where to call this stored procedure to get the available master number and
adding new order to the available number.

Please suggest me on this issue.where to call the stored procedure to get the available master numbers in
SOP Entry.

Thanks

Reply
Suggested Answer
Tim Foster responded on 2 Apr 2015 7:21 AM

This is NOT SUPPORTED.  This is what I use when I must:

DECLARE @NXTMSTNO int

SELECT @NXTMSTNO=NXTMSTNO FROM SOP40100 WHERE DEX_ROW_ID=1

UPDATE SOP40100 SET NXTMSTNO=NXTMSTNO+1 WHERE DEX_ROW_ID=1

This should be done only when others are not in Sales Transaction Entry and not SOP Integration is being done.

Tim

Reply
Suggested Answer
Tim Foster responded on 2 Apr 2015 7:27 AM

Another more supported suggestion is the SPROC in your Company Database:

sopGetMasterNumber @O_iOUTMasterNumber int, @O_iOUTErrorState int

Reply
Bill Campbell responded on 2 Apr 2015 11:08 AM

While I know Tim is providing good advice, when ever you do something in the system where the outcome is in question, be sure that you have a good backup prior.

I can not tell you how many times a backup has saved us, when we are certain that nothing could go wrong with what we are doing in SQL.

Just poking my nose in . . .


** Please, if this answers your question, mark it as 'Answered' so others experiencing the same will know it resolved your issue. **

Bill Campbell
Director, Operations
M.I.S. Management Information Solutions Ltd.
Skype: billc.edmonton
Cell: +1 780 994 2455
Off : +1 780 481 5564

Reply
Bindu responded on 6 Apr 2015 12:46 AM

Hi All,

Thanks for you response.

Actually I am automating the workflows for the GP.In Automation i want to trigger the storedproc to get the master number. My issue is when I need to call this storedproc and how to trigger this.

Please help me out in this.

Thanks!

Bindu.

Reply
Almas Mahfooz responded on 6 Apr 2015 6:06 AM

I am sorry but I don't exactly understand your question, it's your workflow, you know you have to create sales document, then how can anyone of us tell you when to call stored procedure.

almas mahfooz  *:-)

Reply
Suggested Answer
Tim Foster responded on 2 Apr 2015 7:21 AM

This is NOT SUPPORTED.  This is what I use when I must:

DECLARE @NXTMSTNO int

SELECT @NXTMSTNO=NXTMSTNO FROM SOP40100 WHERE DEX_ROW_ID=1

UPDATE SOP40100 SET NXTMSTNO=NXTMSTNO+1 WHERE DEX_ROW_ID=1

This should be done only when others are not in Sales Transaction Entry and not SOP Integration is being done.

Tim

Reply
Suggested Answer
Tim Foster responded on 2 Apr 2015 7:27 AM

Another more supported suggestion is the SPROC in your Company Database:

sopGetMasterNumber @O_iOUTMasterNumber int, @O_iOUTErrorState int

Reply