Delete leading zeros of Attributes in Webclient UI
Hello,
to make the UI more userfriendly i used Function module "CONVERSION_EXIT_ALPHA_OUTPUT" in the GET_* Method of some attributes. For displaymode this works fine.
Also in Editmode the leading zeros are gone. But in Edit mode the data is no longer displayed right-justified in the field.
For example if i deleted 4 leading zeros with this function module there are 4 spaces at the end of the number in display mode.
Does anybody know how this can be changed?
Thank you
Best regards
Manfred
Hi Manfred,
I believe, never tried though, that you can control this via the M-Getter method.
Implement one for your attribute and give a DDIC datatype that is displayed right justified in other cases.
cheers Carsten
Similar Messages
-
Delete leading zeros for a field on the pdf form
Hi,
i know it is possible to delete leading zeros via abap coding in the interface.
But is it also possible to this directly on the pdf form - scripting or a setting?
Thank you
Kind regards
ManfredI believe you can set this up as a field display pattern (if you use LCD 8.1 or something like that).
Or you can script that out. In formcalc you can easily process characater by character, test if that is zero and remove it.
http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
Otto -
How could I delete leading zeros in a p decimals 2 field in an internal tab
how could I delete leading zeros in a p decimals 2 field in an internal table. Could you give me an short example
Hi,
Use SHIFT
Example..
DATA: V_CHAR(10) VALUE '0000012345'.
SHIFT V_CHAR LEFT DELETING LEADING '0'.
WRITE: / V_CHAR.
Thanks,
Naren -
How to delete leading zeros for amount fields
Hi all,
I have problem with the leading zeros, where I am populating nearly 30 amount fileds in my statement.i want to delete leading zeros.
I have tried with shift and pack.
and I cannot call every time the function module *alpha_output or input.
can anybody suggest me the better solution.
Regards,
SreYou could use a syntax like
SHIFT: w10a LEFT DELETING LEADING '0',
w10b LEFT DELETING LEADING '0',
w10c LEFT DELETING LEADING '0',
w10d LEFT DELETING LEADING '0'.
or using macros like
DEFINE delzero.
shift &1 left deleting leading '0'.
END-OF-DEFINITION.
delzero: w10a, w10b, w10c, w10d.
Regards -
Delete leading zeros for material in mapping.
Hi,
How to delete leading zeros for material like 0000000128736 if so I am expecting 128736 only.
We need to consider if I get material number is like RPG2389 .
Thanks,
Vinay.Hi,
If you will be getting alphanumeric codes, it would be best to use a UDF with a regex-expression.
UDF Type:
ContextType
imports:
java.util.regex; (if you are using PI 7.1 you must remove the semicolon)
arguments:
input1
Here's the code (courtesy of Sun Developer Network):
Pattern p = Pattern.compile("[^a-zA-Z]");
Matcher m = p.matcher(input1[0]);
StringBuffer sb = new StringBuffer();
boolean output = m.find();
while(output) {
m.appendReplacement(sb, "");
output = m.find();
m.appendTail(sb);
result.addValue(input1[1]);
Now to solve the leading zeroes, just add formatNumber: 0 after the UDF and it will work.
Hope this helps, -
Hello,
Does anyone know how to delete leading zeroes in a mapping ?
I don't think there is a standard function for this, or am I wrong ?
Regards,
Marcohi Marco,
create a simple function that will use the code below:
String stringWithZeros = "0000123490";
String stringWithoutZeros = stringWithZeros.replaceFirst("^0+", "");
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a> -
Hi ,
Iam extracting internal order details in a file .Iam getting internal order number leading 6 zeros .I need to delete that 6 zeros .how can i do that one.
thanks,
madhuHi Priya ,
according to your post I assum that allways 6 zeros are leading your datastring...
If it is so you could use:
MOVE data_string+6 to target_string .
The use of:
MOVE .... left DELETING leading '0'
and
Shift the_field left deleting leading '0'
or something else "automatic" may remove a valid ZERO
in position 7 (or more)
(wich is the first position of your data) !
Regards
Rainer
Some points would be nice if that helped a bit. -
Deleting leading zeros - complication
Hi ,
i need to delete the leading zeros in a value .
eg.
gv_manuserf type c10.
gv_manuserf = '0000B34234'.
i need to delete the leading zeros in this . i tried conversion exit alpha output not working . also used shift statement still not working.
can anyone help me in this how to remove the leading zeros for the above value.
since the character B is there it's not deleting. if i remove that B FM is working. But my program has the valie B in that. Pls help me in this.
Regards,
Rose.Hi Rose,
As far as i remember about this concept we use SHIFT or go for the splitting phenomenon
gv_manuserf is character typr of length 10.
gv_manuserf = '0000B34234'.
To delete the leading zeros in this
SHIFT <string> LEFT DELETING LEADING <symbol>.
<string> is gv_manuserf string,
<symbol> is the symbol that you want to shift out '0' in your case.
Please let me know
1) what is the syntax you have used in your program for SHIFT.
2) Will the B always be the start of the string followed by zeros i mean is it constant.
By giving the answers for the above i think it can be possible to go for other alternative of string splitting.
Thanks
Srikanth.P -
How to delete leading zeros in sap script
Hi
In sapscript iam facing an issue with num4 field.
Iam using this field to display Serial.No
it is displaying '1' as 0001 i want to display here 1 with out leading zeros.
If there any solution let me knowHi,
Try below code
data: w_vbeln type vbak-vbeln,
w_char(10).
w_vbeln = '000012345'.
write w_vbeln to w_char no-zero.
or
The function Module 'CONVERSION_EXIT_ALPHA_OUTPUT' is used to remove the leading zeros in a field.
the following is a sample code which i have used for 'Commitment item' in my report. replace the field with your required field.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = IT_FMIT1-RFIPEX
IMPORTING
OUTPUT = IT_FMIT1-RFIPEX.
Regards,
Chandru -
Variable substitution: (delete leading zeros from file name)
Hi All,
I am configuring an IDOC to FILE (fcc scenario) with a requirement of using the IDOC number in the output file name.
Using variable substitution, I manged to get the IDOC number from incoming Idoc-control record but it comes in its entitre length with a few leading zeroes like '00000001234'.
So my output file name looks like 'Output_000000001234.txt' . I want it to be like 'Output_1234.txt'.
Is it possible to achieve it ?
Thanks
ShirinHi Shirin,
First supress the leading zeros of IDOC number by using the following code:
Create a user defined funciton zerosuppress and take the cache as value and take one argument input. Then put the code below:
//write your code here
String output = input.replaceFirst("^0+","");
return output;
Then use variable substitution for generating ur IDOC number in the out put file name.
Regards,
Vinod. -
MF50 deletes leading Zero's from the material number.
We have a case where we have alpha-numeric material numbers that include some leading zero's. MF50 in it's released format automatically truncates leading zero's. In our case these leading zero's are required only for alpha-numeric material numbers.
Looking on OSS I see multiple notes relating to this issue. Any suggestions to fix this problem would be appreciated.
Jesse Cornelisonchange data type(char) to type n.
make a variable of type n and store kunr value to this variable and display this variable. -
Hi Gurus,
I want to remove the leading Zeros from the Customer ID and while transferring the values in BPC, I want to prefix the value (after removing the zeros) with 'CC_'. eg: 000012345 so I want to transfer that as 'C_12345'.
In transformation file, I had done the mapping as
ID=*str(C_)+ID
which works fine, if I dont have to remove the zeros but i want to remove zeros and concatenate "CC_"
Thanks in advance
RamHi Ram,
Try this.
In Transformation file,
ID=*str(CC_~)+ID
It will concatenate your prefix, 'CC_', with an additional symbol '~', which is later used while removing the leading zeros in Conversion File.
Conversion File:
js=%extenal%.split('~0000').join('').split('~000').join('').split('~00').join('').split('~0').join('').split('~'),join('')
The above code in Conversion File, it will remove the leading zeros anywhere the count of zeros is in between 0 to 4. You can add as many number of Zeros that you want. So, if your ID is prefixing 000 and other ID is prefixing 00, it will remove the respective zeros, without removing the main concatenation or part of the ID.
Hope this solution helps.
Thanks,
Abhishek -
Hi Friends,
I need to delete leading zeros from material while loading to ODS and have tried followings options:
CONVERSION_EXIT_ALPHA_OUTPUT
Shift Variable LEFT deleting leading zeroes
Both the options did not work in my case. I need to delete leading zeros from material. For example if source has material as "00000000002213749R" I was to convert it as "2213749R".
Following is the code I am using in transformation:
DATA: LV_MATNR(18) TYPE C.
LV_MATNR = SOURCE_FIELDS-/BIC/Z9AMATNR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = LV_MATNR
IMPORTING
OUTPUT = LV_MATNR.
RESULT = LV_MATNR.
Also I tried the following code for SHIFT:
DATA: LV_MATNR(18) TYPE C.
LV_MATNR = SOURCE_FIELDS-/BIC/Z9AMATNR.
SHIFT LV_MATNR LEFT deleting leading zeroes
RESULT = LV_MATNR.
I tried both the option but could not get the leading zeros deleted. Can some one let me know whats wrong with the code, or is there any other option i can try for?
Thanks,
ManmitHi amitesh,
Please try this code
DATA: LV_MATNR(18) TYPE C.
LV_MATNR = SOURCE_FIELDS-/BIC/Z9AMATNR.
SHIFT LV_MATNR LEFT DELETING LEADING '0'.
RESULT = LV_MATNR.
Hope this will help u.....
Regards,
Yuvaraj.
Edited by: sap_yuvaraj on Dec 13, 2010 12:54 PM -
Removal of leading zero in &*BSID-SGTXT&.
Hi ,
I need to remove the leading zero from my sacscript fileld &BSID-SGTXT&. When its &BSID-SGTXT& I can put &(Z)BSID-SGTXT&.*
Since i am using &BSID-SGTXT& insertion of Z before is not compressiving zero.*
How to compress leading zero in &BSID-SGTXT&. case.*Thanks *Hi Kiro,
Don't post Duplicate threads,
You can continue here till your Issues gets resolved.
Removal of leading zero from &*BSIS-SGTXT&
&(Z)BSID-SGTXT&. " Instead of puttin z at initial position change as below
&BSID-SGTXT(Z)&.
how to delete leading zeros in sap script
Cheerz
Ram -
How load ean with leading zeros
Hi,
I need help for load leading zeros in ean. If someone can send me the documentation of why SAP delete leading zeros when to load ean code in the field mean-ean11 and mara-ean11. I'm consultan and the client need know this aswer. Because they no want load the articles without zeros. Now if knowledge a enhancement please.
We are using SAP Retail ECC 6.0 and I finding to very notes and I can't find and answer.
Thank you,Hi friends,
My general problem is that I'm using the idoc ARTMAS05 but when to load data delete leading zeros in EAN fields.
Example of my problem:
I have a article with this ean code 0056789 and have other article with this ean 00056789, but when to load data the second article it is no stored because shows error message "Ean code already exits". Now I´m finding the way for to be able to load the zeros of the ean.
I have 23000 article with this problem.
Thank...
Maybe you are looking for
-
How to Split GL Account? - Report
Dear Experts, please help me...it is very urget.. My client have say for example forllowing scenario... "Payment to Subscription " --- Which has only one GL code say 400001, called Subscriptions paid. And he has to pay subscriptions to different depa
-
Unit test cases using sqldeveloper2.1.1
hi, currently i am using sqldeveloper1.5.1. Using this version i am not able to write unit test cases. i need to write unit test cases which is possible using sqldeveloper2.1.1. can i connect my oracle database using sqldeveloper2.1.1. oracle version
-
[Solved] Database Isolation Level - ADF BC
How and Where do we set Isolation Level for ADF BC ? Chandresh Message was edited by: Chandresh
-
What is really new in JSC2 Update 1?
Are there any enhancements made to update 1 except DB change, new version of application server bundled and all the hot fixes and patches included witch were already available to JSC2.
-
Why did my video streaming on Safari suddenly become jumpy?
Why did video playback on my MacBook Pro with Safari suddenly become jumpy? I can watch the same video on Google Chrome without issue. Thanks