Set field as key
Hello,
I have a doubt. I need to change a field of a table and add it to the key.
What i need to know is what kind of impact will that have and the table and if the data on that specific field will be maintained.
Thank you,
Nuno
>
Gurpreet Singh wrote:
> Key Points:
> 1) Take back up of data say load to local file(excel) so later on if you have any issues you can upload data
> through program.
> 3> Adjust Database(SE14>tablename>Adjust database table).
> 4>changing Column position of the field can lead to data loss.
> 5>If the field you are changing is next to Keyfield no issue.Only adjust database(SE14).
> Note:Just download the data to a local file make any changes upload the data again.
> Gurpreet
All these(1,3) precautions can be taken while removing the Key Field.(not sure abt 4 & 5)
Adding an key field along with the existing Key field will not have any impact(data loss or SE14 adjust)
Key field is added ,if the requirement is to accept entries based on composite keys,considering all the Key fields.
Cheers,
Similar Messages
-
Hi,
I have a query regarding Field Selection Key.
I want to know the difference between Field Selection Keys AKTH, ME21, and ME21N.
I have observed during Testing that, AKTH and ME21N are almost the same.
But, I like to know the difference.
Which is to be used when?
Please give suitable suggestions in this regard.
Thanks in advance.
Thanks & Regards,
Srinivasa M.S
+91-9910077829Hi,
Go through following information.
Field selection key: -
You should not delete the field selection keys listed below, which the dialog program uses for control purposes, otherwise the dialog may terminate during processing:
1. Field selection key: transaction
The field selection key that corresponds to the transaction code: for example, field selection key ME22 for the transaction "Change Purchase Order". For the Enjoy Purchase Order transactions (creating, changing, displaying), there is only field selection key ME21N.
2. Field selection key: activity type
Is set from the activity type as follows:
AKTH In creation mode
AKTV In change mode
AKTA In display mode
AKTE With PO extension
You should note that you can also add items in change mode (for example, transaction ME22). Field selection key AKTH would be used for this item.
3. Field selection key: purchasing document type
The field selection key that you have assigned to the document type for the purchasing document. For example, field selection key UBF is assigned to document type UB, which is used for stock transfer orders (within a company code). In this key, the fields Price and Price unit are suppressed.
4. Field selection key: item category/document category
This is determined from the item and document categories as follows: The first two characters consist of the letters 'PT', the third character of the item category (internal representation), and the fourth of the document category:
A for RFQs,
B for purchase requisitions
F for purchase orders
K for contracts
L for scheduling agreements
Accordingly, field selection key PT3F would be used for a subcontracting item in a purchase order.
Field selection key: function authorization/release status
Purchasing documents: Used for authorization control. If the user parameter EFB (function authorizations in Purchasing) has been assigned and a field selection key has been assigned to the relevant value, this field selection key is used. Otherwise, field selection key $$$$ is used if the user has insufficient authorization to display prices.
Purchase requisitions: If the purchase requisition is subject to a release strategy and a field selection key has been assigned to the current release indicator, this field selection key is used.
Field selection key: subitem/creation indicator
Purchasing documents: Is only used in the case of subitems. The field selection key is put together in the same way as for the item categories (field selection key 4), with the string 'UP', the subitem category, and the document type.
Purchase requisitions: the field selection key that is derived from the creation indicator in the purchase requisition, that is, ESTV, ESTF, or ESTD, is used in the case of purchase requisitions generated from within Sales and Distribution, from a production order, or through direct procurement.
5. Field selection key: purchase requisition
In addition to the available field selection keys, you can define a field selection key at function authorization level to influence the input characteristics of fields in the Enjoy Purchase Requisition.
You can use this field selection key to set up groups of users that have certain restrictions when editing purchase requisitions.
SAP Recommendation: -
SAP recommends that you accept the settings defined in the standard system. In this case, no action is required on your part. -
Std Field Selection Key in PR Rele Stgy
Hi
Wats the SAP Std Field Selection Key for the release indicators "X" and "1" and "2" in PR Rele Stgy
VijayDear Vijay,
There is no standard setting. You need to set it up. You can use field selection key from FZ01 to FZ03 r create further more.
Sanjeev -
Field Selection Key In Release Indicator For PR
Hi,
Can you explain what is the use of Field Selection Key in Release indicator for PR on what basis to select this value.
regards,
zafarHi
Field selection key directs which values can be changed after the relevant release indicators have been set
Eg suppose you want to supress the field for PR after first release indicator has been set you have to assign the relevant field selection key to Release indicator
you can assign the same to the release indicators in
spro-mm-Purchasing -PR-Procedure with classification-set up Procedure with classification-release indicators
you can set the field selection key in
spro-mm-purchasing -PR- define screen layout at document level
Regards
Sandeep -
Hi,
Data fields and key fields are same as Characteristcs and key figures? Or they are diffrerent?
Thanks,
RadhaHI
Key Fields = Acts as Primary Key for The ODS like Primary of Tables in R3.
Data fields = Apart from Key fields We consider rest as data fields.
Ususally we use Characteristic info Objects and Dates in Key Fields and Key figures in Data fields.
It's decisive factor for overwriting property of ODS or DOS.
Hope this helps.
Regards,
Rangzz
Edited by: Ranganath Kodiugane on Feb 7, 2009 12:14 PM -
Changing Non key field to Key field in a custom table
Hello Abap gurus:
I have a requirement in which i need to change a non key field in my custom table(Z TABLE) to key field.
For example; i have field sequence as
field 1 key field
field 2 key field
field 3 key field
field 4 non-key field
field 5 non-key field
field 6 non-key field
field 7 non-key field.
i want to change field 7 as key field.
Can i do perform operation??
when i am tryingto perform bove operation it is taking long time to get the table activated.
Could any one please help me in getting this resolved.
regards,
Sravanthi.Use DB Utility (se14) to perform alter table or conversion. The latter is used when atemps to perform first operation fails. Which one is used, really depends on system and current DB table state (i.e. if has any content and what is being adjusted).
The way Max suggested is similar to [conversion process|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21f1b8446011d189700000e8322d00/content.htm] which system takes care of itself.
Refer [Adjusting Database Structures|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21f1ab446011d189700000e8322d00/content.htm] and already given link to conversion.
Please also consider potential errors while doing conversion . This can lead to data loss, so you should think of some backup to prevent that.
Regards
Marcin -
How to fetch old and new value from of a field(non-key) from LOGDATA
Hello SDNers,
i m fecthing LOgdata from dbtlog table[in our case the log is not getting Updated in CDHDR and CDPOS table]
i m using the same logic as it is used in RSVTPROT
but the problem is
" IT is fetching OLD and NEW VALUE after Update from same field LOGDATA of dbtlog table BUT when i used same logic it is FEtching only OLD VALUEs,
CAN U GUYS PLS TELL ME HOW TO FECTH OLD VALUE and NEW VALUE of a PArticular field(non-key field, fecthing key field is not an issue) From LOGDATA field of DBTLOG.
thx a lot in advance
Regards
KuldeepHi,
May be this link is useful to you.
a® -
Free PO indicator in field selection key/group
Hi all,
I would like to make Free PO indicator as mandatory field in PO thru specific document type field selection reference key. When I search for the field, it is not available for existing field selection key (Field selection group).
How can I add the Free PO indicator into this field selection key/group or Does it represented in different name.
Kindly clarify.
With regards
SuddyHi,
"Free Indicator" doesn't exist in field selection. If you wanto to have Free Indicator ON for a specific PO Document Type then you need to do ABAP Development for this.
Use BAdi --> ME_PROCESS_PO_CUST
Interface --> PROCESS_ITEM (Processing of Item Data)
Below is the Sample Code for your reference;
If w_bsart EQ 'ZPOD'.
wa_item3-repos = ' '.
ELSE.
ENDIF. -
Logistics Invoice Verification: how to set up Tolerance Key
Hi Experts,
I would like to set up tolerance key :
Could you please tell me wich Tolerance Key (and the steps) I need to set up in order to block invoices amounts which are above 10 % of the total amount of the PO and max 50£ (absolute value).
All Invoice above these limits should be block for payment.
Many thanks in adavnce for your help,
CesarHello Cesar,
You can block the invoice for payment.
You have to set up the tolerance limits at company code level.
Path: IMG -> Material Management -> Logistic Invoice Verification -> Invoice Block -> Set Tolerance Limits ->
Here you need to maitain the respected " Tolerance Key" and Lower limits and Upper limits %.
This will solve your issue.
BR
Suneel Kumar -
Setting Fields value via reflection
I'm starting from a c# code:
internal void RefreshFromObject(object objFromUpdate)
if (this.GetType()==objFromUpdate.GetType())
PropertyInfo[] fieldsFrom = objFromUpdate.GetType().GetProperties();
PropertyInfo[] fieldsThis = this.GetType().GetProperties();
for(int idxProp=0; idxProp<fieldsFrom.Length;idxProp++)
if (fieldsThis[idxProp].CanWrite && fieldsFrom[idxProp].CanRead)
fieldsThis[idxProp].SetValue(this, fieldsFrom[idxProp].GetValue(objFromUpdate,null),null);
else
throw new ObjectTypeNotValidException("Object type from which update current instance not valid. Use same type.");
Now I have to translate it in Java:
Class clazz = objFromUpdate.getClass();
Class thisClazz = this.getClass();
do {
Field[] fieldsFrom = clazz.getDeclaredFields();
Field[] fieldsThis = thisClazz.getDeclaredFields();
try {
fieldsThis[idxProp].set(thisClazz, fieldsFrom[idxProp].get(clazz));
catch (IllegalAccessException iaccEx) {
System.out.println("IllegalAccessException");
catch (IllegalArgumentException iaccEx) {
System.out.println("IllegalArgumentException");
clazz = clazz.getSuperclass();
thisClazz = thisClazz.getSuperclass();
} while (clazz != null && clazz != Object.class);
My problem is that I don't know if the field type is one of primitive, for which I should use the particular setters and getters.
My questions are:
1) is there in Java a more elegant way to set fields values via reflection?
2) how can I know if a field i changable (equivalent to the method CanWrite of c#?
Thanks a lot to each one that will answer me.
MarcoHi georgemc,
thanks for replying. I-m new with java forum, so I don't know if it is correct the code tags...
Anyway... the problem is that the Field of reflected object could be both of Object types or primitive types. So I cannot use the general method "set" when changing Field's value.
Maybe somebody else had the same problem...
Seems in C# it is a very easy thing... not in java :(
Marco
Class clazz = objFromUpdate.getClass();
Class thisClazz = this.getClass();
do {
Field[] fieldsFrom = clazz.getDeclaredFields();
Field[] fieldsThis = thisClazz.getDeclaredFields();
try {
fieldsThis[idxProp].set(thisClazz, fieldsFrom[idxProp].get(clazz));
catch (IllegalAccessException iaccEx) {
System.out.println("IllegalAccessException");
catch (IllegalArgumentException iaccEx) {
System.out.println("IllegalArgumentException");
clazz = clazz.getSuperclass();
thisClazz = thisClazz.getSuperclass();
} while (clazz != null && clazz != Object.class); -
Setting fields on html page from servlet
I have a HTML Page1 on ServerA that calls a servlet on ServerB. I want the servlet to load Page2 on ServerA and set fields on Page2.
I know I can do so by using Redirect and passing parameters in the URL that can be loaded in the onLoad event of Page2 but I was wondering if there is some way I can cause the servlet to set the fields directly.
I have looked a getRequestDispatcher("url").forward but it seems to me that the page being called would have to be on ServerB (the servlet's server). Am I correct? If not how do I get this to work? I have tried getRequestDispatcher("Page2").forward() and getRequestDispatcher("/Page2").forward() but neither seem to work. I assume because the pages are expected to be found on the servlet's server?thank you!
I do put a bounch of System.out.println statements in it. one is just before the out.println("<html>") statement. another is before response.sendRedirect(). My program can print out each of the System.out.println(). but stop after that.I really do not know why!
Sean -
How to set field type choice using csom (c#)
I have a field type: Choice (menu to choose from) which is not multichoice. How do I set a value?
I have found code for multiple choice but it doesn't seem to work for single choice.Hi,
The following code snippet for your reference:
newListItem["ChoiceFieldName"] = "ChoiceValue";
newListItem.Update();
clientContext.Load(newListItem);
clientContext.ExecuteQuery();
If you are assigning a Value which is not in the Choice Column, You need to create a choice value then assign it to the item.
More information is here:
http://sharepoint.stackexchange.com/questions/124999/how-to-set-field-type-choice-using-csom-c
Best Regards
Dennis Guo
TechNet Community Support -
The value 1 is not allowed for the field variace key
Hi experts,
When i was creating material master i was getting the status message as "the value 1 is not allowed for the field variance key" , but its stopping there its not moving out of that screen and creating the material record. When i see this field in the material master configuration its an optional field. Can you give me suggestions, where it can go wrong.
Thanks & Regards,
Ravi.Hi
Can u tell me the field name . I cant get that field ref key. In which view does it come.
Reg
Raja -
Set up tolerance key (invoice verification)
Hi Experts,
I would like to set up tolerance key and to control invoice item in reference to a PO item and I also need to set up a global tolerance.
What I need to maintain in order to have a double check: at item level and the total amount of the invoice?
(I have already set up PP tolerance key in order to have a check at item level and I need one other control for the global amount of the invoice but which one?)
Many thanks for your help.
BR,
Cesar
Edited by: Cesar on Sep 2, 2009 6:18 PMHello Cesar,
You can block the invoice for payment.
You have to set up the tolerance limits at company code level.
Path: IMG -> Material Management -> Logistic Invoice Verification -> Invoice Block -> Set Tolerance Limits ->
Here you need to maitain the respected " Tolerance Key" and Lower limits and Upper limits %.
This will solve your issue.
BR
Suneel Kumar -
Set my own key instead of using KeyGenerator.generateKey() - how?
How can I set my own key instead of using KeyGenerator.generateKey()?
I don´t see any method that is alowing this.I have now tried my own.
To send encrypted data through a CipherOutputStream, I have done this:
private File file;
private CipherOutputStream cos;
private Cipher cipher;
private PBEKeySpec key;
private char[] password = "test".toCharArray();
public SendFileThread(File file)
this.file = file;
try
key = new PBEKeySpec(password);
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey pbeKey = factory.generateSecret(key);
cipher = Cipher.getInstance("PBEWithMD5AndDES");
cipher.init(Cipher.ENCRYPT_MODE, pbeKey);
catch(Exception err) {err.printStackTrace();}
public void run()
byte [] mybytearray = new byte [(int)file.length()];
try
fis = new FileInputStream(file);
bis = new BufferedInputStream(fis);
bis.read(mybytearray,0,mybytearray.length);
OutputStream os = socket.getOutputStream();
cos = new CipherOutputStream(os, cipher);
int byteCount = 0;
int length = mybytearray.length;
while(byteCount < mybytearray.length)
cos.write(mybytearray[byteCount]);
os.flush();
os.close();
socket.close();
catch(FileNotFoundException err){err.printStackTrace();}
catch(IOException err){err.printStackTrace();}To receive the encrypted data and then decrypt it, I use the same password and Cipher.DECRYPT_MODE in the Cipher.init() method.
private Socket sock;
private DataInputStream din;
private CipherInputStream cin;
private BufferedOutputStream out_file;
private Cipher cipher;
private PBEKeySpec key;
private char[] password = "test".toCharArray();
public ListenForConnectionThread()
try
key = new PBEKeySpec(password);
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey pbeKey = factory.generateSecret(key);
cipher = Cipher.getInstance("PBEWithMD5AndDES");
cipher.init(Cipher.DECRYPT_MODE, pbeKey);
catch(Exception err) {err.printStackTrace();}
public void run()
try
serverSocket = new ServerSocket(2000);
sock = serverSocket.accept();
Runnable r = new Runnable()
public void run()
try
cin = new CipherInputStream(sock.getInputStream(), cipher);
out_file = new BufferedOutputStream(new FileOutputStream("received_file.txt"));
int inputLine;
while((inputLine = cin.read()) != -1)
out_file.write(inputLine);
out_file.flush();
catch(Exception err){err.printStackTrace();}When I run the application, I get this error:
java.security.InvalidKeyException: requires PBE parameters.
Why?
Maybe you are looking for
-
ITunes Match master account for updates
Is there a MASTER computer/mac/pc/itunes library that the cloud pulls information from and sends back too? I am "cleaning" up my itunes to include deleting duplicates, adding missing artwork and combining the compilations together such as the "NOW!
-
Can't get rid of "Inconsistencies in your sync information ...."
This pop-up message keeps appearing every few minutes on my MBP ... no matter how often I Sync. I use to get it a few times a day with my 3G, but now that I have a 3GS, I'm getting it every few minutes ... since also buying and setting up MobileMe. T
-
Citrix Kickout Message not working .
Running from TIDAL . /C " "%ProgramFiles%\tsmsg\tsmsg.exe" * The Claims system will be unavailable for the next hour for nightly maintenance, you have 15 Minutes to save your data and log off!" Getting Below error message ... anyo
-
After restoring my iPod Nano it won't reset.
Recently I had some trouble with my iPod Nano (4th Generation) where whenever I plugged it in iTunes would freeze and my computer would be unable to access the iPod or unplug it. This occurred after updating iTunes and then restarting my computer whi
-
Hi Please have a look at attachment, the AP801-WAE doesn't have any sent/received traffic with AM001N5200. But from AM001N5200, it does has traffic communication with AP801-WAE. Any one know why this happen and how to fix it? Thanks. Leo