Sunday, March 17, 2013

Fire Inside at Convergence 2013

I got here yesterday and the talk about the conferences is buzzing everywhere, even among all of the parades and parties! Check in starts today, as well as ‘Pre-Game’ with GPPC (GP Partner Connection). If you’re here, get up and get registered!

Don’t forget about this neat opportunity at Convergence:

https://mbs.microsoft.com/partnersource/newsevents/events/conferences/FireInsideatConvergence.htm

Here’s the text of the link:

Last Modified 2/28/2013
Posted 2/27/2013

Coming to Convergence?

Don’t miss the opportunity to reveal your true potential and experience the fun-filled activities at the Change Agent Headquarters. Discover your hero title. Take professional headshot photos. Create your own ad, and meet our LinkedIn specialists who can help bolster your LinkedIn profile to achieve the maximum impact.

Change Agent Headquarters

  • LinkedIn Name Tag Analyzer: Access the app to receive a “Hero Title"
  • DIY ad and Professional headshot
    • Star in your own ad featuring your industry background and new title, and take a professional headshot
    • Use retrieval code/ MSTag to retrieve and share your photo via social media
  • LinkedIn Consultants
    • Meet 2 LinkedIn Consultants who are there to help bolster your professional profiles

  • Roaming Change Agent Ambassadors

    • Engage attendee to help customize hero titles on nametag buttons, and drive additional traffic to the Change Agent HQ

Premium Distribution

  • Name Tag laptop stickers in each messenger bag and at HQ
  • Buttons to be distributed by the Change Agent Ambassador throughout convention hall
  • T-shirts as an Evaluation Prize

Banners

  • 2 large banners featuring 6 ads in the main Lobby

Social Media Integration

  • Feature DIY ads on Digital Social Wall and hash-tag them for twitter search during and post event
  • DIY ads also available for attendees to download and share out on their own

Friday, February 1, 2013

Posting multiple batches with a macro

In a recent forum post, a GP user wanted to use a macro to post multiple batches using the Purchasing Batch Entry window. Sounds easy enough, but wait!

The macro worked fine for posting a single batch, but when the second batch was added, the macro always failed. The reason for the failure is that a Progress window pops up each time you post a Purchasing Batch. The Progress window is shown below:

progress window

In order to solve this problem, you need to account for the opening of this window in your macro. When you record a macro during posting, the macro system does not record it correctly. Below is a comparison of the right way and the way the macro system records it.

The RIGHT way:
NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

The WRONG way:
ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

The complete macro to post two batches in a row is below.

Until next post!
 
Here’s the macro.

Each command should be on a single line, it should not wrap.

CommandExec dictionary 'default' form 'Command_Purchasing' command 'POP_Batch_Entry'
NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'


#!BATCH POSTING 1

NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'
ActivateWindow dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'
TypeTo field 'Batch Number' , 'BATCH_NUMBER_1'
  MoveTo field Origin item 0
  ClickHit field Origin item 1 # 'Receivings Trx Entry'
MoveTo field 'Batch Comment'
  MoveTo field 'Post Button'
  ClickHit field 'Post Button'
NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'
NewActiveWin dictionary 'default'  form 'POP_Batch_Entry' window 'POP_Batch_Entry'


#!BATCH POSTING 2

TypeTo field 'Batch Number' , 'BATCH_NUMBER_2'
  MoveTo field Origin item 0
  ClickHit field Origin item 1 # 'Receivings Trx Entry'
MoveTo field 'Batch Comment'
  MoveTo field 'Post Button'
  ClickHit field 'Post Button'
NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'
NewActiveWin dictionary 'default'  form 'POP_Batch_Entry' window 'POP_Batch_Entry'


#!CLOSE AND END

CloseWindow dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'
NewActiveWin dictionary 'default' form sheLL window sheLL
CommandExec form BuiLtin command cmdQuitApplication

Monday, January 28, 2013

Processing 2012 Payroll year end after loading 2013 payroll tax tables

