Update routines
hi,
i need to convert few units to different form.can anybody help me with creating a routine. for example i need to convert 'tm' to 'tn'.points will be fully rewarded for this.
thanx,
Ravi.
PROGRAM 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 : CHAR - 000050
ZXRECTYPE(000050) TYPE C,
InfoObject ZXDELIVTY: CHAR - 000050
/BIC/ZXDELIVTY(000050) TYPE C,
InfoObject ZXORDTYPE: CHAR - 000050
/BIC/ZXORDTYPE(000050) TYPE C,
InfoObject : CHAR - 000010
ZXSALEDAT(000010) TYPE C,
InfoObject 0FISCPER3: NUMC - 000003
FISCPER3(000003) TYPE N,
InfoObject 0FISCYEAR: NUMC - 000004
FISCYEAR(000004) TYPE N,
InfoObject ZXPARCODE: CHAR - 000032
/BIC/ZXPARCODE(000032) TYPE C,
InfoObject : CHAR - 000050
PARENT_DESC(000050) TYPE C,
InfoObject ZXSHIPTOC: CHAR - 000010
/BIC/ZXSHIPTOC(000010) TYPE C,
InfoObject 0NAME: CHAR - 000050
SHIP_NAME(000050) TYPE C,
InfoObject ZXLNGCODE: CHAR - 000050
SHIP_ZXLNGCODE(000050) TYPE C,
InfoObject 0INDUSTRY: CHAR - 000004
SHIP_0INDUSTRY(000004) TYPE C,
InfoObject ZXMARSEGC: CHAR - 000050
SHIP_ZXMARSEGC(000050) TYPE C,
InfoObject ZXACCMNGR: CHAR - 000050
SHIP_ZXACCMNGR(000050) TYPE C,
InfoObject ZXSOLDTOC: CHAR - 000010
/BIC/ZXSOLDTOC(000010) TYPE C,
InfoObject : CHAR - 000050
SOLD_NAME(000050) TYPE C,
InfoObject : CHAR - 000050
SOLD_ZXLNGCODE(000050) TYPE C,
InfoObject : CHAR - 000004
SOLD_0INDUSTRY(000004) TYPE C,
InfoObject : CHAR - 000050
SOLD_ZXMARSEGC(000050) TYPE C,
InfoObject : CHAR - 000050
SOLD_ZXACCMNGR(000050) TYPE C,
InfoObject ZXSTATCOD: CHAR - 000010
/BIC/ZXSTATCOD(000010) TYPE C,
InfoObject : CHAR - 000050
STAT_NAME(000050) TYPE C,
InfoObject : CHAR - 000050
STAT_ZXLNGCODE(000050) TYPE C,
InfoObject : CHAR - 000004
STAT_0INDUSTRY(000004) TYPE C,
InfoObject : CHAR - 000050
STAT_ZXMARSEGC(000050) TYPE C,
InfoObject : CHAR - 000050
STAT_ZXACCMNGR(000050) TYPE C,
InfoObject ZXCONSCOD: CHAR - 000010
/BIC/ZXCONSCOD(000010) TYPE C,
InfoObject : CHAR - 000050
CONS_TO_NAME(000050) TYPE C,
InfoObject : CHAR - 000050
CONS_ZXLNGCODE(000050) TYPE C,
InfoObject : CHAR - 000004
CONS_0INDUSTRY(000004) TYPE C,
InfoObject : CHAR - 000050
CONS_ZXMARSEGC(000050) TYPE C,
InfoObject : CHAR - 000050
CONS_ZXACCMNGR(000050) TYPE C,
InfoObject ZXLOCCODE: CHAR - 000018
/BIC/ZXLOCCODE(000018) TYPE C,
InfoObject ZXDESCODE: CHAR - 000018
/BIC/ZXDESCODE(000018) TYPE C,
InfoObject 0MATERIAL: CHAR - 000018
MATERIAL(000018) TYPE C,
InfoObject : CHAR - 000050
PROD_DESC(000050) TYPE C,
InfoObject ZXPRDGRP: CHAR - 000004
/BIC/ZXPRDGRP(000004) TYPE C,
InfoObject : CHAR - 000021
ZXSALES(000021) TYPE C,
InfoObject : CHAR - 000021
ZXSALESPR(000021) TYPE C,
InfoObject : CHAR - 000021
ZXSALESQT(000021) TYPE C,
InfoObject : CHAR - 000021
ZXSALESUN(000021) TYPE C,
InfoObject : CHAR - 000003
SALES_UNIT(000003) TYPE C,
InfoObject : CHAR - 000021
ZXSALESCO(000021) TYPE C,
InfoObject : CHAR - 000021
ZXSALESCH(000021) TYPE C,
InfoObject : CHAR - 000021
DOC_ITEMS(000021) TYPE C,
InfoObject ZXEXTDATE: CHAR - 000010
ZXEXTDATE(000010) TYPE C,
InfoObject 0VERSION: CHAR - 000003
VERSION(000003) TYPE C,
InfoObject 0RECORDMODE: CHAR - 000001
RECORDMODE(000001) TYPE C,
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_SALES_UNIT
Compute value of InfoObject 0SALES_UNIT
in communication structure /BIC/CSZSD_SALES_001
Technical properties:
field name = SALES_UNIT
data element = /BI0/OISALES_UNIT
data type = UNIT
length = 000003
decimals = 000000
ABAP type = C
ABAP length = 000003
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_SALES_UNIT
USING RECORD_NO LIKE SY-TABIX
TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
G_S_MINFO TYPE RSSM_S_MINFO
CHANGING RESULT TYPE /BI0/OISALES_UNIT
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.
Routine : ZEX_SALES_UNIT
Date Written : July 2005 *
Author : Shekar reddy *
Restrictions : None *
Description : UNIT
ASSOCIATED :Info Object - 0SALES_UNIT
MODIFICATIONS *
TrnsptReq Date Whom Description *
xxxx 15.08.2005 Reddys Initial Program *
SHIFT TRAN_STRUCTURE-sales_unit LEFT DELETING LEADING space.
RESULT = TRAN_STRUCTURE-sales_unit+0(3).
PEROFORM
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_SALES_UNIT
Inversion of selection criteria for InfoObject 0SALES_UNIT
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_SALES_UNIT
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 = 'SALES_UNIT'.
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.
Hi,
Use the function module UNIT_CONVERSION_SIMPLE.
call function 'UNIT_CONVERSION_SIMPLE'
exporting
input = <- Unit field value
round_sign = ''
unit_in = 'TM'
unit_out = 'TN'
importing
output = <- Converted output
exceptions
conversion_not_found = 01
division_by_zero = 02
input_invalid = 03
overflow = 04
output_invalid = 05
units_missing = 06
unit_in_not_found = 07
unit_out_not_found = 08.
Cheers
Vinod
Message was edited by: Vinod C
Similar Messages
-
Urgent help required to write the code in update routine
Hi all,
i want to calculate open purchase order qty in update routine
formula is
open purchase order qty = scl qty - rec qty
where schd line date is less then or equal to 90 days from the current date.
I have written one code : but its giving error that comm_structure is not defined in abap dictionary,can any body help to write appropriate routine. this calculation i am making for MM, and data source and cube are 2lis_02_scl and cube is zc_pur01 ( made by coping the 0pur_c01), data source scl has all fields required in the foumula...here is my code
DATA: COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL.
DATA: SCL_QTY LIKE COMM_STRUCTURE-/BIC/ZK_SCLQTY.
DATA: GR_QTY LIKE COMM_STRUCTURE -/BIC/ZK_GRQTY.
DATA: SCL_DATE.
SCL_DATE = SY-DATUM + 90.
SELECT COMM_STRUCTURE -/BIC/ ZK_SCLQTY COMM_STRUCTURE -/BIC/ ZK_GRQTY FROM
/BIC/CS2LIS_02_SCL INTO SCL_QTY GR_QTY
WHERE
COMM_STRUCTURE -/0SCHED_DATE LE SCL_DATE.
IF SYSUBRC = 0
RESULT = SCL_QTY - GR_QTY.
ELSE = NOVALUE.
ENDIF.
Can any body help me soon its very urgent.
thanksHi Anupam,
I am not a very good ABAP Programmer, but found some things to notify u inyour code..
DATA: COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL,
SCL_QTY LIKE COMM_STRUCTURE-/BIC/ZK_SCLQTY,
GR_QTY LIKE COMM_STRUCTURE -/BIC/ZK_GRQTY.
DATA SCL_DATE LIKE SY-DATUM.
SCL_DATE = SY-DATUM + 90.
SELECT COMM_STRUCTURE -/BIC/ ZK_SCLQTY COMM_STRUCTURE -/BIC/ ZK_GRQTY FROM
/BIC/CS2LIS_02_SCL INTO SCL_QTY GR_QTY
WHERE
COMM_STRUCTURE -/0SCHED_DATE LE SCL_DATE.
IF SYSUBRC = 0
RESULT = SCL_QTY - GR_QTY.
ELSE.
What should be the return value if you dont have to calculate the result."
ENDIF.
try it.. and see..
regards,
kishore. -
Update Routine & Start Routine in BI 7.0
Hi Experts,
We have recently upgraded from BI 7.0 , I am confused about where to write start routine & update routine in transformations of BI 7.0?
Please mention any pointers?
Thanks.
Sharat.Hi
When you open the start routine you will see a routines info which gives you help on this.
A summary would be:
Update routine in transformation.
RESULT = source_field-material.
Basically you can acess the value of the record by using source_field.
Start routine.
The data comes in the form of an internal table with name SOURCE_PACKAGE.
You can access the values by looping into a work area.
LOOP AT SOURCE_PACKAGE assigning <source_fields>.
ENDLOOP.
End routine(This is a new feature in BI 7.0 where you can modify data when transformations are complete and before data is updated to info-providers)
The data comes in the form of an internal table with name RESULT_PACKAGE.
You can access the values by looping into a work area.
LOOP AT RESULT_PACKAGE assigning <result_fields>.
ENDLOOP.
Hope this helps you to understand the basics of the abap used in the transformations .
Regards
Samarpita -
Update Routine to populate 0VENDOR from either of the 2 data source fields
Hi,
I have a requirement to write an update routine for 0VENDOR based on the below logic :
Create routines to populated BW Info Object u201CVendoru201D (0VENDOR) based on the following logic:
IF field u201CVendoru201D (ITM_VENDOR_ID) is populated from data source 0BBP_SC_TD_1, THEN populate 0VENDOR with that value
ELSE IF u201CPreferred Vendoru201D (ITM_PROPVEN_ID) is populated from data source 0BBP_SC_TD_1, THEN populate 0VENDOR with that value
ELSE IF neither u201CVendoru201D (ITM_VENDOR_ID) or u201CPreferred Vendoru201D (ITM_PROPVEN_ID) are populated from data source 0BBP_SC_TD_1, then 0VENDOR = NULL
Can anyone help me in converting this logic into ABAP routine.
Thanks,
SuchitraHi Suchitra,
In the Transfer Rules ... You will be mapping each field then the mapping field click on the button with Triangle then you can see the which type you want.
Then select the routine and select the datasource fields (don't forget to select the both fields VENDOR and PROPITM)...
Then give a name to routine ...
and in the code just change the COMM_STRUCTURE to TRANSFER_STRUCTURE.
Then you can get this .... done..
Regards,
Ravi Kanth -
Update routine to populate value for field ZDOCCATG(Document category)
Hi Experts,
I need to populate data for field ZDOCCATG(Document Category) based on the value of the below two fields,
1. 0deb_cre_lc(Debit / credit Amount)
2. 0ac_doc_typ(Belegart)
The logic is as follows:
if 0deb_cre_lc > '0'.
if 0ac_doc_typ == 'dz'.
ZDOCCATG = Disputes.
else
ZDOCCATG = Invoices.
end If.
else
if 0ac_doc_typ < '0'.
ZDOCCATG = Credits.
end if.
I need to write the update routine to get the values assigned for Document category based on these two fields. When i open the routine for the field ZDOCCATG, i can see the below screen:
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_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
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
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.
Please let me know the code to be inserted (based on the logic mentioned above) in the above screen . Thanks
Regards,
Kavitha JagannathHi Kavitha,
Supposing the technical name of fields is /bic/0deb_cre_lc and /bic/0ac_doc_typ use the code below at the marked position.
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_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
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
<----- Paste the code below as shown here --->
if comm_structure-/bic/0deb_cre_lc > 0.
if comm_structure-/bic/0ac_doc_typ == 'DZ'.
result = 'DISPUTES'.
else
result = 'INVOICES'.
endIf.
elseif comm_structure-/bic/0deb_cre_lc < 0.
result = 'CREDITS'.
end if.
<----
>
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.
Regards:
Jitendra
Edited by: Jitendra Gupta on Oct 15, 2009 3:05 PM -
New field to be filled by update routine
Deltas are running, and added a new char to the cube and written update routine to fill the new char. How should i fill this new value for history. I don't want to reshedule the job from r/3. Will i be able to do from reconstruction (i doubt since our PSA Data is deleted every week). there is no ods between. What are options available.
KunalHi Kunal,
If data is available in BW then you can write some coding(routine) to fill the data for history data you have to loop back(CUBE to CUBE) to CUBE.
Have a look:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f421c86c-0801-0010-e88c-a07ccdc69601
Provide some more details. Which character, is available as attribute of any object...etc..
Hope it Helps
Srini -
Update routine - Performance Tuning
Hi,
To increase the performance, I have deleted some records in the data_package but these changes are not reflecting in the ALV output. We are getting old data only.
If we toutch the standard ALV program it is a problem for other update routinies. Please tell me the solution.
Thanks,
Suresh KashimallaPlease be more specific, and elaborate on your issue. What are you referring to with ALV (ABAP List Viewer?). In which respect? Are you on SAP NetWeaver 2004s?
Cheers
SAP NetWeaver BI Organisation -
Update routine for 0proc_unit conversion
Hi all,
My infoobject 0OPR_ACTWRK uses 0PROC_UNIT for units. It holds data in days and in hours. When I load it to a cube, I want to convert all values to working hours.
I figured out that I have to use an update routine in my update rules. A lot of forum threads about unit conversion mention the function module UNIT_CONVERSION_SIMPLE. Can I use this function for my problem? Or should I use a different function module?
This will be my first ABAP code, so can anyone help me and tell me what I have to fill in exactle in the routine format below?
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
RESULT = .
result value of the unit
UNIT = .
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 -
Thanks in advance!
Regards, PieterDear Pieter,
I am not infront of the system..
the following surely will give error.. :).. so post back here.. so that me or someone else will reply you..
So let us start witht he following coding in the 'Start routine'.
LOOP AT DATA_PACKAGE.
IF DATA_PACKAGE-UNIT= 'DAY'.
DATA_PACKAGE-opr_pldwrk = DATA_PACKAGE-opr_pldwrk * 8.
ELSE.
Do nothing.
ENDIF.
MODIFY DATA_PACKAGE.
ENDLOOP.
Regards,
Hari
Message was edited by: Hari Kiran Y
Message was edited by: Hari Kiran Y -
Hi,
I am updating data between two ODS objects using some update routines. I would like to write the following routine (in pseudo code):
++++++++++++++++++++++++++++++++++++++++++++++++++++
Check if the characteristic i am updating is not null
IF COMM_STRUCTURE-field1 = 'value1' AND
COMM_STRUCTURE-field2 = 'value2'.
RESULT COMM_STRUCTURE-field3.
ELSE.
Don't update anything
END IF
+++++++++++++++++++++++++++++++++++++++++++++++++++
My questions:
1. How i tell the routine not to update anything (as specified in the pseudo code)?
2. How i can check that the characteristic i woul like to update is not null?
3. What is the preferred debug method in case i do not use the PSA?
BR,
XibiThanks Siggi for your prompt and helpful answer. There are however some fundamental things which are not fully clear to me (BTW, where i can find some good documentation on ABAP for BW??):
> Hi,
>
> 1. How i tell the routine not to update anything (as
> specified in the pseudo code)?
>
> set the returncode to a value <> 0.
I wrote the following:
returncode = 1.
Consequently the updated failed. Maybe i am doing something wrong but my intention is not to have the whole thing fail, but rather skip the update for some records.
> 2. How i can check that the characteristic i woul
> like to update is not null?
>
> if not comm_structure-<fieldname> is initial.
The problem is that the characteristic i am trying to update is not contained in the source ODS but only in the target one. Will "if not comm_structure-<fieldname> is initial" still work in this case?
>
> 3. What is the preferred debug method in case i do
> not use the PSA?
>
> Without psa, you need to add a endless loop:
> statics: st_flag type c value '0'.
>
> while st_flag = '0'.
> break-point.
> endwhile.
>
>
> Hope this helps!
>
> regards
>
> Siggi -
Hello Experts,
For loading ODS2 we are making a lookup on ODS1 for 0material based on
purchaing document number, item line item.
Is there any mistake in the start routine or update routine.
Because the load goes in infinite loop. I think update routine should be changed.
Any suggestions are appreciated
Start routine:
data: begin of itab occurs 0,
pur_doc like /BIC/AZODS100-OI_EBELN,
item like /BIC/AZODS100-OI_EBELP,
material like /BIC/AZODS100-material,
end of itab.
clear itab.
select OI_EBELN OI_EBELP MAT_PLANT from /BIC/AZODS100
into table itab.
Update routine for 0material
loop at itab where pur_doc = COMM_STRUCTURE-OI_EBELN
and item = COMM_STRUCTURE-OI_EBELP.
RESULT = itab-matplant.
endloop.Hi,
this takes a long time, because with each record of your data packaged it is doing the loop and scanning each row of the internal table. Use the following instead.
Start routine:
types: begin of t_itab,
pur_doc like /BIC/AZODS100-OI_EBELN,
item like /BIC/AZODS100-OI_EBELP,
material like /BIC/AZODS100-material,
end of t_itab.
data: itab type hashed table of t_itab with unique key pur_doc item.
select OI_EBELN OI_EBELP MAT_PLANT from /BIC/AZODS100
into table itab order by oi_ebeln oi_ebelp mat_plant.
I hope these fields are the key of the ods object.
Update routine for 0material
data: wa_itab type t_itab.
read table itab into wa_itab with table key pur_doc = COMM_STRUCTURE-OI_EBELN
item = COMM_STRUCTURE-OI_EBELP.
if sy-subrc = 0.
RESULT = wa_itab-matplant.
else.
clear result.
endif.
Hope this helps
regards
Siggi -
Hi,
I am trying to write an update routine to calculate and populate fields in my ODS infoprovider.
one of the key figure field in my update rules is 'No. of Days'. Based on the 'No. of Days' range, I want to send a key figure(Infoobject:Due amount) value to another infoobject(Bucket1, Bucket2, Bucket3 ect.)in my ODS infoprovider. For example, let's say,
IF NO. OF DAYS = >0 AND <=30
THEN TAKE THE DUE AMOUNT PUT IN BUCKET1
ENDIF.
ELSE IF
NO. OF DAYS = >31 AND <=60
THEN TAKE THE DUE AMOUNT PUT IN BUCKET2
ENDIF.
ELSE IF
NO. OF DAYS = >61 AND <=90
THEN TAKE THE DUE AMOUNT PUT IN BUCKET3
ENDIF.
I think, I know the data flow logic but I don't know how to code in ABAP language. If someone can give me some psuedo like ABAP code, I would appreciate your help with points.Hi Roa,
I would do this in the start routine of the update rule.
Here is a sample on how do this. You could use a case statement for this code also.
Loop at Data_Packet.
IF NO. OF DAYS = >0 AND <=30
Data_Packet-BUCKET1 = DUE AMOUNT
ELSEIF
NO. OF DAYS = >31 AND <=60
Data_Packet-BUCKET2 = DUE AMOUNT
ENDIF.
ELSEIF
NO. OF DAYS = >61 AND <=90
Data_Packet-BUCKET3 = DUE AMOUNT
ENDIF.
modify data_packet.
endlloop.
Cheers! Bill -
Which is better transfer routine or update routine???
HI ALL,
I have read some documents, but I didnt get the real concept.
Can any one explain in detail as to how do we decide where to write the code i.e a start routine or transfer routine or update routine...and which one is better for a given scenario..
with example?My scenario is like this:
master data InfoObject for e.g. Z_MATERIAL1 with 10 fields as attributes. It has two Source Systems feeding it; SAP and a flat file from a system called Product Catalog (PCAT).
The PCAT data is generally more reliable, hence, if a material XYZ comes from PCAT then PCAT is the owner of the material. SAP should not be able to update five critical fields of that material if PCAT owns the material.
For e.g. the below values comes from PCAT and Master data is updated.
PCAT
Material Group Type Price Curr Unit Prod Desc. Lang Class
XYZ ABC BRU 10.00 USD PC Inh To EN 001
When the data comes from SAP R/3, it should not update anything other than the last 4 fields.
SAP
Material Group Type Price Curr Unit Prod Desc. Lang Class
XYZ ABC BRU 20.00 USD BOX In The DE 003
Finally the data in the Master Data Object should be as below.
Material Group Type Price Curr Unit Prod Desc. Lang Class
XYZ ABC BRU 10.00 USD PC In The DE 003
where do i write the code...i have written this in start routine of transfer rules...i want to know the performance issues... -
Dear All,
Facing the following error while writing an update routine.Please provide the solution
*E:The type of the database table and work area (or internal table)*
*"WA_/BIC/AO_FIMTD00" are not Unicode convertible. convertible.*
Routine:
data : wa_/BIC/AO_FIMTD00 type /BIC/AO_FIMTD00.
data : prev(6) type N.
Prev = COMM_STRUCTURE-fiscper - 1.
select single * from /BIC/AO_APOORD00 into wa_/BIC/AO_FIMTD00
where COMP_CODE = COMM_STRUCTURE-COMP_CODE
and PROFIT_CTR = COMM_STRUCTURE-PROFIT_CTR
and SEGMENT = COMM_STRUCTURE-SEGMENT
and SEM_POSIT = COMM_STRUCTURE-SEM_POSIT
and VTYPE = COMM_STRUCTURE-VTYPE
and FISCPER = prev.
if sy-subrc = 0.
RESULT = COMM_STRUCTURE-/BIC/K_AMOUNT - wa_/BIC/AO_FIMTD00-/BIC/K_AMOUNT.
endif.
Thanks & RegardsPlease close the thread , Once your problem is solved.
Thanks
Mayank -
Return tables in Update routines
Hi,
Can anyone send me some documents on the use of return tables in Update Routines?
email id: [email protected]
Thanks in advance,
RPHi Ram,
<b>Table as a return</b>
In general, routines in the update rules have only one return code.
If you select this field, the corresponding key figure routine no longer
has a return code (defined in RESULT), rather a return table (defined in
RESULT_TABLE). In this case you can create as many key figure values
from the data record as you wish. You can find the calculated
characteristic values in the structure ICUBE_VALUES.
<b>Activities</b>
If you change these values accordingly, then you fill the field for the
relevant key figure and use this to fill RESULT_TABLE.
Regards
Happy Tony
<b>Points == Thanks</b> -
Infostructure update routine : debug problem
Hi All,
We have created three update routines for three corresponding infostructures. But I am not able to debug this routine. I tried to put a hard breakpoint also, but it was of no use. The Infostructure logs the changes in the sales order.
How can I get the list of objects that are accessible in these routines?
How can I view the values of MCVBAP and MCVBAK(communication structures) that are used in the update routines?
How can I debug such routines?
From where does these structures, MCVBAK and MCVBAP, get value? Are these runtime values? How much time does it take normally take for the infostructure to be updated? or is it updated immediately when the sales Order is saved?
Thanks,
JitenHello,
some hopefully helpful answers:
- the MCVBAK / MCVBAP are structures, that are built from the orderdata in the function MCV_STATISTICS_ORDER. There are two exits EXIT_SAPLMCS1_001 (header Data) and EXIT_SAPLMCS1_002 (position data) where you could fill additional user fields in these structures. Additional fields you could define in the structures MCVBAKUSR or MCVABPUSR.
- the time that it takes to get an infostructure updates depends on it's customizing of updating (transaction OM01). the possibilities are: no update, update in V1-posting, update in V2-posting, update in batch.
- Helpful are folling transactions: MC30 ( shows the update logs, you have to set the parameter MCL = 'X' in your userdate, see OSS - Note 77427) , MCVR (simulation of update).
Regards Wolfgang -
How to identify transfer and update routines are applied to my ods/ cubes?
hi all,
how to identify transfer nor update routines are been applied to my ods/ cube?
regds
hariYou need to go through the update Rule and Transfer Rule mapping and if you see any routine then there is a routine. Only manual process and also that is not too bad to go through them.
thanks.
Wond
Maybe you are looking for
-
How do I connect with chat support for CS5 downloading?
I have tried a no. of times to get support chat for my photoshop cs5. I have a new computer and it doesn't have a dvd for downloading my disc. I did talk with support chat and they recommended that I follow a link to download. https://helpx.adobe.
-
Can not make network user accounts
After upgrading from 10.6.8 Server to 10.8 and installing server tools, I can not make network user accounts. All of my old network user accounts migrated to the new OS and work properly, I just can not seem to make new accounts under 10.8. Under 10
-
Iweb: photos blur? and formatting question
Does anyone know how to prevent photos from blurring when you publish a page to dot mac? On my photo page, (only) 2 of the photos appear blurry. I have tried to re-publish, to no avail. Also - is there any way to include column formatting in text? I
-
Macbook pro won't restart to complete software update 10.7.5
hi guys my macbook pro with retina display wont restart after i try to do software update to 10.7.5 it goes to a grey software update screen but wont do anything. i can use drop down menues but nothing is active and i cant bring up the dock. im new t
-
Is it possible to install ARD on a Windows PC to monitor a Mac?
Before you answer the question please read it carefully. I know that you can monitor Windows with a Mac. I am asking of the opposite.