cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP logic.....

Former Member
0 Kudos

Hi,

Is this possible in the update rule for the field...

If comm_structure-KF_Field = 0

" Then dont update that field , let the field value be same as previous"

can we use "exit" ABAP statement in this loop , but then what I need to put in the RESULT = ??.

The idea is not to update the new values of KF , for the repeating key in ODS.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jeetu,

You can use Returncode to skip loading any field

Abort to skips entire record in BW 3.5 update rules.

more info you will get routine help.

[Return code|http://sap.ittoolbox.com/groups/technical-functional/sap-bw/returncode-abort-in-update-rules-257079]

Hope it Helps

Srini

[Dont forget to close the call by assigning poings.... - Food for Points: Make a Difference through Community Contribution!|https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/007928c5-c4ef-2a10-d9a3-8109ae621a82]

Answers (1)

Answers (1)

former_member205352
Active Contributor
0 Kudos

Seeing your code I think you are on 3.X.

you can set abort = 0 for the condition not to be updated.

Hope this helps.

Former Member
0 Kudos

Hi,

As my Key figure remains in Overwite update mode it will not work.

As mentioned in the documentation on sap help site.

"This process presents no problems so long as you update in an additive way, since this simply involves adding a 0. If, however, you use the minimum and overwrite update methods, this process becomes problematic. In these cases, you do not use a RETURNCODE, because if you do, any existing entries will be initialized, meaning that they will be overwritten with an empty or blank value."

At the moment nothing is working for me

Thanks...

Former Member
0 Kudos

Hi Jeetu,

CAn you try this in start routine instead of using standard update functionality, read the active table and look up for similar key record- if found delete this record from source package.

A bit tedious but i think might work out to give ur desired result.

Let me know if u need help with the code.

Hope it helps

Regards,

Rathy

former_member205352
Active Contributor
0 Kudos

I think abort =0 skips the entire record it wont even put that record in the ODS.

You can try this at start routine level.You can delete the entire record on that condition, as long as you dont have other key fig which you want to be updated from that record.

Former Member
0 Kudos

Hi Praveen,

I have several other key figures present in the record , so I cannot go for the start routine approach.

Thanks..

Former Member
0 Kudos

Hi Jeetu,

While in start routine u do a lookup for the same keys in active table of DSO, if the keys matches modify the current record by replacing the new key figure value with the old value u got from the look up.

Doesnt that solve ur problem?

Regards,

Rathy

Former Member
0 Kudos

Hi Rathy,

This will not solve because I dont have those values initially present in the ODS table.

What will happen in case of first loading itself when this KF is 0 in ODS.

Thanks....

Former Member
0 Kudos

This modification code will come inside an 'IF' statement.

if <the look up successfully returns records> then modify the key figure value to the value alredy in the DSO. You will modify record only when the key fields of the current record already exists in the DSO and for for kf=0.

so ur inital load will not process the if and ur load will be fine.

Otherwise u dont modify the record and it loads normally.

Regards,

Rathy

Edited by: Rathy Moorthy on Oct 17, 2008 4:35 PM

former_member205352
Active Contributor
0 Kudos

Since you want to access previous value in the datapackage for the key of ODS you will surely face so called DATAPACKAGE ISSUE, whereever you write your routine.

What if your key fig = 0 is first record in the data package and previous value the last record in data package.

One thing for sure you should make all records in single package.