Skip to Content

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

Dec 01, 2016 at 06:42 PM


avatar image
Former Member


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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mario Tibollo 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.


10 |10000 characters needed characters left characters exceeded