Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
2 lines
809 B
Markdown
2 lines
809 B
Markdown
Create executable program {{P}}STOCK_BAL. On the selection screen, require p_from and p_to as dates. Add s_plant as a select-option for the plant. Read movement data from {{P}}MOVMT. Include a movement when its movement date is on or after p_from and on or before p_to and its plant is in s_plant. A movement type '101' or '201' is a receipt. A movement type '261' or '262' is an issue. Ignore all other in-scope movements. For each material, RECEIPT_QTY is the sum of quantity of its receipts. ISSUE_QTY is the sum of quantity of its issues. BALANCE is RECEIPT_QTY minus ISSUE_QTY. Show one line for each material that has at least one receipt or issue. Do not show a material that has only ignored movements. Sort the lines by BALANCE, highest first. Show columns MATERIAL, RECEIPT_QTY, ISSUE_QTY, BALANCE.
|