Create Validation from Load File (ZCL_RSPLF_FILE_UPLOAD) in BW-IP

Also check SAP Notes:   SAP Note 2053696
URL Upload
<Host:Port>/sap/bc/webdynpro/sap/zrsplf_file_upload_v3?planning_sequence=<Planning Sequence>&sap-client=<Client>&sap-language=EN
Implement BAdI
Class – Method that trigger BAdI
Step #6 trigger  l_r_badi->transform_file
Step #8 trigger  l_r_badi->transform_record
Step #9 trigger  l_r_badi->transform_data
My Case
Need to implement validation when uploading file before data goes into infocube.
What I’ve Done
Put validation logic inside method transform_file from BAdI implementation.


Debugging ABAP BPC Standard 10.0 VS BPC Embedded 10.1

In BPC Standard 10.0 after we connect the Logic Script – BAdI – EPM Package we put the external breakpoint on object below,



In BPC Embedded 10.1 we are not using BAdI anymore to put logic programmaticaly BPC uses Fox Script, it’s extend version of logic script in BPC Standard, by extend I mean more powerful because it has more syntax to handle complex logic.

To execute ‘package’ in BPC Embedded we use Planning Sequence or Planning Function inside Analysis Office instead of running package on EPM Excel.

After all Datasource & Planning Function / Planning Sequence set up, put internal breakpoint inside below object, then execute Planning Sequence from Tcode RSPLAN


Class –  Method
(put it in first line executable syntax)
1. Execute planning sequence with execute step with trace then debug runtime appear.
2. Go to tab script then load script name ‘RSPLFC_DEBUGGING_SCRIPT_FOX’
then execute directly.
20170419-1022 20170419-1023

Voila! debugger for fox script appear.

to get the value of local variable inside Fox Script put some hardcode break-point.


[Solved] ODP Datasource Couldn’t Replicate into BW System


We used to do replication datasource using RSA5 and RSA6 in ECC System.  Then replicate the active datasource in BW System using RSDS.

But since SAP introduce ODP (Operational Data Provisioning) as Data Exchange Framework between Source and Target , it allows us to make use of the ODP source system to use the same technology for a data mart scenario between BW systems as you would for providing other SAP source data for the BW system.

To understand more about ODP here is the link for FAQ

The Case

After activating datasource in RSA5 & RSA6 ECC System the datasource is not appearing in BW RSDS Tcode.


First, understand the Color Legend in RSA5 transaction ( Utilities > Color Key ).

After activating datasource system asking for Package & TR for object. But the status still in red. In old replication this is common and we still can replicate it in our BW System. But it turns out the green check icon represent the Release Datasource for ODP.



then I’ve found out that not all Data extractor of Datasources is supported by ODP from here .  I check on table ROOSATTR in ECC System, but my failed replicated datasource already there.

“The ODP API does not show all Extractors, it only shows the released ones. The idea is that over the time multiple Extractors have been developed by SAP, some became obsolete, some might not work with this API. So along with the ODP API a new table is created in the dictionary called ROOSATTR containing all the Extractors the API and hence DataServices 4.0 supports.”

after reading the notes on ,

it saying,

SAP extractors: Most of the delivered SAP extractors are already released for ODP replication. You can release the corresponding DataSources in your SAP source system by implementing this SAP Note in your source system and then executing the program BS_ANLY_DS_RELEASE_ODP in the relevant source system. Pay attention to the restrictions that apply to the ODP release described in SAP Note 1932459 and KBA 2407906.

So i run the program BS_ANLY_DS_RELEASE_ODP in Development & Testing Client for Source System in BW. Voila! The status in RSA5 & RSA6 my active datasource already turn into green, which is activated for ODP.

If your datasources still not activated for ODP, in notes also saying that,

 For other SAP extractors that are not currently released for ODP replication but that you require, please open an incident in the application component BW-BCT-GEN.

Then Replicate in BW System

RSA1  > Source System > Choose Client under ODP – SAP > right-click > Replicate Datasource

You will find your activate datasources. Don’t forget to activate in RSDS Tcode to activating datasources in BW system.

Override External Debugging Authorization – User is not authorized for debugging

We as ABAP developer want to do some debugging with specific user. For instance there is an bug related to Standard Fiori Timesheet application, the user cannot input the timesheet for one or two day in periode of time. That’s why we need to login as specific user from fiori then we can debug from backend-side of SAP.

