Use ABAP Routine in Selection Tab of Infopackage
I am trying to use the ABAP routine in the InfoPackage SELECTION Tab to "EXCLUDE" a value. For example, I want to load all the Material types, except ZUN1. But, when I write in the ABAP, l_t_range-sign = 'E' instead of 'I' or l_t_range-option = 'NE' instead of 'E', I get an error saying these values are not permitted.
Is there any way to exclude any value from Selection in the InfoPackage?
Regards,
Milind Vad
Hi dear and welcome on board!
You have two options:
include everything you want in your IP
load everything and exclude what you don't want in the start routine in transfer rules
No other ways...
Hope it helps!
Bye,
Roberto
...and please don't forget to reward the answers...it's THE way to say thanks here !
Similar Messages
-
Using ABAP routines for data selection
Hello,
I want to use ABAP routine to determine value range of data selection in Data Package but when I use routine for one field, selection criterias for other fields are ignored, e.g.:
in Data Package I have two selection fields:
CPUDT Accounting Document Entry Date
AEDAT Date of the Last Document Change by Transaction
For CPUDT I wrote ABAP routine
and for AEDAT I have just typed in period of time.
I started data extraction and open Monitor for this Data Package.
At Header tag I checked selections info and there is selection only for CPUDT.
Could somebody explain me is it normal system behaviour?
Thanks
AndrzejThanks for reply but that would be too easy...
I have tried your advice but nothing changed.
I think this is data extraction configuration problem.
Andrzej -
Hi loading last 2 months data using abap routine
we are planning to write a routine in infopackage level,
using the option 6-ABAP routine, to select the last 2 month data ,
we have the time characteristics 0CALMONTH, At present we managing the load by manually changing the selection for last 2 month every time ,
It would be a great help if anybody can show a sample code to select last 2 month data,
Thanks,Hi,
data: l_idx like sy-tabix.
DATA: lv_calmonth LIKE /BI0/SCALMONTH-CALMONTH.
DATA: lv_day TYPE DATS.
"previous month
lv_day = SY-DATUM.
lv_day+6(2) = '01'.
lv_day = lv_day - 1.
lv_calmonth = lv_day(6).
READ TABLE l_t_range with key fieldname = 'CALMONTH'.
l_idx = sy-tabix.
MOVE lv_calmonth TO l_t_range-low.
MODIFY l_t_range INDEX l_idx.
"previous month - 1
lv_day+6(2) = '01'.
lv_day = lv_day - 1.
lv_calmonth = lv_day(6).
MOVE lv_calmonth TO l_t_range-low.
APPEND l_t_range.
p_subrc = 0.
let me know if this works.... not sure about the last append.
Olivier. -
Data selection in info package using ABAP routine.
Hi,
when we are scheduling the info package(Infp package name is like XYZ),we want to load past 6 months data from the current date(INFO OBJECT(0CREATEDON) BETWEEN (Sy-Datum - 6 months TO Sy-Datum),in the selection tab in schedule i want to write the abap routine (type 6).please can any one have this type of code please sedn to me asap.
this is very urgent.delivery is tomorrow.hi Lekha,
try following code.
seems you post the same question twice, one posting is sufficient. and please don't forget to reward helpful answers.
data: l_idx like sy-tabix.
read table l_t_range with key
iobjnm = '0CREATEDON'.
l_idx = sy-tabix.
DELETE l_t_range
WHERE iobjnm = '0CREATEDON'.
L_t_RANGE-SIGN = 'I'.
L_t_RANGE-OPTION = 'EQ'.
if not work, try
L_t_RANGE-OPTION = 'BT'.
BT = between
last 6 month
L_t_RANGE-LOW = sy-datum - 180.
current date
L_t_RANGE-HIGH = sy-datum.
append l_t_range.
modify l_t_range index l_idx.
p_subrc = 0.
$$ end of routine - insert your code only before this line -
endform. -
Load data only for current month using ABAP Routine
Hi Everyone,
I am loading data from R/3 using the 0HR_PA_OS_1 extractor. This requirement is to load the position numbers from R/3. Using the extractor for a given position 28 I get the following dataset results.
CALMONTH POSITION
11-2004 28
12-2004 28
01-2005 28
02-2005 28
|
07-2007 28 CURRENT DATE
Now when I pull data in BW I only want to load the record for most current i.e. 07-2007. I DO NOT want that ALL the records since the day the position was created should be loaded.
Now I do understand this can be achieved using a ABAP routine in the INFOPACKAGE. Below is the routine that I am using and what it is doing is that it is only bringing in the first record.
data: l_idx like sy-tabix.
clear: l_idx.
read table l_t_range with key
fieldname = 'CALMONTH'.
l_idx = sy-tabix.
Current month only
l_t_range-low = sy-datum(6). "Current month
l_t_range-high.
l_t_range-option = 'EQ'. "equals
l_t_range-sign = 'I'.
modify l_t_range index l_idx.
p_subrc = 0.
Can anyone suggest a solution as to why this is happening?
Thanks,
RahulOne explanation would be
- If there is no CALMONTH selection values specified in the selection tab, l_t_range would be empty. This would mean there would be no line for CALMONTH selection, and the code won't modify the l_t_range.
If this is true, you need to check sy-subrc after reading from the itab.
data: l_idx like sy-tabix.
clear: l_idx.
read table l_t_range with key fieldname = 'CALMONTH'.
if sy-subrc = 0.
l_idx = sy-tabix.
* Current month only
l_t_range-low = sy-datum(6). "Current month
* l_t_range-high.
l_t_range-option = 'EQ'. "equals
* l_t_range-sign = 'I'.
modify l_t_range index l_idx.
else.
move 'CALMONTH' to l_t_range-fieldname.
l_t_range-low = sy-datum(6).
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
append l_t_range.
endif.
p_subrc = 0. -
ABAP Routine in selection of Info package in 3x
Hello Experts
We need to load distinct PO data in 3x server.
I have added this distinct po values in range table of info package abap routine.
However its not loading for range table values more than two selections/pos.
If I try to append more than 2 values,only last one is uploaded.
However after load, in monitor tab-header , selection paramenters I can see all PO values in selection.
Some how it works only for two inputs (rows) in range table of ABAP routine in infopackage.
Anybody has faced such issue? any help is appreciated!
Edited by: Kanchan Angalwar on Jan 30, 2010 9:59 AMHi,
Please post your ABAP code here -
Data selection tab of infopackage
hi all,
how do we select data from infopackage if you do not want a certain value?
I wrote ABAP code to select not as:
L_t_RANGE-SIGN = 'I'.
L_t_RANGE-option = 'NE'.
L_t_RANGE-low = 'Y'.
But I got errors. Sign 'I' with 'NE' is not allowed. Please advise.
LindaLinda,
<b>Exclude Option won't work in the Infopackage data selection routine.</b>
You can use SIGN equals to I only and option values EQ, CP and BT.
Try append all the required values. use BT as well as eq.
If you want to permenantly exclude those to BW. you have 3 good options along with Infopackge Selection.
1. <b>User Exit in the Source System.</b>
2. Start Routine in the Transfer Structure.
3. Start Routine in the Update Rules.
all the best.
Regards,
Nagesh Ganisetti.
*assign points if it helps. -
Data Selection tab in infopackage
Hi Gurus
Its a very basic question but can anybody tell me what function the "data selection " Tab does in infopackage?
I know the setting required on R3 side for that but not sure why we use the data selection.
Can we use this data selection for master data as well?Hi Kris,
Data Selection tab allows you to select: date ranges, document numbers and the like.
In order to have filds in there, you should first select in the DataSource in the R/3 side wich field could be selected.
If it is a Generic DataSource, you can do it running RSO2 transaction code.
<text removed by moderator>
Claudio
Message was edited by: Matthew Billingham -
Multiple Data in selection tab of infopackage
Hello,
I need to select in a InfoPackage from a InfoObject multiple values, which means
I need to implement a logical OR in the selection of an InoObject in a InfoPackage.
How to set up L_T_RANGE ?
Thank You !
Martin SautterFor dynamis selects this is also helpfull:
Re: ABAP Selection in infopackage
THank You
Martin -
How To Add InfoObject in the Data Selection Tab of InfoPackages in 2004s
Hi Y'all!
I would like to ask how to add an infoobject in the Data Selection Tab of the InfoPackage in 2004s. It says its optional, this definintion of selection criteria for the infopackage.
My apologies, I don't understand how this is done. Surely, I would like, however, to understand how to add an infoobject in this data selection Tab of the InfoPackage in 2004s.
Can any kind soul out there (gurus) please lend me your thoughts?
Regards,
PhilipsHello Rajani!
Thank you very mcuh for that! I super appreciate it! Can you prescribe how I can do this step by step please? Where exactly in the DS can I locate this "field for selection" option in the DataSource?
Regards!
Philips -
Delete Requests of a Cube using ABAP routine
I have written a ABAP code to get all the requests of a cube. Now I want to delete all the requests which are older than 1 year through this ABAP routine. Please help.
REPORT ZTEST3.
TYPE-pools RSSM.
DATA: i_infocube like rsmonicdp-icube.
TYPES: l_req TYPE RSSM_T_PART.
DATA: li_req TYPE l_req.
CALL FUNCTION 'RSSM_ICUBE_REQUESTS_GET'
EXPORTING
i_infocube = 'ZCOPCBC02'
IMPORTING
e_t_request = li_req.Maybe this might help :
Delete multiple requests from DSO using RSMONICDP table -
Enable 3rd party selection tab in infopackage
HI,
When i create my infopacakage for 3rd party datasource, my 3rd party selction tab is not enabled to give any inputs. Could anyone pls guide me how to get it enabled.
AnamikaHi,
I created the infopackage on Third Party i.e. ETL source System . In that Infopackage there is tab name as "3rd Party Selections". In that tab I have to give selection for the ETL workflow which will process the data from ETL to BW. And that tab is in the disable/ display mode. So question is how to make it enable or in the active mode to provide 3rd party selection condition?
Thanks,
Anamika -
Need to write ABAP Routine at infopackage Selection Options
Hi All,
I need to write ABAP Routine at Info Package Selection Options.
Requiremnet i need to bring some Sales Document Types (Sales Orders Types) only from R/3.
Ex I need OrderTypes ZQT,ZSIV etc
Can any body help to resolve this.
Regards,
P.C.V.Hi P.C.V,
If the order type field is already available in the Data Selection Tab of the InfoPackage, then you just need to place your selections there (e.g. order type = ZQT, ZSIV) without the need to use ABAP routines.
If ever you really need an ABAP routine, here is an example ABAP routine. The most important concept is to modify the range table l_t_range so that the selection reflect what you need.
data: l_idx like sy-tabix.
data: w_startdate like sy-datum,
w_startweek like scal-week,
w_maxdate like sy-datum,
w_maxweek like scal-week.
w_startdate = sy-datum.
w_maxdate = w_startdate + 104 * 7.
* Calculate horizon for extraction
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = w_startdate
IMPORTING
WEEK = w_startweek
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = w_maxdate
IMPORTING
WEEK = w_maxweek
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2.
read table l_t_range with key
fieldname = 'CALWEEK'.
l_idx = sy-tabix.
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
l_t_range-low = w_startweek.
l_t_range-high = w_maxweek.
modify l_t_range index l_idx. -
*** Abap Routine in Infopackage selection ***
Hi !!!
I have the scenario below:
I have created an infoobject called CAEMPFF. In the infopackage selection under field 0COMP_CODE I want to create an abap rotine to read all vaules filled in CAEMPFF.
How can I do that using abap routine ?
Thanks in advance,
Leandro.Hi Leandro,
In the infopackage, under 0comp_code (or probably field BUKRS if it's an ERP datasource), you should select ABAP routine (6) under Type field. Then, you'll be prompted to create the routine.
There you should create a program that reads all the values of your infoobject master data table.
Hope this helps.
Regards,
Diego -
Routine in Infopackage Data selection Tab
HI,
I am having one InfoObject (marital staus) in InfoPackage Data selection Tab.
Now I want to write a ABAP routine for that infoObject in Infopackage to select only those records of marital status = SINGLE.
I am new to ABAP . please let me know what code should I write in this routine.Hi Kris,
You would do it like this:
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'MARITAL_STATUS'.
l_idx = sy-tabix.
move: 'I' to l_t_range-sign,
'EQ' to l_t_range-option,
'SINGLE' to l_t_range-low.
modify l_t_range index l_idx.
Thanks,
Joseph
Maybe you are looking for
-
I have tried Device Manager look for hardware with no luck. I am deployed in Afghanistan and would like to be able to video chat with my family.
-
How can I edit iWeb on laptop while Library remains on External Hard Drive?
I would like to know if there is a way I can keep my iPhoto Library on an External HD, but still be able (maybe using Thumbnails) to edit and organize iWeb updates when I am away from the Ext HD?? Then when I reconnect to the External Hard Drive, I w
-
Hi all, I want to change the user status NOCO(Notification completed) for M2 type of notification in the Quality client.I did it in Dev client for M2(Break down Notn) and imported the TR to Quality.When i try to assign this status in Quality client,
-
Job opening - offerta di lavoro - Milano
English below Ricerca di sviluppatori LabView con esperienza (3 anni), per società multinazionale. Zona: Milano / Nord Italia Per ogni richiesta, usare la mail del mio contatto. Job openings in Northern Italy - LabView developer, 3-year experience.
-
ERROR prevents me from printing