Variations of this problem have been popping up everywhere, as it often does when changes are made to the payroll tax percentages and limits. I wrote this up to answer one of the forum posts, so I thought I would brush it off and publish it.
Here was the scenario:
The company had downloaded the 2013 payroll tax tables and processed 2013 payroll, but neither closed 2012 payroll nor installed the year end update for 2012.
Now they need to close 2012 payroll and then return to processing 2013 payroll. Here’s what I would do to get back on track.
1.       Download and install the January hotfix of Dynamics GP 2010, this includes the year end tax update (as well as a hot fix). The current build is 11.00.2164. It was released 01/24/2013. Be sure you have a backup, this will require a table update. Backup your forms and reports dictionaries and create package files for all of your modifications.
2.       Open the Payroll Tax Tables window and change your FICAS tax code to a wage limit of $110,100 and a rate of 4.2%
a.       To open the Payroll Tax Tables window follow the instructions below.
b.      Navigate to: Administration | Setup | System | Payroll Tax.

c. Select the FICAS tax code, select the Apply Tax Table item and click the Filing Status button.

d. Select the NA filing status and click the Tables button

e. Edit the table rates and change the But Not Over column to $110,100 and the Tax Rate column to 4.2% and then click the OK button.

3.   Click Save on the Payroll Tax Filing Status window.
4.   Click Save on the Payroll Tax Setup window.
5.   Now, your going to remove the extra Medicare Tax for the high income earners.
a. In the Payroll Tax Setup window select the Tax Code FICAM, Apply Tax Table, and then click the Filing Status button.

b. Select the NA filing status and click the Tables button

c. To remove the second row in the table, place your cursor in the second row, choose Edit from the menu bar and then Delete Row.

d. Now you need to adjust the first row's maximum wage by entering $999,999,999.99 in the But Not Over column. Click OK to save and close the window.

6.   Click Save on the Payroll Tax Filing Status window.
7.   Click Save on the Payroll Tax Setup window.
8. Change the user date to 12/31/2012 (anything in 2012 will do)
9.   Create the year end wage file (close payroll).
10.  Make sure you’re happy with the W-2 amounts.
11.  Load the 2013 tax tables using the Payroll Tax Updates wizard
12.  Check to make sure the FICAS amounts reset to a wage limit of $113,700 and a rate of 6.2%
13.  Check to make sure the FICAM table includes the 2.35% extra for wages over $200,000.00.
14.  Don't forget to set the User Date back to the right date to process 2013 payroll!
That should get you fixed back up.
Until next post!
Leslie



































Friday, January 11, 2013

Round 2 2013 Payroll Tax Table update Released!

It’s time to update your payroll tax tables.

The Round 2 2013 tax tables have just been released! The update is available for versions 10 (last one for this version), GP 2010 and GP 2013.

Enjoy!

Leslie

Move Expired SOP Quotes to History

Expired quote documents do not move to the SOP history table on their own. If you want to move them to the SOP history table they need a little help. For my clients that want to keep their quotes, but do not want them to stay in the Work table, I create a stored procedure that runs periodically to clean up SOP Work file.

I use this SQL statement:

--copy line items from expired quotes to history

INSERT INTO SOP30300
(SOPTYPE,     SOPNUMBE,     LNITMSEQ,     CMPNTSEQ,     ITEMNMBR,     ITEMDESC,     NONINVEN,     DROPSHIP,     UOFM,     LOCNCODE,     UNITCOST,     ORUNTCST,     UNITPRCE,     ORUNTPRC,     XTNDPRCE,     OXTNDPRC,     REMPRICE,     OREPRICE,     EXTDCOST,     OREXTCST,     MRKDNAMT,     ORMRKDAM,     MRKDNPCT,     MRKDNTYP,     INVINDX,     CSLSINDX,     SLSINDX,     MKDNINDX,     RTNSINDX,     INUSINDX,     INSRINDX,     DMGDINDX,     ITMTSHID,     IVITMTXB,     BKTSLSAM,     ORBKTSLS,     TAXAMNT,     ORTAXAMT,     TXBTXAMT,     OTAXTAMT,     BSIVCTTL,     TRDISAMT,     ORTDISAM,     DISCSALE,     ORDAVSLS,     QUANTITY,     ATYALLOC,     QTYINSVC,     QTYINUSE,     QTYDMGED,     QTYRTRND,     QTYONHND,     QTYCANCE,     QTYCANOT,     QTYORDER,     QTYPRBAC,     QTYPRBOO,     QTYPRINV,     QTYPRORD,     QTYPRVRECVD,     QTYRECVD,     QTYREMAI,     QTYREMBO,     QTYTBAOR,     QTYTOINV,     QTYTORDR,     QTYFULFI,     QTYSLCTD,     QTYBSUOM,     EXTQTYAL,     EXTQTYSEL,     ReqShipDate,     FUFILDAT,     ACTLSHIP,     SHIPMTHD,     SALSTERR,     SLPRSNID,     PRCLEVEL,     COMMNTID,     BRKFLD1,     BRKFLD2,     BRKFLD3,     CURRNIDX,     TRXSORCE,     SOPLNERR,     ORGSEQNM,     ITEMCODE,     PURCHSTAT,     DECPLQTY,     DECPLCUR,     ODECPLCU,     EXCEPTIONALDEMAND,     TAXSCHID,     TXSCHSRC,     PRSTADCD,     ShipToName,     CNTCPRSN,     ADDRESS1,     ADDRESS2,     ADDRESS3,     CITY,     STATE,     ZIPCODE,     CCode,     COUNTRY,     PHONE1,     PHONE2,     PHONE3,     FAXNUMBR,     Flags,     CONTNBR,     CONTLNSEQNBR,     CONTSTARTDTE,     CONTENDDTE,     CONTITEMNBR,     CONTSERIALNBR,     ISLINEINTRA)