Usually we put some external debug point then after the action triggered from Fiori apps, the debug show up in screen.

But sometimes the Authorization team are not allowing us to do that. Normally the debugging role only allowed in development client. Not on Assurance or even on Production client.

  • Whenever we put external debugging point with user that have no debugging role the message error will be,

“User xxx is not authorized for debugging”

The idea is we need to intercept the standard external debugging point right before the message error appears.

  • Go to function module: SUSR_CHECK_DEBUG_ABILITY

set internal debugging point at line 120

  • Now set external debugger as user we want. The debug screen will appears. Then change the sy-subrc value from ‘3’ into ‘0’

Now the external debug point are set to the user.




[SAP NetWeaver Gateway] oData in Practice – Part 2

Objective: Retrieving Association Data from an OData service

Create Association Between EntitySet

  • Create New Entity Type with Detail Item Data
  • Create New Association

on folder icon named Association, right click > create

then following the wizard,

Principal Entity -> Header

Where table contain Header Records (ZET_USER_PROFILE)

Dependent Entity -> Detail Item

Where table contain Detail Item (ZET_USER_SKILL)

Cardinality means relation between table, here we set the relation between header->item are one to many.

So we set cardinality header with 1 then cardinality for item 1..n

The key we set into pernr.

  • Generate Runtime Object
  • Redefine Method ZETXXX_GET_ENTITYSET with below source code

  METHOD zet_user_skillse_get_entityset.

“Declaration of Local Navigation
DATAlt_nav_path TYPE /iwbep/t_mgw_tech_navi,
ls_nav_path TYPE /iwbep/s_mgw_tech_navi.

“Declaration of Input Parameter Structure
DATAlx_key_tab   LIKE LINE OF it_key_tab,
lx_entityset LIKE LINE OF et_entityset.

“Declaration of Internal Table
DATAlx_user_skill TYPE zta_fio_skill,
lt_user_skill TYPE TABLE OF zta_fio_skill.

“Local Variable
DATAlv_pernr        TYPE char5,
lv_where_clause TYPE string.

lt_nav_path io_tech_request_context->get_navigation_path).

READ TABLE lt_nav_path INTO ls_nav_path WITH KEY nav_prop ‘TOSKILLS’.
IF sysubrc 0.

“1) Request URI using Association

READ TABLE it_key_tab INTO lx_key_tab WITH KEY name ‘Pernr’.
IF sysubrc 0.
lv_pernr lx_key_tabvalue.

FROM zta_fio_skill
WHERE pernr lv_pernr.
IF lt_user_skill[] IS NOT INITIAL.

LOOP AT lt_user_skill INTO lx_user_skill.

TO lx_entityset.
APPEND lx_entityset TO et_entityset.




“2) Request URI using Filter 

“/sap/opu/odata/sap/ZUSER_PROFILE_SRV/ZET_USER_SKILLSet?$filter=Pernr eq ‘xxxxx’
lv_where_clause io_tech_request_context->get_osql_where_clause_convert).
FROM zta_fio_skill
WHERE (lv_where_clause).

IF lt_user_skill[] IS NOT INITIAL.

LOOP AT lt_user_skill INTO lx_user_skill.

TO lx_entityset.
APPEND lx_entityset TO et_entityset.





  • Testing go to /n/IWFND/MAINT_SERVICE > your_service_srv > SAP Gateway Service

>Request URI using Association

IMPORTANT: make sure the navigation property is set correctly.

Navigation Property is used for Relation between Entity Types that used as Request URI using Association. To check that open SEGW, check under Entity Types > Header Entity Types (ZET_USER_PROFILE) > Navigation Properties



>Request URI using Filter

/sap/opu/odata/sap/ZUSER_PROFILE_SRV/ZET_USER_SKILLSet?$filter=Pernr eq ‘00001’


BW – Delta Queue Update Method

Following my last blog post on Unclogging Queue Entries.

We know that we need to trigger delta update by creating V3 job to push the data into Delta Queue.
For note, these process are running on ECC-Side.
There are 3 different update method for this delta:
1. Direct Delta
• In this update method, data is directly transferred to Delta Queue and application tables at same time,
with every document posting
• Here, 1 document = 1 LUW (Logistic Unit of Work)
• Suitable for a small datasource type

2. Queue Delta
• In this update method, the records are first sent to ‘Extraction Queue’ using V1 update
Note: This ‘Extraction Queue’ entries recorded in serialize way. That’s why the queue delta are suitable for serialization document number.
• From ‘Extraction Queue’, we need to send the records to ‘Delta Queue’ using collection
• In this update method, we can collect up to 10,000 documents in one LUW

