0material leading zeros in analyser

Hi,
I want to hide 0material leading zeros in my reports. I'm using the Bex analyser and I didn't find any option in the query designer.
It's maybe just a checkbox or something but i'm afraid it's not possible...
Thank you for your answers.
Nicolas

Hello Akhan,
it's weird, when i execute the MF CONVERSION_EXIT_MATN1_OUTPUT in test mode, with this input value:
000000000000000008
The output is the same.
I think it's maybe due to my customizing in OMSL. I chose leading zeros... I thank it's only in BW and could be change for the reporting...
Nicolas

Similar Messages

  • 0Material---Leading Zeros

    Hi,
      I have a problem regarding 0Material. We want lo populate leading zeros for 0Material in the ODS i.e for Mat No. 9999999999 we wanna see 000000009999999999. Inorder to that I have written update routine where I used FM CONVERSION_EXIT_ALPHA_INPUT. But I couldnt see leading zeros in ODS. What Might be the problem.
    The con rout. we are using is MATN1 and in OMSL leading zeros is unchecked --lenght is 18.
    Thanks,

    OMSL leading zeros is unchecked --lenght is 18.
    update routine--
    Data : i_tab like  DATA_PACKAGE.
      DATA: sub_ord type string.
      Data: v_material like i_TAB-MATERIAL.
      loop at  DATA_PACKAGE into i_tab.
        sub_ord = i_TAB-COORDER+0(2).
        if  sub_ord = 'PD'.
          i_TAB-MATERIAL = i_TAB-COORDER+2(7).
          v_material = i_TAB-MATERIAL.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              INPUT  = v_material
            IMPORTING
              OUTPUT = v_material.
          i_TAB-MATERIAL = v_material .
          modify DATA_PACKAGE from I_tab.
        else.
        endif.
      endloop.

  • 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.

  • Add leading zero's function

    Hey,
    can anyone tell me what is the java function for add leading zero's in xi mapping.
    TX

    Hi Zevik,
    As other threads mentioned used FormatNum and double click and put Zeros. Like if the lenght is 10 then put 10 zeros. Here one thing you should analyse is, if your input value has a string value it will fail in FormatNum becuase it expects only the numeric value.
    So if you dont know whether your input has numeric or alphanumeric then go to UDF. So create a udf with name AddZeros and as Value with one argument as input.
    Imports:  java.*;
    Then add this code:
    int len=input.length();
    for(int i=0; i<10-len;i++)
    input="0"+input;
    return input;
    Here I am assuming the total length is 10. If yours is 20 then put 20 instead of 10 in the second line of the code.
    Regards,
    ---Satish

  • Remove leading zeros in query

    Hi Gurus,
    I have a alpha routine in update rule which will add leading zeros in omaterial,but now I want to display 0material in the report without leading zeros. How to do this ?
    Thanks
    Liza

    Easiest thing is remove the conversion routine in 0material, if you dont want leading zeros.
    Or
    In update rules, use truncate statement to remove leading zeros.
    Ravi Thothadri

  • Remove leading zeros using MDX function

    Hello,
    BO XI R3.1 SP2 FP2.5, SAP BW 7.0
    This seems simple, but I cannot find a solution.
    How do I remove leading zeros from a character field in a OLAP universe. Is there any MDX function?
    I tried
    <EXPRESSION>
    Value([0MATERIAL].[LEVEL01].[[20MATERIAL]].[Value])
    </EXPRESSION>
    <EXPRESSION>
    StrToValue([0MATERIAL].[LEVEL01].[[20MATERIAL]].[Value])
    </EXPRESSION>
    I can remove the leading zeros in Webi, but we require it for ad-hoc reporting? Is there a way to do this in the universe?
    Thanks,
    Nikhil

    Hi,
    SAP BW MDX only allows calcuated expressions that return numeric values: this is one if the main SAP MDX limitations.
    By the way there is the abilitiy to return string only for those expressions:
    [Dimension].currentmember.name
    [Dimension].currentmember.uniquename
    So you can do this:
    <EXPRESSION>
    (right([0MATERIAL].currentmember.name, 4))
    </EXPRESSION>
    <EXPRESSION>
    (right([0MATERIAL].currentmember.uniquename, 4))
    </EXPRESSION>
    <EXPRESSION>
    (left([0MATERIAL].currentmember.name, 3))
    </EXPRESSION>
    <EXPRESSION>
    (left([0MATERIAL].currentmember.uniquename, 3))
    </EXPRESSION>
    Otherwise you can use WebI formulas as described in the thread.
    Regards
    Didier

  • Leading zero check got activated in production .

    Hi,
    We had a DIMP ( Discrete Industries Mill Products) addtional installation to our existing landscape on last weekedn.  we have a strange issue after that.
    Most of the select queries based on material number,vendor,customer are failing. with further analysis it was observed that select queries are failing because of leading zero's missing .
    we are surprised since the same queries worked perfectly fine before ( and it still runs perfectly fine in qulaity client) but now it is failing.
    we know workaround to change all custome programs with conversion exit addtion to material,lifnr,kunnar ect.. but does anybody know if there is any business function which got activated to check leading zero's in select queries and this got activated along with DIMP.
    let me know if you have any helpful inputs.
    PS: i wnat to restore my original settings for leading zero so we dont need to change nay programs.

    Hi Santosh,
    some more analysis is required: For the failed selects, where do the missing-leading-zero kunnr/matnr/lifnr come from?
    If from screen input, check the screens are active, check the input fields data type, active, conversion exit correct?
    It may be a good idea to check the whole system for inactive objects.
    If from other sources, check the complete way the data goes before use in SELECT WHERE clause.
    If you have found one errors source, this will lead to more.
    There are a couple of SAP notes on DIMP, at least the activation process of DIMP should be checked.
    Regards,
    Clemens

  • APD - How to remove leading zero's in a String?

    Hello All,
    I have been stumped by this challenge for a few hours now, so would appreciate your suggestions.
    I am using APD to produce a CSV file where the source is a query. The output requires 0MATERIAL and this is delivered by the source query. The issue is that the CSV file must not retain any leading zero's that may exist in the 0MATERIAL value.
    e.g.
    example #      original material code     desired output
    =========     ======================     ==============
    a            000000000000015931      15931
    b            000000000001001037      1001037
    c            000000000008945420      8945420
    d            000000000080889200      80889200
    e            0000000000L0293500      L0293500
    Initialy, I believed I could simply output the value of 0MATERIAL to an integer field. This would remove all leading zero's but not all 0MATERIAL codes are purely numeric in value (see example (e));
    Someone had a similar requirement w/ SQL Server and solved it by replacing all zero's with a space, trimming leading spaces, then replacing remaining spaces back to zero's! [url]http://www.sql-server-helper.com/functions/trim-leading-zeros.aspx[url]
    So the logic is something like this:
    1. Replace each 0 with a space: REPLACE('0','',[0MATERIAL])
    2. Use the L_TRIM string function to trim leading spaces: L_TRIM(<result from Step #1>)
    3. Replace all spaces back to 0: REPLACE('','0',<result from Step #2>)
    Formula Builder looks like this:
    L_TRIM(REPLACE_ALL('0','',0MATERIAL))
    I attempted this using the
    REPLACE()
    function (available in the APD Formula builder) to replace all zero's with an empty string. This too created a problem because as in examples (a) through to (e), the function replaces all zero's in the string not just the leading ones! e.g.
    REPLACE('0', '',000000000001001037)
    gives 1137 ! 
    The problem here is that when you specify a space in the
    REPLACE()
    function by saying
    it thinks you meant no spaces at all! Therefore I am no longer able to execute step 3! 
    I'm stumped now and would appreciate the communities help on this.
    Thanks,

    Thanks Akshay,
    I took 0MATERIAL as the source field
    I specified ZMATLWOLDZERO as the target field (type same as 0MATERIAL).
    In the code section i wrote this:
      DATA: ls_source TYPE y_source_fields,
            ls_target TYPE y_target_fields.
      loop at it_source into ls_source.
        move-corresponding ls_source to ls_target.
        call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            output = ls_target-ZMATLWOLDZERO
          IMPORTING
            input  = ls_source-material.
        append ls_target to et_target.
      endloop.
    compiles fine but on test execution, the code termnates saying that "Incorrect parameter with CALL FUNCTION"
    Forgive me this is a first attempt I have tried but I fear my logic is incorrect in the code somewhere...

  • Leading zeros without ALPHA conversion

    Hi all,
    we had an infoobject CHAR16 with ALPHA exit, after further analysis we realized that we had to save the field without without trailing zeros so what i've done was to modify the char deleting the ALPHA exit.
    I test in DEV this change and the field was populating correctly in the datastore object, for example:
    Before
    3455 -> 0000000000003455
    After
    3455 -> 3455
    Now i've transported this change in production but it doesn't seem to work, after reloading a chunk of data it's still applying the ALPHA conversion to the field: i've also checked the PSA and i've got the right value.
    Any thoughts?
    Thanks
    Stefano

    Stefano,when you remove the alpha conversion from the infoobject then it might create some inconsistencies while loading data and also in reading the value.
    Lets say firstly you loaded the data to object with Alpha conversion so value got stored like this :
    3455 -> 0000000000003455
    Now when you remove the Alpah conversion then value get stored as
    3455 -> 3455
    System will treat the above entries as two separate records and not single record.Check in system as well.
    To display the data correctly you need to enter the value as they are like one with leading zeros and one without then you may be able to see both the records.
    Hope this gives an idea.
    Regards,
    AL

  • Keeping leading zeros

    I have a series of reports that use Account segmentations that are based on a string of numbers. Unfortunately some of these strings of numbers have leading zeros. (eg. 0023, 0123)
    When the reports are downloaded to excel these leading zeros are lost. Any words of wisdom on how to keep these leading zeros in the report when downloading to excel?

    How would I put the value into double quotes?
    Would this be done under Edit Column Formula?
    If so, I must be doing something wrong. The current column formula is:
    Campaign."Source Code"
    If I change it to:
    "<Campaign."Source Code">"
    I get the following error.
    [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <Code>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT "<Campaign."Source Code">", Campaign."Campaign Name", Campaign.PICK_0, Campaign.PICK_1, Campaign.PICK_2, Campaign.PICK_3, Campaign.PICK_4, Campaign.PICK_5, Campaign.PICK_6, Campaign.PICK_7, Campaign.PICK_8, Campaign.PICK_9, Campaign.Status, Campaign.TEXT_31, Campaign.TEXT_32, Campaign.TEXT_33, Contact."Contact First Name", Contact."Contact Last Name" FROM "Campaign Response Analysis"
    Please advise.

  • Want to hide/eliminate the leading Zeros in the Variable popup for0MATERIAL

    I have a requirement where 0MATERIAL is having leading zeros and it has the MATN1 conversion routine in the production system.I want to only remove the leading zeros in the Variable popup in report for 0 MATERIAL witohut changing the definition of the object as it has too much production data to change.
    Best Regards
    Tagore

    Hi,
    You will have to write some code in F4 help BADI, please refer the sap note 1416952. And you can take help of following function module to remove leading zeros,
    CONVERSION_EXIT_ALPHA_OUTPUT.
    If above thing doesn't help then you will have to create virtual key figure.
    Regards,
    Durgesh.

  • Adding leading zeros in abap objects.

    Can anyone explain me
    1. How to add leading zeros to a field in abap objects.
    For eg:
    data: dmb(6) type c value '123456',
    actually the output value of c should have leading zeros added to it for length 16.
    i.e '0000000000123456' . If the length of dmb is less than 16 then leading zeros should be added to that value to make it 16 as length.
    Please tell me how to do it in ABAP Objects.

    Hi Camila
    Try to use the statement
    DATA: ALPHABET(15) VALUE '     ABCDEFGHIJ',
          M1(4)        VALUE 'ABCD',
          M2(6)        VALUE 'BJJCA '.
    SHIFT ALPHABET LEFT DELETING LEADING M1.
    The field
    ALPHABET
    remains unchanged.
    SHIFT ALPHABET LEFT DELETING LEADING SPACE.
    The field ALPHABET now has the following contents:
    'ABCDEFGHIJ     '.
    SHIFT ALPHABET RIGHT DELETING TRAILING M2.
    <b>ALPHABET</b> now has the following contents:
    '      ABCDEFGHI'.
    <u><b>IN CHARACTER MODE</b></u>
    <b>Effect</b>
    This is the default setting (see above), and the addition is therefore optional.
    <b>Note
    Performance:</b>
    For performance reasons, you should avoid using SHIFT in WHILE loops.
    The runtime required to shift a field with length 10 by one character to the right or left requires about 5 msn (standardized microseconds). A cyclical shift requires around 7 msn. The runtime for the ...
    LEFT DELETING LEADING
    ... variant is around 3.5 msn, for ...
    RIGHT DELETING TRAILING
    ... around 4.5 msn.
    Reward all helpfull answers
    Regards
    Pavan

  • How do I use the print function to output a numeric variable with a fixed amount of leading zeroes

    I need to create an output from a T-SQL query that picks a numeric variable and uses the print function to output with leading zeroes if it is less than three characters long when converted to string.  For example if the variable is 12 the output should
    be 012 and if the variable is 3 the output should be 003.
    Presently the syntax I am using is PRINT STR(@CLUSTER,3) .  But if @CLUSTER which is numeric is less than three characters I get spaces in front.
    Please help!

    >> I need to create an output from a T-SQL query .. <<
    NO! NO! In RDBMS, we have a presentation layer that handles displays. We do not ever do it in the database. This is fundamental. But more than that, the purpose of PRINT is for debugging in T-SQL and never for output.
    You are still writing 1960's COBOL or BASIC, but you want to to it in SQL.  You probably picked the wrong data type (a numeric that should be a string) and are trying to repair your design error.  
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • IR - Column with leading Zeros issue

    Hello,
    I've got an IR report which includes as "default report settings" 1 column with leading 0s. In order to export to Excel that column as text rather than as a numeric I followed a workaround proposed before in this forum (excel copy drops leading zeros
    In essence this workaround is to create an identifical column but in "excel text format" and display the columns depending on the request value: INSTR(NVL(:REQUEST,'YABBADABBADO'),'CSV') <> 0 for example.
    This works just fine for the default report.
    The problem arise when a user creates his own customise report that includes the mentioned column and saves it as a named report. Here, when the results are exported to excel the "excel" column does not appear.
    In fact, just hiding one of the displayed columns produces the same undesired result.
    I would appreciate any comments or suggestions.
    Many thanks
    Edited by: Javier Gil on Jul 20, 2010 7:52 AM

    I have found a better method. In your IR query:
    SELECT LPAD(v.vendor, 7, ' ') vendor,
    /*Just LPAD to a length of the column defined in the database table or to 7, whichever is greater. */
    FROM v, r
    WHERE v.VENDOR = r.VENDOR
    AND date_rcv <= to_date(:P150_CUTOFF,'yyyy/mm/dd')
    AND inv_nbr = ' '
    AND to_stores <> 'T'
    AND (V.VENDOR = RPAD(:P150_VENDOR,10,' ') OR :P150_VENDOR = 'ALL')
    When you download to Excel by Download/XLS (Request=XLS), it preserves the leading zeros.
    In the case of dates, you should LPAD 10 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YY'), 10, ' ') date_rcv,
    I haven’t tried it yet but I think in the case of ‘MM/DD/YYYY’, you should LPAD 12 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YYYY'), 12, ' ') date_rcv,
    Drawbacks of this method:
    Since the string has leading white spaces, you cannot use the filter for the ‘=’ comparison operator. Even filtering using leading white spaces will not return anything. You must use the LIKE and NOT LIKE operator instead.
    Advantages of this method over the original one I posted yesterday:
    1)     You do not have to create another column for download, just one column will suffice.
    2)     Even though the query has leading white spaces, they will not display in the IR region.
    Edited by: richardlee on Aug 5, 2010 11:10 AM
    Edited by: richardlee on Aug 5, 2010 11:16 AM

  • IR truncating leading zeros in my popup window report

    Hello,
    I am using IR_columnname, for one of the columns in my report which is a popup window report.
    My problem is that IR_column search filter in my popup window is truncating the leading zeros.
    I am getting the value but it is truncating the leading zeros.
    like say if the deptno is something like 020 or 0020 in the parent window.
    the IR_columnname value is taking '20' (its truncating leading zeros) with this filter its not dispalying the result in my popup window.
    can anyone help me out with this.
    thanks.

    How are you passing values to the IR filter? There could be a possibility that you source logic is truncating the leading zeros.
    Thanks,
    Manish

Maybe you are looking for

  • Ipod won't sync selected movies.

    I'm not sure what generation my i-touch is. It is a 8g and all I know is that the movies were working fine earlier today and I plugged in my ipod, my computer crashed, and blue screen came up. Rebooted my whole system. Itunes was trying to download t

  • SWF files in InDesign for export as Interactive PDF

    I am creating an interactive PDF file which contains a multi-state slide show with navigation buttons that I created in InDesign. Since that will not display and "work" in an interactive PDF I exported a .swf file of the slide show to place in the fi

  • Web-based deployments can be performed using OUI

    10.2.0.x version Want to learn more about how Web-based deployments can be performed using OUI, if someone has good article or notes.

  • Dashcode Widget Plugin?

    Hi all, I'm trying to create a widget with plugin, however, I am getting runtime errors with the following code: function _lolwut(event) var macbot = window.mbot; var spoken = document.getElementById("textfield").value; var speak = macbot.talkToMacbo

  • HT4236 Syncing a photo album on iPad

    I made an album in iPhoto but it says 0 photos in that album when I select that on my iPad to sync. Any ideas why?