cancel
Showing results for 
Search instead for 
Did you mean: 

Copying Characteristics Values based on Conditions

Former Member
0 Kudos

Hello Experts,

We've a scenario, wherein we have following data in Source DSO which is a Direct Update Planning DSO as shown below:

and we would like to copy the values in DSO2 which is also a Direct Update Planning DSO.

This means copy value of Customer in BPGRP4 and also if the Prod Cat is not empty copy the value in CRM_PROD4. If Prod is filled then populate CRM_PROD7.

Please advise, how shall i proceed here.

Thanks & regards,

Jomy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Experts,

I was able to replicate this scenario with the below code:

DATA LV_PROD   TYPE 0CRM_PROD.

DATA LV_BP_GRP TYPE 0BP_GRP.

DATA LV_CRM_BP_A04 TYPE 0CRM_BP_A04.

DATA LV_CRM_PR_A04 TYPE 0CRM_PR_A04.

DATA LV_PR_CAT TYPE 0PR_CAT_SAL.

LV_PROD = OBJV().

LV_BP_GRP = OBJV().

LV_CRM_BP_A04 = LV_BP_GRP.

LV_PR_CAT = OBJV().

LV_CRM_PR_A04 = LV_PR_CAT.

IF LV_PROD = #.

* Assigning the PPG to Level 4 and BP GRP to Level 4 and rest everything as #

{ZDISPBBSR,#,#,#,LV_CRM_BP_A04,#,#,#,#,#,#,LV_CRM_PR_A04,#,#,#,YTPMPD02} = {ZDISPBBSR,#,#,#,#,#,#,#,#,#,#,#,#,#,#,YTPMPD01}.

ENDIF.

Now my question is do I've to replicate statement for each and every Key Figure Separately, as there are 30 odd KF's or Can i genralize for every KF at once, so it comes in the same line ?

Thanks & regards,

Jomy

Former Member
0 Kudos

Really appreciate if somebody can share their experts thoughts!

Thanks,

Jomy

Former Member
0 Kudos

Hi,

you can define your KF as KEYFIGURE_NAME type and loop over all KFs :


DATA RATIO TYPE KEYFIGURE_NAME.

IF { REVENUE, 1 } > 500.

FOREACH RATIO.

{ RATIO, 2 } = { RATIO, 1 }.

ENDFOR.

ENDIF.


Examples for Formula Applications - BI Integrated Planning - SAP Library


hope it helps

Former Member
0 Kudos

Hi Anass,

That really helped !!

Thanks,

Jomy

Answers (0)