3. Unserialized V3 Update
• Here, the extracted data of an application is written to update tables using V3 update
• We need to send the data from Update Tables (SM13) to Delta Queue (RSA7) using Collection Run
• In this, serialization of documents is not guaranteed

Image above showing the difference of three update methods.
> Direct Delta VS Queue & V3 Unserialize
Data from transaction updated directly into Delta Queue using V1.
Meanwhile, Queue & V3 Unserialize have temporary table( Extraction & Update Table).
> Queue VS V3 Unserialize
Extraction suitable for serialization & V3 Unserialize are not.
Queue Delta check with LBWQ.
V3 Unserialize check with SM13.


Debug Story – BAdI not implemented for appset …

It was started couple days ago. Two of my colleagues reporting issue regarding write back data on a BPC Environment Model. We’ve never have this problem before. The write back engine run smoothly on every model in every situation.

So I start to debug several spots to understand what’s going on.

The error caused by Exception cx_badi_not_implemented which generated by method,
Find BAdI implementation,
GET BADI lo_badi
appset_id = d_appset_id
application_id = d_appl_id
module_id = ds_wb_param-work_status-module_id.

So, my first attempt I try to by pass this procedure by change flag ds_wb_param-execute_badi into abap_false.
But, on the following step there is more validation for this exception.

My second attempt would be checking the the object of lo_badi which reference into BAdI badi_ujr_write_back. There are two implementations using this enhancement spot. I’m guessing since this implementation we need to input appset_id, application_id, & module_id so we get the right implementation.
But the write back we used comes from standard process, it doesn’t make any sense if the implementation doing something wrong with standard process. So I crossed this possibility and start to think another option.

Then I tried to debug deeper.
The next guess would be my third attempt.
I found the same exception showed on method CL_UJV_VALIDATION_MGR -> CHECK_VALIDATION.
Try to dig deeper, I found the table UJV_MODULES which for BPC Validations – Module On/Off Table.
And there is only one record for that model. *AHA

So i googled little bit then found out that TCode UJ_VALIDATION which generate the record for tables UJV_MODULES.

Then I ask permission one of my senior if he still using the validation or not. Then Turning off validation for that model. It works like a charm.
Problem Solved

for further information on how UJ_VALIDATION works or how to use it check:

BW – Collection Run for Entries Delta Update

So we found this problem regarding Delta Update on BW server.
After BW running on production phase for a couple days we saw the update are not running as they should. They’re some extraction that remain on yellow light. It seems like there are no data coming through anymore from ECC to BW side.

It turned out there are a lot of entries Queue-ing on ECC side. Using transaction SMQ1, we could see some entries are waiting in line to be extracted.

It’s like a ‘Clogged Pipes’.
So how do we overcome the clogged pipes? we need to take out the plug.
But, where is the plug in terms of data flow from ECC to BW?

What we don’t know is, there is a difference process to update Full/Initial Datasource and Delta Datasource. Full/Initial data extracted are store in Setup-Table.
If initialization is successfully extracted into BW PSA, delta generated on ECC. From then on, data collection stored in Delta Queue (RSA7) before extracted by Infopackage.

And now for the best part, Unclogging.
It turned out we need to do the V3 job, releasing the entries data delta into queue delta before delta info package is triggered from BW-side.
Go to LBWE.
By clicking the job control and scheduling the job. Data Entries that stuck on SMQ1 are flowing into Delta Queue RSA7.

After setting up the background job process( I think I need to create a blog post on how I do this) for every time delta infopackage requested, the ‘Clogged Pipes’ never seen anymore.

Multi Tenancy in Enterprise Resource Planning Trends

What is Multi Tenancy?

According to Gartner

Multitenancy is a reference to the mode of operation of software where multiple independent instances of one or multiple applications operate in a shared environment.

Single-Tenant vs Multi-Tenant?

> Single Tenant Model – Each customer gets a separate instance of the software which runs on a logically isolated hardware environment.
> Multi-Tenant Model – All the customers are served from the same common software instance and hardware infrastructure.

What’s the difference from today environment?

Quoting from Bill Harmer, Gooddata

