Recently in sap bi Category

A client requests a specific report to be saved as a flat file.

In this case, the format is a comma space vertical (CSV) delimited file, which is a common workaround for Microsoft Excel's limitation of 65,000 rows. That sounds easy enough.

Working with SAP Application Process Designer (APD), however, was anything but straight-forward. The Business Explorer (BEx) query report was showing one set of numbers while the flat-file seemed to display whatever it wanted at the moment. After hours of banging my head against my desk, I have discovered 3 tips that will help to save you the frustration and recoup several hours from your workday.  Here is a summary of the three tips followed by a more detailed explanation.

 

Three Rules for Working with SAP APD

1. Unhide all fields

2. 'Display Data'

3. Create formulas in APD

 

Before explaining the three rules in detail, I want to show you a before picture.  Below is a screen-capture, comparing the query results with the generated flat file.  The value of "50" for Safety Stock in the report is correct but the value of "0.000" in the APD flat file is wrong. (Click on the image below for a larger picture)

image001.jpg To drive the point home, here is another view of the same record.  Notice how the value of "50" for Safety Stock (in the query) appears under "Reorder Point" (in the APD flat-file)?  Also, how the value of "24" for Open SO Quantity in the query appears under Max Stock Value in the APD flat-file.

image002.jpg

What is causing the values to jump around and be displayed in arbitrary columns?  For that, we will need to take a closer look at the query definition. 

Notice below how there are a series of green and blue icons in the columns section of the query designer.  The green icons are your visible fields and the blue icons signify that a field (key figure, calculation, formula, restricted key figure, etc.) is hidden from view.  Not only is that field hidden in the report output but it is hidden from the APD mapping as well.

image003.jpg

Rule 1: Unhide all fields in APD


Your life will be much better for it. See below.

image004.jpg

Apparently, un-hiding the fields in Query Designer help APD to put the output values in the correct buckets.  Otherwise, selectively displaying and hiding column fields will make numbers omelet look like scrambled eggs.

So now that you are displaying all of the report fields, how do you go about verifying that the flat-file output will match the Business Explorer (BEx) query?  Well, you test the APD of course!  How you go about testing the APD is another thing altogether.

To start this topic, here is a sample APD. Notice there are five distinct steps between the initial query result (step 1) to the final flat-file layout (step 5).

image005.jpg

So the question is "If the query result from step 1 does not match the data in the final flat-file in step 5, then how do you find out what went wrong and where it went wrong"?

One approach (that I am embarrassed to admit guilt of doing) is to run the ADP, compare the results from step 1 and step 5, and adjust the APD.  That is, I tried adjusting the join in step 2. When that didn't work, I tried adjusting the calculation in step 3. When that didn't work, I tried adjusting the display/hide field mapping in step 4. When that didn't work, I would bang my head against the desk, rinse, and repeat.  It's not the best approach or most methodical approach.


Rule 2: Display Data

A more pragmatic approach is to use the "Display Data". See below:

image006.jpgimage007.jpg

Performing a Right-Click on a node (steps 1 through 5) will display the data at it exists at that point in the execution of the APD transformation. 

 

For instance, I realized that my selective display and hide of the report fields was causing an issue after having verified the query results by selecting "Display Data" on the Query Result node at Step 1.

Rule 3: Create formulas in APD

 

After verifying the query output in the APD at step 1 matches my expectations, I select "Display Data" at the Join node in Step 2. At this stage, I find that my calculation for Open Purchase Order Quantity and Open Sales Order quantity was displaying the results in scientific notation.  For example, the value "24" was displayed as "2.4000000000000000E+01".  That was easily fixed by performing the calculation in the APD as a node, instead of the performing the calculation in the query.

Well, those are my 3 tips to making working with APD a better experience. I hope the tips saved you a few hours. =D

SAP Tip: How to Fill A Basic Security form

| 0 Comments

Filling out a security form for a new multiprovider or query is never fun.  Here are some steps that may help to smooth that process.

Find a similar multiprovider/query and get the following ZA and ZR roles, where ZA allows a user to access a query or multiprovider and ZR allows a user to find the query in the appropriate role/folder in BEx.


ZA ROLES


a. Look up table AGR_1251 using the following selection criteria:

AGR_NAM = ZA*

LOW = *<CUBENAME>*

