Posts

How to write ABAP program to Merge multiple files in one file in Application server

 In some scenarios, it may happen that business has loaded multiple files in a period for sales for example. All these files should be merged into one consolidation file and loaded once to target instead of loading each file separately. Also the consolidation file will have a standard name which the infopackage can recognize and pick up rather than changing the infopackage to load multiple files with different names.

How to write ABAP program to trigger PC based on file in application server

Image
 In this post, I will detail on how to write an ABAP program which checks for a specific file in the application server and triggers a process chain. If no file is found, it just displays a message and does not do anything. Once the program is ready, you need to schedule a job with this program which runs in the background every 30 minutes for example to check the file and trigger the PC.

How to load the csv file having date in MM/DD/YYYY format

Image
 The flat file loaded to BW must be in csv format. If the file has calendar day in the format MM/DD/YYYY or MM.DD.YYYY or DD/MM/YYYY or DD.MM.YYYY, the file gets loaded but PSA shows the incorrect date as YY.YY.MMDD or something like that. To ensure that the date is correctly loaded to BW, we need to make some settings in the flat file data source to handle the date formats entered by the user in the file.

How to derive fiscal period from calday in transformation

Image
 In many scenarios, client business has a different fiscal year than the standard calendar year (Jan to Dec) For example, let client XYZ has a July to June fiscal year. This will be saved as fiscal year variant in the table T009 in the system- Here H1 is the fiscal year variant which takes the year as July to June. Now suppose we are loading calday from source to target. Source does not have fiscal period but target is having fiscal period.

Issue: Error in generating export datasource / DSO cannot be activated

Image
 After system copy of Production to development system, there are many issues related to Basis team. One of the issues is DSO not getting activated and throwing error while creating new ones or activating the already existing ones. If this happens, contact basis team as it is a source system RFC issue. This happened in our case. You might get the same error in many other scenarios but here I am discussing the error due to source system RFC issue.

Qlikview not able to fetch all data from Multiprovider

Image
 There is a scenario which I encountered recently in my project where Qlikview was not able to see complete data from the Multiprovider from SAP BW. The Multiprovider consisted of few standard DSOs with the setting : " SID generation during Activation " and " Set Quality Status to OK automatically " checkbox checked. Thus, even though all the settings are in place, the Qlik was not able to see all the data in the raw layer.

How to write BW Customer exit to enhance BEx variables

 Here I will site an example of how to enhance a BEx variable using BW customer exit. Display only two years of data in the BEx query Scenario : Displaying only two years data in the BEx query based on the system date. The BEx query is based on a cube having 5 years of data. Method: Create a variable for calday or any time characteristic present in the cube. I am taking 0calday as an example. SAP provides standard variables also to serve the same purpose. Here I will create a customer exit variable to illustrate the method. Let the variable name is VAR2 This variable should be Interval value and mandatory. There is no user input required when the query is accessed. Hence the BEx variable should not be "Ready for Input". Based on the system date, an Interval of two years will be calculated. For example, if system date is 24th Feb, 2017, the BEx query should display 2016 and 2017 data. Drag and drop this variable in the filter section of the query. Save the query. Now go to th