cancel
Showing results for 
Search instead for 
Did you mean: 

Copy information from another application

Former Member
0 Kudos

Hello Experts,

I'm facing some issue, and I've tried a lot of approachs and still without a answer.

There is two application, one of Sales and another of Production.

After planned the Sales, based in the volume of sales, we project the production applying another measures.

So, what I need is after planned Sales, copy the informations of volume, from Sales to Prodution, changing just one member, that is a master data.

I've tried to use script logic, LOOKUP (script below), and use BADI with this [document|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0480970-894f-2d10-f9a5-d4b1160be203?QuickLink=index&overridelayout=true]. But the point is, that with this document, we start from the app source to the app destination, and what I'm looking for is the opposite.

Well, if somebody could help me. Thank you a lot.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Guys, anybody had this problem?

Former Member
0 Kudos

How do you exactly know what volume data is?(rptcurrency , datasrc?) Please post the script logic you have tried .Please be more specific with your issue. thanks.

former_member212723
Participant
0 Kudos

If I am understanding correctly, you would like to copy data from one application to another. You may try the script logic for *DESTINATION_APP something like this

*DESTINATION_APP = ()

*RENAME_DIM ()=() if necessary

*ADD_DIM ()=() if necessary

*REC()

*COMMIT

Hope this helps.

Regards

Former Member
0 Kudos

Hi, thanks for your reply.

Ok, let me explain better. What I need is this, in the source application we have this data.

APP:SALES

CATEGORY=PLAN1

ENTITY=1000

INPUTCURRENCY=NONE

MATERIAL=E00000778

TIME=2012.JAN

UNIT=KG

P_ACCT=0002

SIGNNEDDATA=1050,000

And I need to copy this values to another app, but, changing the P_ACCT and adding the CostCenter, like this:

APP:PROD

CATEGORY=PLAN1

ENTITY=1000

COSTCENTER=NONE ***

INPUTCURRENCY=NONE

MATERIAL=E00000778

TIME=2012.JAN

UNIT=KG

P_ACCT=0012 ***

SIGNNEDDATA=1050,000

The script is the folowing. I'd done this based in some threads that I saw.


//-----------------------------------------------------------------------------------------------------------
//Production APP
//-----------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------
//Take informations from SALES
//-----------------------------------------------------------------------------------------------------------
*LOOKUP SALES
*DIM SALES1:CATEGORY="PLAN1"
*DIM SALES1:ENTITY = "1000"
*DIM SALES1:INPUTCURRENCY = "NONE"
*DIM SALES1:P_ACCT = "0002"
*DIM SALES1:UNIT = "KG"
*DIM SALES1:MATERIAL = "E00000778"
*ENDLOOKUP

*WHEN LOOKUP(SALES1)
	*IS > 0
        	*BEGIN
			*REC(P_ACCT="0012",EXPRESSION=%VALUE%)
        	*END
        *NEXT
*NEXT

Thanks!

Edited by: Lucas Gabriel Corrêa da Costa on Jan 6, 2012 12:45 PM

former_member212723
Participant
0 Kudos

Here is a simple script that you may test... Please create the script and DM in SALES app. You can add *XDIM_MEMBERSET or *WHEN for further filtering....

*DESTINATION_APP = PROD

*ADD_DIM COSTCENTER=NONE

*WHEN P_ACCT

*IS 0002

*REC(FACTOR=1,P_ACCOUNT=0012)

*ENDWHEN

*COMMIT

Former Member
0 Kudos

Hi Lucas

In ur LOOKUP table, Add 0002, 0012 in P_ACCT Dimension

*DIM SALES1:P_ACCT = "0002, 0012"

and RUN the Script from Bottom to Top

I Hope so it helps..

SRM

Edited by: surendermiryala on Jan 7, 2012 2:45 AM

Former Member
0 Kudos

Thank you for your reply.

I added the member in LOOKUP, but still not working.

It's a problem in *WHEN LOOKUP(SALES1)

That results in the folowing message:

"

Validation Error(s)

Unknown Dimension Name in Keyword: "LOOKUP(SALES1):

"

If you know how to solve this, please, let me know.

Thanks.

Former Member
0 Kudos

The problem is that in my flow,

the trigger to execute that copy, is in PRD, the destination of the data.

Do you know any way to execute a DM from another app?

Thaks!!

Lucas

Former Member
0 Kudos

Hello Lucas,

I`m afraid you could only use "DESTINATION_APP" syntax. It means you must execute the package from the application of source data, and not from the application of destination data (as you are trying to do).

Maybe you must reconsider your script attending to this limitation.

I hope this info help you.

Regards,

Gabriel Garcí

former_member212723
Participant
0 Kudos

Lucas,

You may test this.

*LOOKUP SALES

*DIM SALES1:CATEGORY="PLAN1"

*DIM ENTITY = "1000"

*DIM INPUTCURRENCY = "NONE"

*DIM UNIT = "KG"

*DIM MATERIAL = "E00000778"

*ENDLOOKUP

*WHEN P_ACCT

*IS 0002

*REC(FACTOR=LOOKUP(SALES1),P_ACCT="0012",COSTCENTER="NONE" )

*ENDWHEN

*COMMIT

Please check whether all dimensions are listed in the look up...

Hope this helps.

former_member200327
Active Contributor
0 Kudos

Hi Lucas,

First of all, you can try using RUNLOGIC. You can find a How To guide [here|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0ad38cf-9e0e-2e10-9d9a-fbf57e69cd40].

Second, you can try changing SAPP in your data DM Package. I heard that this should work starting from SP08 of v.7.5.

Regards,

Gersh

Former Member
0 Kudos

Thanks a lot everyone.

I got to solve the issue.

With the script logic on source app, using *DESTINATION APP


// Send data to Production app

*XDIM_MEMBERSET P_ACCT = 0002
*XDIM_MEMBERSET CATEGORY = PLAN1
*XDIM_MEMBERSET SCENARIO = NONE
*XDIM_MEMBERSET MATERIAL = BAS(HMAT)

*DESTINATION_APP = PRODUCTION
*ADD_DIM COSTCENTER=NONE

*WHEN P_ACCT
    *IS 0002
         *BEGIN
              *REC(P_ACCT="0012",ENTITY="1000",EXPRESSION=(%VALUE%) )
         *END
*ENDWHEN
*COMMIT

But the point is that I called this script from the target app.

In data manager I created a data package using the process chain /CPMB/ALLOCATION, but with the advaced parameters below.


TASK(/CPMB/ALLOCATION_LOGIC,SUSER,%USER%)
TASK(/CPMB/ALLOCATION_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/ALLOCATION_LOGIC,SAPP,SALES)
TASK(/CPMB/ALLOCATION_LOGIC,LOGICFILENAME,SEND_DATA_PROD.LGF)

Thanks everyone by the help.

Lucas

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Lucas,

Only one last question. Do you execute this package from app SALES or app PRODUCTION?

Thank you,

Regards,

Gabriel Garcia

Former Member
0 Kudos

Hi Gabriel,

In the DM app Production, you have to change the advanced parameters. Setting the Sales app.


TASK(/CPMB/ALLOCATION_LOGIC,SAPP,SALES)

I'm in the 7.5.5 version of BPC NW.

Regards

Lucas

Former Member
0 Kudos
Former Member
0 Kudos

Hi

try like this once

First u Copy from sales to Production

then take changes in Copied application

SRM