b. Grab the roles the following roles:
            End-User = ZA*END*

            Power-User = ZA*POW*

            IT Power-User = ZA*IT-POW*

ZR ROLES

  1. Find a similar query in BEX.
  2. Identify the folder/role it falls under
  3. Get the folder/role name

Transport

Perform the following steps to collect a role into a transport request number:

PFCG

Search on tech name of role

Click on transport icon

Uncheck "user assignment"

Check "personalization"

Enter Transport Request Number

Ø       extra: "menu" has all queries for this zr-role (folder)

Posted via email from hau's posterous

SAP Tip: SD Transactions

| 0 Comments

Here is a list of common SD transactions (in ECC), which may be helpful when creating dummy data or filling out unit test plans.

Link: https://wiki.sdn.sap.com/wiki/display/ERPLO/SD%20Transactions%20-%20Roles%20Matrix

Posted via email from hau's posterous

I ran into this issue when trying to load from an export datasource (based on an ODS) into another ODS.

  1. I replicated the datasource, but the problem persisted.
  2. I activated the update rule, but the problem persisted.
  3. I logged off the system, re-entered RSA1, and the problem was solved.

It would appear that the RSA1 memory-bug is still here (SAP BW 7.0 SP 20)

Posted via email from hau's posterous

FICO Transaction Codes

| 0 Comments
Here is a handy list of common FI/CO transaction or configuration codes:

https://wiki.sdn.sap.com/wiki/display/ERPFI/SAP+FICO+Transaction+Codes

Posted via email from hau's posterous

Runtime Error with BEx Variables

| 0 Comments
Because today is Monday and the beginning of the workweek, I was greeted with this error message when creating a sample query.  

bex-query-error.png

The error occurs when trying to use a selection variable. This error message appeared on my screen before kicking me out of the system.

Question: How to get around this issue?  

At first, I thought it was a front-end patch issue. I am on SAPGui 7.10 at patch level 8.  Since Solution Manager is not used at my current client, downloading a newer version was out of the question.

Then, I remembered a college had sent an email regarding a similar issue.  Looking in my Google Mail (which blow Outlook out of the water, by the way, for quick searches), I found the following solution:

1. Close all the Bex Analyzer related tools,especially the Query Designer

2. Go to the folder C:\Program Files\SAP\FrontEnd\SAPGui
  
3. Copy the attached file wdbsPres.dll in the above folder and keep the original file as a backup.
                    

Restarting BEx Query Designer after following the above steps ... Presto!  I can create queries again!  Here's the link to that file: wdbsPress.dll

Let me know in the comments below if this post helped you.

"My setup job isn't doing anything."

| 0 Comments
A coworker faced a common issue when loading setup tables in the SAP ECC source system.

When he started collecting sale orders and filling the setup table via transaction OLI7BW, he noticed that the job was running for a long time.  He was not sure if it was still processing or if it had an error.

"Should I go ahead and delete the job", he asked.
 
02-2009-03-02_151351.jpg Depending on the selection condition, a setup job can as quickly as a few minutes or as long as a few hours.  Check the table below should offer some insight.

Table TMCW3 is the counter table that is used when filling the setup table. 

MCAPP is the application number (11 in our case is 2LIS_11_VA*)
LAUFNAME is the username
BELEGLOW is the low value of the selection during the setup
BELEGHIGH is the high value of the selection during the setup
BELEGACT is the current record that is being processed
TABNAME is the source table used in the extraction

01-2009-03-02_151246.jpgThe important column here is BELEGACT.  This field contains the current value that is being used by the job to fill the setup table.  If you used a range of Sale Order numbers, then this field will contain the current sale order that is being processed.

Refesh this screen to see a new value for this field.  A new value for this field means that the job is running and processing the displayed record.

Let me know, in the comments, if this tip helps.

Recent Entries

Useful ABAP Programs & Function Modules in SAP BI
Regardless of the environment (SAP Netweaver 2004, 2004s, or BW/BI 3.x), I often find myself scratching my head for that…
Handy BW trick
SAP Business Intelligence (BI) 7.0 allows you to access the ABAP code behind a transformation easy via RSA1 > Transformation…
Success!
Lessons in Transporting the BI Administration Cockpit to Quality Assurance (QA).It took the better part of a week, but with…