web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

UNPOSTED BATCHES ACROSS ALL DATABASES

(0) ShareShare
ReportReport
Posted on by

Hi all -

Is there a way to view all unposted sales and GL batches across all the GP companies? Maybe a sql script? 

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    babubaskaran@outlook.com Profile Picture
    12 on at

    Hi,

    You can create a custom smartlist using smartlist builder and select multi company.  Unposted sales transactions SOP10200 and GL10001 unposted work line details.

  • Suggested answer
    Andrew John Dean Profile Picture
    1,337 on at

    Try the following script that uses   (i) Cursors   (ii) Dynamics SQL and (iii) Temporary tables

    CREATE TABLE [tag:TEMP] (BCHSOURC VARCHAR(15), BACHNUMB VARCHAR(15))

    DECLARE @INTERID VARCHAR(15), @SQL VARCHAR(1000)

    DECLARE COMPANY_CURSOR CURSOR FOR

    SELECT RTRIM(INTERID) FROM SY01500

    OPEN COMPANY_CURSOR

    FETCH NEXT FROM COMPANY_CURSOR INTO @INTERID

    WHILE @@FETCH_STATUS = 0

    BEGIN

    SET @SQL = 'INSERT INTO [tag:TEMP] SELECT BCHSOURC, BACHNUMB FROM ' + @INTERID + '..SY00500 WHERE BCHSOURC IN (''Sales Entry'', ''GL_Normal'')'

    EXEC(@SQL)

    FETCH NEXT FROM COMPANY_CURSOR INTO @INTERID

    END

    CLOSE COMPANY_CURSOR

    DEALLOCATE COMPANY_CURSOR

    SELECT * FROM [tag:TEMP]

    DROP TABLE [tag:TEMP]

    Regards

    Andrew Dean

    Envisage Software Solutions

  • Community Member Profile Picture
    on at

    run this in each company: SELECT DB_NAME()db, BCHSOURC,BACHNUMB FROM sy00500 WHERE BCHSOURC IN ('Sales Entry','GL_Normal') AND NUMOFTRX >  0 AND BCHSTTUS = 0

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans