L_s_range-low not taking leading zeros

Getting a value of '01111' from a source.
Want to add the leading zeros of '00001' to '01111' to become '0000101111' and assign that to l_s_range-low.
Tried CONVERSION_ALPHA EXIT_INPUT but there are too many zeros added.
Tried translate, shift , and type N, but not get the leading zeros to populated onto the selection criteria screen for the field.
Trying to use the source value to convert it to a profit center with leading zeros.
Regular ABAP seems to add the leading zeros when WRITE, but l_s_range-low is not taking the leading zeros and displaying it on the selection criteria screen.
How to populate leading zeros values for l_s_range-low?

VAL001 = '00001'
VAL999 = '99999'
LOOP AT itab1.
       VALUE1 = itab1-field.    -
> field has '01234' always start with a zero.
       CONCATENATE  VAL001 VALUE1 INTO VALUE3.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT         = VALUE3
         IMPORTING
          OUTPUT        = VALUE3               .
       L_S_RANGE-LOW = VALUE3.
       CONCATENATE VAL999 VALUE1 INTO L_S_RANGE-HIGH .
       L_S_RANGE-SIGN = 'I'.
       L_S_RANGE-OPT  = 'BT'.
       APPEND l_s_range TO e_t_range.
    ENDLOOP.
Created a variable for 0PROFIT_CTR.
Profit Center is CHAR 10.
when running the query, Selection criteria screen has omitted 0 and only display 1234 for the low.

