Routine in BEX
Hi All,
I have Unit of measure as Data fields and Po Qty and GR Qty as Key fields in the report. I need to create a formula based on the Unit of Measure like:
If UOM is EA logic is different and when UOM = FT or LBS different logic.
How can i achieve this in my report.
Please advise..its very urgent.
Thanks,
Sheshu.
Hi,
Del dt Pstg Date OUN PO Qty Qty 2 OrdFilled Count Item
6/5/2007 6/5/2007 EA 5 4 0 1
6/6/2007 6/7/2007 EA 5 1 0 1
6/9/2007 6/10/2007 EA 12 12 1 1
6/27/2007 6/28/2007 FT 1000 950 1 1
The logic above for the Ordfilled and Count item is to compare the dates and qty fields and fill it with 0 or 1..also need to compare the Unit of measure if its EA normal else for FT 10 % variance is acceptable for the quantities..
please respond
thanks,
Sheshu
Similar Messages
-
Routine in Bex - urgent pls.
I have 2 columns A and B in the report:
A B C
1234 1234 1234
5903 0 5903
0 3287 3287
I want to get the column C.
So, the condition for the column C would be :
if A<>0 and B <>0 then A
else if A==0 then B
else if B==0 then A
I heared that this can be done by routines . I need the code to do this . Also let me know where to put the code.
This is urgent pls.
VaishaliHi,
No need to write coding.....directly u can get these by unsing formula as told in the above forum....there u get all these conditions in Boolean operators. so just make use of them..
Thanks & Regards -
Hi,
I am facing a problem in displaying leading zeroes for a char in a BW report. This char has length 4 and it should show the value as 0ABC in the report but instead it displays just ABC. When checked the info providers, the data is right there.
Technical details: length - 4, Conv Routine - ALPHA, BEx display - Key & text
Could someone please throw some light on this?
Thanks a lot in advance.Hi Bobs,
Here is what I understood from your query;
You have leading zeros for the char info object in the info provider but while running the query it is returning with the rest of the characters but not leading zeros?
Yes while loading in to info provider ALPHA conversion does add any leading zeros according to the char size to load in to the info provider but while reporting it does the reverse ALPHA. but you have to check the values in the master data for the char info object where the default option for query results on char objects to retrieve key and text values from char object master tables. I think the master data for the char info object might not be have leading zeros. -
Concatenation of Data from 4 infoobjects into a single cell in Bex Report
Hi,
I have loaded ODS with the description data. The source system for loading the ODS is the flat file. The ODS data should be a replica of the flat file.
In the flat file, there is a description field corresponding to a particular ID. This Description is greater than the standard 60 char length. So, I had to split the description while loading the flat file using single line routine in the Transfer Structure.
So, while loading different the data, I split the description field data from the flat file into 4 infoobjects and the flat file data was loaded into the ODS.
Now, from the reporting point of view, I need to display the entire description data from the 4 info-objects into a single cell in the Bex report.
Please suggest a solution for this.
<b>****Points will be awarded***</b>Hi Vineet,
Thanks for the response.
Could you please help me out with the VBA script(code) that needs to be written in the macro.
Thanks in Advance.
<i><b>****Points will be awarded****</b></i>
Regards,
Hitesh Shetty. -
What is difference between bex analyser and bex browser
what is difference between bex analyser and bex browser . please explain what are use of both and what we do in both.
hi
Bex Browser
The Business Explorer Browser (BEx Browser) makes it possible for you to access all document types of the Business Information Warehouse that are assigned to your role or that you have stored in your favorites. You can select and open documents assigned to you in the BEx Browser or store and manage new documents in the BEx Browser.
Document types that you can work with in the BEx Browser are:
· BW workbooks
· Documents that are stored in the Business Document Service (BDS)
· Links (references to file system, shortcuts)
· Links to internet sites (URLs)
· SAP transaction calls.
· Web applications and Web templates
· Crystal Reports
Bex Analyser
The Business Explorer Analyzer (BEx Analyzer) is the analysis and reporting tool of the Business Explorer that is embedded in Microsoft Excel.
Features
You can call up the BEx Query Designer in the BEx Analyzer, in order to define queries. Subsequently, you can analyze the selected InfoProvider data by navigation to the query created in the Query Designer and create different query views of the data. You can add the different query views for a query or for different queries to a work book and save them there. You can save the workbook in your favorites or in your role on the BW Server. You can also save the workbook locally on your computer.
Beyond that, you can precalculate the workbook and distribute it by e-mail to recipeients or you can export it to the Enterprise Portal and make it accessible to other employees in the company.
You can start queries in a standard view (with a Standard Web Template set up in Customizing) in the Web browser and forward the URL or continue to navigate on the Web. Similarly, you can export the Web query to MS Excel 2000.
Overview of the Functional Area of the BEx Analyzer:
· BEx toolbar
You access the functions of the BEx Analyzer from the BEx toolbar, which takes you to the BEx Open dialog box where you can open existing queries, or to the BEx Query Designer where you can create new queries or change existing queries.
· Evaluating Query Data
The BEx Analyzer offers convenient functions for evaluating and presenting InfoProvider data interactively. In the BEx Analyzer, you can add queries to workbooks, navigate within them and refresh the data. You can also process the queries further in Microsoft Excel or display them in the Web browser in a default view.
Navigation of a query allows you, for example, to filter characteristics on a single value, drilldown on all values for a characteristic, regroup characteristics and key figures in the rows and columns of the results area, or hide key figures. Navigation results in different views of the InfoProvider data. In addition, a range of further functions is available which allow you to edit a query interactively (for example, sorting, cumulated output, among others). In addition, you can use the editing functions in Microsoft Excel in order to set up individual format templates, to print results areas, or to create graphics.
· Queries in Workbooks
Queries are inserted into workbooks so you can display them. When you insert a query, a link is made between the cell areas of the worksheet and the data of the InfoProvider upon which the query is based. A link therefore exists between the Business Explorer and the Business Information Warehouse Server (BW Server).
When inserting a query into the workbook, a VBA routine is automatically generated in the workbook. You can also connect the Business Explorer with your own VBA programs (Visual Basic for Applications).
You can create workbook templates, into which you can insert your queries. Workbook templates can contain pre-determined items for the area of the query, formatting settings, logos, VBA macros, and so on.
· Precalculating workbooks
You can precalculate and distribute workbooks with the BEx Broadcaster, which is a Web application you get to form the BEx toolbar. The system generates MS Excel workbooks with historical data. You determine the time for precalculation yourself: You can have workbooks precalculated at a predefined time or they can be precalculated whenever data in the underlying InfoProvider changes. You can have the precalculated workbooks sent by e-mail or you can export them into the Enterprise Portal, where you can make them available to employees within your company.
Activities
To start the BEx Analyzer, choose Start ® Programs ® SAP Front-end Business Information Warehouse ® SAP Business Explorer Analyzer.
You can also access the BEx Analyzer via SAP Easy Access ® SAP Business Information Warehouse ® SAP Menu ® Business Explorer ® Analyzer or in the Business Explorer Browser using the Business Explorer Analyzer symbol in the menu bar.
Hope this will solve your issu
nagarjuna -
Where to write IF THEN ELASE statements in BEX Query Designer
Hi All,
I need to write a formula in query designer...
saying that to display the all Quantities in KGs.. Now articles are in Grams and KGs...
So here i need to perform calculation like... if article is in KGs divide by 1, else if article is in Grams divide by 1000.
where can i write this logic to perform calculation ...
Thanks in advance..
ravi.phi chetan,
No its not work.. why because i need to convert the unit of measure in Masterdata Attribute values... that means ) ' 0grooss_wt'. this is attribute as a keyfigure of ' 0material' .. this ' 0gross_wt' values has to convert in KGs. at Present ' 0gross_wt' values are in KG and Grams...
I can change these values in update rules by writting Routine.. But I need to convert it in KGS at BEX Query Designer Level..
I need calculate like this
quantity sold * Gross Weight.
here Gross Weight is the formula variable which replacing the values of gross weight...
i tried by creating conversion types in RSUOM t-code. but it works on keyfigures of infocube.. not on attribute values of master data...
is there any solution to solve this Problem... -
Hi experts,
i have requirement to write end routine to read a DSO for last 12 months sales quantity for each month and sum value pass to keyfigure
not interested using bex variable, while data loading from source to target dso in end routine i am trying to read another DSO which is same as my
target dso where information is stored by fiscal period, year material etc. finally there is a keyfigure in target whih needs to be filled with sum of 12
months sales quantity, for each record form sourc to target maximum of 12 records will be in read dso (for 12 months) my routine is like below.
i am not expert in abap please kindly gothrough and guide me in this
TYPES: BEGIN OF s_/BIC/AZOSLS00,
FISCPER type /BI0/OIFISCPER,
FISCVARNT type /BI0/OIFISCVARNT,
PLANT type /BI0/OIPLANT,
STOR_LOC type /BI0/OISTOR_LOC,
/BIC/MATERIAL type /BIC/OIMATERIAL,
VTYPE type /BI0/OIVTYPE,
BILL_QTY type /BI0/OIBILL_QTY,
END OF s_/BIC/AZOSLS00.
DATA: it_/BIC/AZOSLS00 TYPE TABLE OF s_/BIC/AZOSLS00,
wa_/BIC/AZOSLS00 TYPE s_/BIC/AZOSLS00.
SELECT
FISCPER
FISCVARNT
PLANT
STOR_LOC
/BIC/MATERIAL
VTYPE
BILL_QTY
FROM /BIC/AZOSLS00 INTO TABLE it_/BIC/AZOSLS00
FOR ALL
ENTRIES IN RESULT_PACKAGE
WHERE
below field is from value of fiscal period (which is fiscal period -999 ex: for 001.2014 this
value will be 002.2013 so 12 months including current period)
FISCPER >= RESULT_PACKAGE-/BIC/ZFISCPERF
below is result filed fiscal period (here i dont know which keyword or statement to be used to select
interval values this between statement giving syntax error that can not be used in where for for all entries
between RESULT_PACKAGE-FISCPER
AND
FISCVARNT = RESULT_PACKAGE-FISCVARNT AND
PLANT = RESULT_PACKAGE-PLANT AND
STOR_LOC = RESULT_PACKAGE-STOR_LOC and
/BIC/MATERIAL = RESULT_PACKAGE-/BIC/MATERIAL .
SORT it_/BIC/AZOSLS00 BY FISCPER FISCVARNT PLANT STOR_LOC
/BIC/MATERIAL .
LOOP AT RESULT_PACKAGE ASSIGNING <result_fields>.
READ TABLE it_/BIC/AZOSLS00 INTO wa_/BIC/AZOSLS00 WITH KEY
below dont know what statement i need to use in read statement for interval of fiscal periods
giving error that >= can not be used
FISCPER >= <result_fields>-/BIC/ZFISCPERF
FISCPER = <result_fields>-FISCPER
FISCVARNT = <result_fields>-FISCVARNT
PLANT = <result_fields>-PLANT
STOR_LOC = <result_fields>-STOR_LOC
/BIC/MATERIAL = <result_fields>-/BIC/MATERIAL
BINARY SEARCH.
BREAK-POINT.
IF sy-subrc = 0.
below for each record there will be 12 records in read so sume of 12 records quantity i need to pass to result again dont know what to say here
sum statement giving error
<result_fields>-/BIC/ZLSTSLS12 =
sum(wa_/BIC/AZOSLS00-BILL_QTY).
ENDIF.
ENDLOOP.
friends please help me in this.
Thanks
Chandra.Hiii,
If you only want to store last 12 months data in Target ODS .
Then Create filter in DTP and write routine in filter for calmonth or fiscal period.
Refer the below link to create filter routine :
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80b2db87-639b-2e10-a8b9-c1ac0a44a7a6?QuickLink=index&…
Regards,
Akshay -
Currency Conversion in Expert Routine
Hi
We have written a expert routine for calculating some amount fields. Now these amount fields get local currency from the source. We need to change it to USD using a standard conversion type. This conversion type already exists. Now how can this be done in expert routine?
Regards
MerlinHi Merlin,
You could use Currency Translation with in BEx Query (It is available on conversion tab of the key figure properties) and use conversion type of USD on the key figure for Amout/Value
regards
Kulmohan -
hi friends,
i have 0date infoobject as one of the fields in a cube. data is uploaded into cube correctly. when i checked data in cube it's in correct format 20.12.2006, but when i checked in bex report it shows 12/20/2006. how to convert it into dd/mm/yyyy or simply day first,month second and year third component format. where i have to routine? suggestion pls..
thanks,
rajuRaju,
Change default user settings. at TCode: SU01 > User id> Change --> Defaults.
These changes are User Specific. effects to all reports.
Hope it Helps
Srini -
Need to add extra field in BEX report
Hi Experts ,
I have a problem in bex report.
scenario is like this--
APD will generate the BPS Daily report on Branch, Group, Area, Region and total company levels and then exports into a flat files stored in appserver
and i got the requirement to change the layout of the report. The client wants to need the one field extra ie. 'REPORTS RUN DATE '
and i am stuck here how to add this field in my report ..
Please help me ASAP.
Thanks a lot in advance
Saurabhhi,
Enhance your APD and in the target add field REPORTS RUN DATE .
Fill this using ABAP routine which populates the sy-datum in this field.
regards,
Arvind. -
Date Format Issue IN BEX REPORT
Hi Experts,
we are working on BW 3.5.
we have a ODS where data is uploaded through flat file and there are 5 to 7 date field all made of Z infoobjects.
So now the user is putting the data for these Date fields as 20110901 = 1st sep2011. but in report its coming as 09/01/2011
when i checked all the Z fields that are created for this date fields have reference character as Date
only one field is character so it is coming correct as given by the user
but rest all are appearing in different format . In ODS also the date is coming as 09/01/2011
now the user want all the data to be in the same format as given by HIM.
I cant even change the properties of these Z info object removing the reference info object 0Date and make them character string.
so now please suggest how to upload the date given by the user as it is without changing the format and also how to change the format for the back data as its flat file so No data can be deleted.
thankkkkkkkkshello
Bex analyzer is an excel add-in. Date formats are based on your regional settings.
If you want to have a different date format in the sap gui then you have to change your user profile in sap system.
Flat file upload needs the date format in a database format (YYYYMMDD).
You can transform the date in the transformation step with rules or with a routine( abap coding).
Thank you
Yiannis -
HOW TO ACHIEVE THIS IN BEX REPORT ?
Hi
I have a query like below:
Indicator---Month---Volume--
Revenue
A--201101-10Tonnes----710USD
A--201102-20Tonnes----2000USD
Because of some selections in our query,It always displays data from beginning of year to present month(August).
Now requirement is to add new column named 'Average'.....It should be weigted average and will be calculated as below:
If we take records for 201101 month in cube....The calculations should be equivalent to Volume of each record * Revenue of each record / Total Volume for that month
so if we take cube and display all records for 201101 month for example:
Indicator--MonthVolume--Revenue
A--2011011--
100
A--2011012--
110
A--2011013--
200
A--201101-4--
300
Then 'Average' that needs to be displayed in report for 201101 month will be calculated as follows:
Volume for each record * Revenue for each record / Total Volume for that month
(1100+21103*2004*300)/(123+4)=212
So,the report will show 201101 as below:
Indicator----Month--Volume-Revenue--Average
A--201101-10710--
212
Similarly,if a report is executed for August month:
Indicator----Month--Volume-Revenue--Average
A--201101--10710--
212
A--201102--202000USD--300
A--201103--303000usd---400
A--201108--606000usd---700
How can I achieve this in query designer?
Regards.......Hi,
Just tried looking into your query. Few questions that I have:
1. When you say
"if we take cube and display all records for 201101 month for example:
Indicator--MonthVolume--Revenue
A--2011011--
100
A--2011012--
110
A--2011013--
200
A--201101-4--
300
If these records are there in cube , then when you query on them the report will get aggregated based on you Indicator & Month. So no individual records to do the calculation.
So I guess you should look for some routines while you are loading this records in the cube to do this calculation rather than Bex ...but I will feel good if someone can tell us to how to acheive it in Bex.
Ankit -
Create aging bucket in BEx - based on date variable
Hi everyone,
I have a report for which we need to create account receivable aging bucket to classify arrears (1>29 / 30>59 / etcu2026).
Our solution overall architecture is the following :
Source System (SAP) > BW back end...Multiprovider > Super BEx Query > Universe > Webi Report
BW 7.0
BO XI 3.2 SP3.0
In this report, each bucket is defined by the difference between:
- the Net Due Date (which is the due date of payment of the invoice)
- and the Current Date (date for which the report is run u2013 can be the date of the day or a date in the past)
We can develop this either in BEx or in Webi, but to avoid potential performance issues in Webi, we take the try to develop this in BEx.
As you can easily imagine, this BEx query will be used for many reportsu2026so not only for this specific report.
What weu2019ve done so far:
1- We created a variable to prompt the user with the date he wants to run the report for
- ZTEST is an optional variable, single value, User input, based on characteristic 0CALDAY
2- We developed RKF in BEx
- Key Figure restricted by Amount
- Net Due Date restricted by the variable ZTEST using the between function and an offset (to determine the range)
=> When we save the query we are getting a warning message saying u201CVariable ZTEST for characteristic Net Due Date has been converted to a required entryu201D
Why? (you probably knowu2026) Because my RKF is using a variable with an offsetu2026which automatically turn on my variable as mandatory and no more as optional.
Consequences:
- In BEx: My variable, which is required to be optional (because we donu2019t have to have this field as mandatory for each and every report running on top of this query) is now mandatory.
- In Webi: If I use the variable (funnel in webi), my report is working fineu2026but if I donu2019t use it in the webi report, I get an error message saying u201Cvalue required for ZTESTu201D
o Funnel is configured as optional in the universe designer (so the issue is not coming from here)
=> 2 consequencesu2026same issue
Question: What can we do to keep our bucket logic running in BEx and avoid this variable to become mandatory?
Solutions (potential)
- Create a custom exit routine to work around this issue u2013 how?
- Create CKF/Custom exit to create our bucket (using ZTEST as an entry value to determine the range) and then use the created range in our RKF to restrict the amount u2013 how? Not so easyu2026
- Build the logic in Webi
- Any other suggestions?
Here we are, any advice would be really appreciated
Thank you guys
Regards
HenriHi peeps,
We finally find a solution for this problem! So I can share it with you.
The overall solution is pretty easy to understand.
1st step is to prompt with the user with a 0DATE variable. The date selected becomes a date input for the next step.
The variables is defined as a range [01/01/1900;variable_value)...in order to retrieve the right data set.
2nd step is to use this date to create our aging bucket, dates range.
To do so, we created 4 user exit variables (for each aging bucket).
3rd step is to use these ranges in RKF.
This way you get aging bucket dynamically defined by the user input pretty cool!
Regards
H -
Need suggestion for designing a BEx report
Hi,
I need suggestions for designing a BEx report.
Iu2019ve a DSO with below structure:
1. Functional Location u2013 Key
2. Maintenance Plan u2013 Key
3. Maintenance Item u2013 Key
4. Call # - Key
5. Cycle u2013 Data Field
6. Planned Date u2013 Data Field
7. Completion Date u2013 Data Field
This DSO contains data like:
Functional -
Plan --- Item -
Call# --- Cycle -
Planned Dt -
Completion Dt
Location
11177 -
134 -
20 -
1 -
T1 -
02-Jan-2011 -
10-Jan-2011
11177 -
134 -
20 -
2 -
T2 -
15-Feb-2011 -
11177 -
134 -
20 -
3 -
T1 -
15-Mar-2011 -
11177 -
134 -
20 -
4 -
M1 -
30-Mar-2011 -
25000 -
170 -
145 -
1 -
T1 -
19-Jan-2011 -
19-Jan-2011
25000 -
134 -
145 -
2 -
T2 -
20-Feb-2011 -
25-Feb-2011
25000 -
134 -
145 -
3 -
T1 -
14-Mar-2011 -
Now Iu2019ve to create a report which will be executed at the end of every month and should display the list of Functional Locations whose Cycles were planned in that particular month, along with the last completed Cycle/Date.
Thus based upon above data, if I execute report at the end of (say) March then report must display:
Functional --- Curr. Cycle --- Planned Date --- Prev. completed Cycle --- Prev Completed Date
Location
11177 -
T1 -
15-Mar-2011 -
--- T1 -
-- 10-Jan-2011
11177 -
M1 -
30-Mar-2011 -
--- T1 -
-- 10-Jan-2011
25000 -
T1 -
14-Mar-2011 -
--- T2 -
-- 25-Feb-2011
Any idea how can I display Previous Completed Cycle and Completion Date (i.e. the last two columns)?
Regards,
Vikrant.hi vikrant,
You can a Cube at the reporting layer which gets data from DSO and which has these 2 extra characteristics completion date and previous cycle along with other chars and keyfigures from DSO.
You can populate these based on your logic in the field routine.
Hope it helps.
Regards
Dev -
How to load 256 length field from r/3 to BW & How to report in Bex Browser
Hi,
We have a field consists of 256 length in r/3 system.
I want to load from R/3 -> BIW -> Bex Reporting.
What are the steps to be taken in R/3 Side.
What are the steps to be taken in BW side.
What are the steps to be taken for Bex.
Thanks,
MadhuMAdhu,
If you want to extract the data from R/3 to BW fro which the field length is 256 then its not possible directly.
Either you need to breeak up the same filed into 5 Infoobjects since the maximum length of the infoobject is 60 or else you need to maintain a conversion routine... And the remaining process of loading the data from R/3 to BIW is the same.
Hope this helps...
Gattu
Maybe you are looking for
-
I have installed BOE 3.1 on Solaris. When I schedule a report, the history does not always refresh correctly. In some cases the history shown is from a previous report and not the current report. Their appears to be a caching problem but the probl
-
When I try backing up to icloud it says that I have gone over the free 5gb. It shows that I have 4.6 gb of pictures in my camera roll when I barely have over 200 pictures! Any similiar problems or possible solutions?
-
Function returning table in Oracle 8i
I have one function written in SQL server 2000. I am not getting the way to write this function in oracle so that it can return table me as an output. SQL server's code CREATE FUNCTION dbo.GetTerminalAccessPolicy4AdHocShift(@rDate datetime,@rTerminal
-
Dear all, I want to manage a pricing with conditions based on material master data and batch. Do I have the opportunity to do that in SAP? If yes, can you explain to me the customizing for that, regards, Julien
-
Unable to find specied column in result set.
i m trying to display database values in textboxes on SelectedIndex_Changed event of list box control but i am getting "Unable to find specified column in result set" again n again.. why this is so??????