cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic: clear data in a target application

romuald_colletaz
Participant
0 Kudos

Hi all,

I need to copy data from an application (BILLING) to another one (BUDGET). I use *DESTINATION_APP to execute the copy and it works fine.

Before copying data, I need to clear existing data in target application BUDGET even if no data exists in the source application BILLING. For example, I can have data on entity E1 in BUDGET application and no data on entity E1 in BILLING application.

If I use the following command data on E1 are not cleared:

XDIM_MEMBERSET ENTITY=<ALL>

*DESTINATION_APP = BUDGET

*WHEN CATEGORY

*IS ACTUAL

*REC(EXPRESSION=0)

*ENDWHEN

So I tried to add the command *WHEN_REF_DATA=MASTER_DATA before the *WHEN command in order to ensure that all entities are cleared but it doesn't work.

Any idea to help me?

regards,

Romuald

Accepted Solutions (0)

Answers (3)

Answers (3)

romuald_colletaz
Participant
0 Kudos

Hi,

indeed it works when I use *REC(EXPRESSION=1). We're going to use CLEAR package before executing the script.

regards,

Romuald

former_member200327
Active Contributor
0 Kudos

Hi Romuald,

You are right, this script is not going to send anything if Entity E1 is empty in BILLING Application. It also not going to send any records if CATEGORY = ACTUAL is empty in your App. Can you please share what log you got when you ran it with *WHEN_REF_DATA = MASTER_DATA?

Regards,

Gersh

krishna_priya1
Contributor
0 Kudos

We had similar requirement . We ended up clearing the data in DESTINATION application by executing clear DM package , and then executing logic in SOURCE application which would copy data from source to destination . As in our case , these are nightly schedules . I dont remember properly ,but we faced some issue clearing DESTINATION application data from source application using logic.

Former Member
0 Kudos

Hi,

Can you just try the below code:

XDIM_MEMBERSET ENTITY=E1
*DESTINATION_APP = BUDGET
*WHEN CATEGORY
*IS ACTUAL
*REC(EXPRESSION=1)
*ENDWHEN

Does this send the value of 1 to the BUDGET application?

I remember there was a problem in sending the data of 0. To rectify that problem, you might have to upgrade to BPC NW 7.5 SP08 Patch2 or BPC NW 7.5 SP10.

Hope this helps.