Start routine for insert a record by each day in a range of dates
Hi all,
I need create a start routine for insert 1 record by each day in a range of dates:
example:
Actual.
DATE_I DATE_F TIME_I TIME_F TIME_minutes
04/04/2008 05/04/2008 13:40:00 23:00:00 2000
Result:
DATE_I DATE_F TIME_I TIME_F TIME_minutes
04/04/2008 04/04/2008 13:40:00 24:00:00 X
05/04/2008 05/04/2008 00:00:00 23:00:00 Y
I thanks any help.
regards.
Alberto.
Hi Alberto,
What I understood from your requirement is that you want to split the record into 2 since you have 2 dates coming from the source.
In the transformations you will have to create new rule group one for each of the dates.
You can create the new rule group by clicking on the 'Rule Group' button and then clicking on the 'New Rule Group'.
In the newly created rule groups take care to distribute data for each date separately.
Hope it is clear.
All the best...
Regards,
Krishna
Similar Messages
-
Start routine for Update Rules
I need to write a start routine for the update rules for an DSO with main idea as follows:
I must compare the record that comes from the infopackage with the record that's already in my DSO. If the X date for the same 0PM_ORDER is the same as one in my DSO - do nothing
If the X date is previous to the X date in my DSO for the same 0PM_ORDER - the new record must be created and at the same time all the records with subsequent(later) X dates for this 0PM_ORDER must be deleted.
If the X date is later than the X date in my DSO for the same 0PM_ORDER - the new record must be created.Hi,
Find the below code.
DATA: BEGIN OF ITAB1,
ZDATE TYPE /BIC/DATE
END OF ITAB1.
SELECT zdate FROM /BI0/QEMPLOYEE INTO corresponding
fields
of ITAB1 where employee = SOURCE_FIELDS-EMPLOYEE.
IF ITAB1-ZDATE COMMUNICATE_STRUCT-DATE
RESULT = ITAB1-CLM_IPAA.
ENDIF.
ENDSELECT.
There will be an table for each DSO if you go for an manage DSO you will get three table i.e New,Active and Change Log take Active tables date field and compare with the communication structure that comes to routine.
The above example is just an example table will be different from DSO to DSO.
Let me know your thoghts.
Regards,
Shivu. -
Start Routine logic to delete records which do not satisfy a condition
Hello,
Iam trying to code a start routine to delete the records from the source_package if a certain set of conditions are not met.
It is failing at the last statement.
Pls help.
Thanks
Jagadish
code is as follows..
LOOP AT SOURCE_PACKAGE assigning <SOURCE_FIELDS>.
IF not (
( <SOURCE_FIELDS>-/BIC/ZCLSD_DT BETWEEN <SOURCE_FIELDS>-/BIC/ZWEEKOF
AND <SOURCE_FIELDS>-/BIC/ZNONWKOF )
AND
( <SOURCE_FIELDS>-/BIC/ZCLSD_DT IS INITIAL )
DELETE SOURCE_PACKAGE FROM <SOURCE_FIELDS>.
(is failing at the delete statement.)
ENDIF.
ENDLOOP.Thanks Pratap,
I used an internal table to load the records and used a delete statement out side the LOOP.
By using a Work Area assignment instead of the Source_fields, The delete statement is giving me an error saying "Conversion of Numeric Value to type Object is not valid".
Here is the code I have modified...
TYPES: BEGIN OF LINE,
WO(6) type c,
END OF LINE.
DATA: WA TYPE LINE,
ITAB TYPE TABLE OF LINE.
LOOP AT SOURCE_PACKAGE assigning <SOURCE_FIELDS>.
IF NOT (
( <SOURCE_FIELDS>-/BIC/ZCLSD_DT BETWEEN <SOURCE_FIELDS>-/BIC/ZWEEKOF
AND <SOURCE_FIELDS>-/BIC/ZNONWKOF
AND
<SOURCE_FIELDS>-/BIC/ZAPRD_DT IS NOT initial )
Append <SOURCE_FIELDS>-/BIC/ZWO_NBR to itab.
ENDIF.
ENDLOOP.
loop at itab into WA.
DELETE SOURCE_PACKAGE where /bic/ZWO_NBR = WA-wo.
endloop. -
Start Routine for transfer rules
Hello experts,
I want to use the SQL DISTINCT keyword to return non-duplicate results from a table in a DataSource (data base) in a the start routine for the transfer rules.
How do I address that table in the start routine of the TR?
I thought about something like that.
TABLES: mytable
DATA: itab_mytable type table of mytable
SELECT DISTINCT CUSTID, etc.
FROM mytable into table i_tab.
I am new to ABAP so I would be happy to get some suggestions!
thanx in advance
AxelHello Oscar,
as fa as I understood the entire data package in the transfer structure format is used as parameter (DATAPAK) for the routine.
so I want to perform a SQL statement on DATAPAK!
But it sais it can't find DATAPAK in ABAP-Dictionary as a table!
can I actually perform SQL statements on DATAPAK?
Thanx
Axel -
hi friends
i need to give a start routine for my baseunit.
i need my baseunit always EA,
i get the data from the flat file , so what ever the unit they mention there in the flat file if it is not equal to 'EA', then it should take it as EA.
i gave code like this
IF COMM_STRUCTURE-0BASE_UOM NE EA
APPEND 'EA'
then i got this error
E:Field "COMM_STRUCTURE-0BASE_UOM" is unknown. It is neither in one of
the specified tables nor defined by a "DATA" statement. "DATA" statement.Hi Sampath,
Can you try this and let me know if it works...
loop at data_package.
if data_package-base_uom <> 'EA'.
data_package-base_uom = 'EA'.
modify data_package.
endif.
endloop.
Cheers,
Praveen.
Message was edited by:
Praveen Mathew -
hi friends
i need to give a start routine for my baseunit.
i need my baseunit always EA,
i get the data from the flat file , so what ever the unit they mention there in the flat file if it is not equal to 'EA', then it should take it as EA.
i gave code like this
IF DATA-PAKAGE_STRUCTURE-0BASE_UOM NE EA
APPEND 'EA'
then i got this error
E:Field "DATA-PAKAGE-0BASE_UOM" is unknown. It is neither in one of
the specified tables nor defined by a "DATA" statement. "DATA" statement.Hi Sampath,
Can you try this and let me know if it works...
loop at data_package.
if data_package-base_uom <> 'EA'.
data_package-base_uom = 'EA'.
modify data_package.
endif.
endloop.
Cheers,
Praveen.
Message was edited by:
Praveen Mathew -
ABAP Code in Start Routine for restricing the data records from ODS1 - ODS2
Hi
I need small ABAP Code in Start Routine Of Update rules Of ODS . Im in BW 3.5 .
I have records like below in first layer ODS and i want to restrict some records while going to second layer ODS ..
ODS1 :-
DocNO EventType Date
123 001 08/08/2008
123 003 08/08/2008
123 011 09/08/2008
I want one record in ODS2 for this document number whose EventType = 001 only and date of third record ... like below
Doc NO EventType From Date Todate
123 001 08/08/2008 09/08/2008
So how can i get like this record in the ODS2 which will get data from ODS1 . So i need to write the code in the start routine of the ODS2 .
So please give the me the code for start routine ....
Regards
SureshIts difficult in BW 3.5 to include this logic in START_ROUTINE as you cannot add the extra to_date field to the DATA_PACKAGE table.
You need to create a new global internal table with the same structure of DATA_PACKAGE with additional field to_date. then use the logic to fill in the global internal table
define a internal table new_data_package with the required structure like (docno, eventtype, fromdate todate)
data: l_w_datapkg_001 type data_package,
data: l_w_newdatapkg type new_data_package,
data: l_w_datapkg_011 type data_package
LOOP AT DATA_PACKAGE INTO l_w_datapkg_001 WHERE event_type = '001'.
l_w_newdatapkg-docno = l_w_datapkg_001-docno.
l_w_newdatapkg-event_type = l_w_datapkg_001-event_type.
l_w_newdatapkg-fromdate = l_w_datapkg_001-date.
MOVE CORRESPONDING FIELDS OF l_w_datapkg_001 INTO l_w_newdatapkg.
READ TABLE data_package INTO l_w_datapkg_011
WITH KEY docno = l_w_datapkg_001-docno
event_type = '011'.
l_w_newdatapkg-to_date = l_w_datapkg_011-date.
APPEND l_w_newdatapkg TO new_data_package
ENDLOOP.
Now the new datapackage contains the ODS2 data that u needed -
How to use Start Routine for this requirement
Hello,
I am having data in 2 ods and should load that data into cube, but there isn't any common object in both the ods's. I need to analyze based on these ods objects. so I thought of pulling some objects into 1ods which are used for analysis and added some objects to ods and cube. Now I have to write a start routine in update rules to fetch the data from the info objects which are present in another ods. Can any one help me in this?
Rajesh.Hi Surya,
Extract all info from table BKPF
select * into it_bkpf
from bkpf
where gjahr = p_fisyr.
Select record based on internal table it_BKPF
The reason why FOR ALL ENTRIES syntax is used because of its cluster table.
select * into it_bseg
from bseg
for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr = it_bkpf-belnr.
Delete duplicate record based on Company Code and GL No.
delete adjacent duplicates from it_bseg
comparing bukrs belnr. -
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. -
Where to start config for having memo record per profit center level?
Hi guyz,
I need to prepare memo record for profit center level.
We are not activating Cash Management module and only FI-AA, FI-GL, FI-AP, FI-AR, Bank Accounting, CO-OM, CO-CCA, CO-PCA for the project.
I am mostly a CO consultant, thus I need your help step by step..
Where to start and how to do configuration for the memo record?
Need your help asap...thanking you...Hi Maleeq,
to bring in some clarification. If you consume material from stock, where the MM account determination for the P/L side is a cost element, the system requires you to enter a CO object. In this case the profit center is (always!!!!) derived by the CO object, e.g.:
- cost center
- PP order
- internal order
- sales order (in MTO scenario)
- WBS element
etc.
If you have PP with a FG as material to be produced, the PP order gets the PC from the FG and all (always!!!!!) postings on this PP order will get the PC from the PP order. This is valid of course only for the P/L side. The stock change/reduction will be credited on the profit center of the RAW.
And yes, in the material, there is by plant a profit center (marc-prctr), but relevant for PC derivation on the P/L side is the CO account assignment (if cost element).
If you have a material consumption, where no cost element is created (ususally for the consumption during SD delivery), in this case, the PC is derived from the material master (plant wise).
regards
Bjoern -
Read source system in start routine for BW 7.0
Dear all,
how can I tread a source system in the start routine in BW 7.x?
The input parameter "SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS" has been available in 3.x but no more available in 7.x
Any ideas ?
Thanks
IFRHi,
use method p_r_request->get_logsys( ).
regards
Siggi -
Script for inserting 1000 record in a table...
Hello Gurus,
I have a table structure like this....
USERID USERNAME USERPWD EMAILID FIRSTNAME LASTNAME ISACTIVE
1 superuser Pyramid123 [email protected] a b 1
21 neha Pyramid123 [email protected] s s 1
I need to write a script where i can insert 1000 dummy related records into this table..
your help would be appreciated..
Thanks,
HPHi,
Hope the below solves your problem.
SQL> CREATE TABLE t (USERID NUMBER,
2 USERNAME VARCHAR2(20),
3 USERPWD VARCHAR2(10),
4 EMAILID VARCHAR2(20),
5 FIRSTNAME VARCHAR2(10),
6 LASTNAME VARCHAR2(10),
7 ISACTIVE NUMBER);
Table created
SQL> INSERT INTO t
2 SELECT srl,
3 name,
4 pwd,
5 LOWER(SUBSTR(name, 1, 10)) || '@abc.com',
6 SUBSTR(name, 1, 10),
7 SUBSTR(name, 11, 20),
8 1
9 FROM (
10 SELECT level srl,
11 dbms_random.string('U', 20) name,
12 dbms_random.string('A', 10) pwd
13 FROM DUAL
14 CONNECT BY LEVEL <= 1000);
1000 rows inserted
SQL> commit;
Commit complete
SQL> select count(1) from t;
COUNT(1)
1000
SQL> select * from t where rownum < 10;
USERID USERNAME USERPWD EMAILID FIRSTNAME LASTNAME ISACTIVE
342 JLMPNCRYRZYLEGVVKLQT ypsFEvtYOg [email protected] JLMPNCRYRZ YLEGVVKLQT 1
343 UINEJWHGFHCBOUXWQWEL OSBmpXSSDp [email protected] UINEJWHGFH CBOUXWQWEL 1
344 TLGFDHHLMACMMENWRMZG RIrPTdotaX [email protected] TLGFDHHLMA CMMENWRMZG 1
345 QARLMGJVFJXTJRQUFRFU lkbvEGACDi [email protected] QARLMGJVFJ XTJRQUFRFU 1
346 TYMDMPTWASFOGIYZYBZP SadCSlHiZc [email protected] TYMDMPTWAS FOGIYZYBZP 1
347 XDTRMJICNQNKFMDRRMZB lSchkFigpz [email protected] XDTRMJICNQ NKFMDRRMZB 1
348 DQZUKSXOLMQLMFBMEGNI psBCKgLVPP [email protected] DQZUKSXOLM QLMFBMEGNI 1
349 JMTNKXDDAPDHYLHUVSWF WXYrBQNKJk [email protected] JMTNKXDDAP DHYLHUVSWF 1
350 ZHAFZAJPJCBHNLTCQWTB rhtoGTpBle [email protected] ZHAFZAJPJC BHNLTCQWTB 1
9 rows selected
Regards
Ameya -
Task-flow for inserting a record in a popup: error on primary key.
Hi all,
I am using Jdeveloper 11.1.1.2.
I am trying to display a bounded task flow in a popup launched from a page. I am following the steps in: http://www.oracle.com/technology/products/jdev/tips/fnimphius/popupinuishell/declarative_popup_in_uishell.html
I have a view object (myVO) and I have a page (page1), where I can edit the records of myVO. In this page I have a button that launches (in a window) a task-flow (insertTF, that uses existing transaction if possible, composed by page2 and page3) where I can insert a new record in two step (using a train).
At the end of the train I can save or cancel (task flow return activity) the inserting record.
The button cancel work well, but the button save does not. When I click on it, I return in page1 but I have this error: Error: another user modified row with primary key oracle.jbo.Key [[+numberOfKey+]].
If I see the database navigator or I refresh the page, I can see the record just inserted.
How can I do to remove this error?
Thank you
Andrea
Edited by: Andrea9 on 10-dic-2009 06:39There are default values coming from the DB. There are also default values that I have setted in myModel on myEO.
I am the only user manages the database, there are no other users.
So, how can I solve this problem? Have I to remove the default value on inserting? From DB or from myEO?
thanks in advance
Andrea -
Procedure for inserting a record in HANA
Hi All
I have created a table using .hdbtable definition. I have also created an .xsodata service to fetch the details of the table. The problem is when trying to insert data into the table.
For this, I created a procedure. But when I tried to activate I am getting an error which says "Invalid column name".
But the Column name which is provided is correct.
I am stuck and not able to proceed. Please help.
Thanks in advance
MeenakshiHi All
Instead of using a procedure, I tried to achieve the same using server side js. I created a .xsjs file and tried to connect to DB to insert values. But here also no luck. There is an error popping in the insert statement.
Here is the screenshot of the problem. Any suggestions ? -
Index used or not for selecting data from ODS in a start routine
Dear friends,
In the start routine of the update rules to a cube, I am reading some data of an ODS in to an internal table .
The ODS is indexed. But, I am not sure if the index is at all used in the Select statement (that gets the data from ODS to the internal table in the start routine) while loading data to the cube.
Any help is highly appreciated.
regards,
atlajHi Atlaj
You can findout this is display execution plan for SQL statement in DB02.
Goto DB02. and under diagnostic, you find explain. Select that and enter your query. Make sure that everything here is in capital format. Below is a sample query which I have entered.
SELECT "CRM_SALORG" "SALESORG" FROM "/BI0/QORGUNIT"
WHERE "SALESORG" = ? AND "OBJVERS" = ? AND "DATETO" >= ?
AND "DATEFROM" <= ?
The select parameters should be inside qoutes and in caps and even the from table. Once you enter your query in this format, click on explain. It will show the index scan if the index is present. the output for my query will be something like
0 SELECT STATEMENT ( Estimated Costs = 1,348E+01 [timerons] )
1 (COOR) RETURN
2 ( 0) TQ
3 ( 0) FETCH /BI0/QORGUNIT
4 ( 0) IXSCAN /BI0/QORGUNIT~Z1
Where my last statement (line 4) is showing index scan and the name of index read is Z1.
Hope this helps.
Please let me know if you have any problems entering the query in the specified format and u get any error.
Regards
Sriram
Maybe you are looking for
-
McAfee program searches for programs that are susceptible to malware and automatically searched for updates and installs them. For some Reason, when it comes to Adobe products it requires myself to have to perform a manual update. When I followed t
-
After updating to the newest version of Firefox, when it opens I get two tabs, and the one that comes up on my screen is new tab, with my homepage on the other, which requires that I click on it to go there. Also when I click on a link the same thing
-
FILTER access path..
Hi , I have read a section in Performance Tuning e-book regarding the "Use of EXISTS versus IN for Subqueries". In this section an example with its explain plan is posed.... SELECT e.employee_id, e.first_name, e.last_name, e.salary FROM employees e W
-
I just installed Adobe Pro XI and get this error popup when viewing and creating Portfolios, any ideas on how to fix or what my issue may be?
-
IPhoto11 (MBP, OS 10.8.3) and PS Elements 11
I want to process a picture in iPhoto11 (MBP, OS 10.8.3) with PS Elements 11: In iPhoto/Preferences/advanced I have chosen Adobe Photoshop Elements 11. When I try to process a picture in iPhoto the program PS Elements starts correctly, but the pictu