Creating a Range in BI 7.0
Friends -
We have an infoObject called Zcustomer. Zcustomer has a navigational attribute called ZEMP (this is the number of employees at the companies - numc type). I want to create another navigational attribute called ZEMP2 where it calculates a value based on a RANGE.
For example,
Company XYZ has 50 employees
Company ABC has 100 employees
My logic for populating ZEMP2 should be:
If ZEMP between 0 and 50 ZEMP2 = A
Else
If ZEMP Between 51 and 100 then ZEMP2 = B
Else ZEMP2 = C
What is the best practice for populating ZEMP2 when we load Zcustomer in a transformation. Is it best to create ABAP in the transformation start routine, or do we create the logic in a Formula, or could this be done in a Hierarchy? or what?
Any suggestions would be helpful
Patrick
Since you're on BI 7.0, you can either do this in a Characteristic Routine or in the End Routine.
If your preference is to do this in a Characteristic Routine, you would map ZEMP to ZEMP2 and then create an ABAP routine as such:
IF source_fields-zemp BETWEEN 0 AND 50.
RESULT = 'A'.
ELSEIF source_fields-zemp BETWEEN 51 AND 100.
RESULT = 'B'.
ELSE.
RESULT = 'C'.
ENDIF.
Now, if your preference is to do this in the End Routine, the code would look like this:
LOOP AT result_package
ASSIGNING <result_fields>.
IF <result_fields>-zemp BETWEEN 0 AND 50.
<result_fields>-zemp2 = 'A'.
ELSEIF <result_fields>-zemp BETWEEN 51 AND 100.
<result_fields>-zemp2 = 'B'.
ELSE.
<result_fields>-zemp2 = 'C'.
ENDIF.
ENDLOOP.
Whichever you choose, is dependent on other processing needs for this Transformation. If this is the only post-Start Routine transformation to be done, then the Characteristic Routine route would be the most efficient, because it has to go through this process no matter if there is a routine or not, whereas the End Routine would have to loop back through the entire internal table (Data Package) in order to update. However, if you already have an End Routine doing other post-process transformational logic, then the End Routine would be the most efficient place to put this code.
Similar Messages
-
Not able to created Number Ranges for Asset Classes in AS08
Dear Friends,
I am not able create Number Ranges for Asset Classes in AS08.
It is giving me an error message as company code does not exist.
When I Check Consistency under path SPRO -> Financial Accounting -> Asset Accounting -> Preparing for Production Startup -> Check Consistency -> Overview Report: Company Codes. I am getting the following
RSOL Reliance Sealink One PLtd
CoCode no. alloc. NKTR
Fiscal Year Variant V3 Apr.- March, 4 special periods
Start 2nd half month 00
Transfer date 31.03.2006
Chart of dep. TOLL Chart of Depreciation - For Highway Projects
Net worth tax 01 Book depreciation as per Compinies Act 1956
Enter net book value
Status company code 2
Current fiscal year 2007
Doc. type dep. pstng AF Dep. postings
> Number range &1 in co.code &2 for doc.type &3 must be defined as internal
Calc.insur.value
Input tax exempt
If you see the above first two line you will find the difference is that Company code RSOL in the first line and NKTR company code in the second line.
Actually CoCode no. alloc. has been wrongly copied as NKTR while copying CoCode it should be RSOL and not NKTR.
I think because of this wrong allocation it is giving me an error in AS08. Also it is not showing me CoCode in drop down list in AS08.
Please help me to resolve the problem.
Thanks
Rahul JainLook in TC OAOB if the company code is assigned to a chart of depreciation
-
Creating a range with Substitution Variables for Report Script
Is it possible to create a range with substituion varables for use in a report script. For example instead of listing "Jan" "Feb" "Mar" "Apr" in the report script can I use a sub varaible like Jan:Apr that will list them all out?
while I have not had luck with ranges in report scripts, others have. You could have a substitution variable the is "Jun" "Jul " "Aug" or whatever you want the members to be. and it will replace jusr fine
-
How to create number ranges with "OK60" transaction or any other.
Hello,
I need to create a new number range to asigne to a document type , using transaction OK60 ( the error says this transaction).
but I only can display with this transaction, and I would like to update.
Is there any other transaction to do this , or is there any way to do this with this transaction OK60?
Thank you very much.
Kind regards
OlgaHi,
OK60 indeed is used for creating number ranges for FI/CO earmarked funds transactions. You should press on 'Pencil' button and create an interval. If for some reasons, you cannot do this via this transaction, try using SNRO transaction, with IRW_BELEG parameter. If this also fails, then apply to BASIS team to check your authorizations.
Regards,
Eli -
Steps to create Numer range buffering
Hi Gurus,
Can any b'dy explain the concept of number range buffering and also i need steps to create number range buffering for transactional data.
here we have a full load it has to load 50L of records daily . it is taking 1.5 hr to 2 hr to load this data into an info cube we are looking to improve this load performence.
thanks in advancde to all gurus.
laxhi,
Welcome to SDN...
basically number range buffering is used to increase performance. usualy SID number range buffered,
transaction rsrv can be used to check -> all elementary tests >> master data >> compare number range and max sid. and >> transcation data >> comparison of rumber range and max dimid.
transaction SNRO is used to maintain number range.
http://help.sap.com/saphelp_nw04/helpdata/en/7b/6eb2aa7aed44ea92ebb969e03081fb/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/95/3d5540b8cdcd01e10000000a155106/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/aa/dbc9b4b56143bb8f2ae909d7d040fa/content.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/71efb490-0201-0010-949b-b2344b58b094
Number Range Buffering can help cube loads if you your loads result in a good number of new Dim IDs being created with the load.
Without buffering, each row of data to be loaded that would require a new Dim ID to be assigned (because it is new combination of characteristics for that dimension) must go out and read the Number Range table for that specific Dimension and get the next available number. So if you add 50,000 rows to a cube that results in 5,000 new Dim IDs to be assigned, that means 5,000 queries that must go read the table. Now if you buffered 500 numbers at a time, that would mean only 10 queries to the number range table.
In a perfect BW world, someone in your shop would have the ability to go to your P system and make the change. Chances are, this ability is locked down and you will have to get the P opened to make the change.
This can also make a big improvement in the load time if you are doing a large initial load of millions of rows to a cube.
FOR MORE DETAILS http://www.sap-img.com/ge003.htm
Re: SMS through SAP
pls assign points if useful..
-Shreya -
Can i create value range in domain
can i create value range in domain
Hi,
Value range means we will give possible values at Domain level.
We will have Value tabe also at Domail level.
when we give possible values at Domain level it will restrict to those values to that particular field.
Deepak.
If this helps you reward with points.
Message was edited by: KDeepak -
Problem in creating No. Range Object
HI All,
I have one ztable ZDESIGN having fields
NFDESIGN
DEPT
MACH_TYPE
MATNR
CODE
CUST_NM
MACH_NO
MAKTX
NETWORK_NO
QTY
MOD_CODE
STATUS
DVER
IMPL
PART_ST
RELBY
RELDT
i want to store the number in code field on save. but i want to add many records at one time.
while creating number range object(SNRO) , foll error is coming
Table ZDESIGN may have only the no.range el.field and the subobject as a key
how create number range object.
ThanksHi Kushi,
Number ranges are not meant for initialization.
you need to use subobjects which allows you to create number range values for example based on the month.
you need not to increase the number every time.
the FM gives you increased number every time.
as i said earlier create entries in SCARR table. carrid values like 01 02 03 04 -- 10 11 12 ETC.
12 sub objects for 12 months.
then go to SNRO tcode and create the values for each month.
in the program
data date type sy-datum.
month(2) type c.
month = sy-datum+3(2) will give you the current month.
pass this to the FM NUMBER_GET_NEXT
along with other parameters.
hope this is clear to you.
regards
Ramchander Rao.K -
Create list-range partition table
Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I am trying to create a partition table with LIST-Range, and I am getting this following error, is oracle 10.2.0.4 database supports to create list-range partition(composite)
SQL> CREATE TABLE tbp_list_range
REPORT_DATE DATE,
member_id_01 varchar2(2),
DATE_SERVICE date,
member_id varchar2(15)
PARTITION BY LIST(member_id_01)
SUBPARTITION BY RANGE (DATE_SERVICE)
PARTITION SPTYR04M01_C VALUES('AA','aa')
NOLOGGING
COMPRESS (
SUBPARTITION PTYR12M011 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION PTYR12M021 VALUES LESS THAN (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION recent1 VALUES LESS THAN (MAXVALUE)
PARTITION SPTYR04M01_Yo VALUES('BJ','bj')
NOLOGGING
COMPRESS (
SUBPARTITION PTYR12M01 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION PTYR12M02 VALUES LESS THAN (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
SUBPARTITION recent2 VALUES LESS THAN (MAXVALUE)
SUBPARTITION BY RANGE (DATE_SERVICE)
ERROR at line 9:
ORA-00922: missing or invalid option
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Any help would be greatly appreciated.
Thanks,any possible work around for this scenario on 10.2.0.4
--thanks -
Hi experts,
I need to populate two column in order to get waiting time, then i need to create minute range as below:-
i ) less than 30 minute
ii) 30 minute - 60 minute
iii) 60 minute - 90 minute
iv) more than 90 minute
select TO_CHAR(abs(vlh.SERVICING_DATETIME-vlh.ARRIVAL_DATETIME )* 1440,'99999999.99'),count(TO_CHAR(abs(vlh.SERVICING_DATETIME-vlh.ARRIVAL_DATETIME )* 1440,'99999999.99'))
from visitlochis vlh
where servicing_datetime is not null
and arrival_datetime is not null
AND servicing_datetime >= TO_DATE ('01/01/2009', 'dd/mm/yyyy')
AND servicing_datetime <= TO_DATE ('10/01/2009', 'dd/mm/yyyy')
and (TO_CHAR(abs(vlh.SERVICING_DATETIME-vlh.ARRIVAL_DATETIME )* 1440,'99999999.99'))>=60
and (TO_CHAR(abs(vlh.SERVICING_DATETIME-vlh.ARRIVAL_DATETIME )* 1440,'99999999.99'))<=90
group by TO_CHAR(abs(vlh.SERVICING_DATETIME-vlh.ARRIVAL_DATETIME )* 1440,'99999999.99')
Any advise and guidance is needed..
Thanks in advanceHi,
Welcome to the forum!
What is the prupose of the WHERE -clause conditions:
and (TO_CHAR(abs(vlh.SERVICING_DATETIME-vlh.ARRIVAL_DATETIME )* 1440,'99999999.99'))>=60
and (TO_CHAR(abs(vlh.SERVICING_DATETIME-vlh.ARRIVAL_DATETIME )* 1440,'99999999.99'))<=90? It looks like you're trying to only get waiting times between 60 and 90 minutes; but since you're comparing strings to numbers (the expressions to the left of the >= and <= operators are strings, but the expressions to the right are numbers) you might be getting something you didn't expect.
If you want to assign one of the numbers 1, 2, 3 or 4 to each row, depending on its wait time, you could always use CASE, like this:
CASE
WHEN vlh.SERVICING_DATETIME - vlh.ARRIVAL_DATETIME < (1 / 48) THEN 1 -- 1/48 day = 30 minutes
WHEN vlh.SERVICING_DATETIME - vlh.ARRIVAL_DATETIME < (2 / 48) THEN 2
WHEN vlh.SERVICING_DATETIME - vlh.ARRIVAL_DATETIME < (3 / 48) THEN 3
WHEN vlh.SERVICING_DATETIME - vlh.ARRIVAL_DATETIME >= (3 / 48) THEN 4
END AS wait_grpTo avoid computing the difference 4 times, you could do it once in a sub-query.
In certain circumstances, you can do something a little shorter.
For example, if servicing_datetime is never earlier than arrival_datetime, you can get the same results as above like this:
1 + LEAST ( FLOOR ( ( vlh.SERVICING_DATETIME - vlh.ARRIVAL_DATETIME)
/ 48
, 3
) AS wait_grp -
How to create numkr range in pe03
hello experts
how to create number range in pe03 when already some others number range is saved whether to delete the others ra nge or create a new one under others. even after creating under otherwise it is showing as errorHi,
Pls correct it T.code.. Number ranges will create in PA04 T.Code. not in PE03. PE03 for features. In PE03 - NUMKR feature- will assign the default number range- for trigger automatic no. while hiring ee's.
See, if already some number ranges saved into one number range, you can split it with other number range like;
01 - 000001 - 100000
Like in your system it was saved like above.
now you want to split the above no. range to below number range. I hope you are expecting following way.
01- 000001 - 50000
01- 500001- 100000
Regards,
Devi. -
I tried to create a Ranges Table Type as per SAP Help. It does get created,
But the warning message occurs when create line type for this table type.
I had been through standard help of Creating a Ranges Table Type:
URL:
http://help.sap.com/saphelp_47x200/helpdata/en/4f/991f82446d11d189700000e8322d00/frameset.htm)
The warning message is as under:
Field name OPTION is reserved (Do not use structure as include in DB table)
I replaced this field with another name, then it asks for fieldname "OPTION".
Your valuable suggestions please!Hi
Just I said in my prevoius answer you can define a dictionary structure like this:
FIELD DATA ELEMENT
.INCLUDE SRANGE
LOW MATNR
HIGH MATNR
In this way you have a structure like the range R_MATNR, and you can use it to define your paramenter in TABLE PARAMETER of Function:
FUNCTION ZTRANSFER_RANGES.
""Interfaccia locale:
*" TABLES
*" RMATNR STRUCTURE ZMATNR
DATA T_MARA LIKE STANDARD TABLE OF MARA.
SELECT * FROM MARA INTO TABLE T_MARA WHERE MATNR IN RMATNR.
ENDFUNCTION.
But you can also define a table parameter without definition:
FUNCTION ZTRANSFER_RANGES.
""Interfaccia locale:
*" TABLES
*" RMATNR
DATA T_MARA LIKE STANDARD TABLE OF MARA.
SELECT * FROM MARA INTO TABLE T_MARA WHERE MATNR IN RMATNR.
ENDFUNCTION.
Max -
I have to create a number range for OM ids . OM ids will be assigned to organistion units . OM ids will be unique and cannot be assigned to more then one org units . Please tell me the steps to create Number range which should start with 10000 till 99999.
Waiting for reply.Thanks Guys
I had already done what 'Jatra Riwayanto ' suggested now . It is better if before getting the next number via FM 'NUMBER_GET_NEXT' we should lock the number range object using FM 'NUMBER_RANGE_ENQUEUE' and after getting the number unlocks the number range ob ject using FM 'NUMBER_RANGE_DEQUEUE' .
<b>Sample code</b>
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
EXPORTING
object = 'ZPOMID'
EXCEPTIONS
foreign_lock = 1
object_not_found = 2
system_failure = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZPOMID'
IMPORTING
number = NEXT_NUMBER
quantity = quant
returncode = code
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
EXPORTING
object = 'ZPOMID'
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
ENDIF.
Thanks Buddies , full points awarded. -
Good afternoon,
I understand it is advisable to create number ranges in each client. When using SNRO in PRD we have to open the client via SE06 and SCC4. We do not like having to open PRD client. Is it possible to create number ranges in PRD without having to open client?
Regards,
SteveHi,
Every team will have firefighter ID for such purposes. Before logging to the user ID, you will be asked to maintain the reason for login. So, all the changes made through firefighter ID is tracked. So, check with your basis team to provide access for maintaining number ranges under this ID.
Regards,
P Gomatheeswaran -
Create no. range for excise group
Plz suggest how to create no. range for excise group.
Thanks in advance
vibhutiDATA: spfli_wa TYPE spfli,
r_carrid TYPE RANGE OF spfli-carrid,
r_carrid_line LIKE LINE OF r_carrid.
r_carrid_line-sign = 'I'.
r_carrid_line-option = 'BT'.
r_carrid_line-low = 'AA'.
r_carrid_line-high = 'LH'.
APPEND r_carrid_line TO r_carrid.
SELECT *
FROM spfli
INTO spfli_wa
WHERE carrid IN r_carrid.
ENDSELECT. -
Create Number Ranges for Budgeting
Hello Experts,
Can you please tell me what is the significance of "Create Number Ranges for Budgeting" in Customizing view of PS->Costs->Budget. ? Also, where does it impact ?
Please help.
Regards ,
Ankur
Edited by: ankur_sau on Feb 17, 2012 7:11 AMHi,
It refers that you can define your own number for budget documents which will be created on aloocation, supplement, transfer, release etc.. for the project.
Plus for all types of budget transactions like allocation, supplement, transfer, release etc. range defined in 01 will be used.
External number is not possible in this case.
Impact is budget documents will be created with the defined number range in this step.
Regards,
Harsh. -
Hi All Sap Experts
Please tell me How to create Number Range
I tried with the Transaction Code " SNRO "
But Im getting The following error
Dialog box title : " Buffering Methods ".
Message in the Dialog box is :
-Numbers may be lost!
-Do not use for Financial accounting Documents!!
?. Do you want set this Buffering method?
And another error is :
Dialog box title : " Transport number range intervals "
Message in the Dialog box is :
The number range intervals are not included in automatic customizing changes.
Transport all changes made within range interval maintenance must be
triggered manually.
In the initial screen for range interval maintenance function
<b> Interval</b> --> <b>Transport</b>
Please note the information that you get when transporting intervals.
So please tell me the solution for this error.
Thank you
Basu
Another ishi,
Create number range object using OYSN.
Then call the following function modules.
FORM get_next_id CHANGING p_discrep.
DATA: last_id LIKE zrecaudit-discrep,
quant LIKE inri-quantity, "dummy
code LIKE inri-returncode. "returncode
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
foreign_lock = 1
object_not_found = 2
system_failure = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZRECAUDIT'
IMPORTING
number = last_id
quantity = quant
returncode = code
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
ENDIF.
ENDFORM. " get_next_id
<u><i><b>refer the links</b></i></u>
http://www.sap-img.com/ge003.htm
http://www.sap-basis-abap.com/sapmm009.htm
http://www.erpgenie.com/abap/code/abap33.htm
http://www.kabai.com/abaps/z26.htm
Rgds
Anversha
Maybe you are looking for
-
Return Delivery for In-House Repair Order
When I create an In-House Repair order in CRM and replicate it to ECC, the return delivery does contain the special stock indicator "E", hence the stock is posted to unrestricted. This only happens with replicated orders. Any ideas?
-
Hi. I get this error: Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory in /usr/local/apache/htdocs/oci8test.php on li
-
How to set Environment Settings for J2EE?
hi i don't know java but know a little vb6 i would like make and compile this: http://java.sun.com/developer/technicalArticles/peer/ i downloaded all components... but can't figure out how to do: Table 1: Environment Settings for Compiling and Runnin
-
Any Problem in Running 9.0.4 rdf on 10.1.2 AS?
Hi all, Recently my company is migrating the Oracle Application Server from 9.0.4 to 10.1.2 Patchset 3. I find that the rdf created by Reports Builder 9.0.4 can be run directly on AS 10.1.2. But I am not sure if there is any potential problem about t
-
Two select commands in one item doesn't work?
I've created an item in a region which contains one select sentence which goes like: select sum(r.amount * price.prices * re.sats * ac.sats) from registration r, pricetype price, ressoucecostdriver re, activitycostdriver ac where r.art_art_id = price