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,
Jiten
Hello,
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
Similar Messages
-
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 -
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 -
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 -
No RETURNCODE 0 allowed in update routines in transfer mode
Hi,
After Applying a RETURNCODE = 4 to one characteristic in my update routine i get the following message:
No RETURNCODE <> 0 allowed in update routines in transfer mode
Message no. RSAU492
It seems that i doesn't allow me to modify a certain characteristic in my target ODS.
Any suggestions?
BR,
XibiHi,
could it be this problem (as described in an OSS note) ?
"Symptom
Various errors occur when you load reporting point data from CRM with the DataSource 0CRM_UT_POD_ATTR and update the data in BW:
1. Insufficient data is delivered, and all fields are empty except for the external reporting point name (EXT_UI_BW).
2. The restriction according to the external reporting point name (EXT_UI_BW) in the BW scheduler has no effect.
3. The update in BW to the InfoObject 0UCCRMPOD terminates with the error message RSAU-492 (Return code <> 0 is invalid in overwrite MODE in update routines).
Other terms
Sales, commercial and industrial customers, IS-U-CRM integration, IS-U, quotation controlling, quotation planning
Reason and Prerequisites
There is an error in the extractor. In addition, the selection according to EXT_UI_BW cannot be supported in the InfoPackage for technical reasons. The case was not caught when the texts for 0UCCRMPOD were updated because the texts for 0UC_POD (IS-U reporting point) had not yet been loaded from IS-U.
Solution
The error is eliminated in CRM 4.0 Support Package 05 and BI Content Add-On 3.20 Support Package 11 or BI Content Add-on 3.30 Support Package 04 or BI Content Add-On 3.51 Support Package 01.
Correction instructions for the CRM section are attached."
/manfred -
How to put break point in the update routine
I am trying to create a break point in update routine. I can do that in the start routine but I would like to know how I can include a break point in update routine in Q.
ThanksGo to Monitor Screen of the data load -> Details tab -> data processing -> right click on Data Packets -> select simulation -> select update rules and give no.of records you want to debug and then system will display the code where you can debug by giving break points.
Hope it helps.. -
Hi all,
Would be grateful to you if you could guide me about the basics to write and debug update routine/start routine.
Thanks in advance.
ArunHi
Follow the below steps.
1) Write "Break-Point" in your start routine and field routine where you want to trace the code.
2) Activate it and load the data via PSA.
3) After the load is done, goto monitor screen ---> Details tab ---> Processing
4) Right-click and select "Simulate Update"
5) Select the data package and press enter.
6) Press F7 twice. It will take you to the Break-Point stmt in the Start routine.
7) From there you can continue the debugging.
Open the transformation where you have written the start routine and from there, go to the menu option Extras -> Display Generated Program. It will contain the start routine you have written. Place a break point there in the code and come to the DTP Execute tab.
Here you can debug the custom --
Select Processing mode as "Serially in the dialog process (for debugging) and then click on execute button. You will now be able to debug the code you have written.
Debugging data upload in BW
Go through the below link
Tracing data transformation in SAP BW without debugging
Debugging data upload in BW
Hope this helps
regards
gaurav -
Canu2019t u201Ccommentu201D lines in Update Routine although in Change mode
Hi,
There is an update rule between a datasource (2LIS_02_SCL) and ODS1 that I need to modify. When I double click on it, instead of seeing the old update rule that I am used to, showing the list of the fields I get some graphics with the links between fields in one group to the other.
The u201CRule groupu201D is set to u201CStandard Groupu201D.
I double click on the link between the fields of interest and changed u201CRule Typeu201D to u201CRoutineu201D and changed it to the change mode for changes.
I have an INCLUDE program from another project which performs the same tasks that I am trying to implement.
At a location where it states u201Cu2026insert your code here u2026u201D, I am able to bring in the lines from the other routine which does the desired job.
1.
The problem at this moment is that I canu2019t get COMMENT on all the previous codes which were in there. I tried deleting, and that also fails. As a result, I am getting errors.
Any help on this?
2.
Is that the right place to modify the routine?
3.
What is the difference between between between this approach of modifying update routines compare to the old one?
ThanksHi,
thanks so far:
I did exactly what you described. When I got to where to insert my code, I see that the system by default has METHODS, with declaration etc.
I want to ignore all those and simple insert the following. Donu2019t I need to comment on all the existing information that I do not need:
e.g. when I inserted the code below, and performed a u201Cchecku2019, it failed at a line (TYPE RSODSOCHECKONLY READ-ONLY,) which existed originally in the default code which read. I though I should be able to comment those out, but the system is not allowing me:
Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*--my insert begins--
INCLUDE MY_UPDTE_RULE.
$$ end of global - insert your declaration only before this line -
FORM Calc_Data
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BI0/V0PUR_C01T-GR_QTY
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC.
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
IF ( COMM_STRUCTURE-u2026u2026.
perFORM ZZZZZZZ
USING COMM_STRUCTURE-u2026u2026
u2026u2026
u2026u2026
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.
$$ end of routine - insert your code only before this line -
ENDFORM.
*--end of my code--
Thanks -
Look up at master data in update routine
Hi all,
I am loading from flat file in to an infocube. My transaction data comes in the format Subcategory, Area,Date, Sales qty,UOM. But my infocube should be filled with Category,Subcategory,Region,Area,Date,SalesQty,UOM. My business requirements want me to model Category, Subcategory,Region area as characteristics of dimension. ie I cannot model Category as navigational attribute of Subcategory and Region as navigational attribute of Area.
But I can get the master data file for Subcategory in Sucategory, Category format and Area in Area, Region format. So when I load the transaction data I can make a table lookup on these master data table and fill the required fields.
But the problem is I donot have much experince in ABAP routines.
Can any one help me with a sample start/update routine on how to do this.
Any help will be appreciated.
Regards,
AmithAmith,
Actually, you may everything do in a start routine of the URs (including lookup itself).
There is no need to declare internal table in a global part of routine and then read values in routines.
The code may look the following. (Don't have the system on hand. So, some syntax may require some modification.)
TABLES: <Your Master Data Table>.
DATA: wa_temp TYPE DATA_PACKAGE_STRUCTURE OCCURS 0 WITH HEADER LINE,
wa_md TYPE <Your Master Data Table> OCCURS 0 WITH HEADER LINE.
SELECT * FROM <Your Master Data Table> INTO wa_md.
SORT wa_md ASCENDING BY <Basic Char Key>.
LOOP AT DATA_PACKAGE INTO wa_temp.
READ TABLE wa_md WITH KEY <Basic Char Key> = wa_temp-<Basic Char Key>.
wa_temp-<YourLookupIO> = wa_md-<YourLookupAttribute>.
MODIFY DATA_PACKAGE FROM wa_temp.
ENDLOOP.
Best regards,
Eugene -
Software update Digital signiture problem
I just purchased a brand new powermac G5 Quad 2.5ghz. after initial setup software update ran, and after it checked and found updates I recieved this error message:
"The digital signature for this package is incorrect. The package may have been tampered with or corrupted since being signed by “Apple”."
I have never seen this before, and cannot seem to fix it. I have searched these forums and tried deleting all the softwareupdate.plist files and restarting. Does anyone have a solution for this? I have a 15inch powerbook and I've never had an error doing a software update.
Thanks for the help.
-JasonThe mechanism of Software Update forms from the registration procedures upon entering license section and admin authentication received securely to install Mac OS X 10.4 or 10.4.x. Some identifiable information such as computer ID, the unique MAC address, a node information and the registered information are transmitted to an Apple server with the digital signature.
I believe this server differs from the dot mac server with the reception system that includes time zone. Presumably, grabbed your information from the dot mac for the registration results in a logic-assertion failure (perhaps unrecoverable) with the error message-- lost or corrupted the consistency of the client information as well as the packages stored in the directory. Software Update routines may no longer be able to handshake with the server. Because, Software Update server audits localizations used the license, validating some XML document, parsing a distribution script for each scheduled software to be updated.
The fundamental is a rock-solid Mac OS X Tiger multi-layed security architecture.
I cannot say for sure if the following troubleshooting can fix the problem. If you like, try removing the folder and files onto the desktop's temporary folders. Restart the computer to test the recurrence.
/Library/Caches/com.apple.SoftwareUpdate/
/Users/HOME/Library/Caches/com.apple.SoftwareUpdate/
/Users/HOME/Library/Preferences/ByHost/com.apple.SoftwareUpdate.xxxxxxxxxxxx.pl ist
/Library/Preferences/com.apple.SoftwareUpdate.plist
/Users/HOME/Library/Preferences/com.apple.SoftwareUpdate.plist
You may want to test if this BSD command works with Terminal.
softwareupdate -l
or
softwareupdate --list
If suggestions do not work, I would do everything from scratch. Note that some invisible filesystem on the HFS Plus File System can be erased with a zeroing option. -
Diff between Start ,transfer,update routines
hi
Plz tell me what is the difference between Start routine,transfer routine and update routine. Send me some real time examples.I would be very glad.
Regards
AjayHi!
it is simple all of them are small program used in ETL process while loading in to BW.
<b>Start routine:-</b> is used in Transfer rules and update rules, this abap code is executed before starting the load and used in scenarios where we want to perform some operations on all the data example deleting some records before processing records in Update rules or transfer rules.
<b>Update routine:-</b> abap code used in update rules to transform or finding some field. ex:- may be you want to retrieve the field data from some data base tables based on the other data present in the infosource
<b>Transfer Routine:-</b> similar to the update routine but used in transfer rules.
with regards
ashwin
<i>PS n: Assigning point to the helpful answers is the way of saying thanks in SDN. you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i> -
Update Routine - Deaggegation - Net Price
Dear sdn's
For a object '0NETPRICE' , i am using the following update routine.
IF ( COMM_STRUCTURE-processkey = '002' OR COMM_STRUCTURE-processkey = '012' OR
COMM_STRUCTURE-processkey = '022')
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
Here GR Qty (31,969), GR Val (286,122.55) loading correctly. Net price getting aggreagted. In the folowing example i should get only 7.56 instead of 30.24. Inversion also problem, it will through only "0'.
Netprice GR Qty GR Val Document Number
7.56 50,819- 454,830.05- 4500008362
7.56 66,886 598,629.70 4500008362
7.56 66,886- 598,629.70- 4500008362
7.56 82,788 740,952.60 4500008362
30.24 31,969 286,122.55
Can anybody suugest me the logic in routine ...?
Regards
Raju SaravananHi,
( COMM_STRUCTURE-PROCESSKEY = '002' or
COMM_STRUCTURE-PROCESSKEY = '012' or
COMM_STRUCTURE-PROCESSKEY = '022' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-CPQUAOU <> 0.
perFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-CPQUAOU
COMM_STRUCTURE-po_UNIT
COMM_STRUCTURE-base_uom
COMM_STRUCTURE-numerator
COMM_STRUCTURE-denomintr
CHANGING RESULT.
if COMM_STRUCTURE-/BIC/ZPEINH ne 0.
RESULT = RESULT * COMM_STRUCTURE-/BIC/ZSTPRS1.
RESULT = RESULT / COMM_STRUCTURE-/BIC/ZPEINH.
else.
RESULT = 0.
Endif.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
else.
RETURNCODE = 4.
endif.
result value of the routine
RESULT = .
result value of the unit
UNIT = COMM_STRUCTURE-CURRENCY.
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.
the above code using.....please suggest -
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
Maybe you are looking for
-
Hello oold computer no longer available. I have 1200+ songs on iPhone that need transferring to my iTunes library. Can anyone show me how to do this please? Thank you!
-
Leopard Mail and Filemaker pro - "Send Mail" is s-l-o-w
When I upgraded to Leopard, I began having a problem with the "Send Mail" function in Filemaker Pro, even after I upgraded to the latest version. Previously, sending mail with an attachment to 300 BCC addresses went very quickly - about 10 seconds. S
-
Update of Business Partner Master Data
Greetings. I am wondering is there any way you can configure the standard system so that the analyst responsible for the business partner will receive a notfication when the business partner master data is updated in SD. Currently its linked to the c
-
Lightroom 5 error message upon import, won't work with symlinks, can't fix!
Mac MPR with SSD, I have always had my /pictures and /documents folders symlinked with Dropbox.. I just installed Lightroom 5, and when I click "Import", it says, "AgPathUtils.getStandardFilePath: can't create directory at:" /User/Pictures.. Please,
-
HT2500 managing e-mail? why does my email open the next one when I delete one?
I am lost on why my e-mail keeps poping open the next one when I delete one? I would like to clean out e-mails that I know are junk without having to open them. thanks for your help.