Access to Abap routine in infopack
Dear Experts,
Is there no way to control access to change the data selection routines of one selection field if an id can access and change other input fields in the infopack selection?
By the way, what does 'Required entry field' mean?
Are there documentation for these functions?
regards,
Pascal
Hi All
my CTO found the following option
function module that is "remote-enabled module "
then you call CALL FUNCTION 'Y_FM_IDOC_CATSDB' DESTINATION 'SAP4.7E'
you need to define it in SM59
code example
data: BEGIN OF IT_SOBSL OCCURS 0,
SOBSL(2),
END OF IT_SOBSL.
DATA: ls_range type STANDARD TABLE OF rssdlrange WITH HEADER LINE.
SELECT /BIC/ZSPEPROCI FROM /BIC/SZSPEPROCI INTO TABLE IT_SOBSL
WHERE /BIC/ZSPEPROCI NOT BETWEEN 'AA' AND 'ZZ'
AND /bic/zspeproci ne '' .
BREAK-POINT.
LOOP AT IT_SOBSL.
ls_range-IOBJNM = 'SOBSL'.
ls_range-LOW = IT_SOBSL-SOBSL.
ls_range-SIGN = 'I'.
ls_range-OPTION = 'EQ'.
APPEND ls_range .
ENDLOOP.
loop at ls_range.
append ls_range to l_t_range.
endloop.
Similar Messages
-
OLAP variable in ABAP Routine.
In data selection of Infopackage, I have used a OLAP variable. Is it possible to access the routine for OLAP variable in a ABAP routine?? How to proceed for the same???
Hi,
There are function modules for SAP variables.
- RSVAREXIT_variablename
- RREX_VARIABLE_EXIT (for variables to be processed see include LRREXTOP).
Customized variables with exit can be accessed by FM EXIT_SAPLRRS0_001.
If you are able to transfer mandatory parameters, just implement call of required FM
Into report. If not, you have to copy and adopt coding desired from the FMs.
Hope this helps
Joe -
Add authorization check in Infopackage Scheduler for option 6-ABAP Routine
We want to add an authorization check in routine rssm_routines_maintain. This is in the Infopackage scheduler in the Data Selection tab under the column Type after selecting type=6(ABAP Routine). This is a core modification. We have checked with our Security team with traces and found nothing available to help us.
Two questions:
1) Is there any other way we can control who can create/change ABAP code by this method ?
2) Does anyone see this causing problems if we were to make a change to the routine to add code to do an authorization check.
Your help would be appreciated.
Robert Begin,
450-677-9411 or
514-924-4311
or email at [email protected]Hi Chandran, we need to restrict a certain group of BW Developers from writing code in the abap routine (option 6 ) in the Infopackage of the Data Selection Tab in column Type.
The concern is that if having access to write abap code, a person can practically do as heéshe pleases with ABAP code and it is a concern.
Do you have any solution/suggestions to lock this down?
Much appreciated,
Regards,
Robert. -
Populate new fields in DSO (DBTable) with ABAP routine
Hi,
I've added a couple of fields to a DSO. The DSO contains a large number of records (60m+) and I have a tight window to cutover so the activation time would be an issue if I use a loop transformation. Therefore, I am looking to populate the additional fields directly in the Active table using an ABAP routine.
One of the fields is a key figure to be derived from an existing CHAR field so would need to apply some logic during update, such as IF <CHAR_FIELD> CA 'ABC'. <KYF_FIELD> = 1 etc.
Aside from fairly basic Start Routines my ABAP is very poor so was wondering if anyone can help me with the syntax or, preferably some sample code to achieve this.
Thanks in advance,
AdHi,
In transformation of the cube, choose routine for char E.
There you can assign value in RESULT field. Actually RESULT field is assigned to E, find the code below,
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
raise exception type CX_RSROUT_ABORT.
... "to skip a record
raise exception type CX_RSROUT_SKIP_RECORD.
... "to clear target fields
raise exception type CX_RSROUT_SKIP_VAL.
(* insert your abap code here to find the value of E*.)
RESULT = * assign the value you got for E here.
rgrs,
v.sen -
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 -
Call function in abap routine of infopackage
Experts,
Good day. I have a problem concerning the data to be imported in my ods.I can't find a similar thread corcerning my problem. My File date field should contain only 2 years and 3months data of recent data. I'm using a call function fima_date_create to filter values of zfile_date.
CALL FUNCTION 'FIMA_DATE_CREATE'
EXPORTING
I_DATE = sy-datum
I_FLG_END_OF_MONTH = ' '
I_YEARS = 2-
I_MONTHS = 3-
I_DAYS = 0
I_CALENDAR_DAYS = 0
I_SET_LAST_DAY_OF_MONTH = ' '
IMPORTING
E_DATE =
E_FLG_END_OF_MONTH =
E_DAYS_OF_I_DATE =
The sy-datum becomes the High value and the date generated by this FM will be the low value. I already tested this function module and it is what i want. How Should I write the ABAP code for this in the abap routine for my infopackage? Or what steps do I need to take.Hi,
When you choose the option to write a routine for one of the characteristics in the infopackage selections, you get a window to write your code with some prewritten code as below. Modify it as shown below, for your requirement.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'CALDAY'.
l_idx = sy-tabix.
START of YOUR CODE
<----
Required logic -
>
L_T_RANGE-LOW = <lower limit of range>.
L_T_RANGE-HIGH = <upper limit of range>.
L_T_RANGE-SIGN = 'I'.
L_T_RANGE-OPTION = 'BT'.
END of YOUR CODE
modify l_t_range index l_idx.
p_subrc = 0.
Hope this helps. -
ABAP Routine code for the below logic
Hello BW Experts ,
I need to write a complex ABAP routine in BW .
Following is the detail explaination .
Can anyone tell me the ABAP code for the below logic?
It would be a greate help as I am unable to do this
since last two days.
WBS Elements are maintained at IOS and Warranty levels in R/3 side.
The IOS WBS is a top level of WBS element and below that the Warranty WBS level.
The IOS and Warranty WBS elements can be differentiated by means of priority field.
When priority = i , WBS Element is known as IOS Level WBS Element and
When priority = Y the WBS element is known as Warranty WBS element.
The Equipment Number is maintained compulsorily at IOS Level WBS elements only.
It is not maintained at Warranty WBS Element.
But the Cost is maintained at Warranty WBS Elements.
In BW I need all Warranty WBS ( priority = Y) along with their cost figures and Equipment Numbers.
But as the Equipment Number is not maintained compulsorily at Warranty WBS level we have asked to
Copy it from IOS WBS ( priority = i ) and assign it to Warranty WBS level ( priority = Y ).
So I have included the Equipment Number in the ODS and in update rules I need to write the routine for it as
per the above logic.
The Equipment Number is coming from Master data of WBS Element.
The WBS element master data we are loading in BW .
Also the same WBS Element transaction data is coming from the transaction data data source in BW.
Following fields / infoobjects and the table names in BW :
1. Equipment Number : /BIC/ZEQUIPMNT and table name /BIC/MZWBS_ELEM.
2. WBS Element : ZWBS_ELEM is coming from transaction data data source as well as master data.
In ODS update rules it is coming from transaction data data source Comm_structure-ZWBS_ELEM.
Also we are loading separetly the master data for ZWBS_ELEM.
The ZEQUIPMNT is an attribute of ZWBS_ELEM.
3. Priority : PRIORITY and table name /BIC/MZWBS_ELEM.
The info object name for Priority is 0Priority but in master data table /BIC/MZWBS_ELEM
the field name is PRIORITY.
When PRIORITY = ' i ' then ZWBS_ELEM is at IOS Level
When PRIORITY = ' y ' then ZWBS_ELEM is at Warranty Level.
4. ODS name : /BIC/AZCOST00 and same is table name active data table .
So please tell me the routine Code .
Best Regards ,
Amol.Hi Dinaker,
Did you find any solution for this issue. I too have a similar requirement of pulling all the service orders for a specific Purchase Order in the BW report.
Thanks,
SAPBWI -
Hi Friends
We are on BI7 and ECC6.
We have to get the quantities into BI from ECC for that we are using one field from 2lis_11_vaitm. But we want to count the quantity only when material is a complete package all other values should be 0. Packages are described in the material as for example DMS PACKAGE , DST PACKAGE , DTTS PACKAGE DTTTT PACKAGE.
Now My thinking is ,Inorder to do that we have to use the offsets in ABAP routine. But the first few letters are not 3 / 4 fixed it may be 3, 4, 5 or 6 letters the PACKAGE will start from the next word..
Can any one help me how to write the ABAP logic to get the offset for last 11 letters ?
regardsF2 & F3 TYPE I.
F1 = 'DTTS PACKAGE' (F1 contains the value)
F2 = LENGTH(F1) (F2 determines the length of the field)
OR
F2 = STRLEN(F1)
F3 = F2 - 11 (F3 determines the difference)
F4 = F1+F3(11) (F4 picks up value based on offset)
*Not sure if variables are accepted for offsets. -
ABAP routine in infopackage that runs function in ECC
Hi All
I need to have dynamic filter in the info package
I have program in ECC that brings me the value that I need to filter in my info packege
I want to use ABAP routine in infopackage that runs function in ECC and brings the value that was received from the ECC function
Is that possible?
ThanksHi All
my CTO found the following option
function module that is "remote-enabled module "
then you call CALL FUNCTION 'Y_FM_IDOC_CATSDB' DESTINATION 'SAP4.7E'
you need to define it in SM59
code example
data: BEGIN OF IT_SOBSL OCCURS 0,
SOBSL(2),
END OF IT_SOBSL.
DATA: ls_range type STANDARD TABLE OF rssdlrange WITH HEADER LINE.
SELECT /BIC/ZSPEPROCI FROM /BIC/SZSPEPROCI INTO TABLE IT_SOBSL
WHERE /BIC/ZSPEPROCI NOT BETWEEN 'AA' AND 'ZZ'
AND /bic/zspeproci ne '' .
BREAK-POINT.
LOOP AT IT_SOBSL.
ls_range-IOBJNM = 'SOBSL'.
ls_range-LOW = IT_SOBSL-SOBSL.
ls_range-SIGN = 'I'.
ls_range-OPTION = 'EQ'.
APPEND ls_range .
ENDLOOP.
loop at ls_range.
append ls_range to l_t_range.
endloop. -
Abap Routine in DTP Filter with selection in a table
Hi guys,
I need help please.
I'm trying include a abap routine in a DTP filter, for this case I need to make a select in a dso table and return a list of criterias.
Example: for this characteristic 0GL_ACCOUNT i need in a fiter 20 or more 0GL_ACCOUNT of table "/BIC/DSO_XXX".
How can I select more than one 0GL_ACCOUNT in a tranparency table "/BIC/DSO_XXX"... and put in a DTP Fiter.
DTP FILTER ROUTINE.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'GL ACCOUNT'.
l_idx = sy-tabix.
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.Try this:
DATA: lv_rows TYPE n LENGTH 10,
it_zbw_pl_proj LIKE STANDARD TABLE OF /BIC/DSO_XXX
lw_zbw_pl_proj LIKE LINE OF it_zbw_pl_proj .
SELECT COUNT(*) INTO lv_rows FROM /BIC/DSO_XXX Where <your condition> .
SELECT * INTO TABLE it_zbw_pl_proj FROM zbw_pl_proj where <your condition>
IF lv_rows <> 0.
LOOP AT it_zbw_pl_proj INTO lw_zbw_pl_proj .
l_t_range-iobjnm = '/BI0/GL_ACCOUNT'.
l_t_range-fieldname = 'GL_ACCOUNT'.
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
l_t_range-low = lw_zbw_pl_proj-GL_ACCOUNT.
l_t_range-high = lw_zbw_pl_proj-GL_ACCOUNT.
APPEND l_t_range.
ENDLOOP.
ELSE.
" No data found for Current Forecast Version.
p_subrc = 4.
ENDIF.
I just copied this data from a DTP routine where i am fetching Versions from a DB table zbw_pl_proj. You may need to change the naming convention and performance tune the code ( like defining internal table only to hold GL_account and then only selecting GL_Account from ODS).
Hope this helps!
Regards
Amandeep Sharma
Edited by: AmanSharma123 on Jul 14, 2011 2:42 PM -
I am in the process of creating an ABAP routine in the Infopackage to load current month based on system data from one cube in BW to another Cube in BW. I am getting the following error in the load. I am not an ABAPer and would appreciate if you can help or guide me with a sample code.
Here is the error.
For sel. field '/BIC/Z_APOSNAP', no selection with SIGN = ''; OPTION '' allowed.
Thank you
NeeluHi Neelu,
U can create a ABAP Routine of the type 6 (ABAP Routine),The field you are trying to populate is a select-option so you have to define both Sign and Option along with Low and High values.
As u want to load current month, from a system values , u can do it from sy-datum.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = ''/BIC/Z_APOSNAP'.
l_idx = sy-tabix.
l_t_range-low =
l_t_range-high =
l_t_range-sign =
l_t_range-option =
modify l_t_range index l_idx.
p_subrc = 0.
Just u can fill Sign as 'I' and Option 'EQ'.
Fill Low and High with values u get from System Data.
Hope this Helps,
Thanks,
Krish
**awarding points is way of saying thanks in SDN. -
ABAP routine in the infopackage for Multiple Selection
Hi experts,
I want to include a abap routine in the infopackage for Multiple Selection so that I can fetch only the required Material Numbers when the InfoPackage is schedule. As I have the constraints that I have to select certain Material Numbers only, that are not in series - so I cannot select"BT' fuction. Tell me what ABAP Code will work in this scenario.
Kind regards,
Rajesh GiribuwaHi,
The Routine will have to use 'EQ' operator and Append each selections to the Structure.
ABAP Routine
InfoPackage definition for Bespoke SIS Structure
Infopackage routine !
Regards
Happy Tony -
hi,
I need some help withe ABAP routine in the DTP selection
I have requirement to load the data for specific company codes on a specific days.
If the current date is monday then it should pick Taiwan or
if the current date is Tuesday the it should pick Australia and Korea or
if the current date is sunday then it should pick CHINA and Vietnam.
I want to use only one DTP for this requirement. Please help me with the code for Info Object 0COMP_Code.
Regards,
Raghuhi,
I have tried the code and it is not populating any value in the selection.
Please check
data: l_idx like sy-tabix.
data: day like SCAL-INDICATOR.
*Finding out the day
clear day.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
DATE = sy-datum
IMPORTING
DAY = day.
read table l_t_range with key
fieldname = 'COMP_CODE'.
l_idx = sy-tabix.
case day.
when 1. "Monday
l_t_range-low = '0711'.
l_t_range-high = ' '.
l_t_range-option = 'EQ'.
l_t_range-sign = 'I'.
modify l_t_range index l_idx.
when 2. "Tuesday
l_t_range-low = '0355'.
l_t_range-high = ' '.
l_t_range-option = 'EQ'.
l_t_range-sign = 'I'.
modify l_t_range index l_idx.
when 3. "Wednesday
l_t_range-low = '0211'.
l_t_range-high = ' '.
l_t_range-option = 'EQ'.
l_t_range-sign = 'I'.
modify l_t_range index l_idx.
when 4.
when 5.
when 6.
when 7.
l_t_range-low = 'China'.
l_t_range-high = ' '.
l_t_range-option = 'EQ'.
l_t_range-sign = 'I'.
modify l_t_range index l_idx.
endcase.
p_subrc = 0. -
ABAP Routine in the InfoPackage
Hello,
I need to write an ABAP Routine in the infopackage to populate the selection conditions automatically. Coding is for Fiscal year/Period and it should be populated as LOW - Pervious period and HIGH - Current period.
I tried to do the coding myself but couldn't able to fetch the current and previous periods. I would be grateful if some one can share the code with me.
Best Regards,
Nene.Hello,
Try this.
1) Identify the current period by inputting sy-datum to function module 'DATE_TO_PERIOD_CONVERT'.
2) Find the first day of current period using function module
'FIRST_DAY_IN_PERIOD_GET'
3) Minus one day from the first day of current period to get previous period last date.
4) Call the same function module 'DATE_TO_PERIOD_CONVERT' by inputting the previous period last date (derived in step 3).
5) Pass the values to the infopackage code.
$$ begin of routine - insert your code only below this line -
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = '<field name>.
l_idx = sy-tabix.
l_t_range-SIGN = 'I'.
l_t_range-OPTION = 'BT'.
l_t_range-LOW = <previous period> (refer step 4)
l_t_range-HIGH = <current period> (refer step 1)
modify l_t_range index l_idx.
Thanks
Viswa
(Assign points if helpful). -
ABAP routine to join two ODS objects into one
Hi there,
i have two ODS objects related to each other. and i want to load them into another ODS object and join them so to say.
as far as i got now, it seems that the only way to do this is an ABAP routine in the update rules. ca nanyone give me a hint on how to do this? no clue how ABAP works yet.
i suppose there must be some template or something because i think others must have had the same issue before. anyone who already solved this?
i'd appreciate your help,
regards,
stefanHI Stefan,
First add VTS_KUN (customer code)
VTS_BEDA (order date)
in ODS2 VTSNWBP2 and don't map to any field intransfer rule.
write this code in start routine of udpate rule between VTSNWBP2 and VTSNWBDN.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
<u>TABLES: /BIC/AVTS_NWBE00.</u>
DATA: ...
$$ 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 <i>/BIC/CS8ZODS2</i>.
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
<b>DATA: S_DATA TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
DATA: ITEM_TABLE TYPE STANDARD TABLE OF /BIC/AVTS_NWBE00
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
*start of modification
*Populating the order number data from ODS1 table
SELECT * FROM /BIC/AVTS_NWBE00 INTO TABLE ITEM_TABLE.
SORT DATA_PACKAGE BY VTS_BES ASCENDING.
SORT <u><i>ITEM_TABLE</i></u> BY VTS_BES ASCENDING.
LOOP AT DATA_PACKAGE INTO S_DATA.
LOOP AT ITEM_TABLE WHERE VTS_BES = S_DATA-VTS_BES.
MOVE-CORRESPONDING item_table to s_data.
APPEND S_DATA.
ENDLOOP.
ENDLOOP.
DATA_PACKAGE[] = S_DATA[].</b>
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.
*TABLES: /BIC/AVTS_NWBE00.--ODS1 table
Lemme know this is working.
Regards,
San!
Message was edited by: San!
Maybe you are looking for
-
hi what is meaning of individual slip colective slip individual slip with text in gr printout tell me in layman language
-
HND not even installed and still ruining my day
I installed the EasyLink router configuration software with my new WRT160N router. I chose not to install the Home Network Defender. In the EasyLink software, there is a page to configure HND. If I go to that page, it prompts me to install the 30 d
-
Trouble using contacts with mail
Does anyone know how to select multiple contacts to address a message in Apple Mail? I understand how to use the "+" sign to bring up contacts, but I can only select one email address and then the contact window closes. Very frustrating trying to s
-
Arturo Cortes J. HI to everyone I had made a VI in where I need to show 2 graphs, one that shows the pressure and the other one that shows the signal output depending on the programming. allready i made that the pressure graph shows the hystoric an
-
RE Encoding using Files on my HDD
hi there I am trying to encode video/Audio ( Video files on my hard disk , HDD).I tried Manycam ( Application ) which is a amazing tool , but the problem is the BIG logo at the bottom which makes the output look ugly.Is there anyother way to go e