Sunday, September 30, 2007

Finding consignment stock balance at any point in time - treat the data in the remarks field in the Delivery Order as "locations"

[SAP]
What??!!
Ok, here goes.

[background]
Remarks field - Users key the delivery location into the remarks field. This is separate from the address field supplied by SAP. There are no checks and user can key in anything they like. Eg: 7 level; 6th storey; etc.
Consignment - are goods that are placed on customers' premises. Eg: books in bookstores; phones in mobile phone shops.
[/background]


1. Get all material documents from the very first day my company opened shop. Filter off those that do not have Delivery Orders.
2. Get the Delivery Orders.
3. Get the Delivery Order Remarks field via a function call.
4. Sorted by this remarkable remarks field, start counting the material movements that has occurred since the dawn of time, allocating them to their respective "locations".

Sounds easy? Already worked 2 weeks on this...

Q&A
===
q1. Why can't you use your previous logic - the one that starts tracking from the closest match?
a1. Can you tell me what each and every student in a school has eaten today? You can know how many plates of noodles and sandwiches have been sold but do you know *who* bought what? You got to interview every single single student to find out.

q2. Err... wouldn't that be slow?
a2. You bet your ass.

q3. Very slow?
a3. You daft?

q4. How are you going to verify your results?
a4. Compare with my other report that gives me the stock balance at any point in time but with one material at a time. Then list out all the material movements that has occurred for that material since day 1. Take out my calculator and...

q5. The deadline is Monday, isn't it?
a5. Yeah.

No comments:

Post a Comment