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
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
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
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
Hi,
You can create a custom smartlist using smartlist builder and select multi company. Unposted sales transactions SOP10200 and GL10001 unposted work line details.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156