Associating multiple key fields.
Is it common practice to associate multiple key fields with a dimension level or fact? For example, if ITEM dimension has two primary key fields (inventory_item_id, sr_instance_id) to identify one single item, PLAN fact table the same, I can't manually associate ITEM dimension or PLAN cube with their tables from Analytic Workspace Manager. But I can do this with OLAP Analytic Workspace Java API. Problem with Java approach is that my AW can't be viewed corrected in AWM.
Is it "right way" to associate multiple key fields? Or should I avoid this (say concatinate keys into one item_key field)?
Hi,
Refer below code of FM 'F4IF_INT_TABLE_VALUE_REQUEST',it will useful to you.
DATA: IL_RETURN TYPE TABLE OF DDSHRETVAL,
WAL_RETURN TYPE DDSHRETVAL,
IL_FIELDS TYPE TABLE OF DFIES ,
WAL_FIELDS TYPE DFIES,
VL_RETFIELD LIKE DFIES-FIELDNAME.
CLEAR IL_FIELDS.
REFRESH IL_FIELDS.
LOOP AT FIELDS.
WAL_FIELDS-FIELDNAME = FIELDS-FIELDNAME .
WAL_FIELDS-TABNAME = FIELDS-TABNAME.
WAL_FIELDS-KEYFLAG = FIELDS-SELECTFLAG.
APPEND WAL_FIELDS TO IL_FIELDS.
ENDLOOP.
VL_RETFIELD = 'TABNAME'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ''
RETFIELD = VL_RETFIELD
VALUE_ORG = ''
TABLES
VALUE_TAB = VALUES
FIELD_TAB = IL_FIELDS
RETURN_TAB = IL_RETURN
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
READ TABLE IL_RETURN INTO WAL_RETURN WITH KEY FIELDNAME = VL_RETFIELD.
IF SY-SUBRC EQ 0.
VIEWNAME = WAL_RETURN-FIELDVAL.
ENDIF.
Best regards,
Syf
Similar Messages
-
Search help with multiple key fields
Hi,
I want to dispaly search help on a field from a internal table have multiple key fields i.e combination of fld1 + fld2 +fld3 makes one single row. Therfore can any one tell me how to return that single row , because if I am using function F4IF_INT_TABLE_VALUE_REQUEST I get only one return field that I select by which I can't get the actual line that I have selected as there may be more that one line for that field.
please suggest any way through programming not by creating any search help through se11.
thanksHi,
Use select query to select the fields & display them.
In the following code i've selected only a single field in select query but u can do it for more than 1 & proceed similarly.i've tried it before using this code.
SELECT WERKS
NAME1
FROM T001W
INTO TABLE ITEMP
WHERE IWERK = 'M011'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'WERKS'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = ITEMP
FIELD_TAB =
RETURN_TAB = T_RETURN
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
S_WERK-LOW = T_RETURN-FIELDVAL.
Hope this helps.
Reward if helpful.
Regards,
Sipra -
Multiple Key fields to same recordset strucure
HI ,
I am having a requiremet whre I need to pass multiple keyfield values to the same recordset structure.
Sample File
A,123,234,567
B,234,456,645
B,345,123,345
C,234,565,456
Here I need to pass A keyfield to Recordset 1 , B and C to the recordset2 .
Please guide how to achive this requirement to pass multiple keyfield values to the same recordet strutcure that is B and C key fields to assagin Recordset 2.
Regards
KrishnaHi Krishna - I don't think you can define an OR condition for a key field.
So read them as separate recordsets and handle it during the mapping. I don't see any issue that way. -
How to read from an internal table with multiple key fields.
Hi All!!
I want to read from an internal table having keys as k1,k2,k3.
How can I use read statement to read an entry having this as the key fields.
Thanks in adavance..
Prabhas Jhahi there
use:
sort itab by K1 K2 K3.
read table itab into wa with key K1 = value 1
K2 = value2
K3 = value 3
BINARY SEARCH.
where:
itab is ur internal table
wa is the work area with the same line type as the itab
cheers
shivika -
Couldnt work with multiple key fields in keyword search
Hi,
I have some issue while working keyword search uder free form search in datamanager. in my repository i have two keyfields name(default field) and nation(lookup flat). but while working with keyword search if i pass any value that is comparing with only the values under keyfield name not comparing with other keyfield nation values. i am working with MDM 5.5 sp6. It would be appreciable if any one solve this issue.
Regards
RaviHi Ravi,
If you want to perform Keyword search for Nation field as well without changing it's field type; then plz follow these steps:
1. Set the Keyword property for Nation Field as Normal in Main table.
2. Now go to the lookup table to which Nation field is looking into (say the Lookup table name is Nations).
3. Now set the Keyword property for Nation field as Normal in the lookup table (Nations table) as well.
4. Go back to Main table and now perform Keyword search. This time it will perform the search on both the fields (i.e., Name as well as Nation).
Please let us know, if problem still persists.
Regards,
Varun -
File Content Conversion - Key Field Value
Hi Experts,
I am using File to Idoc scenario for my mapping. In the receiver Communication channel, I am using File Content Conversion. My scenario is as follows :
I have a recordset with Header and Line items with Key Field Indicator as 'H' and 'L'. In some cases, the value for this Key Field is coming in as something other than 'H' and 'L'. I need to throw an exception when this Key Field is not 'H' or 'L'.
In the 'Content Conversion' tab, my attributes are as:
Header_Structure.keyFieldValue = 'H' and Line_Structure.keyFieldValue = 'L'. Is there any more attributes that I need to add ?
Please advise. Thanks a lot.
Regards,
Freddy.>>multiple key field values in FCC configuration i.e Line_Structure.keyFieldValue = H or L
AFAIK it is not possible but lets wait for other experts to comment on this...
>>Can keyFieldInStructure (add, ignore) parameter help me in this case ?
No. this parameter is only used when you want to include key filed in ur XML structure(add) or not (ignore)...
Chk this:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm -
Multiple key level associations
Hi,
I am getting the below error during the consistency check.
Table, X, has multiple key level associations.
Can anyone please let me know the reason for the same.
Also, when I drag the physical tables from the physical layer to the BMM Layer, there are some default primary keys in the Logical Table.What considerations does OBIEE take into when deciding upon the Primary Key in the Logical table.
Thanks in Advance
Akshatha"can you check the keys foreign keys for those table "
You didn't mention what I should be checking for.
However, I think I've worked it out now.
I have a dimension table that is referenced by both other dimension tables and the fact tables. Therefore, when imported into BI, both the dimension tables and the fact tables have foreign keys to this common dimension table.
I'm guessing that the foreign keys on the dimension tables are not required - because there are foreign key references from the fact tables to the common table anyway. Bearing in mind that this is a star schema and not a snowflake schema.
=> I deleted all the foreign keys from all my dimension tables, and now the consistency check works ok. -
Entering multiple entries in ZTABLE after changing a key field to nokey.
HI Experts,
This is Hema Iam new To ABAP.
My senario is I have created a ZTABLE with companycode, GLAccount, costcenter,profitcenter,plant.
AT first my table has companycode and GLaccount has key fields..
But to enter the multiple entries for cocode and GLaccount (ZBUKRS and ZHKONT) i have changed GLaccount has non key fields and table maintainence regenarated for the same.
my issue is as there are repeating entries for cocode and glaccount it is not possible to enter the entries as it is saying the entry is repeated and asking me to skip because cocode is primarykey there...
how can i overcome thsi issue to enter multipel entries for cocode and GLaccount.
As it should be done quickly ur help would be usefull
Thanks In Advance
L.Hemalatha.Hi
I created zslno field and made it has primary key field aslo but still iam getting eror message while entrying entries as
"an entry already exists with the same key"
wht should be done i maintainance recreated after adding this field nad in se14 i adjusted the table too still what steps should be done ?
eg i need to enter data:
client cocode zslno GLacount Cost center profit center plant
010 1000 1483100 1001199 0035
010 1000 226100 101199 0076
so while entering second record and trying to save iam getting that error.... help me out -
Error 15037: Table has multiple key level associations
Oracle BI 11g.
I get this error when doing a consistency check with the BI Admin tool:
Table DIMCPN has multiple key level associations: [DIMCPN.CPNKEY] and [DIMCPN.CPNKEY]
I've seen the notes in the following thread:
Re: nQSerror 15037
However, these don't help.
I'm not doing anything complicated.
All I've done is to create the Physical model by importing some dimension and fact tables, then create the Business layer object by dragging across from the physical layer, then create the Presentation layer object by dragging across from the Business layer.
I've not done anything else at all. I.e. I've not renamed any columns, created any hierarchies, etc, etc.
Any ideas what's happening?"can you check the keys foreign keys for those table "
You didn't mention what I should be checking for.
However, I think I've worked it out now.
I have a dimension table that is referenced by both other dimension tables and the fact tables. Therefore, when imported into BI, both the dimension tables and the fact tables have foreign keys to this common dimension table.
I'm guessing that the foreign keys on the dimension tables are not required - because there are foreign key references from the fact tables to the common table anyway. Bearing in mind that this is a star schema and not a snowflake schema.
=> I deleted all the foreign keys from all my dimension tables, and now the consistency check works ok. -
Multiple entries in a Z table with same key fields
Hi
I do have a ZTABLE, with 3 key fields defined earlier. It consists of around 1 lakh records. Later onwards, two of the non keyfields have been made to key fields.
This table is being populated with records at the time of saving a ztransaction.
But some times, the system is updating the same records, some times twice, sometimes thrice, etc. I got to know that all fields (both key fields and non-key fields) of the record are same. That is, records are being updated in to the database table n number of times may be depending of some false logic in the program.
If I tried to enter the same using SM30, it is showing me an error message stating that the record is already existing.
What can be the reson?Hi,
It seems there is some kind of data inconsistency..try to get all the records and then delete the duplicate entries through program....Now once u r done , from now onwards there won't be any duplicate entiers.,also before updating table use filters to avoid the duplication..
Regards,
Nagaraj -
To create multiple files on the receiver side based on key field
Hi Gurus,
My scenario is File to File
My Source structure is as below
My File looks like
My file looks like below
570774 11/26/2008 8:12 6296 xxxxxxx 985-399-5157 1153 Teche Road Morgan City United States Lori Eisenman Louisiana 70380 0 1153 Teche Road Morgan City United States Lori Eisenman Louisiana 70380 303 101400100000 3365440332522 ELLE YVES SAINT LAURENT Eau de Parfum Spray 2 61 78 156 184 184 0
570774 11/26/2008 8:12 6296 xxxxxxx 985-399-5157 1153 Teche Road Morgan City United States Lori Eisenman Louisiana 70380 1153 Teche Road Morgan City United States Lori Eisenman Louisiana 70380 376 106074700JP0 3365440347229 GOLDEN GLOSS N° 27Shimmering Lip Gloss 1 28 28 28 0
570775 11/26/2008 8:15 6296 xxxxxxx 985-399-5157 1153 Teche Road Morgan City United States Lori Eisenman Louisiana 70380 7 1153 Teche Road Morgan City United States Lori Eisenman Louisiana 70380 284 9000400000 3365440316546 L'HOMME Eau de Toilette Spray 1 53 53 53 60 60 0
for each new order number(key field ex: 570774) a new xml file to be created , from the above example 2 xml files sholud be created(one for 570774 and the other for 570775)
How can i acheive this functionality?
Please help me on this, Thanks in advance
Regards
SrinivasHi Srinivas,
map the key field to the parent record of the target field. Use the split by value and change the source key field level to higher one so that the all occurences of the key field are occuring. The mapping will be like this;
Source Key Field (change to higher level) --> Spli by value --> Filename creation UDF --> Target header field.
Try this.
Regards,
Murugavel. -
Wild Card as key field value in Content Conversion
Hi,
Can any one please tell me that can a wild card such as '*' be used as key field value.
Thnx,
Pravesh Puria.Hi Pravesh
For the file name in the sender file adapter you can use the '*' or '?'(as a placeholder for exactly one character)
You can also enable the "Advanced Selection for Source File" in the sender file adapter, where you can do two things:
a)you can specify an exclusion mask for the file name specified above.
b)you can specify/lits multiple directories with a file name and an associated exclusion mask, e.g. in file name you put ".txt" and in the associated exclusion mask "a". The every file with ".txt" except "a" will be fetched from that directory.
Try it out.
Regards,
Goekhan -
Adding fields into DSO in the Key Fields
Hello Experts,
I am using a Cube which loads data from DSO. Now, for some requirement I have to add one field into DSO in the key fields Part. But DSO already has 16 fields which I cannot remove.
So how can I add one more field into DSO in this case?
The cube I am using is 0FIGL_C10 and the DSO is 0FIGL_O10.
Regards,
Nirav ShahYou can create an Infoobject - acts as a custom key to concatenate multiple fields into one and make it a keyfield.
15 fields + custom key ( concatenate 2 fields ) = 16 Keyfields
Procedure - > Example
16th Key - > RVERS-Version-CHAR-3-0VERSION
17th Key - > RMVCT-TransactnType- CHAR-3-0MOVE_TYPE
1. Create one infoobject - ZKEY - Length = 6 ( add lenghts of the two objects)
2. Make ZKEY as a keyfield for the DSO.
3. Make 16th Key and 17th Key datafields.
Create a routine for ZKEY in the transformation or transfer rules to concatenate values coming from source into one.
TRFN Routine
Concatenate SOURCE_FIELDS-RVERS SOURCE_FIELDS-RMVCT into RESULT.
Or
Transfer Rules Routine
Concatenate COMM_STRUCTURE-RVERS COMM_STRUCTURE-RMVCT into RESULT.
This way nodata will be lost/overwritten due to less number of keyfields in the DSO.
We have as many as 21 Keyfields for GL Totals DSO. -
Key fields and non-key field of condition table
Hello Gurus,
what is key fields and non-key field of condition table?
thanks very much!Key field
Each condition table contains keys that can be used for creating dependent condition records.
for example let take condition type PR00.
PR00 uses access sequence PR02 .
Access sequence PR02 has following tables associated with it namely 304, 305 & 306
When you create a conditon record for PR00 with transaction VK11 or VK31, you have a button 'key combination' which is nothing but fields associated with tables 304, 305 & 306.
In brief, Condition records are always created using specific keys. Condition tables are used to define the structure of the keys of a condition record.
Non key field
For example take condition table 144 - sales deal basic data.
Table 144 is associated with access sequence PBUD.
If you check the fields associated with this table (click technical view button), there are three fields at bottom which do not have 'key' check mark -KDATU, PLTYP, KSTAF
So, when you create a condition record for PBUD, system does not propose these 3 fields in 'key combination' and hence are non key fields.
Please reward points for good answers as this would help increase the total donation that SAP will make to the United Nations World Food Programme. -
Key field from content - Sender file adapter content conversion
I am reading a source CSV file that has this structure. All rows in the source file are the same structure: line items of a PO. But there will be multiple POs in a single file, identified by the PO number as one column in the file.
PONum,LineItemNum,Qty,Description
001,1,34,Carrots
001,2,17,Apples
001,3,22,Bananas
002,1,4,Mangos
002,2,9,Coconuts
003,1,44,Grapes
Goal is to generate 3 messages, one for each PO:
<po>
<num>001</num>
<line_items>
... 3 line items for PO # 001 ...
</line_items>
</po>
<po>
<num>002</num>
<line_items>
... 2 line items for PO # 002 ...
</line_items>
</po>
<po>
<num>003</num>
<line_items>
... 1 line item for PO # 003 ...
</line_items>
</po>
Is there any way to use the Content Conversion Key Field Name to group the line items into the correct 3 messages? "Key Field Name" expects a static identifier for each type of row; but mine varies by the PO number in the content.
Or do I need to do this in the mapping? If so, what is the easiest way to split 1 large message of all line items into multiple target messages based on the PO number? (I assume this is better than sending individual line item messages and aggregating them later, as long as the file size is OK.)
Thanks in advance!
RBL
Edited by: Robert Burfoot-Lobo on Apr 8, 2009 11:43 AMHi Robert,
If ur goal is to split into 3 messages one for each PO, you can go for message split and using graphical mapping you can achieve that.
Within the message mapping go to the tab Messages.
Change the occurrence of the target message to 0..unbounded.
Also this link may help you.
/people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
Regards,
Madhu
Maybe you are looking for
-
I have a iphone 4S with ios 7and am continually getting noftications that I have unread messages when I don't? What is the problem?
-
Can't open Freehand Mx in Leopard 10.5.8
I've been using Freehand Mx for years and have lots of recent files. Around 6 months ago updated my system (Intel iMac) to Leopard 10.5.8. Freehand was working fine until yesterday! Now when I try to open it the application seems to open but there is
-
IPhoto stopped working while importing photos from iPhone
I am new to Mac OX and I just tried to load all my pictures in the iPhone to the Macbook Air by iPhoto. There were some 4000 pictures in my iPhone. During the import and while the blue bar go half way, the picture stopped skipping and the import see
-
Price control indicator and valuation class
All SAP Gurus, Is there any relationship between price control indicator (V and S) and valuation class? We want to change the price control for certain materials from V to S and for certain materials from S to V. Regards,
-
Hi, I'd like to know if is possible change background of a image when I'm exporting some frame to JPEG? I'm asking it because when I try export some text that is white the image generated becomes completed white (The text mix with the background whi