SELECT    
SOP10200.SOPTYPE,     SOP10200.SOPNUMBE,     SOP10200.LNITMSEQ,     SOP10200.CMPNTSEQ,     SOP10200.ITEMNMBR,     SOP10200.ITEMDESC,     SOP10200.NONINVEN,     SOP10200.DROPSHIP,     SOP10200.UOFM,     SOP10200.LOCNCODE,     SOP10200.UNITCOST,     SOP10200.ORUNTCST,     SOP10200.UNITPRCE,     SOP10200.ORUNTPRC,     SOP10200.XTNDPRCE,     SOP10200.OXTNDPRC,     SOP10200.REMPRICE,     SOP10200.OREPRICE,     SOP10200.EXTDCOST,     SOP10200.OREXTCST,     SOP10200.MRKDNAMT,     SOP10200.ORMRKDAM,     SOP10200.MRKDNPCT,     SOP10200.MRKDNTYP,     SOP10200.INVINDX,     SOP10200.CSLSINDX,     SOP10200.SLSINDX,     SOP10200.MKDNINDX,     SOP10200.RTNSINDX,     SOP10200.INUSINDX,     SOP10200.INSRINDX,     SOP10200.DMGDINDX,     SOP10200.ITMTSHID,     SOP10200.IVITMTXB,     SOP10200.BKTSLSAM,     SOP10200.ORBKTSLS,     SOP10200.TAXAMNT,     SOP10200.ORTAXAMT,     SOP10200.TXBTXAMT,     SOP10200.OTAXTAMT,     SOP10200.BSIVCTTL,     SOP10200.TRDISAMT,     SOP10200.ORTDISAM,     SOP10200.DISCSALE,     SOP10200.ORDAVSLS,     SOP10200.QUANTITY,     SOP10200.ATYALLOC,     SOP10200.QTYINSVC,     SOP10200.QTYINUSE,     SOP10200.QTYDMGED,     SOP10200.QTYRTRND,     SOP10200.QTYONHND,     SOP10200.QTYCANCE,     SOP10200.QTYCANOT,     SOP10200.QTYORDER,     SOP10200.QTYPRBAC,     SOP10200.QTYPRBOO,     SOP10200.QTYPRINV,     SOP10200.QTYPRORD,     SOP10200.QTYPRVRECVD,     SOP10200.QTYRECVD,     SOP10200.QTYREMAI,     SOP10200.QTYREMBO,     SOP10200.QTYTBAOR,     SOP10200.QTYTOINV,     SOP10200.QTYTORDR,     SOP10200.QTYFULFI,     SOP10200.QTYSLCTD,     SOP10200.QTYBSUOM,     SOP10200.EXTQTYAL,     SOP10200.EXTQTYSEL,     SOP10200.ReqShipDate,     SOP10200.FUFILDAT,     SOP10200.ACTLSHIP,     SOP10200.SHIPMTHD,     SOP10200.SALSTERR,     SOP10200.SLPRSNID,     SOP10200.PRCLEVEL,     SOP10200.COMMNTID,     SOP10200.BRKFLD1,     SOP10200.BRKFLD2,     SOP10200.BRKFLD3,     SOP10200.CURRNIDX,     SOP10200.TRXSORCE,     SOP10200.SOPLNERR,     SOP10200.ORGSEQNM,     SOP10200.ITEMCODE,     SOP10200.PURCHSTAT,     SOP10200.DECPLQTY,     SOP10200.DECPLCUR,     SOP10200.ODECPLCU,     SOP10200.EXCEPTIONALDEMAND,     SOP10200.TAXSCHID,     SOP10200.TXSCHSRC,     SOP10200.PRSTADCD,     SOP10200.ShipToName,     SOP10200.CNTCPRSN,     SOP10200.ADDRESS1,     SOP10200.ADDRESS2,     SOP10200.ADDRESS3,     SOP10200.CITY,     SOP10200.STATE,     SOP10200.ZIPCODE,     SOP10200.CCode,     SOP10200.COUNTRY,     SOP10200.PHONE1,     SOP10200.PHONE2,     SOP10200.PHONE3,     SOP10200.FAXNUMBR,     SOP10200.Flags,     SOP10200.CONTNBR,     SOP10200.CONTLNSEQNBR,     SOP10200.CONTSTARTDTE,     SOP10200.CONTENDDTE,     SOP10200.CONTITEMNBR,     SOP10200.CONTSERIALNBR,     SOP10200.ISLINEINTRA

