Update Rule Routine Problem
Hi
i have wriiten a update rule routine.
in that routine i am fetching comp code ,GL Acct. from SKB1 table and match those records wth Data Package records.
Data Package has both Open and Closed items. so i need to match the Comp Code and GL Account which i have fetched from SKB1 with Data Package Comp Code and GL account which records will be matched they will go to Target ODS otherwise Delete from Data Package.
But data is not coming properly in Target ODS.
i have debug the routine and found , there are 10 records(Comp Code + GL Acct.) has been fetched from SKB1
and Data Package has Total 416 Records. Only 20 Records has been gone to Target ODS while I have seen the 216 Comp Code and GL Account combination has been successfully matched with 10 Records of SKB1
Below is the code in Start routine.
Note: Data Package has Multiple Records for a Combination of Company Code and GL Account which is present in SKB1.
How can i resolve this problem.
********Logic to Fetch Open items GL Account**************
*Fetch data from SKB1*********
SELECT /BIC/ZMCFBUKRS
/BIC/ZMCFSAKNR
FROM /BIC/AZOCFSKB100
INTO TABLE TB_ZOCFSKB1
FOR ALL ENTRIES IN DATA_PACKAGE
WHERE /BIC/ZMCFBUKRS = DATA_PACKAGE-COMP_CODE
AND /BIC/ZMCFSAKNR = DATA_PACKAGE-GL_ACCOUNT
AND /BIC/ZMCFXOPVW = 'X'.
***Fetch records from FI GL Data Package which match with
***internal table TB_ZOCFSKB1
LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE.
READ TABLE TB_ZOCFSKB1 INTO WA_TB_ZOCFSKB1 WITH KEY
/BIC/ZMCFBUKRS = WA_DATA_PACKAGE-COMP_CODE
/BIC/ZMCFSAKNR = WA_DATA_PACKAGE-GL_ACCOUNT
binary search.
IF sy-subrc ne 0.
DELETE TABLE DATA_PACKAGE FROM WA_DATA_PACKAGE.
ENDIF.
***Clear Work Area****************
CLEAR WA_TB_ZOCFSKB1.
CLEAR WA_DATA_PACKAGE.
ENDLOOP.
***Refresh internal table*********
REFRESH TB_ZOCFSKB1.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
Edited by: AtulMohan Mishra on Feb 9, 2011 11:22 AM
Hi,
It is very important that you SORT the internal table before you do a READ with Binary Search.
SORT TB_ZOCFSKB1 BY /BIC/ZMCFBUKRS /BIC/ZMCFSAKNR.
You are sure to miss results unless you do.
Similar Messages
-
Problem in the update rule routine in BIW production
hi,
I have encountered a problem in the update rule, the problem is, there is a routine to calculate the age of a person, age is a key figure,
The problem is that the key figure is not being calculated.
we had encountered the same problem in the bw developent, we reinstaled the update rule, and the age was calculated correctly. Where as in production we cannot instal from business cotent, should we transport the perticular update rule once again?
if there is any other solution, please let me know.
Thanks in advance.
regards chetana.I think retransporting is the only option available to you. You cannot modify anything in your production system.
IF you have a chance to speak with basis people,ask them to open the system status to modifiable for few minutes.
and make necessary changes in production and bring it back to normal (This is not a best practise in all situations).
hope this helps.
Praveen -
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 -
Why data in PSA doesn't change when update rule routine is modified?
Hello guys,
why data in PSA is not changed after I modifiied the update rule routine. I created a infopackage which is only to PSA, but it shows me any change. If I changed this infopackage to the one which is assigned to "PSA firstly, and then to Infoobject", then I saw the changes in infoobject, but in PSA, still nothing changed.
I can't figure out the reason. Any hint is welcome!
Thanks in advance.
Regards,
LiyingHI..
1) PSA data is like of source system data
2)Update rules are how you update your keyfigures to Data Tragets.
Since you have put upto PSA that is the first data staging in BW so there wont be any change of the data even if you write routines at update rules.
Hope it is clear
Reg
Ram -
Key Figure Update Rule aggregation problem?
Hello all,
I am trying to create a simple routine in an update rule to sum up two key figures and perform a calculation. To be more specific, I want to add ZQTY and ZQTY2, and calculate the quantity greater then 8 for formula (F1).
(F2) = ZQTY + ZQTY2.
(F1) = IF ( F2 > 8, then F2 - 8, else zero)
Source:
0CALDAY...0EMPLOYEE...ZTASK....ZQTY....ZQTY2
2008.05.01....90000....TASK1.....5.......1
2008.05.01....90000....TASK2.....1.......2
2008.05.01....90001....TASK1.....8......0
2008.05.01....90002.....TASK1....9.......4
Target:
0CALDAY...0EMPLOYEE...ZQTY....ZQTY2....(F1)
2008.05.01.......90000............6..........3...........1
2008.05.01.......90001............8..........0...........0
2008.05.01.......90002............9..........4...........12
In the source, calday, employee, task are the key. In the target, 0calday, 0employee are the key.
Here is the code I am using for my update rule routine for F1:
DATA: total_sum TYPE d .
*BL - Get sum of qty
total_sum = COMM_STRUCTURE-/BIC/ZQTY + COMM_STRUCTURE-/BIC/ZQTY2 .
*BL - Calculate qty > 8
IF total_sum > 8 .
RESULT = total_sum - 8.
ENDIF.
With the current code, I am not getting the correct results (employee 90002 will be correct, employee 90000 will be wrong because of aggregation). Does anyone know how to get around this?
Thanks,
Edited by: Brendon Lipchen on May 13, 2008 4:38 PMHi,
In case of 'ABORT = 1' the whole data package will not be loaded.
Best regards,
Eugene -
How to access basic cube data as part of update rule routine?
Dear colleagues:
I am developing a routine as part of the update rule to define a characteristic value to feed an infocube. However, I need to peek up a data that is available on another infoprovider, in this case a basic cube.
So far, I have done that by peeking up data form ODS as part of the update routine, but this is the first time I need to peek up a data from a basic cube.
<b>Does that works the same way as ODS?</b>
Best regards
WaldemarHi Krzysztof Konitz:
I have posted an inquire about getting that from the PSA. By mistake I have posted that once before your reply and another after that. Then I red you reply.
However, you replay solved the problem.
Best regards
Waldemar -
Calculation in update rule/routine in order to modify DATA_PACKAGE
Hello all,
I want to load some finance data from two ODS objects into an InfoCube. In the update rule I have build a start routine in order to compare two values of two internal tables (itab1 and itab2) which gets loaded with data from the both ODS.
When the value of the itab1 is higher of itab2 then I want to subtract the value from itab2 from itab1.
After that I want to MODIFY the DATA_PACKAGE in order to update later the cube with an new lower value.
The DATA_PACKAGE is defined as standard table as well as itab1 and itab 2 but I get the error message that the line type is not compatible.
How I have to build the MODIFY statement in order to calculate and update values in the DATA_PACKAGE?
Any helps would be great.
Best regards from Munich/Germany,
Stefan LeontiadisHi Stefanos,
My thought is probably not the best in terms of performance, but it should work. The problem you'll hit is not having the entire data set from both ODS Object loads in memory at the same time.
To cover this, you can declare a table in the global section of the start routine, let's call it GT_REF_DATA. Next, perform a SELECT ffrom <other ODS Object> FOR ALL ENTRIES IN DATA_PACKAGE WHERE <selection> into GT_REF_DATA in the local section of the start routine.
In the individual update routine, you can do a READ TABLE GT_REF_DATA INTO LS_REF_DATA WITH KEY <selection> to get the record you want to compare.
Here's where you have to be careful. If I understand your logic right, you can do:
IF LS_REF_DATA-field < COMM_STRUCTURE-field.
RESULT = COMM_STRUCTURE-field - LS_REF_DATA-field.
ELSE.
RESULT = COMM_STRUCTURE-field.
ENDIF.
That avoids processing everything in the start routine and your MODIFY problem. If you prefer the start routine, you can work with the DATA_PACKAGE directly. Just remember that DATA_PACKAGE has a header line, so you can simply LOOP AT DATA_PACKAGE, change the value in DATA_PACKAGE, then MODIFY DATA_PACKAGE.
The way I prefer to do things is to create a separate internal table that is the same type as DATA_PACKAGE. I fill the internal table with all values to store to the InfoCube (even those you don't change from DATA_PACKAGE). At the end of the routine, CLEAR DATA_PACKAGE then APPEND LINES OF itab TO DATA_PACKAGE.
I know there's lots of options above. Let me know if I got your logic wrong or you have questions.
Cheers,
Adam -
BW 3.5 Update rule routine and start routine convert to BI 7.0 Endroutine.
I have bw 3.5 update routine and update rules start routine( r/3 to ODS). i need to replicate that routine into BI 7.0 endroutine with the same logic with some minor changes(DSO to DSO).
IN BW 3.5 the data is getting from r/3 where as in BI7.0 the data fetching from DSO itself but the logic is same as bw 3.5.
following is the start routine:
DATA: G_FISCPER_TO TYPE /BI0/OIFISCPER,
G_CALMONTH LIKE /BI0/PCALMONTH-CALMONTH,
G_MONAT TYPE /BIC/OIYRDFMONAT.
ABORT = 0.
------ Globale Variable füllen --------------------------------------*
CALL FUNCTION 'Y_RDF_FISCPER_FOR_INFOPACKAGE'
EXPORTING
I_ISOURCE = '0FI_AA_001' (*** this is infosurce getting from r/3, in 7.0 this one is DSO 'B")
IMPORTING
E_FISCPER_TO = G_FISCPER_TO
E_MONAT = G_MONAT
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC = 0.
CALL FUNCTION 'Y_RDE_FISCPER_TO_CALMONTH'
EXPORTING
I_PERIV = 'K4'
I_BDATJ = G_FISCPER_TO(4)
I_POPER = G_FISCPER_TO+4(3)
IMPORTING
E_CALMONTH = G_CALMONTH
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0 OR G_CALMONTH IS INITIAL.
CALL FUNCTION 'Y_RDN_MONITOR_SET'
EXPORTING
I_MSGID = 'YRDFBW'
I_MSGNO = '027'
I_MSGV1 = '0FI_AA_001'
I_MSGV2 = 'YRDF_FIAA_PERIOD'
TABLES
T_MONITOR = MONITOR.
ABORT = 1.
ENDIF.
ELSE.
CALL FUNCTION 'Y_RDN_MONITOR_SET'
EXPORTING
I_MSGID = 'YRDFBW'
I_MSGNO = '027'
I_MSGV1 = '0FI_AA_001'
I_MSGV2 = 'YRDF_FIAA_PERIOD'
TABLES
T_MONITOR = MONITOR.
ABORT = 1.
ENDIF.
Update routine:
RETURNCODE = 0.
ABORT = 0.
CLEAR RESULT.
IF NOT COMM_STRUCTURE-ASSET_MAIN BETWEEN '000000200000' AND
'000000299999'.
CALL FUNCTION 'Y_RDF_GET_CCTR_0ASSET'
EXPORTING
I_COMP_CODE = COMM_STRUCTURE-COMP_CODE
I_ASSET = COMM_STRUCTURE-ASSET
I_ASSET_MAIN = COMM_STRUCTURE-ASSET_MAIN
IMPORTING
E_COSTCENTER = RESULT
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0 OR RESULT IS INITIAL.
CALL FUNCTION 'Y_RDN_MONITOR_SET'
EXPORTING
I_MSGID = 'YRDFBW'
I_MSGTY = 'E'
I_MSGNO = '061'
I_MSGV1 = COMM_STRUCTURE-COMP_CODE
I_MSGV2 = COMM_STRUCTURE-ASSET
I_MSGV3 = COMM_STRUCTURE-ASSET_MAIN
TABLES
T_MONITOR = MONITOR.
RETURNCODE = 1.
ENDIF.
ENDIF.
How can i write this in BI7.0?
ThanksHi ,
solved on my own. Thankyou very much..
thanks & regards,
M.S
Edited by: M.S on Oct 27, 2009 6:57 AM
Edited by: M.S on Oct 27, 2009 6:59 AM -
Update rules Activation Problem
Hi,
Iam getting the error while transporting the update rules to production,saying error mesage,
Start of the after-import method for object type R3TR UPDR (Activation Mode)
Update rules 4AR6MO7P6M428KB2RPA65E9EX read in version M
Error when activating update rule 4AR6MO7P6M428KB2RPA65E9EX
Activation of the update rules for ZCG_O15 ZBW_CRTDN
IC=ZCG_O15 IS=ZBW_CRTDN error when checking the update rules.
from Dev to QA successfully transported and data hasbeen loaded with out any issues,
I didnot changed any thing in ODS,I Just created the new infosource with only two characteristics and created the update rules direct updating,with out any routines.
I activated the update rules in Dev couple of times and transported to PD,but every time it is giving same error,there was no issues upto QA,
Please suggest anybody how to resolve this issue.
Thanks
BI USERHi
Thanks for your replies,
Iam checking from transport request error log,iam getting error message as I mentioned in my question,
iam not getting detail information on error log,Update rules are available in PD system but in inactive state,
I did the Update rules check it is giving message 'no erreors found in update rules'.
I collected all dependent objects from transport collecter,still same error,I tried from Program
RSAU_UPDR_REACTIVATE_ALL,but my PD system is in not modifiable state.
Thanks -
hi all
i need to write a routine at the update rule level for currency type....
currency type has data of type 00,01,02 loaded to psa and then to infocube
i need only 00 data to be loaded into cube, so want to write a routine
can you please provide the coding for the same so that i can write at the update rule level for curr type field
RegardsPROGRAM CONVERSION_ROUTINE.
Type pools used by conversion program
TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
Declaration of transfer structure (selected fields only)
TYPES: BEGIN OF TRANSFER_STRUCTURE ,
InfoObject 0COMP_CODE: CHAR - 000004
HEADER_COMP_CO(000004) TYPE C,
InfoObject 0PLANT: CHAR - 000004
HEADER_PLANT(000004) TYPE C,
InfoObject 0MATERIAL: CHAR - 000018
HEADER_MATERIAL(000018) TYPE C,
InfoObject 0MATL_TYPE: CHAR - 000004
HEADER_MAT_TYPE(000004) TYPE C,
InfoObject 0MATL_GROUP: CHAR - 000009
HEADER_P_GROUP(000009) TYPE C,
InfoObject 0LOTSIZE_IT: QUAN - 000013
LOTSIZE(000007) TYPE P,
InfoObject 0UNIT: UNIT - 000003
LOTSIZE_QTY_UNIT(000003) TYPE C,
InfoObject 0FISCPER: NUMC - 000007
PERIODE(000007) TYPE N,
InfoObject 0FISCVARNT: CHAR - 000002
FISCAL_Y_VARIANT(000002) TYPE C,
InfoObject 0PCPITEMCAT: CHAR - 000001
ITEM_CATEGORY(000001) TYPE C,
InfoObject 0PCP_RES: CHAR - 000035
COST_ITEM(000035) TYPE C,
InfoObject 0COMPONENT: CHAR - 000018
MATERIAL(000018) TYPE C,
InfoObject 0VAL_CLASS: CHAR - 000004
VALUATION_CLASS(000004) TYPE C,
InfoObject 0PLANT_COMP: CHAR - 000004
PLANT(000004) TYPE C,
InfoObject 0SEND_CMPC: CHAR - 000004
COMPANY_CODE(000004) TYPE C,
InfoObject 0CO_AREA: CHAR - 000004
CONTROLLING_AREA(000004) TYPE C,
InfoObject 0COSTCENTER: CHAR - 000010
COST_CENTER(000010) TYPE C,
InfoObject 0ACTTYPE: CHAR - 000006
ACTIVITY_TYPE(000006) TYPE C,
InfoObject 0WORKCENTER: CHAR - 000008
WORK_CENTER(000008) TYPE C,
InfoObject 0VENDOR: CHAR - 000010
VENDOR(000010) TYPE C,
InfoObject 0INFO_REC: CHAR - 000010
INFO_RECORD(000010) TYPE C,
InfoObject 0ABCPROCESS: CHAR - 000012
PROCESS(000012) TYPE C,
InfoObject 0AMOUNT: CURR - 000015
VALUE(000008) TYPE P,
InfoObject 0AMOUNTFX: CURR - 000015
VALUE_FIXED(000008) TYPE P,
InfoObject 0AMOUNTVR: CURR - 000015
VALUE_VARIABLE(000008) TYPE P,
InfoObject 0OI_MENGE: QUAN - 000015
QUANTITY(000008) TYPE P,
InfoObject 0BASE_UOM: UNIT - 000003
QUANTITY_UNIT(000003) TYPE C,
InfoObject 0PRICEUNIT: DEC - 000005
PRICE_UNIT(000003) TYPE P,
InfoObject 0CURRENCY: CUKY - 000005
CURRENCY(000005) TYPE C,
InfoObject 0CURTYPE: CHAR - 000002
CURRENCY_TYPE(000002) TYPE C,
InfoObject 0COSTELMNT: CHAR - 000010
COST_ELEMENT(000010) TYPE C,
InfoObject 0COSTCOMP: NUMC - 000003
COST_COMPONENT(000003) TYPE N,
InfoObject 0CCOMPSTRUC: CHAR - 000002
COST_COMP_STR(000002) TYPE C,
InfoObject 0SCRAPQTY: QUAN - 000015
SCRAP_QTY(000008) TYPE P,
InfoObject 0COMP_SCRAP: QUAN - 000015
COMP_SCRAP_QTY(000008) TYPE P,
InfoObject 0COSTVAR: CHAR - 000004
COSTING_VARIANT(000004) TYPE C,
InfoObject 0COSTVERS: NUMC - 000002
COSTING_VERSION(000002) TYPE N,
END OF TRANSFER_STRUCTURE .
Global code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM COMPUTE_CURTYPE
Compute value of InfoObject 0CURTYPE
in communication structure /BIC/CS0CO_PC_PCP_10
Technical properties:
field name = CURTYPE
data element = /BI0/OICURTYPE
data type = CHAR
length = 000002
decimals = 000000
ABAP type = C
ABAP length = 000002
reference field =
Parameters:
--> RECORD_NO Record number
--> TRAN_STRUCTURE Transfer structure
<-- RESULT Return value of InfoObject
<-> G_T_ERRORLOG Error log
<-- RETURNCODE Return code (to skip one record)
<-- ABORT Abort code (to skip whole data package)
FORM COMPUTE_CURTYPE
USING RECORD_NO LIKE SY-TABIX
TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
G_S_MINFO TYPE RSSM_S_MINFO
CHANGING RESULT TYPE /BI0/OICURTYPE
G_T_ERRORLOG TYPE rssm_t_errorlog_int
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
$$ begin of routine - insert your code only below this line -
DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
If <SOURCE_FIELDS>-CURTYPE NE '00'
Delete DATA_PACKAGE.
RESULT = .
returncode <> 0 means skip this record
RETURNCODE = 0.
abort <> 0 means skip whole data package !!!
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
FORM INVERT_CURTYPE
Inversion of selection criteria for InfoObject 0CURTYPE
This subroutine needs to be implemented only for SAP RemoteCubes
(for better performance) and for the Report/Report Interface
(drill through).
--> I_RT_CHAVL_CS Ranges table for current InfoObject
--> I_THX_SELECTION_CS Selection criteria for all other InfoObjects
<-- C_T_SELECTION Selection criteria for fields of
transfer structure
<-- E_EXACT Flag: Inversion was exact
FORM INVERT_CURTYPE
USING I_RT_CHAVL_CS TYPE RSARC_RT_CHAVL
I_THX_SELECTION_CS TYPE RSARC_THX_SELCS
CHANGING C_T_SELECTION TYPE SBIWA_T_SELECT
E_EXACT TYPE RS_BOOL.
$$ begin of inverse routine - insert your code only below this line-
DATA:
L_S_SELECTION LIKE LINE OF C_T_SELECTION.
An empty selection means all values
CLEAR C_T_SELECTION.
L_S_SELECTION-FIELDNM = 'CURRENCY_TYPE'.
Selection of all values may be not exact
E_EXACT = RS_C_FALSE.
$$ end of inverse routine - insert your code only before this line -
ENDFORM. -
Update Rule Routine not deleted properly
Hi all
I have deleted a routine from an update rule, removed the key figure from the infoprovider and reactivated both the ODS and the update rule.
The update rule therefore no longer contains the datafield.
Unfortunately the the code for the routine still exists in the system (RSAABAP and other tables) and references in this routine to other fields are preventing me carrying out other actions, so I need to properly remove the routine from the system.
I cannot go back to the old generated code for the update rules as there is no version management. I have tried putting the field back on the ODS and recreating the routine, but the system generates a new key for the routine so it looks as though I have lost the link completely.
Any suggestions? Is there a way of deleting an object type R3TR ROUT consistently without doing it through the Update rules change screen?
Regards
HayleyHi,
Let me give the solution, we are also having the same issues..
thanks in advance
sree -
Data is coming from one cube to another cube.
How to restrict the data in update rule by using routine , which is not require in to another Cube.
Thanks,
AsitHi Asit,
You are on which system BW 3.5 or BW 7.0?
If you are on BW 7.0, there are various way of doing this.
1> Using DTP: If you have definite filter criteria while loading data from Infocube 1 and Infocube 2, you can use it in DTP.
for eg. while doing data loads, exclude records where material group is blank. While creating DTP, you can specify required filter criteria.
2> using start routine: You can use start routine as well to exclude all those records which you don't want to load to target infocube.
For eg. Delete all records from source package where case ids are blank.
use below statement to code it:
Delete source_package where <fieldname> = <some values>.
Regards,
Nilima -
Update Rule Routine: Compare system date
Can anyone help me with regards to writing some ABAP code in update rule?
I would like to check if the value of a date characteristics is equal to system date in data source. If its value is equal to system date, assign '0' value to another numeric characteristics. Otherwise, it will get the difference between system date and the date characteristics. I have rewritten the routine as follows. But there is no effects on the result. Am I correct?
if COMM_STRUCTURE-<date characteristics> = SYST-DATUM.
RESULT = '0'.
else.
RESULT = COMM_STRUCTURE-<numeric characteristics>.
endif.
Many thanks in advance.I have rewritten the code as follows. ZLASTPURD is a numeric characteristics. The code is written in the routine of ZLASTPURD in update rule. But it takes no effect. The case "COMM_STRUCTURE-/BIC/ZLASTPURD ='0'" means another date characteristics is equal to system date, the value of ZLASTPURD is blank after modifying the code. However, the code is workable for "RESULT = COMM_STRUCTURE-/BIC/ZLASTPURD.". Is there anything wrong?
data lastpurdays type I.
lastpurdays = '1'.
if COMM_STRUCTURE-/BIC/ZLASTPURD = '0'.
RESULT = lastpurdays.
else.
RESULT = COMM_STRUCTURE-/BIC/ZLASTPURD.
endif.
Many thanks in advance. -
Update rule - Routine Char -ABAP issue
Dear Experts,
Infocube u2013 Update rule u2013Chars-
MM_BEMOT(Indicator) IS a FIELD which I am introducing in the update rule.
I don't get any value from Data_package.
MM_BEMOT_ITAB has 2 entries.(50,06). It is not updating 2 entries u2013
It is updating the same entry 2 times 50.
Infocube - I have to update like
Order,Indicator,Type,Cost element,amount
45167 06 01 12345 10.00
45167 50 01 12345 10.00
Startroutine - I am reading the data from DSO and moving those data into
MM_BEMOT_ITAB . MM_BEMOT_ITAB has 2 entries now. I have to update 50,06 values into
MM_BEMOT.
READ TABLE MM_BEMOT_ITAB
WITH KEY ORDER = COMM_STRUCTURE-ORDER
COSTELMNT = COMM_STRUCTURE-COSTELMNT.
result value of the routine
LOOP AT MM_BEMOT_ITAB.
IF SY-SUBRC = 0.
RESULT = MM_BEMOT_ITAB-MM_BEMOT.
endif.
ENDLOOP.
Advance thx
ENDIF.You may have to put the following line in your update rule after changing the result.
RETURNCODE = 0.
Regards.
Sanjay
Message was edited by:
Sanjay Sinha -
Hello All,
I have an Update Rule between ODS and InfoSource. I have the following routine for 0CALQUARTER. I cannot figure out why it is not being populated in the ODS. I see that 0FISCPER is being populated in the ODS. What am I missing. I am attaching the code below.
Thanks.
Regards,
bw_newbie
Routine:
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: v_qtr(1).
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CSZFI_SL_A129_TT
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZFI_O12900-CALQUARTER
RETURNCODE LIKE SY-SUBRC "Do not use!
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-FISCPER+4(3) = '000' OR
COMM_STRUCTURE-FISCPER+4(3) = '001' OR
COMM_STRUCTURE-FISCPER+4(3) = '002' OR
COMM_STRUCTURE-FISCPER+4(3) = '003'.
v_qtr = 1.
ELSEIF COMM_STRUCTURE-FISCPER+4(3) = '004' OR
COMM_STRUCTURE-FISCPER+4(3) = '005' OR
COMM_STRUCTURE-FISCPER+4(3) = '006'.
v_qtr = 2.
ELSEIF COMM_STRUCTURE-FISCPER+4(3) = '007' OR
COMM_STRUCTURE-FISCPER+4(3) = '008' OR
COMM_STRUCTURE-FISCPER+4(3) = '009'.
v_qtr = 3.
ELSEIF COMM_STRUCTURE-FISCPER+4(3) = '010' OR
COMM_STRUCTURE-FISCPER+4(3) = '011' OR
COMM_STRUCTURE-FISCPER+4(3) = '012' OR
COMM_STRUCTURE-FISCPER+4(3) = '013' OR
COMM_STRUCTURE-FISCPER+4(3) = '014' OR
COMM_STRUCTURE-FISCPER+4(3) = '015' OR
COMM_STRUCTURE-FISCPER+4(3) = '016'.
v_qtr = 4.
ENDIF.
CONCATENATE COMM_STRUCTURE-FISCPER(4) v_qtr INTO RESULT.
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.You may have to put the following line in your update rule after changing the result.
RETURNCODE = 0.
Regards.
Sanjay
Message was edited by:
Sanjay Sinha
Maybe you are looking for
-
My apple id does not work on my home computer
my apple id work son my i phone, ipad, and my work laptop but not on the app store or mobile me on my home computer
-
TextArea text not displayed correctly with ImageSnapshot
I am having an issue with the ImageSnapshot.captureImage command capturing the text in a TextArea. Attached are two files illustrating the issue. The "screenshot.jpg" pic shows how the TextArea controls are displayed on the screen. The "created jpg.j
-
Customer consignment stock table-field
HI All, Please let me know which is the correct field of MSKU which gives me CUSTOMER Consignment stock. Thanks, Saravanan
-
ORA-01017: invalid username/password; logon denied While R12 upgrade
We are in the middle of applying the patch u6678700 - to upgrade applications 115102 to R12 . We face the following errors : There are now 48839 jobs remaining (current phase=A197): 60 running, 9011 ready to run and 39768 waiting. Assigned: file 2399
-
Select statement without using Rownum or Rowid
Hi, I have a requirement where I have delete the first 100 records from table without using the rownum or rowid. Thanks to all for your time Narain