Skip to Content
avatar image
Former Member

How can I make a BADI validation for data input in BPC 10.1 NW Standard

I need to write a BADI that compares data in 2 cubes and if the comparison is not as required , I stop the save and popup the user with the validation error.

The comparison logic is comparing the sum of some data in 1 cube with the sum of some of some data in cube 2 based on some properties in the 2 cubes.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Dec 06, 2016 at 09:32 AM

    You can do it using write back badi or validation badi. But you have provide details:

    What data you are saving (sample)?

    How do you want to compare?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Vadim Kalinin

      I use the subliquid property in both models to be many to many link between 2 models

      all the bought products in cube 1 having specific property (ex XYZ) are used to produce all the "Produced Sub Liquids" in model 2 having the same property (ex XYZ)

      example.png (11.4 kB)
  • Dec 07, 2016 at 01:28 PM

    Sorry, but many to many relationship can't be specified by property.

    For many to many you need a relationship table or model:

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for your reply

      in my case one liquid can only be used in 1 operation type ( cannot be input twice)

      and each subliquid can only be output of 1 operation ( no 2 operation can have a common subliquid as output)

      so the property is fulfilling my business case

      Pplz see the example below

      ex2.png (13.9 kB)
  • Dec 08, 2016 at 08:16 PM

    Strange production ...

    From my own experience you have number of row materials and number of finished or semi-finished goods. And the relationship is many to many (one specific row material can be used in a number of finished/semi-finished goods). But in theory i can imagine your scenario.

    Anyway, the main question is: when do you want to trigger validation (after what data is sent?)?

    Looks like you first enter purchased liquids without validation and you have to validate subliquid data entry! Is it correct?

    Also total validation is useless in general because it's not using the percents of the liquids used to produce subliquids...

    Not clear!

    Add comment
    10|10000 characters needed characters exceeded

    • Looking on your text I can see that validation has to be done only when "user will enter the real produced subliquids S1 & S3" in operation department.

      And the logic has to be:

      User can enter S1 or S2 or both S1 and S2 in the single send.

      Before writing data to cube, the existing data has to be read in itab and data send has to replace existing values in itab. Then total has to be calculated for itab and compared to existing sum of L1 and L2. If more - all sent records to be rejected.


      Already in the cube:

      L1=150, L2=250, SUML=400

      S1=200, S2=100, SUMS=300

      First data entry:

      Single S2=300

      Read from cube into itab:S1=200, S2=100

      Replace S2=100 with S2=300

      Calculate SUMS=200+300=500 > SUML=400

      Reject send of S2=300

      Second data entry:

      Both S1=150, S2=300

      Read from cube into itab:S1=200, S2=100

      Replace S1=200 with S1=150 and S2=100 with S2=300

      Calculate SUMS=150+300=450 > SUML=400

      Reject send of both S1=150, S2=300

      Is it clear?