FROM         SOP10100 LEFT OUTER JOIN
                      SOP10200 ON SOP10100.SOPTYPE = SOP10200.SOPTYPE AND SOP10100.SOPNUMBE = SOP10200.SOPNUMBE
WHERE     SOP10200.SOPTYPE = 1 AND (SOP10100.QUOEXPDA < GETDATE())

--HEADER
--copy header records from expired quotes to history

insert into SOP30200
(SOPTYPE,    SOPNUMBE,    ORIGTYPE,    ORIGNUMB,    DOCID,    DOCDATE,    GLPOSTDT,    QUOTEDAT,    QUOEXPDA,    ORDRDATE,    INVODATE,    BACKDATE,    RETUDATE,    ReqShipDate,    FUFILDAT,    ACTLSHIP,    DISCDATE,    DUEDATE,    REPTING,    TRXFREQU,    TIMEREPD,    TIMETREP,    DYSTINCR,    DTLSTREP,    DSTBTCH1,    DSTBTCH2,    USDOCID1,    USDOCID2,    DISCFRGT,    ORDAVFRT,    DISCMISC,    ORDAVMSC,    DISAVAMT,    ORDAVAMT,    DISCRTND,    ORDISRTD,    DISTKNAM,    ORDISTKN,    DSCPCTAM,    DSCDLRAM,    ORDDLRAT,    DISAVTKN,    ORDATKN,    PYMTRMID,    PRCLEVEL,    LOCNCODE,    BCHSOURC,    BACHNUMB,    CUSTNMBR,    CUSTNAME,    CSTPONBR,    PROSPECT,    MSTRNUMB,    PCKSLPNO,    PICTICNU,    MRKDNAMT,    ORMRKDAM,    PRBTADCD,    PRSTADCD,    CNTCPRSN,    ShipToName,    ADDRESS1,    ADDRESS2,    ADDRESS3,    CITY,    STATE,    ZIPCODE,    CCode,    COUNTRY,    PHNUMBR1,    PHNUMBR2,    PHONE3,    FAXNUMBR,    COMAPPTO,    COMMAMNT,    OCOMMAMT,    CMMSLAMT,    ORCOSAMT,    NCOMAMNT,    ORNCMAMT,    SHIPMTHD,    TRDISAMT,    ORTDISAM,    TRDISPCT,    SUBTOTAL,    ORSUBTOT,    REMSUBTO,    OREMSUBT,    EXTDCOST,    OREXTCST,    FRTAMNT,    ORFRTAMT,    MISCAMNT,    ORMISCAMT,    TXENGCLD,    TAXEXMT1,    TAXEXMT2,    TXRGNNUM,    TAXSCHID,    TXSCHSRC,    BSIVCTTL,    FRTSCHID,    FRTTXAMT,    ORFRTTAX,    FRGTTXBL,    MSCSCHID,    MSCTXAMT,    ORMSCTAX,    MISCTXBL,    BKTFRTAM,    ORBKTFRT,    BKTMSCAM,    ORBKTMSC,    BCKTXAMT,    OBTAXAMT,    TXBTXAMT,    OTAXTAMT,    TAXAMNT,    ORTAXAMT,    ECTRX,    DOCAMNT,    ORDOCAMT,    PYMTRCVD,    ORPMTRVD,    DEPRECVD,    ORDEPRVD,    CODAMNT,    ORCODAMT,    ACCTAMNT,    ORACTAMT,    SALSTERR,    SLPRSNID,    UPSZONE,    TIMESPRT,    PSTGSTUS,    VOIDSTTS,    ALLOCABY,    NOTEINDX,    CURNCYID,    CURRNIDX,    RATETPID,    EXGTBLID,    XCHGRATE,    DENXRATE,    EXCHDATE,    TIME1,    RTCLCMTD,    MCTRXSTT,    TRXSORCE,    SOPHDRE1,    SOPHDRE2,    SOPLNERR,    SOPHDRFL,    COMMNTID,    REFRENCE,    POSTEDDT,    PTDUSRID,    USER2ENT,    CREATDDT,    MODIFDT,    Tax_Date,    APLYWITH,    WITHHAMT,    SHPPGDOC,    CORRCTN,    SIMPLIFD,    DOCNCORR,    SEQNCORR,    SALEDATE,    EXCEPTIONALDEMAND,    Flags,    SOPSTATUS,    SHIPCOMPLETE,    DIRECTDEBIT,    WorkflowApprStatCreditLm,    WorkflowPriorityCreditLm,    WorkflowApprStatusQuote,    WorkflowPriorityQuote,    ContractExchangeRateStat)

