Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    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.

    M.

    Add comment
    10|10000 characters needed characters exceeded