Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert SOP order by sql

Status
Not open for further replies.

cryrep

Programmer
Oct 18, 2005
56
CA
I try to insert a SOP order into GreatPlain, it look to work, i find back all order information, i don't have the master number, i have to figure out how i will got it...
Someone have allready do this kind off operation

i got the idee to insert everything as a Quote and then transfere everithing as a order to get greatplains update all tables
 
I have tried to create a PHP class library for inserting orders into GP - it is really a pain to inject an order using SQL. You have to make sure all item, customer, and salesperson information is processed and inserted. Not to mention duplicate number issues.

The quote idea does sound pretty good.

But to answer your question, there is a stored procedure that will get you your master number and its called sopGetMasterNumber.

Here is the actuall SQL called to retrieve the master number - the master number will be returned in the 2nd column:

BEGIN DECLARE @stored_proc_name char(27) DECLARE @retstat int DECLARE @param1 int DECLARE @param2 int set nocount on SELECT @param1 = 0 SELECT @param2 = 0 SELECT @stored_proc_name = 'CMPNYDB.dbo.sopGetMasterNumber' EXEC @retstat = @stored_proc_name @param1 OUT, @param2 OUT SELECT @retstat, @param1, @param2 set nocount on END
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top