Update Rule Problem for conversion char values
Hi all,
I need to implement the following logic into the update rule:
data: ch1(10) type c,
ch(8) type c.
ch = ch1.
The value in ch1 can be only characters or only numbers. I am facing problem in converting this, as characters are left aligned and the numbers are right-aligned.
Please guide.
Thanks
Another example can be:
data: ch1(10) type c,
ch(8) type c,
ln type n.
ch1 = '0000000010'.
condense ch1.
ch = ch1.
write:/ ch1, '-----', ch.
In this case, we get only 0 in ch field.
Thanks,
Similar Messages
-
Update rule problem for date in Prod
My scenario is like this:-
ODS 2 is loaded from ODS 1, in ODS 1 there is a data field calendar day (DATS, time characteristic) and there is a data field posting date (DATS, characteristic) in ODS 2. In the update rule, the posting date is updated from calendar day by a formula source.
The problem is the posting date data field is updated into ODS 2 correctly in development box but it is not updated (blank) in production box. I can't figure out what is the cause, hopefully someone can give me some help. Thanks.
Cheers!
CecilThe only different is the development system is having this part of code in the update rules program compare to production system. Do I need to compile the update rules formula manually?
*This ABAP Code was generated automatically *
*Formula Calculator *
*Generated :2008:09:12-10:47
*User: XXX
*Calculation:
result = COMM_STRUCTURE-CALDAY.
ENDCATCH.
if sy-subrc <> 0.
perform error_message using 'RSAU' 'E' '507'
'ROUTINE_0004' g_s_is-recno
rs_c_false rs_c_false g_s_is-recno
changing c_abort.
endif.
Cheers! -
Update rule/routine for 0PUR_C04
hi experts,
can someone give the update rule/routine for uploading 0ORDER_VAL(effective order value) into the cube 0PUR_C04 and the calculations for it?
and also some explantion on how this effective purchase order value 0ORDER_VAL is calculated*??
thanksHi Surya,
If you are using standard content for 0PUR_C04, you can get the update rule in standard update rules, which you can see in Business content on Metadata repository. For standard content four data source used to fill cube. Purchasing Group (2LIS_02_S011 ), Purchasing Data (2LIS_02_HDR), Pur.Data (2LIS_02_SCL) and Purchasing Data (2LIS_02_ITM). The mapping for different update rules are done as:
2LIS_02_S011: Direct Mapping
2LIS_02_HDR: No Update
2LIS_02_SCL: Routine (mm_convert_effwr)
fill the internal table "MONITOR", to make monitor ent *ries
IF ( COMM_STRUCTURE-PROCESSKEY = '001' or "Bestellu *ng
COMM_STRUCTURE-PROCESSKEY = '011' or
COMM_STRUCTURE-PROCESSKEY = '021' or
COMM_STRUCTURE-PROCESSKEY = '004' or "LP
COMM_STRUCTURE-PROCESSKEY = '014' or
COMM_STRUCTURE-PROCESSKEY = '024' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-ORDER_VAL <> 0.
perFORM LOC_CURR_CONVERT
USING COMM_STRUCTURE-ORDER_VAL
COMM_STRUCTURE-DOC_DATE
COMM_STRUCTURE-ORDER_CURR
COMM_STRUCTURE-LOC_CURRCY
COMM_STRUCTURE-EXCHG_RATE
CHANGING RESULT.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
else.
RETURNCODE = 4.
endif.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
2LIS_02_ITM: No Update
Hope this will give you some lead.
Regards,
Kams -
Update rule problem - validation of "sales/cost w/ tax" keyfigure
BW Gurus,
Hi to all, i have this update rule problem at "sales/cost w/tax" keyfigure here is the senario.
Our Goverment mandatory implemented an additional 2% tax from the original 10%, this will affect our report on sales, and also the BW "sales/cost w/ tax" key figure.
My question is How can I validated the effectivity of the new tax? i have tax 10% from previous sales and 12% on the current sales. What "date field" can I use to validated this. I am using /BIC/CS2LIS_13_VDITM stucture to get the data i need.
Thanks in Advance
JovenHi,
Till to day how are extracting the data for tax(original 10%) is it available directly in 2LIS_13_VDITM ?
Usually all taxes( condition types) can be extracted by the data source 2LIS_13_VDKON.Discuss with SD team, they may give the condition type used for different taxes.
With rgds,
Anil Kumar sharma .P -
Function modules for converting Char value to hexadecimal value
Hi All,
Function modules for converting Char value to hexadecimal value.
Thanks in advanceHi,
use this function module:
<b>RSS_UNIQUE_CONVERT_TO_HEX</b>
regards
Debjani
Rewards point for helpful answer -
Update rule problem - Urgent pls???
Hi friends,
Below is the code i used in my start routine of the update rule.
Here im sorting the values and then for calday field im filling with the value if it is empty.
eg:
rec1>ord001>25.06.2006-->val1
rec2>ord001> -->val1
in the second record im filling with date of the previous record.
This logic is working fine.If i give any one order number.
If i load all the values,it is not updating.
I think this rule is not getting applied for all the datapackets..(something like that-any problem with looping???)
Awaiting for your valuable suggestion asap..
Thanks&Regards
Ragu
$$ begin of global - insert your declaration only below this line -
TABLES: /BIC/AZPP_O200.
DATA: zpp02 like /bic/azpp_O200 occurs 0 with header line,
mcalday like sy-datum.
Clear : ZPP02[],
ZPP02,
mcalday.
SORT DATA_PACKAGE BY PRODORDER ASCENDING
COMPONENT ASCENDING
CALDAY DESCENDING.
Loop At DATA_PACKAGE.
if DATA_PACKAGE-CALDAY ne '00000000'.
mCalDay = DATA_PACKAGE-CalDay.
else.
DATA_PACKAGE-CALDAY = mCALDAY.
MODIFY DATA_PACKAGE INDEX SY-TABIX.
clear : mCalday.
endif.
EndLoop.I think that the metter happens when the first record is in a datapackage and the second in next one.
In that case you have the matter.
The only way you can do this right is managing data directly in PSA table befor loading.
Also if you have two record with DATA_PACKAGE-CALDAY = '00000000' the secon is filled with '' because fo the clear.
Hope it helps.
Regards -
Hi frndz,
I have one query regarding update rule.
i want to ask you the question that while defining the routine on particular keyfigure is it requierd to maintain the sequence of the field as it is in cube.
Like i am facing a starnge problem i have just now updated system to 3.5 now my problem is i have a master data material in that i have wriiten few update rule on specific fields,now when i am loading the data in material master data few of the material having the value others dont have.
i think some problem lies in update rule i have checked correctly every thing is fine with the update rule,
can any one suggest me why its behaving strangely.i have tried that but no where i am getting the problem.
like after debugging i got the value correctly till the PSA but its not going correctly in data target. -
Update rules only for the keys of a DSO
Hi everybody,
We have a problem after our recent migration to BI 7.0.
In a transfer rule, the 0RECORDMODE is set to 'D' and in the update rules only the keys of the DSO are mapped. It's just for a deletion of data in the DSO.
In BW 3.5, everything was fine but now it doesn't work anymore. Data are transfered but not inserted in the DSO.
I've tried to affect a constant to a characteristic which is not a key in the update rules and the data are correctly inserted.
Is it a normal comportment ?
Any idea is welcome.
Thanks in advanceI think I have a similar problem. I've got updates for iWork apps available after upgrading to Mavericks. I've tried both my apple ID and my wife's but I get an error with both saying the software was purchased with a different ID. I have no idea what ID that would be. Is there anyway to check the ID the software is licensed to?
-
BW 0HR_PA_2 - 3 Update rules assignment for 0PA_DS02 - 3
Hello experts
I am just another one tryng to figure out how to assign the update rulesfor DSO's 0PA_DS02 and 3. The business content activation of the update rules yields a no update type of rule. So I guess we need to assign the fields manually. I read the <How-to> document on the BW/HR authorization but I am still trying to pass <GO> and load the initial data as the document does not mention the update rules assignment. In that regards I searched SDN on how to modify the update rules but I can't seem to pin point the exact complete information.
Please help.
Thanks.
YB.=========================
Update Rules for 0PA_DS03 (Part 2)
=========================
0TCTNDEF - BW Reporting Authorizations: Node Variables Defaul
Initial value
0TCTNIOBJNM - InfoObject of Node
Routine:
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_key_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS0HR_PA_3
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BI0/APA_DS0300-TCTNIOBJNM
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
RETURNCODE = 0.
result value of the routine
IF COMM_STRUCTURE-hr_otyobj IS INITIAL.
RESULT = '1NODENAME'.
ELSE.
CASE COMM_STRUCTURE-hr_objtype.
WHEN 'O'. RESULT = '0ORGUNIT'.
WHEN 'C'. RESULT = '0JOB'.
WHEN 'S'. RESULT = '0HRPOSITION'.
WHEN 'P'. RESULT = '0EMPLOYEE'.
WHEN 'Q'. RESULT = '0QUALIFICTN'.
WHEN 'QK'. RESULT = '0QUALIGROUP'.
WHEN 'BA'. RESULT = '0APPRAISAL'.
WHEN 'A'. RESULT = '0HRWORKCNTR'.
WHEN 'BK'. RESULT = '0AP_CRIT'.
WHEN 'BS'. RESULT = '0AP_SCHEME'.
WHEN 'E'. RESULT = '0EVENT'.
WHEN 'D'. RESULT = '0EVENTTYPE'.
WHEN 'L'. RESULT = '0EVENTGROUP'.
WHEN 'F'. RESULT = '0EVLOCATION'.
WHEN 'G'. RESULT = '0RESOU'.
WHEN 'R'. RESULT = '0RESTYPE'.
WHEN 'H'. RESULT = '0EXTPERS'.
WHEN 'U'. RESULT = '0EXTORG'.
WHEN OTHERS.RETURNCODE = 4.
ENDCASE.
ENDIF.
if the returncode is not equal zero, the result will not be updated
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
0TCTNODE - Nodes of a Hierarchy
Routine:
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_key_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS0HR_PA_3
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BI0/APA_DS0300-TCTNODE
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
IF COMM_STRUCTURE-hr_otyobj IS INITIAL.
RESULT = 'ROOT_H'.
ELSE.
RESULT = COMM_STRUCTURE-hr_otyobj.
ENDIF.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
0TCTOBJVERS- Object Version
Constant: A
0TCTSYSID - BW System
Routine:
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_key_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS0HR_PA_3
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BI0/APA_DS0300-TCTSYSID
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
CALL METHOD cl_rso_repository=>get_logical_system_self
RECEIVING
r_logsys = RESULT.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM. -
Master Data lookup in Update Rule problem
Hi all,
I am currently having a problem loading data to an InfoCube using flat files.
The architecture is as follows:
1) The source of the data is a flat file
2) The data is loaded thru an Update Rule and is of type Full-Update
3) The Update Rules determines the Profit Center using the Master Data of the WBS-Element
4) The data is written in an InfoCube
This solution however does not always work as planned. In the following situation a problem occurs:
1) The flat file contains WBS-element RD.00753.02.01, which has a Profit Center attribute value 8060
2) When I load the flat file, the PC value 8060 is written into the row in the InfoCube, which is correct
3) Then I change the master data of the WBS-element by setting the Profit Center attribute value to 8068
4) I run the Attribute Change Run
5) Then i load a flat file again, which also contains WBS-element RD.00753.02.01
6) The master data attribute value should now write the value 8068 into the InfoCube. HOWEVER, this is when the evil occurs. BW does not write a PC value of 8068, but it write the value 8060. This is wrong.
Why does BW not take the newest version of the Master Data to performe the attribute value look-up? Or why doesn't BW write the correct Profit Center into the cube?
Thanks,
OnnoHi Ricardo,
The debug via PSA simulation of the update indicates that the CORRECT Profit Center value is to be written into the InfoCube.
However, if I check the contents of the cube (after the load has finished) using the request-id the WRONG Profit Center value is shown. This indicates that the correct Master Data is used, however the update of the Cube is wrong. Why does this happen. the load is of type full-update, so should add a new row in the cube using the value in the data from the UR.
Onno -
Update rules error for 0IC_c03
HI all,
I have replicated the BF,BX and UM datasources into BI and I restored the BX datasource to 3.x and assigned the DS to standard Infosource 2lis_03_BX and activated.
one field 0GN_R3_SSY was not mapped because there was no field in the DS 2lis_03_BX.
I activated the transfer rules,it got activated without error,but it was in yellow.
And I created a Zcube copying the standard cube 0IC_C03 and tried to create update rules,giving the Infosource name 2lis_03_bx
then a message popped up saying
'InfoSource 2LIS_03_BX is only set up for the initial run for non-cumulatives.' I clicked on ok and then another message as
'No update exists for time-reference characteristic 0CALDAY' and clicked ok then update rules proposal generated,and in update rules the status of some of keyfigures with type routine was showing error
for example:
Value Received into Valuated Stock , Receipt Quantity: Blocked Stock , Quantity Received into Consignment Stock
Receipt Quantity Total Stock
please explain in detail what could be the reason?Try to create an infosource by using copy from the standard one. Then try to See the std mapping between infosource & data target. Similarily do the mapping between Zinfosource & Z data target as the std one.
Hi PT,
I will do as you said, I have a doubt is it all because 0GN_R3_SSY is not mapped in the transfer rules ,because transfer rules are not in green when I activated it and Iam going to create the Update rules.
How to copy the standard Infosource as you wont get any option to copy it.
Thx -
Purchasing cube designing, update rule mapping for 0calday
Hi All,
Iam designing cube for Purchasing module in BW. Iam having doubt in mapping for 0calday in update rules, is it with document date or scheduline date. I have searched in SAP cube 0PUR_C01, it is mapped with 0SCHED_DATE( schedule line date). How the difference comes when we choose document date and schedule line date.
FYI, we are using only schedule line data source, which is giving relevant information.
Thanks,
RamHi Ram,
Please note:
0SCHED_DATE: The schedule line date is the day on which the scheduled quantity of the material is to be delivered.
0DOC_DATE: The date on which document has been craeted.
Use the first one for purchasing.
Thanks...
Shambhu -
Update rule problem - while data load
Hi friends,
I got the following error while doing initialisation for 2lis_02_sgr.
"ABORT was set in the customer routine 9998
Error 1 in the update "
In the forum i searched for this error and this error is something related to the start routine in my update rule.
But i dont know whats wrong with my routine.
Im giving the start routine below,pls go through this and give me your suggestions..
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
<i>TABLES /bic/AZMM_PUR100 .
DATA: T_PUR1 LIKE /bic/AZMM_PUR100 OCCURS 0 WITH HEADER LINE.</i>
$$ end of global - insert your declaration only before this line -
The follow definition is new in the BW3.x
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CS2LIS_02_SGR.
TYPES:
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA:
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
if abort is not equal zero, the update process will be canceled
CLEAR: T_PUR1[] ,
T_PUR1,
ABORT.
SELECT * INTO TABLE T_PUR1 FROM /bic/AZMM_PUR100.
IF SY-SUBRC EQ 0.
SORT T_PUR1 BY DOC_DATE
DOC_ITEM
DOC_NUM.
ELSE.
MONITOR-msgid = sy-msgid.
MONITOR-msgty = sy-msgty.
MONITOR-msgno = sy-msgno.
MONITOR-msgv1 = sy-msgv1.
MONITOR-msgv2 = sy-msgv2.
MONITOR-msgv3 = sy-msgv3.
MONITOR-msgv4 = sy-msgv4.
append MONITOR.
if abort is not equal zero, the update process will be canceled
ABORT = 1.
ENDIF.
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
Thanks & Regards
Raguthanks gimmo and a.h.p,
i have done the correction as you said,pls verify that.
And also kindly explain me what is the reason for this start routine,what exactly it does???
CLEAR: T_PUR1[] ,
T_PUR1,
ABORT.
SELECT * INTO TABLE T_PUR1 FROM /bic/AZMM_PUR100.
IF SY-SUBRC EQ 0.
SORT T_PUR1 BY DOC_DATE
DOC_ITEM
DOC_NUM.
abort = 0. ( added abort = 0 as per your suggestion )
ELSE.
MONITOR-msgid = sy-msgid.
MONITOR-msgty = sy-msgty.
MONITOR-msgno = sy-msgno.
MONITOR-msgv1 = sy-msgv1.
MONITOR-msgv2 = sy-msgv2.
MONITOR-msgv3 = sy-msgv3.
MONITOR-msgv4 = sy-msgv4.
append MONITOR.
if abort is not equal zero, the update process will be canceled
ABORT = 1.
exit. ( added exit as per your suggestion )
ENDIF.
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
Thanks & Regards
ragu -
Hi
I am working with inventory managemnt.I am facing few issues in update rules like:-
1.I am not able to find coressponding source info objects for the customized one .
2.I am not able to find the some of the charactertics mapped to their info objects in the charactertics tab in the key figures.
3. I some how activate the update rule, but it is not showing data in the cube contents while the request is there.
thanx in advance.The only different is the development system is having this part of code in the update rules program compare to production system. Do I need to compile the update rules formula manually?
*This ABAP Code was generated automatically *
*Formula Calculator *
*Generated :2008:09:12-10:47
*User: XXX
*Calculation:
result = COMM_STRUCTURE-CALDAY.
ENDCATCH.
if sy-subrc <> 0.
perform error_message using 'RSAU' 'E' '507'
'ROUTINE_0004' g_s_is-recno
rs_c_false rs_c_false g_s_is-recno
changing c_abort.
endif.
Cheers! -
Instaling the update rules problem
Hi iam Installing the std update rules. like 0sd_co3 2lis_13_vdhdr by selctig grouping as before and instaling. its showing an error as>
IC=0SD_C03 IS=2LIS_01_S263ERROR WHEN CHECKING THE UPDATE RULES ..
CAN U PLS HELP ME FOR THE SAME. HOW TO INSTAL IT AS I HAVE TO ISTAL AND ACTIVATE THE FEW MORE UPDATE RULES AS IAM GETING ERROR FOR ALL .ITS 3.5
PLS DO IT ASAPTry to activate your update rules btween 8ZSL_DS01 and ODS and cube.
It seems your Datamart is not working properly for the datamart data source 8ZSL_DS01 and try to regenerate datamart
Or lese try to load earch one at time and see the result
Edited by: Prasad B on Aug 29, 2008 4:41 PM
Maybe you are looking for
-
Accented characters, XML, Flash
I have a flash application which is pulling information to populate dynamic fields from two XML files. We have three languages supported, and have been having problems with the non-english accented characters displaying properly when they are called
-
Patch 10.1.2.2 for Solaris is avalialble ?
Dear Oracle, When patch 10.1.2.2 for Solaris is available ? Thanks, Yorke
-
Revision: 17920 Revision: 17920 Author: [email protected] Date: 2010-09-29 05:56:06 -0700 (Wed, 29 Sep 2010) Log Message: Fix for WebLogic: WebLogic does not provide File IO on the deployed artifacts hence using getResourceAsStream. Modified Pa
-
Hi all, I need to know the role of config. in SWFVISU. I mean, if i approve the WI from the UWL, how the backend WI (in SBWP) will get completed. I searched for the same in SDN but not able to find. Please tell how the control will flow from portal t
-
I cant download a movie on ITunes, it taking too long what should I do?
Basicaly the hours keep going up like at first it said 58 minutes remaining then it said 2,,4,12,13,14 hours remaining and its just frusterating, so whathould I do???