cancel
Showing results for 
Search instead for 
Did you mean: 

How tou2026 Load a Flat File into BW-BPS (issue with delta uploads)

Former Member
0 Kudos

Hi,

I implemented solution described in document "How tou2026Load a Flat File into BW-BPS Using a Web Browser".

Everything works fine when I upload first file, but then I have problems with "delta uploads".

Depending on option in the LOAD Function Module, data is either always added (never modified) or second option all data in the real-time infocube is deleted and data from last file is inserted.


* LOAD Function Module
* Overwrite existing data or add to existing data?
* Change the IF depending on which alternative you require
IF 1 = 1. u201C <<<< ADJUST
REFRESH lt_data. " Delete and overwrite existing data
ELSE.
lt_data = xth_data. " Keep existing data
ENDIF.

I am looking for the option that will add record in case particular combination of characteristics doesn't exist yet in the cube or modify record if particular combination of characteristics already exists in the cube.

EXAMPLE:

Lets assume I uploaded the following data with the first file:

SalesOrg Material Quantity

A001 X1 10

A001 X2 20

Then I try to upload the second file:

SalesOrg Material Quantity

A001 X1 20 (I expect this record will be modified because there is value 10 for this combination)

A002 X1 20 (I expect this record will be added)

A002 X2 20 (I expect this record will be added)

My expectation is to have the following set of data in the cube:

SalesOrg Material Quantity

A001 X1 20

A001 X2 20

A002 X1 20

A002 X2 20

Unfortunately I always receive either this set of data:

(Option: "Keep existing data")

SalesOrg Material Quantity

A001 X1 10

A001 X2 20

A001 X1 20 => For combination A001 X1 the sum is already 30 and I expect this sum to be 20

A002 X1 20

A002 X2 20

Or I receive this set of data:

(Option: "Delete and overwrite existing data")

SalesOrg Material Quantity

A001 X1 10

A001 X2 20

A001 X1 -10

A001 X2 -20 => For combination A001 X2 the sum is now 0 and I expect this sum to be 20

A001 X1 20

A002 X1 20

A002 X2 20

I would like to ask if anybody had similar issue with delta uploads and how this issue can be solved ?

Perhaps something is wrong with my planning framework?

Please advise

Thanks!

Marcin

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member93896
Active Contributor
0 Kudos

Hi Marcin,

first of all, the upload works as designed. There's nothing wrong with it. The type of delta mode you require simply is not supported and you have to adapt the coding yourself.

Try the following change:


* >>> INSERT
    READ TABLE lt_data TRANSPORTING NO FIELD
      WITH KEY s_chas = ls_data-s_chas.
    IF sy-subrc = 0.
      DELETE lt_data FROM ls_data-s_chas.
    ENDIF.
* <<< INSERT
    COLLECT ls_data INTO lt_data.

Regards,

Marc

SAP NetWeaver RIG