Skip to Content
author's profile photo Former Member
Former Member

Routine to count documents and get volume incremented & decremented based on conditions


We are designing a DSO where we have to store the count of Billing Documents based on Material and store in new field called as 'Volume'.

Scenario is as below:

Source structure:-

Document || Material || Category

345234 M234 O

278945 M234 O

278945 M234 O

678931 M234 O

123678 M221 O

102359 K112 M

208076 K112 M

2034566 F234 M

2378934 J234 M

13256790 I123 M

from above structure get count of Document for Material(unique) .

If Category is 'O' then populate in target field

Volume' = 'volume'+1 (volume initially is 0) .

If Category is 'M' then target fiels 'Volume' = 'Volume'-1.

Data in DSO to be stored structure:

Material| Volume |





So, can you pls suggest end/start routine logic to get this calculation.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 02, 2016 at 07:38 AM

    load to dso using semantic grouping on document number and material in the DTP. This will make sure all entries for a given combination are in the same packet. In the start routine just count the number of lines per combination and afterwards delete the duplicates... easy game. you can search the world wide web for examples of code.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.