How to look up master data in update rule
Hi Friends,
I want to Fill a characteristic of an info cube using the attribute value in a master data in Update rule.
Eg: I want to fill a field in cube 0PM_C01 that is got from Master data 0PM_ORDER. I have to do this in upate rule. Can anyone help me.
Joe
Eugene, Atlaj
Your answers were very useful.
Eugene as you said,
I read the link you mentioned and I can use code
like this
DATA: mat LIKE /BI0/PMATERIAL-MATERIAL.
SELECT SINGLE MATERIAL FROM /BI0/PMATERIAL INTO mat
WHERE EANUPC = COMM_STRUCTURE-EANUPC AND OBJVERS = 'A'.
IF SY-SUBRC = 0.
RESULT = mat.
RETURNCODE = 0.
ELSE.
RETURNCODE = 8.
ENDIF.
But for each record of comm structure the selection quer y will touch the Data base. As Atlaj said, can I fill the internal table in the start routine and look it up in the update rules. I think the performance willbe increased. Could you give me code sample or link?
Thanks in ADV
Joe
Similar Messages
-
Access master data in update rules
Hi,
I try to calculate a weight in my update rules. Therefore I need the product weight and the number of peaces. I try to read the product weight from master data. The problem is, that it always calculates zero as the result. Is it possible to read master data in update rules?
If I try to calculate the weight in the transfer rules, I get the message in the monitor, that the transfer rules don't finish. Do you have an idea what to do?
Regards,
GabiHi Robert,
here is my code in the update rule.
fill the internal table "MONITOR", to make monitor entries
DATA: l_s_errorlog TYPE RSMONITOR.
data: temp_prod_weight type /BIC/PZL2_P_ID.
general values
RESULT = COMM_STRUCTURE-/BIC/ZL2_POTMW. "weight
UNIT = COMM_STRUCTURE-UNIT_OF_WT.
RETURNCODE = 0.
ABORT = 0.
calculate weight from master data, if it is zero
IF COMM_STRUCTURE-/BIC/ZL2_POTMW = 0
or COMM_STRUCTURE-/BIC/ZL2_POTMW = '0'
or COMM_STRUCTURE-/BIC/ZL2_POTMW is initial.
select single /BIC/ZL2_NETW UNIT_OF_WT
from /BIC/PZL2_P_ID
into corresponding fields of temp_prod_weight
where /BIC/ZL2_P_ID = COMM_STRUCTURE-/BIC/ZL2_P_ID
and objvers = 'A'.
if sy-subrc <> 0.
l_s_errorlog-MSGTY = 'I'.
append l_s_errorlog to MONITOR.
RESULT = 0.
abort, if calculation is not possible
ABORT = 1.
else.
RESULT = temp_prod_weight-/BIC/ZL2_NETW
COMM_STRUCTURE-/BIC/ZL2_POTMQ.
UNIT = temp_prod_weight-UNIT_OF_WT.
endif.
ENDIF.
convert unit
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = RESULT
NO_TYPE_CHECK = 'X'
ROUND_SIGN = ' '
UNIT_IN = COMM_STRUCTURE-UNIT_OF_WT
UNIT_OUT = 'KG'
IMPORTING
ADD_CONST =
DECIMALS =
DENOMINATOR =
NUMERATOR =
OUTPUT = RESULT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10
IF SY-SUBRC <> 0.
l_s_errorlog-MSGTY = 'I'.
append l_s_errorlog to MONITOR.
UNIT = COMM_STRUCTURE-UNIT_OF_WT.
RESULT = COMM_STRUCTURE-/BIC/ZL2_POTMW.
ELSE.
UNIT = 'KG'.
ENDIF.
I'm loading via PSA, but I have problems to debug the code. If I set a break point in my code (command break-point), I can't stop at it.
Thanks,
Gabi -
Loading time-dependent master data using update rules/transformations
Hi
I am trying to load time-dependent master data to an infoobject. It seems that I get an error message on duplicate records if I use a transformation or update rule. Does this only work with direct update ?In the DTP you have the option to ignore duplicate records....
Just select that and then load data... -
Look up master data and concatenate into table field.
Hi,
I have a database table which has many fields including category and period.I am extracting these values from an csv file which also has fields category and period.
Periods are like 001,002,003 etc.but in the table I need it like 0012008,0022008,0032008.
We only have the period coming in from the file ; the associated year would be deduced from the Category. Every category is associated with a year.Therefore , we have to maintain a master data table for these categories where you have the year associated (for the time being take 2008) and the ABAP program needs to read the category from the file , look up to the master data , pick up its year and concatenate with the period that is already mentioned in the file.
How to I achieve this
AnkitEugene, Atlaj
Your answers were very useful.
Eugene as you said,
I read the link you mentioned and I can use code
like this
DATA: mat LIKE /BI0/PMATERIAL-MATERIAL.
SELECT SINGLE MATERIAL FROM /BI0/PMATERIAL INTO mat
WHERE EANUPC = COMM_STRUCTURE-EANUPC AND OBJVERS = 'A'.
IF SY-SUBRC = 0.
RESULT = mat.
RETURNCODE = 0.
ELSE.
RETURNCODE = 8.
ENDIF.
But for each record of comm structure the selection quer y will touch the Data base. As Atlaj said, can I fill the internal table in the start routine and look it up in the update rules. I think the performance willbe increased. Could you give me code sample or link?
Thanks in ADV
Joe -
How to know which master data objects need to activated in R3
SALES OVERVIEW CUBE -0SD_C03
How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.
its very urgent please advise.
R/3 in RSA5
Sales Master Data
0ACCNT_ASGN_TEXT Account assignment group for this customer
0ACCNT_GRP_TEXT Customer account group
0BILBLK_DL_TEXT Locked
0BILBLK_ITM_TEXT Billing block for item
0BILL_BLOCK_TEXT Billing block in SD document
0BILL_CAT_TEXT Billing Category
0BILL_RELEV_TEXT Relevant for Billing
0BILL_RULE_TEXT Billing rule
0BILL_TYPE_TEXT Billing Type
0CONSUMER_ATTR Consumer
0CONSUMER_LKLS_HIER Consumer
0CONSUMER_TEXT Consumer
0CUST_CLASS_TEXT Customer Classification
0CUST_GROUP_TEXT Customer Group
0CUST_GRP1_TEXT Customer Group 1
0CUST_GRP2_TEXT Customer Group 2
0CUST_GRP3_TEXT Customer Group 3
0CUST_GRP4_TEXT Customer Group 4
0CUST_GRP5_TEXT Customer Group 5
0DEALTYPE_TEXT Sales Deal Type
0DEL_BLOCK_TEXT Delivery block (document header)
0DEL_TYPE_TEXT Delivery Type
0DISTR_CHAN_TEXT Distribution Channel
0DIVISION_TEXT Division
0DLV_BLOCK_TEXT Schedule line blocked for delivery
0DOC_CATEG_TEXT SD Document Category
0DOC_TYPE_TEXT Sales Document Type
0INCOTERMS_TEXT Incoterms (Part 1)
0INDUSTRY_TEXT Industry keys
0IND_CODE_3_TEXT Industry code 3
0IND_CODE_4_TEXT Industry code 4
0IND_CODE_5_TEXT Industry code 5
0IND_CODE_TEXT Industry code
0ITEM_CATEG_TEXT Sales document item category
0ITM_TYPE_TEXT FS item type
0KHERK_TEXT Condition Origin
0MATL_GRP_1_TEXT Material Group1
0MATL_GRP_2_TEXT Material Group 2
0MATL_GRP_3_TEXT Material Group 3
0MATL_GRP_4_TEXT Material Group 4
0MATL_GRP_5_TEXT Material Group 5
0MATL_TYPE_TEXT Material Type
0MAT_STGRP_TEXT Material statistics group
0NIELSEN_ID_TEXT Nielsen ID
0ORD_REASON_TEXT Order reason (reason for the business transaction)
0PICK_INDC_TEXT Indicator for picking control
0PRODCAT_TEXT Product Catalog Number
0PROD_HIER_TEXT Product Hierarchy
0PROMOTION_ATTR Promotion
0PROMOTION_TEXT Promotion
0PROMOTYPE_TEXT Promotion Type
0PROV_GROUP_TEXT Commission Group
0REASON_REJ_TEXT Reason for rejection of quotations and sales orders
0REBATE_GRP_TEXT Volume rebate group
0RECIPCNTRY_TEXT Destination country
0ROUTE_TEXT Route
0SALESDEAL_ATTR Sales deal
0SALESDEAL_TEXT Sales deal
0SALESORG_ATTR Sales organization
0SALESORG_TEXT Sales Organization
0SALES_DIST_TEXT Sales district
0SALES_GRP_TEXT Sales Group
0SALES_OFF_TEXT Sales Office
0SCHD_CATEG_TEXT Schedule line category
0SHIP_POINT_TEXT Shipping point/receiving point
In BW
Base Unit of Measure 0BASE_UOM
Bill-to party 0BILLTOPRTY
Calendar Day 0CALDAY
Calendar Year/Month 0CALMONTH
Calendar Year/Week 0CALWEEK
Change Run ID 0CHNGID
Company code 0COMP_CODE
Cost in statistics currency 0COST_VAL_S
Credit/debit posting (C/D) 0DEB_CRED
Distribution Channel 0DISTR_CHAN
Division 0DIVISION
Number of documents 0DOCUMENTS
Sales Document Category 0DOC_CATEG
Document category /Quotation/Order/Delivery/Invoice 0DOC_CLASS
Number of Document Items 0DOC_ITEMS
Fiscal year / period
Fiscal year variant 0FISCVARNT
Gross weight in kilograms 0GR_WT_KG
Number of Employees 0HDCNT_LAST
Material 0MATERIAL
Net value in statistics currency 0NET_VAL_S
Net weight in kilograms 0NT_WT_KG
Open orders quantity in base unit of measure 0OPORDQTYBM
Net value of open orders in statistics currency 0OPORDVALSC
Payer 0PAYER
Plant 0PLANT
Quantity in base units of measure 0QUANT_B
Record type 0RECORDTP
Request ID 0REQUID
Sales Employee 0SALESEMPLY
Sales Organization 0SALESORG
Sales group 0SALES_GRP
Sales Office 0SALES_OFF
Shipping point 0SHIP_POINT
Ship-To Party 0SHIP_TO
Sold-to party 0SOLD_TO
Statistics Currency 0STAT_CURR
In R3 RSA5 we have all the Master data data sources as mentioned above, and BW also. How to find the related Master data Infosource in R/3 Master data Data sources.
Thanks in advance,
Bhima.
Message was edited by: Bhima Chandra Sekhar GuntlaHi,
<i>How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.</i>
I think, you are looking for master data sources(text,attributes,hier).Am i right?
If so, This cube has almost all SD master data characterstics. So you can activate all the all master data datasources of SD in r/3 (SD-IO).
Any way you requirement does not stop only by using this cube . You will activate all other cubes in SD also. So if you want to activate only needed master data datasources when you are activating a cube, the job becomes senseless. There is no problem(wrong) in activating all master data available under that application , even though you want to activate only one cube.
With rgds,
Anil Kumar Sharma .P -
Open hub Services - How to extract the master data related to a object ?
Hi Gurus,
I am implementing OpenHub services for our project, it's on BW 3.5, I have the list of required fields with which I am creating an InfoSpoke. Now I am stuck in some the info objects which are having master data associated with it.
Example : Business partner(BP) data, when I map the 0BP infobjects in infospoke it's extracting the BP ID (ex: CT065316,CT068638 etc) in flat file but I want the BP name, address & telephone number as well, which are coming from master data table. But I am able to map only 0BP infobjects as a part of ODS/Cube.
Can any one tell me how to get the master data extracted in the flat file with associated info object???
Answers will be highly appreciated.
Regards,
Kironmoy Banerjee
Edited by: Kironmoy Banerjee on Oct 1, 2009 3:34 PMHi Kironmay
Please follow the below mentioned procedure to create a transformation. This is applicable for BW 3.5 as well.
- Enter your infospoke in the edit mode.
- On the Transformation tab set the indicator for the Infospoke with Transformation with BADI so that the infospoke is activated.
- This will take you to the Addin implementation/BADI builder.
- Enter the short text/description for the implementation. The implementation name is always the same as the technical name of the infospoke
- The implementation of the BADI is always filter dependant.
- In the properties tab of the infospoke enter your infospoke under the Filter specifications.
If you do not specify an InfoSpoke under Filter Specifications, then this implementation is valid for all InfoSpokes. This means that this is called up for all InfoSpokes during the extraction.
- Activate your class
- From your interface tab page, double click on the Transofrm Method and you will arrive in the class builder page
- Here you can enter the code
- To do a look up of the master data you have to write a code similar to the one I've given below. This is just an example for looking up material master.
IF FLT_VAL = 'Your infospoke'.
T_DATA_IN[] = I_T_DATA_IN[].
Select zstd_cost from /bi0/pmaterial into table T_return
For all entries in T_DATA_IN
WHERE material = T_DATA_IN-material.
...Continue with your code.
Append output from T_return to your output E_T_DATA_OUT
- Activate your method. Return to the BAdI builder. Return to your InfoSpoke.
I hope this helps.
Thanks. -
How to start with Master data management
Hi All,
I want to start with Master Data Management. Can any one provide me proper material to get the knowledge on Master Data Management Integration. And What is the relationship between XI.and for starting MDM what all settings i have to do???
Its really urget plz help me out.
Thanks,
Seema Khandelwal
Message was edited by:
Seema khandelwalHi ..
look at this documents
/people/andreas.seifried/blog/2007/08/30/how-to-use-the-test-environment-of-the-mdm-enrichment-controller
/people/harrison.holland5/blog/2006/11/27/mdm-syndication
/people/harrison.holland5/blog/2007/01/22/testing-and-monitoring-an-interface-between-mdm-xi
see this Wiki to find all the documentation on MDM:
https://wiki.sdn.sap.com/wiki/display/HOME/MasterDataManagement
Here, for the components you need to install:
https://wiki.sdn.sap.com/wiki/display/HOME/MasterDataManagement+Components
Others smart links are here:
- sdn e-learning.
https://www.sdn.sap.com/irj/sdn/mdm-elearning
http://service.sap.com/installMDM for a
you can use expression editor to do that:
have a look at this guide on how dates can be calculated there
with your field it can be very similar:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b025fab3-b3e9-2910-d999-a27b7a075a16
for more details about expression editor:
Calculation Fields chapter
https://websmp108.sap-ag.de/~sapidb/011000358700006291622006E
MDM 5.5 SP05 - ABAP API
https://websmp101.sap-ag.de/~sapidb/011000358700000271902007E
MDM 5.5 SP05 - ABAP API How To Guides (ZIP File)
https://websmp101.sap-ag.de/~sapidb/011000358700000271912007E
How to Identify Identical Master Data Records Using SAP MDM 5.5 ABAP APIs
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e060251e-b58d-2910-02a2-c9a1d60d9116 -
How to upload the master data from legacy to SAP
Hi Frends,
how to upload the master data from legacy system to SAP System once the configuration is over.how to carry forward the open items of vendors and customers while uploading.who will upload functional consultantsor ABAPER.
please clarify me
Regards
Sap GuruHi ,
use LSMW or BDC for uploading Master & transaction data.
This work is done by the Respective Functional team.
Chandra -
How to fill the master data in ecc
Hi,
0product_attr having zero records i ecc,how to fill the master data in ecc can you pls provide me the setps?
Regrads,
devi.Hi Devi,
Loading data is ECC is not the part of BI Activities. Contact your functional consultant to load data.
BDC and LSMW both are used for loading data into SAP system.
Or ask even directly they can create in ECC. If it is for your testing purpose, it is better to ask them to create master in source system .
Thanks
BVR -
FM for master data creation/update
Hello all,
I would like to ask you for a FM for master data creation/update.
Thanks all for your help.The answer is API_SEMBPS_CHA_VALUES_UPDATE.
-
How to create customer master data for walking customer in retail
hi experts !!!!!!
for retail industry e.g books trading industry
how to create customer master data for walking customer in retail
its dummy or one time customer
if i create one time customer then same customer number can i use for every new order and every new customer how ?????
thanksDear Hanumant,
As per my view,,
You can use one time customer functionality to full fill your requirement.
When you create sales order with one time customer system take you to the customer data maintanence screen through that you can maintain the one time customer data.
Same one time customer number you can use for every new order through maintaining different data.
I hope this will help you,
Regards,
Murali.
Edited by: Murali Mohan.Tallapaneni on Dec 19, 2008 6:08 AM -
How to create generic master data datasource .
How to create generic master data datasource which utilises ALE change pointers for extraction of master data.
Hi,
For any master data lets say, Material Master, for this you need to create a view
based on your requirement by selecting one or more tables into your view and
keeping all the required fields in the view as viewfields and go to RS02 create
generic data source, select the view option as source and put the view, save and
activate, at the same time set the delta pointer as to whether Numericpointer/date/timestamp..this way you can create a generic DS then transfer the stru. and at the BW side replicate the source system..and so on..
Hope this helps..
Assign points if useful.
Need further info revert..
Cheers,
Pattan. -
How to Lock the master data. R/3 Conflict ESS
Dear Gurus,
Please guide me how to lock the master data for a nos of days(say 7 days).
Recently we had encountered an issue, related to ESS. While Uploading the Time data through t-code: PT60, our core team encountered a problem, that such and such employee number is locked.
While checking, they identified it, system shown error against those employees, who are accessing their ESS. We check and came to know they are accessing the master data by changing their personal record i.e. address.
Do we have any other provision to lock the master data without setting the control record to release for payroll.
Please help .Create a custom transaction involving a custom views of table T7XSSSERSRV with the following field for each service
"V_T7XSSSERSRV-ISDISABLED"
when HR wants to lock it, the will enter this table and check this field.
this will disable the servcies in the front end.
Once the 7 days are over, HR will uncheck this field. this will re-enable the services in the froint end.
Hope this helps. -
How to Know Customer whose data was updated
hi,
can u tell me how to know customers whose data was update by some .
my requirement is that find customers whose data was modified.
<b>can u tell me bapi names to find modified customers.i can give customer id as input parameter.</b>
regards
GuruHello,
You can get the change details from table CDHDR and CDPOS.
Pass
OBJECTCLAS = DEBI
Object value = "Customer"
TO CDHDR and take CHANGENR.
and then pass OBJECTCLAS,Object value, CHANGENR to CDPOS. It will give the field name, old value and new value.
Regards,
Naimesh
Message was edited by: Naimesh Patel -
Extraction time while updating the data from update rule
Hello Friends,
Can you please tell me that why it is taking more time while updating the data from update rule to data target.
I believe that it is taking 40% of total extraction time.
Is there any specific reason for it?
Prompt reply will be appreciated.
Regards,hi,
check if you have complex transformation in that update rules, like calculation, read from other tables, etc.
take a look 'bw loading performance and analysis' doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2
and bi performance tuning knowledge center
Business Intelligence Performance Tuning [original link is broken]
there e-learning for bw performance
hope this helps.
Maybe you are looking for
-
Force read/refresh of master data attributes on query
Hi there, We're having troubles with one input ready query that changes and attribute value (KYF) of one characteristic. That works fines and whe can save changed data on the infoprovider via DTP. Problem is when data is saved we need to refresh quer
-
Friends, I have been struggling to convert the from address of the retrieved from the inbox to a normal string. I have tried using the toString() method, but still I am able to print only the internet address only . Though it may look like a silly qu
-
How to pass variables between 2 jsp pages-help
Hi, I have a question like this. As an example consider I have 3 .jsp pages. page1.jsp - In this html form it has some textboxes to enter employee details. page2.jsp - In this page it has a "PRINT" button which allows the user to click. page3.jsp - A
-
Connecting Mac Pro to Panasonic BT-LH2550 monitor for Color
Dear All, I am planning to have a setup to connect a Panasonic BT-LH2550 monitor with my Mac Pro to view the footage pixel-pixel for serious color grading with Color from FCP Studio. I am wondering what kind of connection I need to have between the m
-
Query a resultset in java like CFQUERY
Hello, Is there a way to query a resultset in java. Yes what I mean is after obtaining one resultset, again query on that resultset like we do to a table in the DB. Here is my problem in detail and any help doing the same in Java will be most appreci