SELECT     SOP10100.SOPTYPE,    SOP10100.SOPNUMBE,    SOP10100.ORIGTYPE,    SOP10100.ORIGNUMB,    SOP10100.DOCID,    SOP10100.DOCDATE,    SOP10100.GLPOSTDT,    SOP10100.QUOTEDAT,    SOP10100.QUOEXPDA,    SOP10100.ORDRDATE,    SOP10100.INVODATE,    SOP10100.BACKDATE,    SOP10100.RETUDATE,    SOP10100.ReqShipDate,    SOP10100.FUFILDAT,    SOP10100.ACTLSHIP,    SOP10100.DISCDATE,    SOP10100.DUEDATE,    SOP10100.REPTING,    SOP10100.TRXFREQU,    SOP10100.TIMEREPD,    SOP10100.TIMETREP,    SOP10100.DYSTINCR,    SOP10100.DTLSTREP,    SOP10100.DSTBTCH1,    SOP10100.DSTBTCH2,    SOP10100.USDOCID1,    SOP10100.USDOCID2,    SOP10100.DISCFRGT,    SOP10100.ORDAVFRT,    SOP10100.DISCMISC,    SOP10100.ORDAVMSC,    SOP10100.DISAVAMT,    SOP10100.ORDAVAMT,    SOP10100.DISCRTND,    SOP10100.ORDISRTD,    SOP10100.DISTKNAM,    SOP10100.ORDISTKN,    SOP10100.DSCPCTAM,    SOP10100.DSCDLRAM,    SOP10100.ORDDLRAT,    SOP10100.DISAVTKN,    SOP10100.ORDATKN,    SOP10100.PYMTRMID,    SOP10100.PRCLEVEL,    SOP10100.LOCNCODE,    SOP10100.BCHSOURC,    SOP10100.BACHNUMB,    SOP10100.CUSTNMBR,    SOP10100.CUSTNAME,    SOP10100.CSTPONBR,    SOP10100.PROSPECT,    SOP10100.MSTRNUMB,    SOP10100.PCKSLPNO,    SOP10100.PICTICNU,    SOP10100.MRKDNAMT,    SOP10100.ORMRKDAM,    SOP10100.PRBTADCD,    SOP10100.PRSTADCD,    SOP10100.CNTCPRSN,    SOP10100.ShipToName,    SOP10100.ADDRESS1,    SOP10100.ADDRESS2,    SOP10100.ADDRESS3,    SOP10100.CITY,    SOP10100.STATE,    SOP10100.ZIPCODE,    SOP10100.CCode,    SOP10100.COUNTRY,    SOP10100.PHNUMBR1,    SOP10100.PHNUMBR2,    SOP10100.PHONE3,    SOP10100.FAXNUMBR,    SOP10100.COMAPPTO,    SOP10100.COMMAMNT,    SOP10100.OCOMMAMT,    SOP10100.CMMSLAMT,    SOP10100.ORCOSAMT,    SOP10100.NCOMAMNT,    SOP10100.ORNCMAMT,    SOP10100.SHIPMTHD,    SOP10100.TRDISAMT,    SOP10100.ORTDISAM,    SOP10100.TRDISPCT,    SOP10100.SUBTOTAL,    SOP10100.ORSUBTOT,    SOP10100.REMSUBTO,    SOP10100.OREMSUBT,    SOP10100.EXTDCOST,    SOP10100.OREXTCST,    SOP10100.FRTAMNT,    SOP10100.ORFRTAMT,    SOP10100.MISCAMNT,    SOP10100.ORMISCAMT,    SOP10100.TXENGCLD,    SOP10100.TAXEXMT1,    SOP10100.TAXEXMT2,    SOP10100.TXRGNNUM,    SOP10100.TAXSCHID,    SOP10100.TXSCHSRC,    SOP10100.BSIVCTTL,    SOP10100.FRTSCHID,    SOP10100.FRTTXAMT,    SOP10100.ORFRTTAX,    SOP10100.FRGTTXBL,    SOP10100.MSCSCHID,    SOP10100.MSCTXAMT,    SOP10100.ORMSCTAX,    SOP10100.MISCTXBL,    SOP10100.BKTFRTAM,    SOP10100.ORBKTFRT,    SOP10100.BKTMSCAM,    SOP10100.ORBKTMSC,    SOP10100.BCKTXAMT,    SOP10100.OBTAXAMT,    SOP10100.TXBTXAMT,    SOP10100.OTAXTAMT,    SOP10100.TAXAMNT,    SOP10100.ORTAXAMT,    SOP10100.ECTRX,    SOP10100.DOCAMNT,    SOP10100.ORDOCAMT,    SOP10100.PYMTRCVD,    SOP10100.ORPMTRVD,    SOP10100.DEPRECVD,    SOP10100.ORDEPRVD,    SOP10100.CODAMNT,    SOP10100.ORCODAMT,    SOP10100.ACCTAMNT,    SOP10100.ORACTAMT,    SOP10100.SALSTERR,    SOP10100.SLPRSNID,    SOP10100.UPSZONE,    SOP10100.TIMESPRT,    SOP10100.PSTGSTUS,    SOP10100.VOIDSTTS,    SOP10100.ALLOCABY,    SOP10100.NOTEINDX,    SOP10100.CURNCYID,    SOP10100.CURRNIDX,    SOP10100.RATETPID,    SOP10100.EXGTBLID,    SOP10100.XCHGRATE,    SOP10100.DENXRATE,    SOP10100.EXCHDATE,    SOP10100.TIME1,    SOP10100.RTCLCMTD,    SOP10100.MCTRXSTT,    SOP10100.TRXSORCE,    SOP10100.SOPHDRE1,    SOP10100.SOPHDRE2,    SOP10100.SOPLNERR,    SOP10100.SOPHDRFL,    SOP10100.COMMNTID,    SOP10100.REFRENCE,    SOP10100.POSTEDDT,    SOP10100.PTDUSRID,    SOP10100.USER2ENT,    SOP10100.CREATDDT,    SOP10100.MODIFDT,    SOP10100.Tax_Date,    SOP10100.APLYWITH,    SOP10100.WITHHAMT,    SOP10100.SHPPGDOC,    SOP10100.CORRCTN,    SOP10100.SIMPLIFD,    SOP10100.DOCNCORR,    SOP10100.SEQNCORR,    SOP10100.SALEDATE,    SOP10100.EXCEPTIONALDEMAND,    SOP10100.Flags,    SOP10100.SOPSTATUS,    SOP10100.SHIPCOMPLETE,    SOP10100.DIRECTDEBIT,    SOP10100.WorkflowApprStatCreditLm,    SOP10100.WorkflowPriorityCreditLm,    SOP10100.WorkflowApprStatusQuote,    SOP10100.WorkflowPriorityQuote,    SOP10100.ContractExchangeRateStat

FROM         SOP10100
WHERE    SOPTYPE = 1 AND (SOP10100.QUOEXPDA < GETDATE())

--LINE
--delete line items of expired quotes from WORK

DELETE SOP10200
FROM         SOP10100 LEFT OUTER JOIN
                      SOP10200 ON SOP10100.SOPTYPE = SOP10200.SOPTYPE AND SOP10100.SOPNUMBE = SOP10200.SOPNUMBE
WHERE     SOP10200.SOPTYPE = 1 AND (SOP10100.QUOEXPDA < GETDATE())

--HEADER
--delete header records of expired quotes from WORK
DELETE SOP10100

WHERE    SOPTYPE = 1 AND (SOP10100.QUOEXPDA < GETDATE())

I feel certain there is a more elegant solution out there, but this one has been working for a long time.

Let me know what you think and help me approve this process.

Until next post.

Leslie