Similar Messages

  • [svn:fx-trunk] 8591: Fix for SDK-18328 - NumericStepper not stripping leading zeroes upon commit .

    Revision: 8591
    Author:   [email protected]
    Date:     2009-07-15 12:39:05 -0700 (Wed, 15 Jul 2009)
    Log Message:
    Fix for SDK-18328 - NumericStepper not stripping leading zeroes upon commit.
    Bugs: SDK-18328
    QE Notes: None
    Doc Notes: None
    Reviewer: Deepa
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-18328
        http://bugs.adobe.com/jira/browse/SDK-18328
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as

  • Dynamic Extract.  Do Not Want Leading Zeros in Pipe Delimited Record

    Greetings,
    I am using the following code to create a pipe delimited extract file dynamically.  The problem: leading zeros are being lost.  For example, when I do an extract of BKPF, BELNR is appended to the extract without leading zeros.  This is a problem.  Any suggestions for resolving this?
        DATA: lv_dref    TYPE REF TO data,
              lv_dref2   TYPE REF TO data,
              lv_data    TYPE ty_data,
              ls_data    TYPE ty_data,
              oref       TYPE REF TO cx_root,
              text       TYPE string.
        CREATE DATA lv_dref TYPE (p_tab-low).
        ASSIGN lv_dref->* TO <lfs>.
        CREATE DATA lv_dref2 TYPE TABLE OF (p_tab-low).
        ASSIGN lv_dref2->* TO <lft_main>.
        CLEAR ds_clauses.
        MOVE p_tab-low TO ds_clauses-tablename.
        READ TABLE twhere WITH KEY ds_clauses-tablename
                          INTO ds_clauses.
        TRY.
            SELECT * FROM (p_tab-low) INTO TABLE <lft_main>
                    WHERE (ds_clauses-where_tab).
          CATCH cx_sy_dynamic_osql_semantics INTO oref.
            text = oref->get_text( ).
        ENDTRY.
        cv_subrc = sy-subrc.
        gv_tot_cnt = gv_suc_cnt = sy-dbcnt.
        CHECK gv_tot_cnt > 0.
        LOOP AT <lft_main> ASSIGNING <lfs>.
          CLEAR: ls_data.
          DO.
            ASSIGN COMPONENT sy-index OF STRUCTURE <lfs> TO <lfv>.
            IF sy-subrc IS NOT INITIAL.
              EXIT.
            ENDIF.
            WRITE: <lfv> TO lv_data.
            IF ls_data IS NOT INITIAL.
    *LEADING ZEROS ARE LOST HERE (at conatenate)
              CONCATENATE ls_data lv_data INTO ls_data
                                          SEPARATED BY '|'.
            ELSE.
              ls_data = lv_data.
            ENDIF.
          ENDDO.
          APPEND ls_data TO ct_data.
        ENDLOOP.
    Your response is greatly appreciated.
    Kind Regards,
    Jason

    You are losing it because of the write statement, change it to a move.  I assume you are using the WRITE to put the correct formatting for a date field or a type P field, if that is the case,  you can try to check which field is being written at the time by check sy-index or checking the type at runtime.
    *WRITE: <lfv> TO lv_data.
    move <lfv> to lv_data.
            IF ls_data IS NOT INITIAL.
    *LEADING ZEROS ARE LOST HERE (at conatenate)
              CONCATENATE ls_data lv_data INTO ls_data
                                          SEPARATED BY '|'.
            ELSE.
              ls_data = lv_data.
            ENDIF.
    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

  • Taking leading zeros off

    hi folks,
    I need help in the abap code here.
    data char type c.
      char = '0000000550'.
    I need to take the leading zeros away (remember it is in the character format)
    how can I do that?
    thanks
    Santhosh

    silly question.
    There are n ways to do this.
    anyway oneway is like this
    report zemm2466a.
    data: char(20) type c,
         in_num type i.
    char = '0000000550'.
    move char to in_num.
    Regards,
    Ismail

  • Leading Zeros of Consumption in historical time series are not considered

    We are using VM MRP Type and weighted average model to calculate forecast value using historical consumption values. I have 36 historical periods(months) but have consumption incurred only in last period i-e "1". I have choosen a weighted group 01 (20% for 1-12 month, 30% for 13-24 month, 50% for 25-36 month). Using these setting it should calculate the basic value as 1*0.5/12 = .042 but it gives "1" as basic value not considering leading zero consumption value in historical time series. If i put a value in first period it calculates correctly and considers the leading zero.
    We have implemented note 1113276, 1145764 & 1113277 and have chosen CV_OPTION="X" in the interface as per theses notes instructions but still while executing the forecast it is not considering the leading zeros.
    We are using ECC 6.0 MM with 602 support pack.
    Need urgent help in this regard.

    Have you followed the steps as per SAP Note 1113276 , Just check below link with same subject discussed check it helps you,
    [Forecast with consumption zero are not considered |Forecast with consumption zero are not considered]

  • Leading zeros remove from FB05 for assignment field in process open items b

    Dear expert
    At present i am using the electronic bank statement completed OT83 & OT51configuration, when i am running FF-5 the EBS soft copy has been uploaded and created batch input session.
    I executed  batch input session and the transactions has been posting through FB05 for outgoing payment clearing  with assignment field ( where check number is laying correctly and matching EBS soft copy cheque number and SAP outgoing clearing account line item assignment cheque number ) in case of outgoing clearing is happening correctly.
    but where as i have a problem incoming clrg cheque number which is displaying in assignment field and updated when client using FF68(check deposit / collections).
    the user is punching all collections from customers using t.code FF68 and cheque number is updated with 6 digit number in the variant. it is like a JV.
    after posting batch input session the cheque is number displaying in assignment field. the cheque number is updated with 6 digit number. but in the variant cheque number width 6 digit only  but after posting FF68 & SM35 the system automatically taking leading zeros for the remaining length. Cheque number standard length in SAP 13 in table .
    total 13 digit length but user punched only 6 digit only, because the cheque number 6 digit numberonly. so the remaining 7 digits it is occupaying 0000000.
    while executing FF_5 and SM35  (thr FB05) the assignment field cheque number (0000000586585) and soft copy cheque number 6 digit (586585) is not matching , because of that i am unable to clear the incoming collections or incoming payments clrg.
    so how  can i remove the leading zeros after cheque number ( actually displaying 0000000586585 , but i want without zeros only cheque number 586585) in assignment field in FB05 using FF-5 & SM35).
    is there any enhancement or user exit to remove leading zeros or any other way of work around .
    Regards

    Hi Amareswar,
    In your case, request your bank to provide cheque number with leading zeros in electronic bank statement as the leading zeros in the assignment field is SAP system behaviour.
    Alternatively, use 'Define Search String for Electronic Bank Statement' (refer http://help.sap.com/erp2005_ehp_05/helpdata/EN/6d/0cdf4b142e11d3963800a0c9426c73/frameset.htm for details) in the IMG, customize it to search for the cheque number provided in the note to payee field > then append leading zeros.
    The first method is the solution we are using and it is the most cost effective.
    Hope the above helps.
    Kind regards,
    John Chin

  • Need leading Zeros in the excel sheet which is sent from ABAP

    Hi ,
    I am downloading data from SAP to excel sheet using the WS_DOWNLOAD Function Module. The numeric data in not having leading zeros.  if it is 0010 it is displaying 10 in the excel sheet . i need the leading zeros in the excel sheet. without manulally changing it to Text in the excel sheet .
       Is there any way to do it .
    Thanks,
    Chetan

    Hi Chetan,
      CALL FUNCTION 'WS_DOWNLOAD'
        EXPORTING
          filename                = w_file_path
          filetype                = 'DBF'                       "declare the File type as DBF then leading zeros will appear
          write_field_separator   = 'X'
          confirm_overwrite       = 'X'
        TABLES
          data_tab                = Itab.
    Regards,
    Prabhudas

  • Leading Zeros in Excel file

    Hello,
    I am downloading few fields from HR infotypes into Excel sheet, I'm using cl_ABAP_char_utilities=>Horizontal_tab to separate the fields. I'm not getting leading zeros. I have tried with 'DAT', 'CSV' and 'WK1' file formats instead of 'ASC', but the flat file format is changing. I have tried ' ' ' symbol. I am getting leading zeros along with that symbol. Now, I need to remove the symbol. Any suggetions...
    Thanks and regards,
    PNM Raju

    dude,
      it's just a regular concatenate statement using a non blank space like the old HTML &nbsp.
    It doesn't show properly in the editor here on SDN. Just try it n see if it executes by putting a space there.
    I think it would wind up looking something like CONCATENATE ' ' MEAN-EAN11 INTO Z_L_ITAB-EAN11.
    If you're on a laptop or a keyboard without the 10key plus on the right, you'll probably have to hold the [[fn]] key down too.
    So in ABAP type CONCATENATE '<-- right here put the [[fn]][[ALT]]0160 and you should see it place what looks like a space right there.
      Try it

  • Leading zeroes - switching off ALHPA conversion doesn't work

    Hi all.
    I have an IObj ZPARENT with compounding attribute ZATTR.
    While loading data into ZPARENT I got errors regarding duplicate records. Errors occur because I got leading zeroes in ZATTR and records like "1", "01", "001" become "0001" .
    I thought it is because of ALHPA conv. in ZATTR, so I deleted ZATTR master data, removed ALPHA conv. from ZATTR and tried to reload data. I got same duplicate key error and leading zeroes.
    I also examined my transformation. It doesn't have any ALPHA conversions. I do post data into ZATTR through simple routine:
         data: CATTR type c length 35.
         CATTR = SOURCE_FIELDS-REF_INF.
         REPLACE ALL OCCURRENCES OF '#' IN CATTR WITH ':'.
         RESULT = CATTR.
    The data in PSA looks fine - it doesn't have any leading zeroes in PSA, but than it comes to IObj. I got them.
    What I supposed to do to avoid leading zeroes in ZATTR??

    Hi,
    Below SAP Note may help you out.
    Note 447341 - values for ALPHA conversion routine
    check this note also...
    Note 1242892 - Leading zeros removed from the contract number
    Veerendra.
    Edited by: denduluri veerendra kumar on Jul 1, 2009 4:02 PM

  • How to remove leading Zeroes in all fields in Payload

    Hi,
    How can I remove the leading Zeroes in every Filed I have in whole Payload Structure.there are around 10000 fields that have to be removed the leading Zeroes.any good idea please.
       <POSNR>000010</POSNR>
      <MATNR>000002465640</MATNR>
      <ARKTX>000012 KG D107</ARKTX>
      <MATKL>00030010000</MATKL>
      <WERKS>0000ORGC</WERKS>
      <LGORT>0000GC55</LGORT>
      <CHARG>000TEST</CHARG>
    like this mutliple segments and multiple Fields.so  I can take as whole payload with multiple fields should not have leading Zeroes.I can handle if they are 10 0r 20 fileds,but not like whole pay load/1000 fields right.
    thank you,
    Prem

    Hi
      You can have an additional XSLT mapping, to your existing one..
    use copy-of & apply-templates to copy the whole tree & make changes recursively.
    below is a sample code , the marked line is where you need to try your logic of trimming Zeros. (this code does upper case)
    add this below code in your interface mapping object, as XSLT mapping, which does the job (only try putting your logic)
    <xsl:stylesheet
                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                      version="2.0">
                <xsl:output  method="xml"
                            indent="yes"
                            omit-xml-declaration="yes"/>
                <xsl:template  match="*">
                      <xsl:copy>
                            <xsl:copy-of  select="@*"/>
                            <xsl:apply-templates/>
                      </xsl:copy>
                </xsl:template>
                <xsl:template  match="text()">
                      <xsl:value-of  select="upper-case(.)"/>
                </xsl:template>
          </xsl:stylesheet>
    hope this fixes your issue
    Regards
    Vishnu

  • Leading zeros in SAP Script

    hi,
      how can i put leading zeros (functionality of FM CONVERSION_EXIT_ALPHA_INPUT) in SAP Script??
    b'coz of not having leading zeros in PO number,i m facing problems in fetching the PO header text(text id = F01) using INCLUDE syntax.
    Message was edited by: kaushal malavia
    Message was edited by: kaushal malavia

    sreenivas,
       here goes my script coding..
    /:     DEFINE &W_EBELN& = &EKKO-EBELN&
    /:     PERFORM ZERO_PADDING_PO IN PROGRAM ZSXXSR103S
    /:     USING &EKKO-EBELN&
    /:     CHANGING &W_EBELN&
    /:     ENDPERFORM
    and here goes my routine coding.
    *&      Form  ZERO_PADDING_PO
    FORM ZERO_PADDING_PO TABLES TAB_IN STRUCTURE ITCSY
                          TAB_OUT STRUCTURE ITCSY.
      DATA : W_EBELN LIKE EKKO-EBELN.
      CLEAR W_EBELN.
      REFRESH TAB_OUT.
      PERFORM GET_VALUE TABLES TAB_IN USING 'W_EBELN' W_EBELN.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = W_EBELN
        IMPORTING
          OUTPUT = W_EBELN.
      CLEAR TAB_OUT.
      TAB_OUT-NAME  = 'W_EBELN'.
      TAB_OUT-VALUE = W_EBELN.
      APPEND TAB_OUT.
    ENDFORM.                               " GET_VALUE
    *&      Form  GET_VALUE
         -->I_TAB_IN
         -->I_NAME
         -->O_VALUE
    FORM GET_VALUE TABLES   I_TAB_IN STRUCTURE ITCSY
                   USING    I_NAME
                            O_VALUE .
      CLEAR O_VALUE.
      READ TABLE I_TAB_IN WITH KEY NAME = I_NAME.
      O_VALUE = I_TAB_IN-VALUE.
    ENDFORM.                               " GET_VALUE
    can u point out error in code ?? in debuging i can see the value of W_EBELN is geting leading zero padded but when it comes back to SAPSCRIPT it gets changed to original value of without leaing zeros.

  • How to remove leading zeros from variable

    hi,
       how to remove leading zeros from variable like it_vbap-matnr.
    value in it_vbap-matnr is 000000000000000358
    i want to remove leading zeros so that it become 358
    regards
    deepak

    You can use Function Module <b>'CONVERSION_EXIT_MATN1_OUTPUT'</b>
    This Function Module will eliminate leading Zeros.
    For each MATNR Value read form DB Table,u can eliminate Leading zeros and then modify ur Internal table.
    I think u will not get leading Zeros into utr Internal table when u read from VBAP.
    Bcoz MATNR in VBAP itself have Conversion routine.
    If u r getting leading zeros,U can use following Logic.
    tables:
      vbap.
    data:
       t_vbap like standard table of vbap.
    select matnr
    from vbap
    into corresponding fields of table t_vbap.
    loop at t_vbap into vbap.
      CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
          EXPORTING
            INPUT         =  vbap-matnr
          IMPORTING
            OUTPUT        =  vbap-matnr
      modify t_vbap from vbap transporting matnr.
    endloop.
    Hope this will work.....

  • Eliminate Leading Zeros in Portal

    Hi!
    I have a problem with Leading Zeros.
    I have customer details in the master table which has Telephone number and Fax number as attributes to ZCUSTOMER.
    I am running a report on this Object as a provider.
    When I see the report from BEx or Query Designer on the browser, I am not seeing any leading zeros.
    But when the same data is sent to Portal, the xml displays leading zeros as in the master data table.
    Why am I not viewing leading zeros when i run it on the browser?
    and
    How can I eliminate leading zeros display in portal?
    Please help!
    Thanks,
    Sri

    Hello Sri,
    I'm facing the same problem. Could you please explain what you did in portal to solve it.
    Thanks in advance

  • Leading zero on char field

    I have what would be a simple thing.  A need to have leading zero retained on a variable..that holds a month.
    I have a field that is 20090501 and I want to make it 20090401...  that is take 1 month off
    But problem is the calculation does not give leading zeros
    ... here is very cut down version of what I am doing
    DATA:  lv_Period(8) type c,
          lv_mm(2) type c.
    lv_mm = '05'.
    lv_mm = lv_mm - 1.   "becomes 4.    " how do I make it "04".
    concatenate '2009' lv_mm '01' into lv_Period.    " this becomes  2009401  and not 20090401

    DATA: lv_Period(8) type c,
    lv_mm(2) type c.
    lv_mm = '05'.
    lv_mm = lv_mm - 1. "becomes 4. " how do I make it "04".
    if lv_mm is LT  '10'.
    concatenate '2009' '0' lv_mm '01' into lv_Period. 
    else.
    concatenate '2009' lv_mm '01' into lv_Period. " this becomes 2009401 and not 20090401
    endif.

Maybe you are looking for