cancel
Showing results for 
Search instead for 
Did you mean: 

BI-IP: Check for Duplicate Data Entry In New Rows

Former Member
0 Kudos

Hello,

my customer require a solution to check if planning data entries in new rows already exist.

This check was standard functionality in BW-BPS but is not implemented for BI IP.

Do you have a simple solution to have the same check?

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi.

I have asked such question [here |;and there is no standard option.

I resolved it with 2 solutions:

1. using any flag and checking in FOX is this line already exist in posted data

2. [reading IP buffer |;in ABAP and then performing check if exist.

FOX solution works perfect so I stay with it instead of ABAP.

Regards.

Former Member
0 Kudos

Thank you Andrey,

Can you give me details about FOX solution?

Thanks again!

Former Member
0 Kudos

Hi.

Actually it depends on your application design.

Let's say when I enter new line I put indicator (Z_IND) "NEW " for these lines.

All the rest lines have indicator "OLD".

First step I check in FOX whether new entered line exists within old lines:


DATA VZ_IND TYPE Z_IND.
FOREACH VZ_IND.
   IF VZ_IND= 'OLD'.
        IF {ANY_KF_THAT_HAS_VALUE, OLD} <> 0 
             E001(/SEM/003) WITH 'The entered combination already exists'
        ENDIF.
   ENDIF.
ENDFOR.

This way I give error mssage if entered combination already exist within old lines. If indeed exists - planning sequence will stop and the rest steps woun't be executed. If doesn' exists all the rest steps of planning sequence are executed.

Next step I copy records with OLD indicator to NEW indicator.

In the last step I delete records with NEW indicator.

Regards.

Former Member
0 Kudos

Thank you, but if I've understood the user has to fill the field flag.

It's not possible to do a function that fill the flag in the new lines?

Thanks in advance

Former Member
0 Kudos

Hi.

User don't need to fill this flag.

You can create one filter with hard coded value "NEW" and with this filter user enters new data so new entered data will be with flag NEW automatically.

Next use another filter with NEW and OLD values and with this filter run FOX I have mentioned above.

Regards.

Former Member
0 Kudos

Thank you

I don't understand a thing. I have a how to SAP with a similar solution; but it use two query: a top query with a filter Z_IND = OLD and a bottom query with a filter Z_IND = NEW

With your solution you can do the same thing with a single query?

Thank you very much for your answer

Former Member
0 Kudos

Hi.

We need one query ...

I'l try to explain:

You have in the cube any IO (let'sy Z_IND).

You have a filter A with Z_IND restricted value NEW.

You have a query withi this filter A. With this query you able to enter new rows (let's say yu use WAD with analysis item).

So when you enter a new row Z_IND in thsi row always will be NEW.

You have another filter B with Z_IND restricted to NEW and OLD

You have a function BB (FOX for checking existing rows).

You have another function CC that copies records from NEW to OLD.

You have another function DD that deletes records with NEW indicator.

Now create plannig sequence like that:

STEP 1: filter B + function BB (this step takes NEW record and all OLD records and check whether NEW record already exists. If exists you will get error message and sequence will be stopped. If doesn't exists sequence will proceed to the enxt steps)

STEP 2: filter B with function CC (this function copies NEW record to OLD record)

STEP 3: filter A with function DD (this step will delete NEW record because it already has copied to OLD record).

Regadrs.

Former Member
0 Kudos

Thank you very muck!

Answers (1)

Answers (1)

josef_knzli
Explorer
0 Kudos

Hello Eduviges

In BI-IP there is no standard function that checks if entries already exist. The standard way is to not allow addiditonal lines such, that all existing characteristic combinations are shown in the planning layout (input ready query), and only for the combinations shown the keyfigure values can be modified. If you allow additional lines in the planning layout and the user enters a characteristic combination that already exists, the new keyfigure value will sum-up with the existing keyfigure values.

However I did once a kind of 'overwrite function' for a client using a 'new/old flag' with one query showing old entires and an empty query allowing input of new entires. A fox formula then overwrote the old with the new entries for the required characteristic combinations.

regards

Josef