Debug Start routine in BW 3.5
Hi,
I have start routine at Update rules and I have observed that some of the quantity and amount key figures are not calculating properly. It is complex start routine. Can you please let me know the steps to debug the start routine for every record? Example what are the values it is picking up and how the values are getting calculated.
Please let me know the steps.
Thanks,
Ganga
Hi,
Just simulate it. Load the data through the PSA, then go into the monitor and select your request. Choose the "Details" tab. Open up the Transfer section and right-click on a data package and choose Simulate Update. In the pop-up, click on Activate Debugging in Update Rules and then Perform Simulation.
You can then step through the code.
Brian
Similar Messages
-
How do you Debug start routine?
Hi gurus
How do you Debug start routine?
Thanks in advance
RajBy inserting a BREAK statement in the routine you won't be able to debugg as the upload process is done in background.
Instead you should insert a code like this:
data flag.
while flag ne 'X'. endwhile.
Then launch the process and go to transaction SM50 select the process and execute Program/Mode -> Program -> Debugging -
Debugging: start routine in transfer rules
Hi !
can you please tell me how to debug start routines and field routines in transfer rules?
If possible please tell me too debugging of update rules.Hi Rajib,
Go to the monitor -> Details tab -> Processing -> Choose the datapackage you want to debug -> Right click -> Simulate update -> Choose eather activate debugging in transfer rules (to debug in transfer rules) or debugging in update rules(for start routine and update rules).
You can mention the number records you want to debug also, if you have an idea of which records you want to debug you can give the number of that record.
Once the debug screen comes up, press F8...the control stops at first break point...from there you can do a step by step debugging (F5).
Hope this helps...
Regards,
Kalyan -
can someone give me steps to debug start routine.
Thanks,
RadhaHi,
Please go through this link
/thread/157701 [original link is broken]
Thanks,
JACK -
How to debug start routines of update rules from ODS to InfoCube
Dear gurus,
I have an update rule from ODS to InfoCube. I wrote a start routine in the update rule. Now I want to debug it. I went to monitor and simulate update the data package and only got the prompt "No data exists in the corresponding PSA table". So how can I debug this start routine?
Thanks in advance.
Jin MingJin,
In order to use PSA between ODS and InfoCube, you may have to use an exclusive InfoPackage and load separately. In that InfoPackage, choose the radio button to use a PSA.
I think you are currently updating the InfoCube directly without using a separate InfoPackage.
Look for an InfoSource under DataMarts (search for 8<ODS Technical name>) and create your InfoPackage there.
Good luck. -
How to debug start routine for the custom code?
Hi Experts,
Can anybody tell me how to debug the start routine? Also could you please guide me where to write the custom code in the start routine.
Thanks in advance.
Sharat.Rajkumar,
Thank you for your help. but the blog link that you send it to me does not mention anything about ABAP debugger screen.
What should I do once I get in to the ABAP debugger? the link only tells how to get to the ABAP debugger that I know.
Also it say that I have to use the infinite loop to debugg the start routine.
Can anybody tell me how to debugg start routine with the scren shots please. I don't know how to use infinite loop in the start routine. Is their any easy process step by step to see my particular record behavior in the start routine?
I will assing you the points. again thank you. -
Hi,
I have written some update routines and also transfer routines.
I want to check how it works.So is there any way to debug these routines?
If so please explain.
Points will be definitely assigned.it is answered a lot of times in forum.. do a search before posting a new thread
<a href="/people/pavan.bayyapu/blog/2006/09/06/debugging-data-upload-in-bw:///people/pavan.bayyapu/blog/2006/09/06/debugging-data-upload-in-bw
<a href="Debugging Routine in Update Rule://Debugging Routine in Update Rule
how to debug a start routine?
[url=How to debug start routine?]How to debug start routine?[/url] -
Process for Debugging BW Start Routines
I need a detailed process for how to debug the ABAP code of a start routine, particuarly when one ODS is being loaded into another. I know that there is a way to do this with the ABAP debugger but cannot figure it out.
Are there any documents out there that can assist me? I did a search, but all of the examples were too specific to be useful for just general debugging.
Thanks!Hi,
It is not possible to debug in start routine through conventional way upto 3.5 version.
You need to put an endless loop in the start routine.
The program will keep running in the endless loop.
It can achieved by the following code.
data: true,
false.
true = 'X'.
do.
if true = false.
exit.
endif.
enddo.
And in transaction SM50, the endless loop program will visible.
select the program by clicking the check box on the left hand side,
then on the menu,
Program/Mode -> Program -> Debugging.
I hope this helps.
Thanks. -
How to debug the routines in the transformations as well as start,endroutin
Hi all,
Can anyone explain me how to debug the routines in the DTP, as well as the how to debug the start and end routines>?
I am new to bi 7 ?
thanks
PoojaHi,
In Execute tab change the processing Modes to 'serially in the dialog process for debugging' . then you can see the option 'simulate'.
http://help.sap.com/saphelp_nw70/helpdata/en/45/8594ebd17f1956e10000000a11466f/content.htm
Step by step doc,
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0038ad7-a0c7-2c10-cdbc-dd674682c8e7?quicklink=index&overridelayout=true -
Not able to debug the start routine
Dear All,
I am facing a weired situation.
I have a transformation(DSO -> Cube) with start routine. I am able to debug the routine in Development System.
I transported the routine to Production System successfuly, but i am not able to debug the start routine there. I have all the necessary authorisations(SAP_ALL, SAP_NEW)
I am perplexed. Never seen such issue before.
Can someone help me here?
Regards,
Avinash.
Edited by: Avinash Kumar on Nov 5, 2008 11:16 AMDear Jerry,
Thanks for writing.
I followed the instruction, but it didn't work.
Can there be any technical reason for data package to be empty, even if the source has data(Note: There is no filter in DTP)?
Also, i just checked with other start routines...I am not able to debugg there also. System is not entering the debug mode.
Here, the patch level is: 0010. Can this be the villain?
Please advise.
Regards,
Avinash.
Edited by: Avinash Kumar on Nov 6, 2008 4:26 AM
Edited by: Avinash Kumar on Nov 6, 2008 4:51 AM -
Start Routine not working correctly.
Hi gurus,
I'm having a problem with a start routine in an update rule to one of my cubes. I debug it and it seems to work fine. However, it ends the simulation saying in the error message "No active update rules exist for this infosource." However, I think it's something to do with the logic I have in my start routine. Below is the start routine which I am trying to debug. I'm doing a lookup on an ODS and if no match is found on that ODS by Sales Order and Sales Order Item, I do another lookup on an object that has the same information that I'm looking to append to the transaction record. Any help would be greatly appreciated. I'm thinking the second loop against the internal table might not be working correctly as it seems to just sit on that table.
Thanks in advance,
John
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: PENDING_QTY LIKE /BIC/AZO_BKLG100-/BIC/ZQTYPEND1,
ABSOLUTE_QTY LIKE /BIC/AZO_BKLG100-/BIC/ZQTYPEND1,
TEN_PERCENT LIKE /BIC/AZO_BKLG100-/BIC/ZQTYPEND1,
TEN_PERCENT_VALUE TYPE P LENGTH 4 DECIMALS 2 VALUE '0.1'.
DATA: ZWEEK LIKE SCAL-WEEK.
$$ 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/CSZO_PMO1_ENHANCED.
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
TABLES : /BIC/AZO_PMI100. "Active PM Invoice ODS
TABLES : /BIC/PZ_CTBWOBJ. "CTBW Order Master
DATA: T_DATA_PAK LIKE DATA_PACKAGE OCCURS 0 WITH HEADER LINE,
T_DATA_PAK1 LIKE DATA_PACKAGE OCCURS 0 WITH HEADER LINE,
IV_INVQTY like /BIC/AZO_PMI100-INV_QTY,
IV_INVVAL like /BIC/AZO_PMI100-NETVAL_INV,
BEGIN OF IT_INVOICES OCCURS 0,
INV_SALES_ORD LIKE /BIC/AZO_PMI100-/BIC/ZSORDDORD,
INV_SALES_ITEM LIKE /BIC/AZO_PMI100-/BIC/ZSORDIORD,
INV_DOC_NUM LIKE /BIC/AZO_PMI100-/BIC/ZBILLDINV,
INV_DOC_ITEM LIKE /BIC/AZO_PMI100-/BIC/ZBILLIINV,
INV_QTY LIKE /BIC/AZO_PMI100-INV_QTY,
NETVAL_INV LIKE /BIC/AZO_PMI100-NETVAL_INV,
ZBRAND LIKE /BIC/AZO_PMI100-/BIC/ZBRAND,
ZBRANDOWN LIKE /BIC/AZO_PMI100-/BIC/ZBRANDOWN,
ZDESGNOWN LIKE /BIC/AZO_PMI100-/BIC/ZDESGNOWN,
ZFLAGBKLG LIKE /BIC/AZO_PMI100-/BIC/ZFLAGBKLG,
ZNOCOLORS LIKE /BIC/AZO_PMI100-/BIC/ZNOCOLORS,
ZNOSPCLRS LIKE /BIC/AZO_PMI100-/BIC/ZNOSPCLRS,
ZOPENFCTY LIKE /BIC/AZO_PMI100-/BIC/ZOPENFCTY,
ZPACKSYST LIKE /BIC/AZO_PMI100-/BIC/ZPACKSYST,
ZPPG LIKE /BIC/AZO_PMI100-/BIC/ZPPG,
ZAPPLICAT LIKE /BIC/AZO_PMI100-/BIC/ZAPPLICAT,
ZPAPERGDE LIKE /BIC/AZO_PMI100-/BIC/ZPAPERGDE,
ZPRINTMTH LIKE /BIC/AZO_PMI100-/BIC/ZPRINTMTH,
ZQUALITY LIKE /BIC/AZO_PMI100-/BIC/ZQUALITY,
ZSHAPE LIKE /BIC/AZO_PMI100-/BIC/ZSHAPE,
ZSIZE LIKE /BIC/AZO_PMI100-/BIC/ZSIZE,
ZVARIANT LIKE /BIC/AZO_PMI100-/BIC/ZVARIANT,
ZVOLUME LIKE /BIC/AZO_PMI100-/BIC/ZVOLUME,
END OF IT_INVOICES,
BEGIN OF IT_CTBW OCCURS 0,
CTBW_SALES_ORD LIKE /BIC/PZ_CTBWOBJ-/BIC/ZSORDDORD,
CTBW_SALES_ITEM LIKE /BIC/PZ_CTBWOBJ-/BIC/ZSORDIORD,
CTBW_BRAND LIKE /BIC/PZ_CTBWOBJ-/BIC/ZBRAND,
CTBW_BRANDOWN LIKE /BIC/PZ_CTBWOBJ-/BIC/ZBRANDOWN,
CTBW_DESGNOWN LIKE /BIC/PZ_CTBWOBJ-/BIC/ZDESGNOWN,
CTBW_NOCOLORS LIKE /BIC/PZ_CTBWOBJ-/BIC/ZNOCOLORS,
CTBW_NOSPCLRS LIKE /BIC/PZ_CTBWOBJ-/BIC/ZNOSPCLRS,
CTBW_C_APM_006 LIKE /BIC/PZ_CTBWOBJ-/BIC/C_APM_006,
CTBW_PACKSYST LIKE /BIC/PZ_CTBWOBJ-/BIC/ZPACKSYST,
CTBW_PAPERGDE LIKE /BIC/PZ_CTBWOBJ-/BIC/ZPAPERGDE,
CTBW_PPG LIKE /BIC/PZ_CTBWOBJ-/BIC/ZPPG,
CTBW_PRINTMTH LIKE /BIC/PZ_CTBWOBJ-/BIC/ZPRINTMTH,
CTBW_QUALITY LIKE /BIC/PZ_CTBWOBJ-/BIC/ZQUALITY,
CTBW_SHAPE LIKE /BIC/PZ_CTBWOBJ-/BIC/ZSHAPE,
CTBW_SIZE LIKE /BIC/PZ_CTBWOBJ-/BIC/ZSIZE,
CTBW_VARIANT LIKE /BIC/PZ_CTBWOBJ-/BIC/ZVARIANT,
CTBW_VOLUME LIKE /BIC/PZ_CTBWOBJ-/BIC/ZVOLUME,
END OF IT_CTBW.
*These deletions are already included in the InfoPackage:
*Keep only PackMat Finished Materials SOrders:
*DELETE DATA_PACKAGE
WHERE MATL_GROUP(5) NE 'PM-FM'.
*Keep only open SOrders:
*DELETE DATA_PACKAGE
where /BIC/ZOSTATUS = 'C'.
*Keep only MC and CF SOrders:
*DELETE DATA_PACKAGE
where DOC_TYPE NE 'ZOR6' AND DOC_TYPE NE 'ZOR9'.
*Keep only non rejected SOrders:
DELETE DATA_PACKAGE
where REASON_REJ IS NOT INITIAL.
Exclude list of statistical Item Categories (not billing
relevant).
DELETE DATA_PACKAGE WHERE
ITEM_CATEG = 'ZPC1' or
ITEM_CATEG = 'ZPC2' or
ITEM_CATEG = 'ZPC3' or
ITEM_CATEG = 'ZPC4' or
ITEM_CATEG = 'ZTAF' or
ITEM_CATEG = 'ZTAE' or
ITEM_CATEG = 'ZTAG' or
ITEM_CATEG = 'ZTSV'.
REFRESH: T_DATA_PAK,T_DATA_PAK1,
IT_INVOICES, IT_CTBW.
T_DATA_PAK[] = DATA_PACKAGE[].
T_DATA_PAK1[] = DATA_PACKAGE[].
DATA : COUNT1 LIKE SY-TABIX.
DESCRIBE TABLE T_DATA_PAK1 LINES COUNT1.
IF NOT COUNT1 IS INITIAL.
Selection for Invoice Items ***********
SORT T_DATA_PAK1 BY /BIC/ZSORDDORD /BIC/ZSORDIORD.
SELECT /BIC/ZSORDDORD /BIC/ZSORDIORD /BIC/ZBILLDINV /BIC/ZBILLIINV
INV_QTY NETVAL_INV
/BIC/ZBRAND /BIC/ZBRANDOWN /BIC/ZDESGNOWN /BIC/ZFLAGBKLG
/BIC/ZNOCOLORS /BIC/ZNOSPCLRS /BIC/ZOPENFCTY /BIC/ZPACKSYST
/BIC/ZPPG /BIC/ZAPPLICAT /BIC/ZPAPERGDE /BIC/ZPRINTMTH
/BIC/ZQUALITY /BIC/ZSHAPE /BIC/ZSIZE /BIC/ZVARIANT
/BIC/ZVOLUME
INTO TABLE IT_INVOICES
FROM /BIC/AZO_PMI100
FOR ALL ENTRIES IN T_DATA_PAK1
WHERE /BIC/ZSORDDORD = T_DATA_PAK1-/BIC/ZSORDDORD AND
/BIC/ZSORDIORD = T_DATA_PAK1-/BIC/ZSORDIORD AND
051114: Exclude pro forma invoices from selection.
( bill_type NE 'ZPF1' AND bill_type NE 'ZPF2' AND
bill_type NE 'ZPF3').
SORT: IT_INVOICES BY INV_SALES_ORD INV_SALES_ITEM.
DELETE IT_INVOICES WHERE ZQUALITY IS INITIAL.
REFRESH: T_DATA_PAK1.
LOOP AT T_DATA_PAK.
CLEAR: T_DATA_PAK1, IV_INVQTY, IV_INVVAL, IT_INVOICES, IT_CTBW.
MOVE-CORRESPONDING T_DATA_PAK TO T_DATA_PAK1.
loop at IT_INVOICES
where INV_SALES_ORD = T_DATA_PAK-/BIC/ZSORDDORD
and INV_SALES_ITEM = T_DATA_PAK-/BIC/ZSORDIORD.
IV_INVQTY = IV_INVQTY + IT_INVOICES-INV_QTY.
IV_INVVAL = IV_INVVAL + IT_INVOICES-NETVAL_INV.
endloop.
Use req. del. date if not conf. del. date is available
Changes being made to use conf. del. date instead of
req. del. date. This is not always filled in.
IF T_DATA_PAK1-/BIC/ZDATESCHL IS INITIAL.
MOVE T_DATA_PAK1-DSDEL_DATE to T_DATA_PAK1-/BIC/ZDATESCHL.
ENDIF.
move:
IV_INVQTY to T_DATA_PAK1-INV_QTY,
IV_INVVAL to T_DATA_PAK1-NETVAL_INV,
IT_INVOICES-ZBRAND to T_DATA_PAK1-/BIC/ZBRAND,
IT_INVOICES-ZBRANDOWN to T_DATA_PAK1-/BIC/ZBRANDOWN,
IT_INVOICES-ZDESGNOWN to T_DATA_PAK1-/BIC/ZDESGNOWN,
IT_INVOICES-ZFLAGBKLG to T_DATA_PAK1-/BIC/ZFLAGBKLG,
IT_INVOICES-ZNOCOLORS to T_DATA_PAK1-/BIC/ZNOCOLORS,
IT_INVOICES-ZNOSPCLRS to T_DATA_PAK1-/BIC/ZNOSPCLRS,
IT_INVOICES-ZOPENFCTY to T_DATA_PAK1-/BIC/ZOPENFCTY,
IT_INVOICES-ZPACKSYST to T_DATA_PAK1-/BIC/ZPACKSYST,
IT_INVOICES-ZPPG to T_DATA_PAK1-/BIC/ZPPG,
IT_INVOICES-ZAPPLICAT to T_DATA_PAK1-/BIC/ZAPPLICAT,
IT_INVOICES-ZPAPERGDE to T_DATA_PAK1-/BIC/ZPAPERGDE,
IT_INVOICES-ZPRINTMTH to T_DATA_PAK1-/BIC/ZPRINTMTH,
IT_INVOICES-ZQUALITY to T_DATA_PAK1-/BIC/ZQUALITY,
IT_INVOICES-ZSHAPE to T_DATA_PAK1-/BIC/ZSHAPE,
IT_INVOICES-ZSIZE to T_DATA_PAK1-/BIC/ZSIZE,
IT_INVOICES-ZVARIANT to T_DATA_PAK1-/BIC/ZVARIANT,
IT_INVOICES-ZVOLUME to T_DATA_PAK1-/BIC/ZVOLUME.
if IT_INVOICES-ZFLAGBKLG is initial.
SELECT /BIC/ZSORDDORD
/BIC/ZSORDIORD
/BIC/ZBRAND
/BIC/ZBRANDOWN
/BIC/ZDESGNOWN
/BIC/ZNOCOLORS
/BIC/ZNOSPCLRS
/BIC/C_APM_006
/BIC/ZPACKSYST
/BIC/ZPAPERGDE
/BIC/ZPPG
/BIC/ZPRINTMTH
/BIC/ZQUALITY
/BIC/ZSHAPE
/BIC/ZSIZE
/BIC/ZVARIANT
/BIC/ZVOLUME
INTO TABLE IT_CTBW
FROM /BIC/PZ_CTBWOBJ
FOR ALL ENTRIES IN T_DATA_PAK1
WHERE /BIC/ZSORDDORD = T_DATA_PAK1-/BIC/ZSORDDORD AND
/BIC/ZSORDIORD = T_DATA_PAK1-/BIC/ZSORDIORD AND
OBJVERS = 'A'.
SORT: IT_CTBW BY CTBW_SALES_ORD CTBW_SALES_ITEM.
DELETE IT_CTBW WHERE CTBW_QUALITY IS INITIAL.
REFRESH: T_DATA_PAK1.
endif.
loop at IT_CTBW
where CTBW_SALES_ORD = T_DATA_PAK-/BIC/ZSORDDORD
and CTBW_SALES_ITEM = T_DATA_PAK-/BIC/ZSORDIORD.
endloop.
move:
IT_CTBW-CTBW_BRAND to T_DATA_PAK1-/BIC/ZBRAND,
IT_CTBW-CTBW_BRANDOWN to T_DATA_PAK1-/BIC/ZBRANDOWN,
IT_CTBW-CTBW_DESGNOWN to T_DATA_PAK1-/BIC/ZDESGNOWN,
IT_CTBW-CTBW_NOCOLORS to T_DATA_PAK1-/BIC/ZNOCOLORS,
IT_CTBW-CTBW_NOSPCLRS to T_DATA_PAK1-/BIC/ZNOSPCLRS,
IT_CTBW-CTBW_PACKSYST to T_DATA_PAK1-/BIC/ZPACKSYST,
IT_CTBW-CTBW_PPG to T_DATA_PAK1-/BIC/ZPPG,
IT_CTBW-CTBW_PAPERGDE to T_DATA_PAK1-/BIC/ZPAPERGDE,
IT_CTBW-CTBW_PRINTMTH to T_DATA_PAK1-/BIC/ZPRINTMTH,
IT_CTBW-CTBW_QUALITY to T_DATA_PAK1-/BIC/ZQUALITY,
IT_CTBW-CTBW_SHAPE to T_DATA_PAK1-/BIC/ZSHAPE,
IT_CTBW-CTBW_SIZE to T_DATA_PAK1-/BIC/ZSIZE,
IT_CTBW-CTBW_VARIANT to T_DATA_PAK1-/BIC/ZVARIANT,
IT_CTBW-CTBW_VOLUME to T_DATA_PAK1-/BIC/ZVOLUME.
if T_DATA_PAK1-MATERIAL+0(1) eq 'A'.
move T_DATA_PAK1-MATERIAL+1(4) to T_DATA_PAK1-/BIC/ZQUALITY.
move T_DATA_PAK1-MATERIAL+5(3) to T_DATA_PAK1-/BIC/ZSIZE.
move T_DATA_PAK1-MATERIAL+8(2) to T_DATA_PAK1-/BIC/ZVARIANT.
endif.
APPEND T_DATA_PAK1.
ENDLOOP.
ENDIF.
IF SY-SUBRC EQ 0.
DATA_PACKAGE[] = T_DATA_PAK1[].
ABORT = 0.
ENDIF.
REFRESH: T_DATA_PAK, T_DATA_PAK1.
REFRESH: IT_INVOICES, IT_CTBW.
FREE: T_DATA_PAK,T_DATA_PAK1.
FREE: IT_INVOICES, IT_CTBW.
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.
Edited by: John Lucky on Jan 25, 2008 10:58 PMHi,
Why is the hard coding of "breakpoint" done.
Try removing it.
Regards
Merlin. -
ABAP code in start routine (delete no in)
In my start routine, I would like to delete some data package whose employee id is not in the selection list.
but there are some ABAP grammer error in the where condition. Can somebody help this? I tried to read the document for 'WHERE - IN seltab', but still I could not give the right code.
<p>
employeeid_itab type table of string.
select /bic/zpe_employeeid into table employeeid_itab from /bic/pzpe_employeeid.
DELETE SOURCE_PACKAGE where ZEMP_employee_ID NOT IN employeeid_itab.
It seems that internal table employeeid_itab could not be directly used after the IN keyword.
how can I do this?
Edited by: Ben Li on Feb 22, 2008 2:09 PMHi Oscar,
Actually I had tried this before, using the code like the following,
<p>
Types: EmployeeID(7) type c.
<p>
data: sel_itab type range of EmployeeID.
<p>
select /bic/zpe_employeeid into table sel_itab from /bic/pzpe_employeeid.
<p>
delete SOURCE_PACKAGE where zemp_employee_id not in sel_itab.
<p>
The grammer check is OK, but when I debug it, I found that there are records in sel_itab, but all the records just have one charactor, actually, my employeeID have 7 charactors in database. So it does not work, I think I miss something in define of the range table. Can you please figure out? Thanks a lot. -
Hello,
I am writing a Start Routine in my update rules from an ODS into another ODS. My start routine is basically just restricting some data from being updated into my data target. I am restricting based on 0VYPTE = 20. That is, if a records has 0VTYPE = 20 I am deleting it from the data_package. If I debug through the program, it works correctly with one record but when I throw in about 120K records it doesn't work. Can someone please have a look and tell me what is wrong here?
LOOP AT DATA_PACKAGE.
<b>IF DATA_PACKAGE-VTYPE NE 10.</b>
DELETE DATA_PACKAGE.
CONTINUE.
ELSE.
IF DATA_PACKAGE-/BIC/CASES NE 'CS'.
PERFORM load_mrscube_tables USING DATA_PACKAGE-SOURSYSTEM.
PERFORM BASEUNIT_CONVERT tables
MONITOR
using DATA_PACKAGE-MATERIAL
DATA_PACKAGE-SOURSYSTEM
DATA_PACKAGE-/BIC/CASES
'CS'
DATA_PACKAGE-/BIC/CASES_REV
changing
quant_out.
EXIT.
EXIT.
modify DATA_PACKAGE.
ENDIF.
ENDIF.
ENDLOOP.Hi Nyrvole,
Try to change the code this way and check(debug).
DELETE DATA_PACKAGE WHERE VTYPE NE 10.
LOOP AT DATA_PACKAGE.
IF DATA_PACKAGE-/BIC/CASES NE 'CS'.
PERFORM load_mrscube_tables USING DATA_PACKAGE-SOURSYSTEM.
PERFORM BASEUNIT_CONVERT tables
MONITOR
using DATA_PACKAGE-MATERIAL
DATA_PACKAGE-SOURSYSTEM
DATA_PACKAGE-/BIC/CASES
'CS'
DATA_PACKAGE-/BIC/CASES_REV
changing
quant_out.
EXIT. -- WHY THIS EXIT FOR...??
EXIT. -- WHY THIS EXIT FOR...??
modify DATA_PACKAGE. -- ARE YOU CHANGING ANY RECORDS..??
ENDIF.
ENDLOOP.
Put break-point after end loop and dugug and see the no of records.
Hope it Helps
Srini -
Strange select statement behavior in start routine during extraction
Hi, All..
I'm receiving some odd behavior from a select statment being processed in batch mode (specifically, when run in a normal BW extractor - start routine), the select yields no results .. sy-subrc = 4 and target itab is empty. however, when i run this same select statement in debug, i get sy-subrc = 0 and records are returned!! I tried putting the select statement in a standard abap program & it came back successfully in both foreground & background. something is strange when run in the BW extractor process?? anyone familiar with this?? any help is appreciated!! Thanks!!Thanks everyone for the comments!
The code is in the start routine from 0BBP_CONF_TD_1 into 0BBP_CON.
-The select returns records when in debug
-I've tried running it open without the "for all entries" & it still fails in batch
-The select works during the delta but always fails on the initial load
The select is a join:
DATA: BEGIN of t_JOIN1 OCCURS 0,
CONNUM LIKE /BI0/ABBP_CON00-BBP_CON_ID,
CONITEM LIKE /BI0/ABBP_CON00-BBP_COITEM,
PONUM LIKE /BI0/ABBP_PO00-BBP_PO_ID,
POITEM LIKE /BI0/ABBP_PO00-BBP_POITEM,
ACGUID LIKE /BI0/ABBP_PO00-BBP_ACGUID,
SCNUM LIKE /BI0/ABBP_SC00-BBP_SC_ID,
SCITEM LIKE /BI0/ABBP_SC00-BBP_SCITEM,
REQSTR LIKE /BI0/ABBP_SC00-BBP_REQSTR.
DATA: END of t_JOIN1.
SELECT a~BBP_CON_ID
a~BBP_COITEM
a~BBP_PO_ID
a~BBP_POITEM
b~BBP_ACGUID
c~BBP_SC_ID
c~BBP_SCITEM
c~BBP_REQSTR
INTO TABLE t_JOIN1
FROM /BI0/ABBP_CON00 as a
INNER JOIN /BI0/ABBP_PO00 as b
ON aBBP_PO_ID = bBBP_PO_ID AND
aBBP_POITEM = bBBP_POITEM
INNER JOIN /BI0/ABBP_SC00 as c
ON bBBP_SC_ID = cBBP_SC_ID
AND bBBP_SCITEM = cBBP_SCITEM
FOR ALL ENTRIES IN DATA_PACKAGE
WHERE a~BBP_CON_ID = DATA_PACKAGE-BBP_CON_ID AND
a~BBP_COITEM = DATA_PACKAGE-BBP_COITEM AND
a~BBP_COITEM <> 0 AND
b~BBP_ACGUID <> '0000' AND
c~BBP_SCITEM <> 0. -
Hi Friends !
Facing a bit strange issue. When I run the DTP with selection for all AC_DOC_NO, start routine works fine & I am getting the expected result. But when I run the DTP without selection, result is not as expected. During debugging also I can see the correct records. Please advise.
With Regards
RekhaHi,
If you are loading to DSO, I am sure there could be some overwrite is happening where u r missing the expected records.
if this is the scenario then try to add keyfield in DSO to overcome from overwrite.
Maybe you are looking for
-
Initial time machine backup larger than actual computer harddrive
I've got an iMac with a 1TB harddrive and am trying to use a time machine set up to back up my harddrive. The external harddrive I'm using for my back up is also 1TB. I currently have about 135GB of free space on my iMac's harddrive and my external d
-
Is there a way to edit the selection of a pop-up list using only the keyboard? In some other OS X apps I use, this is accomplished via hitting <space> to open the user-defined pop-up list, followed by the familiar scheme of using letter or arrow keys
-
Oracle 11g database & OBIEE 10g user id case sensitivity
Hi, Previously we used to point OBIEE to 10g database and the following query used to return data. But now we have database upgraded to 11g R2. Is there a way to make the 11g R2 database case insensitive and make the following query return results? H
-
Total Number of Cells per block
Hi How do we calculate Total Number of Cells per block in a database? Thnx
-
Metadata automation....
I have a problem that I can't seem to tackle and I don't know if its possible or not within Adobes CS. Here it is.....The photog takes a series of images and I need to have some of the metadata changed to sequential numbers. I have created a custom x