Suppressing Leading Zero in Date
We are currently having a problem when running a query in BEX. The date which displays as MM/DD/YYYY is suddenly displaying with the leading zero in the month and day supressed, for example "3/5/2006" instead of "03/05/2006". This is interfering with macros in our workbook. We recently implemented support packs but don't know if this is related. Does anyone know how to fix this? When running the same query from the Query Designer the dates display correctly, without the leading zeros suppressed.
Hi adadms,
Plz check ur system settings.
Go to control panel : regional options-Date
check with short date format.
it may be d/m/yy.
Thanks,
sekhar.
Similar Messages
-
Display key and text in dropdown box & suppress leading zeros in material #
Hi Everyone,
I have some questions on how to .... Can anyone help me? Here they are:
How to show material # and description (key and text) both in dropdown box list?
How to suppress leading zeros in material #, i.e. 0000000012345678 only show 12345678 ?
How to show a date with format mm/dd/yyyy not yyyymmdd?
Thanks alot, Jin
Edited by: Jin Freda on Mar 25, 2008 4:47 PMHi,
What type control you are useing for date .
If you are useing Input field of date type or Date picker control you should get this option in the control properties.
Can you tell me what are tabs are appaering in the conrtol properties.
2.When you you are using the formula Round(@material) ,Are you typing it or draging Field from right side in to the formula .If you did not drag it you will get Message:Formula has errors.
One more probelm is there if the Data type of field where you using formula is not Number type.
Check all above and get back to me.
3.You are not able to give 6 points for all because its a resrticed one you execeded giving6 points option now you can give only 10 points.
Regards,
GOVINDU -
Hi,
How to suppress leading zeros in a character string.
Thank you.hi,
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = str1
IMPORTING
output = str1.
Example:
input = 00000000000123
output = 123
rgds
Anver -
Suppressing Leading Zeroes in the Query output
Hi,
I have selected a data field(0MATERIAL) as a free characteristics, It displays text and key and the key has leading zeroes.
In the infoobject 0MATERIAL, ALPHA conversion routine is not selected, I can't change and insert the ALPHA right now because it would end up with reloading a large volume of data in different targets. To avoid this or to reduce the impact, in the reverse way,
Could it be possible to suppress this leading zeroes at the query level? I was hoping that there would be a change that I could make at the query level, since it is 0Material and am looking at the point of minimal impact.
Thank You.Hi Senthil,
create InfoObject ZMATERIAL like a copy of 0MATERIAL, delete all the attributes and insert ALPHA conversion.
Insert this ZMATERIAL like display attribute of 0MATERIAL. In InfoSource for 0MATERIAL map also ZMATERIAL with the same field that is feeding 0MATERIAL (MATNL). In your query insert 0MATERIAL and ZMATERIAL, and then hide 0MATERIAL (you need to insert also 0MATERIAL because ZMATERIAL is only in display), you will see only the values of ZMATERIAL, that is the material without the zeros in front.
You can also decide to transform ZMATERIAL like navigational attribute, but in this case you have to change all the structure where do you want ZMATERIAL, because you need to flag it like navigational in that specific structure.
Ciao.
Riccardo. -
Suppress leading zeros for ALV column
Hello,
I have an ALV with a column mapped to a context attribute of type NUMC and would like to suppress the leading zeros being displayed. My initial solution was to change the attribute to a char/string type and remove the zeros in my code, but then, the sort functionality no longer works correctly. Any ideas if the ALV can use a 'hidden' field to do the sorting for a certain column... that way, I can display the number as a char/string without the zeros and when the user sorts the column, the ALV will use the hidden NUMC type field.
Thanx for any directions...Hi,
You can follow the following way which i implemnted for one of my application. Here i am setting this property for the context attrubute. May be this will work. But in ALV there is no separate method for this type of setting.
**This method is used to display the Leading zeros for the Lot Number in Step-1
DATA:
node_do_not_change TYPE REF TO if_wd_context_node,
node_d0130_sapmf05a TYPE REF TO if_wd_context_node,
node_pstap TYPE REF TO if_wd_context_node,
node_info TYPE REF TO if_wd_context_node_info,
ls_fprops TYPE wdy_attribute_format_prop.
node_do_not_change = wd_context->get_child_node( name = wd_this->wdctx_do_not_change ).
node_d0130_sapmf05a = node_do_not_change->get_child_node( name = wd_this->wdctx_d0130_sapmf05a ).
node_pstap = node_d0130_sapmf05a->get_child_node( name = wd_this->wdctx_pstap ).
node_info = node_pstap->get_node_info( ).
ls_fprops = node_info->get_attribute_format_props( 'VALUE' ).
ls_fprops-null_as_blank = if_wd_context_node_info=>c_format_null_as_BLANK.
node_info->set_attribute_format_props(
name = 'VALUE'
format_properties = ls_fprops ).
Warm Regards,
Vijay -
How To Suppress Leading Zeroes
Can someone give a new modeler a tip on how to suppress the leading zeroes in a field? Order number, for example, is returned with many leading zeroes, and each dynamic expression I choose doesn't seem to work.
Thanks in advance!As I said before, the easiest way I know to do this is to take your data, order number string "0000000000001234567", translate it to an integer - 1234567 - then re-translate that to a formatted string.
I have actually come up with an answer, but am not sure that I like how it has to be done. First, I changed the Control Type for field VBELN (order number) to "None". Then I created two additional fields in the output table view. The first is named fmtOrdNum. Its Control Type is "None", meaning it won't be displayed, and its default value is INT(@VBELN). The second field is named fmtOrdNum2. This field is displayed, and has a default value of NSTR(@fmtOrdNum, 'P'). The resulting output is what I wanted to see - leading zeroes are suppressed.
The reason I'm not happy with this is that I'm not sure that two additional fields should have to be created. I'm looking for the place to tell VC to manipulate (format, in this case) the fields it's received from the BAPI before it places them on-screen. So additional questions remain:
1. How do you instruct VC to apply formatting to a field before placing it on-screen? Is this done on Control Properties, and where?
2. Can expressions be nested - e.g. NSTR( INT(@@), 'P') - and to what level? -
Gui_Download - Suppress leading zero in EXCEL
Hello,
in my scenario I need to build an excel file in which some of the information they need to be displayed in excel with the leading 0 in front (type-lqua lgort 0701 ) thing does not happen in my view.
I create the Excel file like this:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
= BIN_FILESIZE
FILENAME = filename
FILETYPE = 'ASC'
APPEND = ''
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = tb_out
I have read in some posts that just insert a character " ' " to show everything as text, however, this does not fit in my case because my file is the input to another application (not mine) that reads the file with the FM' ALSM_EXCEL_TO_INTERNAL_TABLE '
How can I view the file directly without suppressing leading 0 ?
Thanks in advancetry this
instead of gui_download use this to download into excell file.
DATA: XL_itab type alsmex_tabline occurs 0 with header line.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = FILENAM
I_BEGIN_COL = 1
I_BEGIN_ROW = 2
I_END_COL = 3
I_END_ROW = 5000
TABLES
INTERN = xl_itab.
* EXCEPTIONS
* INCONSISTENT_PARAMETERS = 1
* UPLOAD_OLE = 2
* OTHERS = 3 .
IF SY-SUBRC = 0.
* MESSAGE 'DATA UPLOADED SUCCESSFULLY' TYPE 'I'.
ENDIF.
loop at xl_itab.
case xl_itab-col.
when '1'.
<your workarea-fieldname> = xl_itab-value.
when '2'.
<your workarea-fieldname> = xl_itab-value.
when '3'.
<your workarea-fieldname> = xl_itab-value.
endcase.
at end of row.
append<work area> to <internal table>.
clear <workarea>.
endat.
endloop.
if you have more doubts just reply me -
Leading zeros from data downloads
Hello!
While downloading data from the ABAP tables, Excel removes the leading zeros automatically but in some SAP tables (NAST for example), those leading zeros are necessary to find the required associated data. Is there any way to prevent Excel from removing these zeros?
Thanks a lot!Hi,
There are two ways to solve it.
1) select complete columns in the Excel sheet and then assign the number format as ' TEXT ' in the sheet.Then u ll be able to see the leading zero's
2) If u donot want to wrk in Excel the way i have mentioned,then in the abap program just use the FM
"CONVERSION_EXIT_ALPHA_INPUT" over that field before uploading in a table.
By mistake i have told u the wrong way.the first way is for copying the data from text file to excel file and preserving the leading zeros.
regards
kanishak
Edited by: Kanishak Gupta on May 6, 2009 5:36 AM -
Hi All,
We have a characteristic 'Material'(custom defined master data infoObject) of length
10,Conversion routine:ALPHA, datatype :CHAR,& output length:10.
Requirement is Material number should be displayed as 10 digit number(characters ) in Bex
report.
but for some of the materials,we don't have 10 digits for example we have a material
123(this 123 should be seen as 0000000123 in Query output).
When i am displaying infocube contents or master data contents i could see 123 as
0000000123. but with F4,it shows 123 as 123 and in Query output also as '123'
1.actually How data will be stored in infocube and master data tables? (either 123 or
0000000123)
2. one soution to display matarial as 10 char in report is with transfer/update routine by
adding leading zeros.
Is there any other way to achieve this without using routine ?kendly let me know.
correct me if my above asumption is wrong.
thanksHi Murali,
the Alpha Conversion ist used to convert data between an internal and an external view. The internal view is how the data is physically stored in the database. The external is i.e. how the data is displayed in reports.
At some point the Alpha Conversion (if defined for the characteristic) is automatically used - you can not change it. This means that in this cases you can only see the external format. The BEx Reporting is one place and the F4 help another.
In some places within the BW system (no enduser view) you have the option to see the data in the internal format. One of these places ist the cube content. There you have a flag "Do not use any conversion". If this flag is activated you will see the data in the internal format. But this is NOT the format a user will see in reporting.
In your case the internal format is the value "0000000123" and the external "123".
Hope that helps
Regards
Adios -
Adding leading zeros before data loaded into DSO
Hi
In below PROD_ID... In some ID leading zeros are missing before data loaded into BI from SRM into PROD_ID. Data type is character. If leading zeros are missing then data activation of DSO is failed due to missing zeros and have to manually add them in PSA table. I want to add leading zeros if they're missing before data loaded into DSO.... total character length is 40.. so e.g. if character is 1502 then there should be 36 zeros before it and if character is 265721 then there should be 34 zeros. Only two type of character is coming either length is 4 or 6 so there will be always need to 34 or 36 zeros in front of them if zeros are missing.
Can we use CONVERSION_EXIT_ALPHPA_INPUT functional module ? As this is char so I'm not sure how to use in that case.. Do need to convert it first integer?
Can someone please give me sample code? We're using BW 3.5 data flow to load data into DSO.... please give sample code and where need to write code either in rule type or in start routine...Hi,
Can you check at info object level, what kind of conversion routine it used by.
Use T code - RSD1, enter your info object and display it.
Even at data source level also you can see external/internal format what it maintained.
if your info object was using ALPHA conversion then it will have leading 0s automatically.
Can you check from source how its coming, check at RSA3.
if your receiving this issue for records only then you need to check those records.
Thanks -
Leading zeros in data uploading
hello experts,
i am uploading the data for the business partner using lsmw
here my issue is while i am uploading the data i am feeding the system for the business partner like '0000001' but when i finish the uploading and when i check the records it is saving in the sap data base as '1'
how to get the business partner no.s with the leading zeros .
Thanks in advanse
NaveenThat is weird. In your LSMW, look at the "Converted Data" How does this number look at that point? How are you seeing "1", in the database via SE16? At row view? Or Record View? You may be seeing the conversion routine, depending on how you are looking at the data. If you go to SE16, enter the table name, and then enter your "1" as the field value, hit execute. You now see the row for the record. How does it look here? This will give a true representation of how the data is being stored. If you double-click on this line, you will see the record with the conversion routines ran against it. Here I would expect to see "1" instead of "000001".
Regards,
Rich Heilman -
Any way to not get leading zeros in dates?
When displaying a date or time, I'm always getting leading zeros. Is there a simple way to not have them?
For example:
SELECT TO_CHAR(SYSDATE,'HH:MI PM') FROM dual;
Will show 02:07 PM. I'd like it just to be 2:07 PM
The flip side, that I don't want to see would be not having the zeros in minutes... I don't want 2:7 PM.I don't know if there's a better way...
SELECT decode(substr(TO_CHAR(SYSDATE,'HH:MI PM'), 1,1), '0' ,substr(TO_CHAR(SYSDATE,'HH:MI PM'), 2) , TO_CHAR(SYSDATE,'HH:MI PM')) FROM dual;
thanks,
Narayan -
Suppressing leading zeroes during mapping
Dear All,
I am having one requirement in which i want to compress all the leading zeroes for the material no only eg 0000123450 shuld be converted into 123450.
Is there any standard function available which compresses the leading zeroes???
Waiting for your valuable response.
Regards,
N.JainWrite a UDF like this ..
public class test {
public static void main(String[] args) {
System.out.println(args[0].replaceAll("^0*",""));
Also you can use XSLT for this.
Try the XPath function number($string) in your XSLT and see if it does what you want. Since it turns any XPath object into a number, the leading zeros won't appear.
Use it ike this
<xsl:variable name="a">
<xsl:call-template name="removeLeadingZeros">
<xsl:with-param name="phone">
<xsl:value-of select="EVENT/ContactPhone"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:template name="removeLeadingZeros">
<xsl:param name="phone"/>
<xsl:message>
<xsl:value-of select="$phone"/>
</xsl:message>
<xsl:choose>
<xsl:when test="starts-with($phone,'0')">
<xsl:call-template name="removeLeadingZeros">
<xsl:with-param name="phone">
<xsl:value-of
select="substring-after($phone,'0' )"/>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$phone"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Regards
Aashish Sinha
PS : Reward Point if Helpful -
Suppressing Leading Zero's in an EvDRE Report
Hello Experts,
I am trying to create an EVDRE that suppresses any data that is less than 1 (For example, I have a .01 and a .05) and will prevent it from showing up in the report. Does anyone know the best way of doing this?
Thank you so much!
DavidDear David Flacks,
BPC Excel could suppress null value automatically, null zero is no record in database. For your example (the signeddata=0.1), I do not think so. If you would like to suppress null value, please you give the value of Suppress Zero is Y in your Expansion settings table. And for the value 0.1 maybe you can use VBA Macro which runs after expansion all. a VBA macro contains logic for delete a particular cell base on value.
Kind Regards,
Wandi Sutandi -
Suppress leading spaces while displaying an amount field in a Smart form
Hi all,
In a smart form, I am using fields like KONV-kbetr and VBAP-netwr each of them currency type and 2 decimal places. I want to suppress the decimal places and also the leading spaces while displaying these fields in a smartform cause when this field is inserted in a sentence, a lot of gap is there between the field and the words of the sentence. I dont want to change the field length cause it can be that huge in some cases.
Please help.
Thanks ,Hi, if you would place it in a sentence, it would be an option to concatenate the text and values into one string and then condense it.
concatenate <text> <value> into lv_sentence.
condense lv_sentence.
but another way is to use codes for displaying values in smartforms:
This is from a smartforms PDF i have..
Output Options for Field Contents
Use the Formatting options to adapt the value of a field before printing it. You can enter the
relevant parameters directly behind the field name. Make sure to write the short forms of the
different options in uppercase letters. Some of the options can be combined.
General Information
The formatting options are not suited for all data types of fields (for example, for character fields
you need no exponential representation). You must distinguish between numeric fields and
character fields.
Numeric Fields
If specified, the system first evaluates the length (<length>).
If no length is specified, the system displays the value in its overall length.
The trailing blank indicates a positive sign. To suppress it, use formatting option S.
Any offset <offset> specified is ignored.
Sequence of evaluation: (<length>), sign to the left(<),Japanese date (L), suppress blanks (C),
right-justified display (R), insert fillers (F).
Character Fields
By default, the system displays the value of a field in its overall length, but truncates trailing
blanks.
Sequence of evaluation: suppress blanks (C), <offset> and (<length>), right-justified display (R),
insert fillers (F).
Overview
Formatting Options for Fields
Syntax Description
&field+<offset>& Skips <offset> places of the field value (character fields only). If the
offset is greater than the length of the value, nothing is displayed.
&field(<length>)& Sets the output length to <length>.
&field(*)& If the field is defined by a Data Dictionary type, Smart Forms set the
output length to the value specified there.
&field(S)& Suppresses the sign
&field(<)& Displays the sign to the left of the number
&field(.<nat.number>)& Limits output of decimal places to <nat.number>
&field(E<nat.number>)& Displays the field value with the fixed exponent <nat.number>. The
mantissa is adapted to this exponent by shifting the decimal
character and inserting zeros.
SAP Smart Forms (BC-SRV-SCR) SAP AG
Output Options for Field Contents
72 April 2001
&field(T)& Suppresses thousand indicators when displaying fields of types
DEC, CURR, INT, and QUAN.
&field(Z)& Suppresses leading zeros of numbers
&field(I)& Suppresses display of initial values
&field(K)& Deactivates a conversion routine specified in the Data Dictionary.
&field(R)& Right-justified display. Use this option only when specifying an
output length as well.
&field(F<filler>)& Replaces left-justified blanks in the value by the fill character <filler>.
&field(L)& Converts and a date field to a local date and displays it. The date is
then formatted using edit mask JPDAT.
Since this representation uses Japanese characters, use it in the
Japanese version of the SAP System only.
&field(C)& The system takes the field value as a sequence of words separated
by blanks. Option C shifts these words to the left and leaves only
one blank inbetween as separator. Any leading blanks are
suppressed. This effect corresponds to that of the ABAP statement
CONDENSE.
Maybe you are looking for
-
this does not happen on any other site i visit only on yahoo mail.yahoo,s answer to the same question is we dont know reason maybe its firefox.
-
Interactive Report filter using "in"
I am using an interactive report, and I want to filter using the "in" criteria. The data I want to filter is a person's name, and it is a concatenation of the entire name, last name first. I have no problem doing this filter on just the first or last
-
We have a 2 node Failover cluster created in a Node and Disk Majority (recommended) condition. The nodes have shared Quorum and Data Disks on iSCSI SAN. The only application on these nodes is SQL Server. When we tested the failover by moving the
-
Going through nodeStamp of an af:tree
Hi Folks, I have a mission that I was not able to solve. I have a tree that shows Employees and Subordinates. One Subordinate can be inside one or more Supervisors. When the user clicks on any subordinate, the icon of all supervisors of that subordin
-
Add arabic subtitles with Premiere cs5
Hi to all, I need to add arabic subtitles to a video, but I have problems when I copy and paste the text from a PDF file. When I copy each sentence, what it is finally pasted is different, so I do not know what to do. Can someone help me please? Do I