cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to delete transaction data in model by abap code or logic script

former_member245036
Participant
0 Likes
639

Dear Expert,

I have data in Opex Model like this:

Category Entity Costcentre   Account   Time       Signeddata

B01         AA01   CC_10101  1223300   2016.03    150000

Now, I want to modify this record like this

Category Entity Costcentre   Account   Time       Signeddata

B03         AA01   CC_10101  1223300   2016.03    150000

The first record will be disappeared in OPEX model.

please, tell me how to do this by implemeting ABAP code in BADI or script logic. ( exception: delete manually in bw by deletion by selection).

thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Looks like you want to move data from B01 to B03.

Simple script:

*XDIM_MEMBERSET CATEGORY=B01

...// other dimensions scope

*WHEN CATEGORY

*IS *

*REC(EXPRESSION=%VALUE%,CATEGORY=B03)

*REC(EXPRESSION=0)

*ENDWHEN

Vadim

former_member186338
Active Contributor
0 Likes

And by the way, if you perform Light optimization with zero elimination both positive and negative record will disappear!

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Hung,

in your BADI you need to send 2 records, send 0 to the original record, then the new value to the new intersection record.

Andy

former_member245036
Participant
0 Likes

Dear Andy,

when I set 1st second record eq 0, data in model like this

Category Entity Costcentre   Account   Time       Signeddata

B01         AA01   CC_10101  1223300   2016.03    -150000

It means the system automatically generate negative record.

I don't want to this record.

Former Member
0 Likes

yes, that is the standard function of BPC, when you do the total in the report it will show 0.

Don't look in BW itself, if you look in BW then you need to sum the total as well to give you the final result.

Andy

former_member245036
Participant
0 Likes

Hi Andy,

I know, but i want use statement like

Modify table(model) from it_tab in abap code

how to do this?

Former Member
0 Likes

Hi Hung,

in your ABAP editor you put the cursor on the word modify, then press F1, it will show you how to use that key word.

but no matter what you change in the it_tab when you write to BW it will record the difference from the old value to the new value. So I don't know what you want to archive by using modify table statement as that has nothing to do with the negative it posted in BW.

Andy