on 03-04-2014 3:07 AM
Dear all,
I have a script logic that currently will post/transfer figures from application A (HRPLAN) to application B (Financials), and there is also a currency conversion script logic in application B. This currency conversion script logic is to be executed after the figures from application A has been posted to application B. However due to customer request, they will like this process to be automated together when the posting happened. Therefore I will like to ask is there any way to call/include the currency conversion script logic in application B from the posting/transfer script logic in application A.
Understand that there is a method call "INCLUDE" which allows to include another script logic, however it is only restricted if the script logic are reside in the same application.
Cheers !
Regards,
Elvin
Hi Elvin,
Please implement the badi RUNLOGIC_PH (works for 7.5 and 10): http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/903c14d2-6741-3010-34b2-9ae9822c2...
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
I tested the RUNLOGIC_PH and I had an error after I executed the script.
Below is the log file of the error :
Please kindly advise ! thanks !!
LGX:
*XDIM_MEMBERSET CATEGORY=FORECAST
*XDIM_MEMBERSET COSTCENTER =CC1001021
*XDIM_FILTER COSTCENTER =[COSTCENTER].PROPERTIES("CALC") = "N"
*XDIM_ADDMEMBERSET EMPLOYEE=EMP_NONE
*XDIM_MEMBERSET ENTITY=E_NONE
*XDIM_MEMBERSET HRANALYTIC=COMMITTED,EXISTING,NEW,HRANALYTIC_NONE
*XDIM_MEMBERSET RPTCURRENCY=SGD
*XDIM_FILTER TIME=[TIME].PROPERTIES("CALC") = "N"
*XDIM_MEMBERSET HRACCOUNT=NHRC001,NHRC000,NHRC002,NHRC003,NHRC004,NHRC005,NHRC006,NHRC007,NHRC008,NHRC009,NHRC010,NHRC011,NHRC012,NHRC014,NHRC015,NHRC016,NHRC017,NHRC018,NHRC019,NHRC021,NHRC020,NHRC022
*START_BADI RUNLOGIC_PH
QUERY=OFF
WRITE=ON
DEBUG=ON
LOGIC=CONVHRCOSTS2.LGF
APPSET=APPSETNAME
APP=FINANCIALS
DIMENSION EMPLOYEE =<NONE>
DIMENSION HRANALYTIC =<NONE>
DIMENSION HRACCOUNT =<NONE>
DIMENSION MCOSTCENTER =<NONE>
DIMENSION RCOSTCENTER =<NONE>
DIMENSION HRACCOUNT =<NONE>
DIMENSION JOBTYPE = <NONE>
DIMENSION RPTCURRENCY=SGD
DIMENSION DATASRC=HRPLAN
DIMENSION FLOW=FA99
DIMENSION ANALYTIC=EXISTING
DIMENSION ACCOUNT=BAS(40999999)
DIMENSION P_PROFITCENTER =<NONE>
DIMENSION PROFITCENTER =<NONE>
DIMENSION INTCO = <NONE>
DIMENSION MEASURERS =<NONE>
*END_BADI
-------------------------------------------------------------------------------------------------------------------------------------
LOG:
FILE:\ROOT\WEBFOLDERS\MAPLETREE
\ADMINAPP\HRPLAN\TEST.LGF
USER:HARBOURFRONT\ELVINSEE
APPSET:APPSETNAME
APPLICATION:HRPLAN
[WARNING!] NO MEMBER SPECIFIED
FOR DIMENSION:JOBTYPE WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] NO MEMBER SPECIFIED
FOR DIMENSION:MCOSTCENTER WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] NO MEMBER SPECIFIED
FOR DIMENSION:RCOSTCENTER WILL QUERY ON ALL BASE MEMBERS.
EXECUTION BADI:RUNLOGIC_PH
QUERY: OFF
WRITE: ON
Member "<NONE>"not exist
Error in RUNLOGIC call.
BADI EXECUTION TIME IN TOTAL
:309.00 ms.
SCRIPT RUNNING TIME IN
TOTAL:0.68 s.
Please, specify the dimension lists:
1. For the cube you are running the script - HRPLAN?.
2. For the FINANCIALS cube.
Members in FINANCIALS cube can't be <NONE>!
By the way, do you really have appset: APPSET=APPSETNAME?
Also remove:
*XDIM_FILTER COSTCENTER =[COSTCENTER].PROPERTIES("CALC") = "N"
*XDIM_FILTER TIME=[TIME].PROPERTIES("CALC") = "N"
B.R. Vadim
Hi Vadim,
1) Yes the script which I am running is in HRPLAN cube
2) Dimension members as follow :
HRPLAN
EMPLOYEE
HRANALYTIC
HRACCOUNT
MCOSTCENTER
RCOSTCENTER
HRACCOUNT
JOBTYPE
RPTCURRENCY
MEASURES
Financials
RPTCURRENCY
DATASRC
FLOW
ANALYTIC
ACCOUNT
P_PROFITCENTER
PROFITCENTER
INTCO
MEASURES
3) I have change it from <NONE> to BASMEMBERS but still getting the same error
4) The appset name contains my client's company name therefore I have mask it out and change to a fictitious name. Hope you understand.
Cheers !
Elvin See
1. You didn't provided the full list of dimensions - I don't see CATEGORY, TIME, ENTITY... HRACCOUNT is duplicated in HRPLAN. COSTCENTER is not mentioned...
2. "3) I have change it from <NONE> to BASMEMBERS but still getting the same error" - where do you read that BASMEMBERS is a valid option???
3. Provide the calling script - CONVHRCOSTS2.LGF
4. Try this code - without any XDIM_MEMBERSET before:
*START_BADI RUNLOGIC_PH
QUERY=OFF
WRITE=ON
DEBUG=ON
LOGIC=CONVHRCOSTS2.LGF
APPSET=APPSETNAME
APP=FINANCIALS
DIMENSION EMPLOYEE =<NONE>
DIMENSION HRANALYTIC =<NONE>
DIMENSION HRACCOUNT =<NONE>
DIMENSION MCOSTCENTER =<NONE>
DIMENSION RCOSTCENTER =<NONE>
//DIMENSION HRACCOUNT =<NONE> - duplicated dimension name?
DIMENSION JOBTYPE = <NONE>
DIMENSION RPTCURRENCY=SGD
DIMENSION CATEGORY=FORECAST //common for both?
DIMENSION COSTCENTER=<ALL> //common for both?
DIMENSION TIME=<ALL> //common for both?
DIMENSION ENTITY=E_NONE //common for both?
DIMENSION DATASRC=HRPLAN
DIMENSION FLOW=FA99
DIMENSION ANALYTIC=EXISTING
DIMENSION ACCOUNT=BAS(40999999)
DIMENSION P_PROFITCENTER =<ALL>
DIMENSION PROFITCENTER =<ALL>
DIMENSION INTCO = <ALL>
//DIMENSION MEASURERS =<NONE> - don't specify measure!
*END_BADI
Vadim
Hi Vadim,
Thanks for your help.
I have change the BASMEMBERS to <ALL> and it is executed with no errors and it works by calling the other script in other application and got the results I wanted.
Just one question, it is necessary to defined all dimensions in the RUNLOGIC_PH ? In my case which I had already scope the necessary member set it in my CONVHRCOSTS2.LGF.
What my concern is that by scoping the dimension members at both places will it affected the memory ? As the customers had huge datasets and therefore I am concern about the memory space it will be affected.
Thank you.
Cheers
Elvin See
Hi Elvin,
It's better to define all dimensions in the RUNLOGIC_PH and remove extra scoping from CONVHRCOSTS2.LGF (make it simple). Memory is not the issue - just the member selection.
Don't use *XDIM_MEMBERSET's before RUNLOGIC_PH, the scope will be reset at the line *END_BADI
If you need to do some other calculations after *END_BADI - then scope here.
Also *XDIM_FILTER is used to filter scope passed to default.lgf. For DM package it's better to use *SELECT(%SOMEVAR%,...,"[SOMEPROPERTY]='SOMEVALUE'") and then *XDIM_MEMBERSET SOMEDIM=%SOMEVAR% or inside RUNLOGIC_PH call DIMENSION SOMEDIM=%SOMEVAR%
B.R. Vadim
Message was edited by: Vadim Kalinin - Added text after Also...
Thanks for the advise. I will give it a try and let you know the result.
Cheers !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Elvin,
One alternative would be to create a custom process chain which calls data manager packages from separate models (which each run a piece of script logic) and then run that package link through the model of your choice.
You need to use the process chain type that calls an ABAP program, then configure it to run UJ_TEST_PACKAGE which can be used to run data manager packages from any model.
Cheers,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.