Value conversion
Hi everybody,
i need a small help reg value conversion.
for suppose:
1>a = 1.234.567,89 in sap format
we need to convert this to a = 1,234,567.89 into flat file.
2>date format is showing as DD.MM.YYYY in sap format
we need to convert this to MM/DD/YYYY
(no matter which user is used to run the program)
please give me reply.
Hi Sunil,
To dispaly the Date form System Format to User Format the FM 'CONVERT_DATE_TO_EXTERNAL' is used.
Consider this code.
REPORT zztest_arun_2.
DATA: e_date(10) type c VALUE '2/2/2006',
i_date(10).
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = e_date
IMPORTING
date_internal = i_date
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
WRITE : / 'CONVERT_DATE_TO_INTERNAL',
/ 'My Date:' , e_date ,
'Conv Date:', i_date.
skip 2.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = sy-datum
IMPORTING
DATE_EXTERNAL = e_date
EXCEPTIONS
DATE_INTERNAL_IS_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE : / 'CONVERT_DATE_TO_EXTERNAL',
/ 'My Date:' , sy-datum,
'Conv Date:', e_date.
Thanks,
reward If Helpful.
Similar Messages
-
Creating Value Conversion Filters in Import Manager
Hello.
I am trying to create some Value Conversion Filters that change street suffixes to abbreviations. Such as Lane to Ln.
How would I go about doing this? Am I supposed to use the find/replace Conversion Filter?
Points awarded to any helpful answers / helpful guides (besides the Import Manager Guide) <--- I have this already
Thanks,
NicholeHi,
Yes u can use the Find/Replace Conversion filter property in Import manager.
In this u can write the word u want to change and then write the req format.
But the conversions are permanent while if u do this in MDM data manager under transformations they are temporary.i.e they will not be syndicated.
Hope this may help u.
Rgds]
Ankit
Edited by: ankit jain on Aug 6, 2008 5:06 AM -
Hello,
I am trying to meet the new business requirements for the client I am working at. They recentlyd decided to eliminate all company codes and condense to one purchase organization. I have my purchase org and company code data in a Tuple.
Can I use the value conversion filter to all data in my repository to elimate company codes and condense the purchase orgs? I guess my question really is can you use the value conversion filter if the field values to be converted are in Tuples?
Thanks experts!Hey ,
if you apply value conversion filters at the field level, the conversions are applied sequentially to each converted value that has not been individually edited or converted at the value level, now when you first map a field, each value in the Converted Value column appears in gray to indicate that it is inheriting value conversion filters from the field level. When you apply a manual edit or a value-conversion filter to an individual value, the Converted Value then appears in black to indicate that you have overridden inheritance from the field level. You can use the Restore Converted Value command to restore inheritance for a value.
Value conversion filters automate repetitive and error-prone transformations, eliminating manual typing and the possibility of user error. They also allow powerful reformatting algorithms to be applied to an entire group of values.
No conversion filter is necessary to trim leading and trailing spaces from source values, as Import Manager does this automatically when importing values into an MDM repository.
Hope it gives you clarity.
Deep -
Value conversion during syndication.
Hi All,
I need to do a value conversion during syndication of records out of MDM. The values maintained in my MDM Repository is true and false while the destination system can only read Y and N. What would be the best option to have this value conversion done during the auto syndication?
Appreciate your responses.
- AdityaOne way to handle this is by using key mapping on a lookup table instead of a boolean field. Often times your remote systems will have different internal values than the ones you are storing in your system. For example, you may store "True" or "False" as values in your MDM repository, however ECC doesn't accept those values, instead it wants "X" or "NULL". Likewise, a third-party system may expect "T" or "F". The same thing goes for other fields in your repository (ie: country codes, region values, etc). In cases such as this, you should create a lookup table with key mapping enabled. Then, you can maintain different values based on the remote system. In other words, you may store the value "TRUE" in your lookup table, but the key mapping for true may maintain "X" for ECC and "T" for a legacy system that you define in the console. Then, when you build your syndication map, you may the remote key to the destination field instead of mapping the actual code value of your repository. This way the correct value will always get syndicated to the partner system regardless of what system is being syndicated to.
Does that make sense? -
Keytool Error: DER Value Conversion
I'm trying to import a certificate into a Keystore and I keep getting the following error:
Keytool error: java.lang.IllegalArgumentException: DER value conversion
I'm running this on a W2K3 box with Java SDK 1.4.2. I have imported this certificate on two other servers that have the same configuration with no problems. I've been trying to fix this thing for days and it has become very frustrating.
Message was edited by:
JayWDid you ever get any information on this?Yes, and I apologize for neglecting to post it here.
First, I didn't get the aix 1.3 ssl working with my code, but I am pretty sure I could have if I'd just change the packages I imported. What we have done with our customers using Java 1.3 on aix is have them keep using the old Sun JSSE 1.0.2 for the time being. And we have our solaris customers stick to Java 1.3 so we have only one version of the code.
In Java 1.4, ssl is bundled into Java. The ssl classes which were in vendor-specific packages like ibm.com and sun.com, will now be in javax.net.ssl.
This information is from Brad Wetmore of the Java Security Team at Sun.
So as soon as we can get Java 1.4 on AIX, we're moving to that and using the javax.net.ssl package. -
Hello,
I try to make an URL connection to a secure site with JSSE 1.0.3. I get the exception 'DER Value conversion' printed below, when I connect to an IIS server with a Baltimore test servercertificate. Does someone know how to solve this problem?
Thanks, Arianne.
java.lang.IllegalArgumentException: DER Value conversion
java.lang.String sun.security.x509.AVA.toString()
java.lang.String sun.security.x509.RDN.toString()
void sun.security.x509.X500Name.generateDN()
java.lang.String sun.security.x509.X500Name.toString()
java.lang.String sun.security.x509.X500Name.getName()
com.sun.net.ssl.internal.ssl.X500Name com.sun.net.ssl.internal.ssl.X500Name.a(java.security.Principal)
java.security.cert.X509Certificate com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(java.security.cert.X509Certificate, java.util.Date)
java.security.cert.X509Certificate[] com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(java.security.cert.X509Certificate[], java.util.Date)
boolean com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(java.security.cert.X509Certificate[], java.lang.String)
boolean com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.isServerTrusted(java.security.cert.X509Certificate[], java.lang.String)
boolean com.sun.net.ssl.internal.ssl.JsseX509TrustManager.isServerTrusted(java.security.cert.X509Certificate[], java.lang.String)
void com.sun.net.ssl.internal.ssl.ClientHandshaker.a(com.sun.net.ssl.internal.ssl.HandshakeMessage$CertificateMsg)
void com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(byte, int)
void com.sun.net.ssl.internal.ssl.Handshaker.process_record(com.sun.net.ssl.internal.ssl.InputRecord)
void com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(com.sun.net.ssl.internal.ssl.InputRecord, boolean)
void com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(com.sun.net.ssl.internal.ssl.OutputRecord)
void com.sun.net.ssl.internal.ssl.AppOutputStream.write(byte[], int, int)
void java.io.OutputStream.write(byte[])
void com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake()
java.net.Socket com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect(java.lang.String, int)
void com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer(java.lang.String, int)
void com.sun.net.ssl.internal.www.protocol.https.HttpClient.l()
void com.sun.net.ssl.internal.www.protocol.https.HttpClient.<init>(javax.net.ssl.SSLSocketFactory, java.net.URL, boolean)
void com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>(javax.net.ssl.SSLSocketFactory, java.net.URL)
com.sun.net.ssl.internal.www.protocol.https.HttpClient com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(javax.net.ssl.SSLSocketFactory, java.net.URL, com.sun.net.ssl.HostnameVerifier, boolean)
com.sun.net.ssl.internal.www.protocol.https.HttpClient com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(javax.net.ssl.SSLSocketFactory, java.net.URL, com.sun.net.ssl.HostnameVerifier)
void com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect()
java.io.InputStream com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputStream()
java.io.InputStream java.net.URL.openStream()
void URLReader.main(java.lang.String[])
Exception in thread main
Process exited with exit code 1.Sure, this is a solution if you start from zero but we have the same problem and it did work with iPlanet4.0 and jre 1.2.2 but now that we upgraded to iPlanet 6.0 and 1.3.1 and having an attribute with no value like PHONE=; causes the NSServletRunner to crasch. And we have a few hundred certificates with some values missing. How can this be fixed?
-
Foreign Currency Valuation Values Conversion
Hello SAP Experts!
We are migrating from 4.6B to 4.7 and we are working in the vendor, customer and G/L accounts open items conversion.
In the present system (4.6B) the users use transaction F.05 for foreign
currency valuation with the flag "Bal. sheet preparation valuatn" activated. This means, that the valuation difference is not reversed
but it is stores in the field BSEG-BDIFF of the affected open item.
Now we are trying to convert those foreign currency open items with a
batch input to transaction FB01. However, the fields BSEG-BDIFF do not appear in the dynpros and we could not find a way to make them optional to enter the value of previous revaluations.
We have thought of transaction F-05, but there is no way there to reference the revaluation that is being posted to the affected open item. T
If we do not enter this amount in that field we will have problems
after the go live to pay those items, as the "Bal. sheet adj. 1"
account balance will never be zero and the gain/loss accounts for exchange rate difference will be duplicated.
Do anyone know how can this be done?
Hope you can help me on this one.
Many thanks in advance.
Regards!
NoeliaHi Dominic!!
Thanks a lot for your answer. Yes, they are separate systems
Let me see if I understand your suggestion:
1) I should do a manual posting through F-05 in our 4.6B system bringing the balance adjustment account and the exchange rate difference account to zero.
2) Transfer the balances to 4.7.
3) In the first closing period run the automatic foreign currency valuation
(through F-05) with the flag "Bal. sheet preparation valuatn" deactivated so that the system revaluates the open items from the time the open item is created to that moment.
is it like that?
Many thanks for your help again!
Best regards,
Noelia -
RGB value -- RGB -- YCrCb -- RGB -- RGB value conversion help?
Hi,
I am using bufferedImages and the method getRGB() and setRGB().
I was wondering how I can convert a negative RGB value like -6262262 to RGB values like 155, 80, 90. Then convert those to Y' Cb Cr values like 0.23, 0.212, 013. And then I have to convert them back to RGB values (e.g. 155, 80, 90) and then to the negative RGB value (e.g. -6262262). I need methods like the following:
// Return RGB red value:
public static int RGB_redValue (int rgb)
// code
// Return RGB green value:
public static int RGB_greenValue (int rgb)
// code
// Return RGB blue value:
public static int RGB_blueValue (int rgb)
// code
// Return Y'CbCr, Y value:
public static double YCbCR_YValue (int red, int green, int blue)
// code
// Return Y'CbCr, Cb value:
public static double YCbCR_CbValue (int red, int green, int blue)
// code
// Return Y'CbCr, Cr value:
public static double YCbCR_CrValue (int red, int green, int blue)
// code
// Return RGB red value:
public static int RGB_redValueFromYCbCr (double Y, double Cb, double Cr)
// code
// Return RGB green value:
public static int RGB_greenValueFromYCbCr (double Y, double Cb, double Cr)
// code
// Return RGB blue value:
public static int RGB_blueValueFromYCbCr (double Y, double Cb, double Cr)
// code
// Return RGB value:
public static int RGB_value (int red, int green, int blue)
// code
}All I need is the YCrCb value from a bufferedImages and then I need to set the specific pixels to the Y values. I couldn't find any methods that I can use to do so. If anybody has methods like above, please post. If not, then can you write the formulas or link them. Thanks.// Return RGB values:
public static int RGB_red (int rgb)
int myR = (rgb >> 16) & 0xff;
return myR;
public static int RGB_green (int rgb)
int myG = (rgb >> 8) & 0xff;
return myG;
public static int RGB_blue (int rgb)
int myB = rgb & 0xff;
return myB;
}And YCrCb to RGB and RGB to YCrCb is quite easy:
RGB to YUV Conversion
Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
Cr = V = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
Cb = U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
YUV to RGB Conversion
B = 1.164(Y - 16) + 2.018(U - 128)
G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128)
R = 1.164(Y - 16) + 1.596(V - 128) -
Hexvalue to float value conversion
Hi Everyone,
I have a hex value "40000000" which its value in float is supposed to be "2" in my xml file.When i do the conversion i get a different value.Can somebody help me figure this out.ThanksI have a hex value "40000000" which its value in float is supposed to be "2" There exists a standard IEEE 754 floating point representation, and just by
coincidence it matches your conversion for this particular value: int i= 0x40000000;
float f= Float.intBitsToFloat(i);
System.out.println("f= "+f);kind regards,
Jos -
How to read no value(conversion file)
hI Friends,
i'm loading actuals data from bw to bpc application. some of records in bw cube are not having data for one characterstic (eg: master cost center).
1. i want to drop those records which are not having data, how can i achieve this through conversion file,what content can i put in external column? and in internal column i will use *skip.
2. if i want to put some new value for records having no value for one characterstic(eg: master cost center). how can i assign that in conversion file? i.e what can i put in external col.
Above 2 question relates to conversion file, that same characterstic which is having no value in bw cube. For many records i have master cost center value, but here i want to handle no value.
Thanks,you are correct, i want to handle no value situation(alv cell is having no value) for master cost centre infoobject of bw cube.
I also get similar idea like you as follows
External col: *
Internal col: *if(js:%external%.length=0 then CC_A, dummny parameters). But i haven't tested and now analysing data in bw cube.
I would like to know any other keywords are there, why because in my bw cube around 3 characterstics are having no value(similar) to above. Yes by above way, one can maintain 3 conversion files.
Regards,
Naresh -
Generally script output for amount values consist of comma and fullstop.
for total amount value is 1,500,000.00
Now suppose you want to do some manipulation on it then you have to write subroutine in script and pass this value and in that case if you have do some manipulations then first you have to remove comma and fullstop
by using conversion routine or REPLACE OR TRANSLATE keyword.
i had used that one and done the manipulation also.
Upto here fine and now when i am passing this value back to sapscript it is coming as it is.
For eg now value is coming sapscript print preview is
11500220
I want to add comma and fullstop in this value.
How to do that i am not getting .
i am not getting any conversion routine for this thing also.
if i change the char value to numeric value and passed to script then it is not displaying in the output.
Please give me the solution.Hi,
you can use 'write to'.
For example:
data: a type menge_d value '1234'.
data: b(10).
then.
write a to b.
now, b is 1,234.000, u can use b in your smart forms . -
[abap] problem on value conversion
hello experts ,
I'm giving appt_id(scappt is the table) as the input it is 03_Yt9VGMmaN4MsBxDGDAc1n0 taking from database
when i'm executing , the value should be converted to uppercase. can anybody tell me is there any function module avilable for giving exact data base format. I need help on it plz do reply.
thanks in advance
regards ,
sashiWhy do you want to [translate|http://help.sap.com/abapdocu_70/en/ABAPTRANSLATE.htm] SCAPPT-APPT_ID [to uppercase|http://help.sap.com/abapdocu_70/en/ABAPTRANSLATE.htm#&ABAP_ADDITION_1@1@], this field's domain (TEXT25) allows lowercase in database
Regards,
Raymond -
Value conversion according to User default
Hi,
I have a Problem in a BDC. I am trying to populate pick quantity filed in my BDC ( Tcode VL02N ) the BDC works fine for a particular user default setting( NNN,NNN.NN ). But is the same program is used by some other user whose Default settings are different ( NNN.NNN,NN ) BDC fails .
I need to convert the value based on user default before passing it to the field in BDC.
pl. suggest me the solution .
Thanks.
HiteshHi
Try to use the WRITE command before transfering the value to BDC table
DATA: QUANTITY(20) TYPE C.
WRITE <QUANTITY> UNIT <UNIT> TO QUANTITY.
<BDC>-VALUE = QUANTITY.
APPEND <BDC>.
In this way the WRITE statament'll write the quantity in the format according to user default parameters.
Max -
I/P variable value conversion
Hi Gurus,
I have doubt,
in BEx i am taking month.year input from user and applying PERI6 conv, routine to it.
so for example if i/p is 05.2009 then after conv it becomes 200905.
my requirement is i want to change the value to previous year december. ie 200812.
so eg, if i/p is 200801 say then i want 200712.
is it possible to do it without ABAP routine.?????
or if ABAP routine is required how should I go about with it?????
Thanks and Regards,
Viraj Dhopavkar.If I have undestood your Question you want the user input to be modified and give the results for the previous month.
Follow this note...
/thread/1310262 [original link is broken]
Second option is:
Create a Global Varaible for input ready.
Create another custom exit variable which has a routine for previous month or any value that you want and use this custom Variable in a REstricted key figure and also make the restriction as a constant selection which you can find in the Advanced tab fro the restricted key figure.
Thanks
Suresh -
Re-FLOATING POINT VALUE CONVERSION.
Hi,
I have value lile this : 1.000000000000000E03, or 1.090000000000000E02 , is there
any function module to convert it into actual value like 1,00.00 or 1,099.00 etc.
Thanks in advance.
Shyam.hi
call fm CONVERT_WITH_OVERFLOW_CHECK.
data lv_num type f .
data: p10_4(10) type p decimals 4.
lv_num = 27.
CALL FUNCTION 'CONVERT_WITH_OVERFLOW_CHECK'
EXPORTING
i_value = lv_num
I_UNIT = ' '
I_KRUND = ' '
IMPORTING
E_VALUE = p10_4
EXCEPTIONS
UNIT_CONVERSION_ERROR = 1
WRONG_E_VALUE_TYPE = 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.
the variable p10_4 will be having your result. its format will be driven by the type you have taken.
regards
Vishal Kapoor
Maybe you are looking for
-
Connection Problems following Upgrade at Exchange
I have been having problems since 1st November. I had received an e-mail advising that “we’re rolling out our faster broadband and we’ll be upgrading our network in your area on 01-Nov-11…For the first ten days or so after your upgrade, your broadban
-
How do I reinstall pages on my new hard drive
I have just replaced my hard drive in my macbook pro. How do I reinstall pages and numbers without paying for it
-
HELP!!! Changed from Firewire to USB
Ok, I took my firewire cable home so that I could hook in to my system at home and went to usb for the office. When I hooked in using the USB it is recognizing a different name for the same Ipod that I've had for over a year now. I don't remember usi
-
How do I adjust the white balance in Elements?
How do I adjust the white balance in Elemements ?
-
Problem with Uploading files in Web applications with the iPad
Hello, I have a question. How can I upload a word file in the gmx-Mailserver with my IPad? I can only find the picture library. In this library i cannot upload a word-file or other files-types. I use Safari. The same problem exists by other web appli