cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

Hi,

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 |

M234

M221

J234

I123

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member186445
Active Contributor
0 Kudos

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.

M.

Answers (0)