I am often reminded of a joke about how many people it takes to do this task or that. My new joke is how many lines of ABAP code in the New BADI for Custom Logic does it take to do the same thing in the older Microsoft version of the product? Some folks in our industry lack good abstract business thinking skills instead are just focused on being great code developers. Notwithstanding that is debatable, the great conspiracy to take jobs however we can continues. Here is how in BPC!
Do not get me wrong. I have been on the Net Weaver stack for some time now. I know how it works and what it really does.
What perplexes me is why such significant architectural features being pursued in the BPC space can be so obviously misaligned to the existing US Microsoft customer base in the BPC arena.
Particularly troublesome is the rising cost of migration from Microsoft to the Net Weaver environment. If I was in charge of marketing and software sales at SAP I would find someone and have a serious heart to heart about architecture and feature design process.
Let's take a look at one real world example where someone somewhere has not been on that many customer engagements but sure knows how to write core software code, particularly classes in the BPC space to unlock cool and improved Net Weaver features.
Dear SAP, most customers use properties in dimensions and use those properties in calculations. Where there is a clear 1 to 1 relationship between a member and some atomic data regarding that member, it is not an irrational choice to use properties in calculations. Now I know it could be an account fact that I can reference, but that may not always be a practical reality. I could give you a few examples but will spare you the details on that for now.
What I am referring to is two (of many you pick yours!) key outages in the new Net Weaver stack that continue to be a problem for most. (not a problem for me but the solution is unrealistic relative to the right way to do things for the customer and the stability of the migration path)
In BPC for Net Weaver when we want to *RECord a new record, we used to be able to use a FACTOR in our statement and directly reference a dimension property with a simple statement like this - MATERIAL.UOP where UOP in this case refers to minimum production quantity.
Now I know someone some where will say a property cannot be assured to be a number. What? Think about where we source this from. It is a number. We know it is a number, and we know it will work and yes we are adults. Please allow us to continue to make adult decisions. We prefer to know consequences rather than not having options.
So why then does this two minute script logic code
*WHEN DIMENSION
*IS SOMETHING
*REC(ACCOUNT=SOMENEWACCT,FACTOR=MATERIAL.UOP/100)
*ENDWHEN
Become this 3 week offshore communication nightmare lasting 3 to 4 weeks?
1. SAP Does not document well anymore. Please document the use of the BPC CL_UJ* classes so certified VB and C++ developers can use them without having to go hunting and gathering for days.
2. WHEN ENDWHEN Accumulates before posting BADI requires work to do so, so please allow an accumulation feature in a BADI so CT_DATA will simply do that otherwise many will forget about the keyword in ABAP COLLECT and how to use it...but its additional lines of code overhead
3. Because technical resources are not good at abstract thinking and most do not even know there are 584 classes available in the SAP system for interfacing to the BPC system so they write way overly cumbersome code and take great risk essentially building there own NON CLASS based interfaces to data!! Great Risk!
You be the judge. Maybe this is not the most effective, but maybe it is.
Well to start there are about 65 lines of code and I would say in the average application this would hold that do nothing but declare the variables and data structures that you need. This includes field symbols and strongly typed structures all for manipulating the data in the program. Could be less, could be more but you will have to figure out how to set these up relative to your needs.
Then you have to do this to read a dimension and its members:
LI_ATTR = 'ATTRYOUNEED'.
APPEND LI_ATTR TO LT_ATTR_TIME.* need to see what can be passed to IT_SEL_MBR
LI_SEL_MBR = 'MEMBERSELECTIONCRITERIA'.
APPEND LI_SEL_MBR TO LT_SEL_TIME_MBR.
TRY.
CREATE OBJECT LO_DIM_TIME
EXPORTING
I_APPSET_ID = L_APPSET_ID
I_DIMENSION = 'DIMNAMEORVARIABLE'.
CATCH CX_UJA_ADMIN_ERROR.
MESSAGE I001(00) WITH TEXT-011.
RETURN.
ENDTRY.
TRY.
CALL METHOD LO_DIM_TIME->CREATE_DATA_REF
EXPORTING
I_DATA_TYPE = 'T'
IMPORTING
ER_DATA = LS_ARRAY.
ASSIGN LS_ARRAY->* TO <LT_DIM_TIME_MBR>.
CATCH CX_UJA_ADMIN_ERROR.
MESSAGE I001(00) WITH TEXT-011.
RETURN.
ENDTRY.
CLEAR LS_ARRAY.
TRY.
CALL METHOD LO_DIM_TIME->READ_MBR_DATA
EXPORTING
IT_ATTR_LIST = LT_ATTR_TIME
IT_SEL_MBR = LT_SEL_TIME_MBR
IMPORTING
ER_DATA = LS_ARRAY.
CATCH CX_UJA_ADMIN_ERROR.
MESSAGE I001(00) WITH TEXT-011.
RETURN.
ENDTRY.
ASSIGN LS_ARRAY->* TO <LT_DIM_TIME_MBR>.
Well to start there are about 65 lines of code and I would say in the average application this would hold that do nothing but declare the variables and data structures that you need. This includes field symbols and strongly typed structures all for manipulating the data in the program. Could be less, could be more but you will have to figure out how to set these up relative to your needs.
Then you have to do this to read a dimension and its members:
LI_ATTR = 'ATTRYOUNEED'.
APPEND LI_ATTR TO LT_ATTR_TIME.* need to see what can be passed to IT_SEL_MBR
LI_SEL_MBR = 'MEMBERSELECTIONCRITERIA'.
APPEND LI_SEL_MBR TO LT_SEL_TIME_MBR.
TRY.
CREATE OBJECT LO_DIM_TIME
EXPORTING
I_APPSET_ID = L_APPSET_ID
I_DIMENSION = 'DIMNAMEORVARIABLE'.
CATCH CX_UJA_ADMIN_ERROR.
MESSAGE I001(00) WITH TEXT-011.
RETURN.
ENDTRY.
TRY.
CALL METHOD LO_DIM_TIME->CREATE_DATA_REF
EXPORTING
I_DATA_TYPE = 'T'
IMPORTING
ER_DATA = LS_ARRAY.
ASSIGN LS_ARRAY->* TO <LT_DIM_TIME_MBR>.
CATCH CX_UJA_ADMIN_ERROR.
MESSAGE I001(00) WITH TEXT-011.
RETURN.
ENDTRY.
CLEAR LS_ARRAY.
TRY.
CALL METHOD LO_DIM_TIME->READ_MBR_DATA
EXPORTING
IT_ATTR_LIST = LT_ATTR_TIME
IT_SEL_MBR = LT_SEL_TIME_MBR
IMPORTING
ER_DATA = LS_ARRAY.
CATCH CX_UJA_ADMIN_ERROR.
MESSAGE I001(00) WITH TEXT-011.
RETURN.
ENDTRY.
ASSIGN LS_ARRAY->* TO <LT_DIM_TIME_MBR>.
Then you need a loop to make the data you just read an internal table
6 more lines of code
Then you need to loop over CT_DATA into other internal table structure so you can manipulate that. This is 27 lines of code that also includes the assignment of internal components of CT_DATA to the <FS> you are using or the strongly typed structure.
Add an additional X number of lines of code for your custom logic or what is otherwise given back to you by most offshore teams --> Plate of Spaghetti!
Then decide whether they are ALL NEW records or an ACCUMULATION of the sum of SIGNED DATA and if it is accumulated records ( that is the signed data is different but the intersection is the same, but in WHEN ENDWHEN logic accumulation is standard in BADI it is NOT!)
And at last you are done! 321 lines of code later. Are you kidding me?
5 lines of code I used to write in script logic is now 321! Of course once you have done it once you kind of know it.....but that is not the client experience, that is MY experience and it is not being well duplicated. BPC needs to think before it leaps!
No comments:
Post a Comment