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!

Batch Status

Status
Not open for further replies.

Borvik

Programmer
Jan 2, 2002
1,392
US
I'm in the process of writing some software to replace one of our 3rd party plugins, so we don't have to rely on a 3rd party anymore.

I'm almost done, but now I'm just working on semantics to make the software more like the GP interface - right now selecting of a Batch ID (just like the window that opens when hitting the magnifying glass next to the Batch ID field in the SOP_Entry window).

There are 4 fields that show up in that list: Batch ID, Origin, Status, and Frequency.

I know that the batches are in the SY00500 table, and I've got 3 of the fields populated: Batch ID (simple one), Origin (static I know that's all it's going to show), and Frequency (8 possible values - gotten from Resource Description on the table).

I'm having difficulty finding the Status of the batch. According to the help files there are a total of 15 different statuses. I found a BCHSTTUS field in the table, but there are no descriptions of what the possible values in it mean (integer field). I found a website that mentioned that the batch status field was:

0 - Available
1 - Marked To Post
2 - Marked To Delete
3 - Marked To Receive

Those four values are a lot less than the 15 that the help file says - and totally leave out a status I'm seeing in the actual window: "No Transactions".

Also apparently for this particular window - as it is part of the Sales module, only maybe 9 or 10 of the 15 different statuses would be used.

Here are those 10 statuses:
Available
Approved
Busy
Deleting
Marked
No Transactions
Posting
Unequal Actual/Control Batch Totals
Unequal Actual/Control Transactions
Unapproved

Any ideas on how to determine which of those status states the batch is in?

Thanks.
 
Ok, as of now I have an idea on how to determine the status - but I'm not sure on the order of importance as it appears that several can overlap.

Here's what I have so far:
Code:
SELECT
	CASE
		WHEN APPROVL = 1 THEN 'Approved'
		WHEN DELBACH <> 0 THEN 'Deleting'
		WHEN MKDTOPST <> 0 THEN 'Marked'
		WHEN (MKDTOPST = 0 AND DELBACH = 0 AND BCHSTTUS = 0 AND NUMOFTRX <> 0 AND POSTTOGL = 0) THEN 'Available'
		WHEN (MKDTOPST = 0 AND DELBACH = 0 AND BCHSTTUS = 0 AND NUMOFTRX = 0 AND POSTTOGL = 0) THEN 'No Transactions'
		WHEN CNTRLTOT <> BCHTOTAL THEN 'Unequal Actual/Control Batch Totals'
		WHEN NUMOFTRX <> CNTRLTRX THEN 'Unequal Actual/Control Transactions'
	END AS [Status]
FROM SY00500
WHERE BACHNUMB = 'MONDAY'

This is actually returning the same batch status that GP is reporting 'MONDAY' to have, but I could have some comparisons wrong/out of order and at some point it could diverge from what GP says the status is.

Any ideas?
 
Well I don't think this is going to happen - at least as an external application.

I found Dexterity and am playing with that - possibly I'll make this as an integration to GP, that way I can use the windows already in GP instead of trying to make my own that look similar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top