In the old days, hosted systems were very common. IBM, CGI, and others allocated servers and provisioned software to run systems for customers–meaning one installation of the binary for each customer. Systems were accessed over dedicated connections, and the “server” industry boomed. Now, the public infrastructure (the Internet) is used to access those same systems. The software, in a lot of cases, is legacy on premise software that is being run in the vendor’s data centers and typically uses a VMWare, Xen or other system-level virtualization to manage the deployments. These 20-year-old hosted-style deployments are not only in use today, but are often slapped with the ubiquitous “cloud” moniker.

What does it do with ERP?

with the popularity of, cornerstone on demand, and other multi-tenants. Now we can see the use of multi-tenant everywhere. It’s not all about the trend, it’s the new era of software development where the old definition of ‘Write once and use it everywhere’ change into ‘Write once and use it for everyone’.
Everyone means multiple customer using the same instance of a software, this model would be advantage for the both sides. For Developer we only need to patch the software once for all customer. For customer we don’t need to setup the infrastructure,which means it would save hell of the money for IT implementation.

And for SAP?

You think that SAP are not prepare for this trend? i’ll give you a hint, they are well prepared.
for the last years SAP already acquiring some cloud multi-tenant across the world: -> SD & FI -> HCM -> HR & FI -> Travel Expense -> Vendor Management Systems (SD) -> SD

Those company acquired in the range of 2011-2014.

More over, John Appleby, stated that SAP HANA will support a ‘True Cloud Multi-Tenancy’.

“The Public Cloud version will use database multi-tenancy, which is quasi-multitenant from a cloud perspective. ABAP Code-lines, configuration tables etc. will not be shared yet between customers on one SAP HANA container database. This is expected to come in time, as SAP HANA supports true cloud multi-tenancy.”

With a lot of technology acquired across module by SAP, I think they are pretty serious to join the era of multi-tenant. Although i don’t know how they’re going to integrate all of their ‘New Acquire Product’ into SAP in the future. Either they have a independent module for travel expense, maybe? or they took all of the engine inside and put it into SAP-ABAP-HANA style?
It’s a lot of possibilities what they could do with those technology.
But, according to the history of their acquisition, I strongly believe that they’re going to do the right thing.
For instance, the acquisition of company name Outlooksoft in 2007, which turned out to be SAP BPC nowadays, integrated so well with SAP ecosystem. Now with SAP BPC 10, they have a new look SAPUI5’s style, the program looks more ‘SAPed’. They even create specific BAdI to accommodate the BPC engine so they could integrate logic script – ABAP – package (excel EPM) so well.
You get the idea, right?

So, How strategic is S/4HANA to SAP?

To put this into context, Hasso Plattner, SAP Chairman of the Executive Board, was quoted as saying:

“If this doesn’t work, we’re dead. Dead in the water.”

PFCG Create Authorization – part 1 (Restricting TCode)

PFCG is transaction on SAP that used for configuring role for user. Why would role is important for user on SAP?
This role is invented by SAP to restricting user for accessing the unwanted tcode. For example we don’t want the user have access for SU01 for creating user or change the other user password. Another example, we don’t want the user to access the classified report (maybe like salary report of a your company).etc.

Without further ado.
1. Go To Tcode PFCG
2. Input name then click single role
3. fill in description
4. Then click menu on tab strip
5. Click icon with label ‘transaction’

6. Input tcode that accessible for this role.

7. If green light active on menu tab strip then go to next tab, authorization

8. Click icon ‘propose profile name’ to automatically generate profile name.
This profile name will be used for specific roled user.

9. Then click Change Authorization Data
10. In the new screen, then open the top of tree ‘Cross-application Authorization Objects’
it means that the role is going to check whether the user with this profile are authorize to access the tcode.
In this example the user with this profile only allowed to access tcode SE11, SE19, SE24, SE37, SE38, SE80

11. Click the circle icon with red & white color, then back.
12. We can see the authorization tab strip in green light. if not u need to regenerate the authorization data.
13. Then go to user tab strip
14. Input user you want to give the role. save.
15. Go to Tcode su01, make sure the role on user on a green light icon.
if not then delete the role. input the role name. save.

16. To test the role is working go to registered tcode first in my case SE11, SE19, SE24, SE37, SE38, SE80 with the user with role. The code should be accesible to user.
17. Check the other tcode registered (ne SE11, SE19, SE24, SE37, SE38, SE80).
18. Voila!

SAP will trigger the error message that the user are not authorized for the tcode.

© 2018 Rijdz

Theme by Anders NorenUp ↑