How to delimit leading zero in vendor number in OO ABAP ALV without using conversion routine

Hi,
How to delimit leading zero in OO ABAP ALV without using conversion routine, because I have many fields like vendor, customer, material number etc..
How to address this leading zero.
I appreciate your quick response.
Regards,
Nalini S.

Hi Nalini,
Delimiting leading zeros in fields has to be done via conversion routines, as suggested by Vadamalai you need to pass on the conversion routine name in you field catalog variable.
Now as to which object oriented approach are you using to have your table contents display in ALV as it matters  -
Using FACTORY method of CL_SALV_TABLE class, or
Using SET_TABLE_FOR_FIRST_DISPLAY method of CL_GUI_ALV_GRID class.
Using FACTORY method of CL_SALV_TABLE will do your own work, no need to apply any conversion routines or set long/medium/short text for columns as we do in field catalogs!
Cheers,
Varun

Similar Messages

  • How to remove leading zero from Material Number

    Hello Everyone,
    I need to figure it out how to remove leading zero from material number. Cureently extractor is sending material number as 100663. But when comes into BI i am getting as "000000000000100663" and similariy in report it is appearing as "000000000000100663". Now my client wants me to exclude preceeding zero for a material in all the reports.
    Is there any setting in query desinger to handle this issure or in the backend.
    Need your inputs.
    Thanks,
    Lasya.

    Hi
    you can use the function Module
    CONVERSION_EXIT_ALPHA_OUTPUT in the start routine
    to test this go to SE37  --- give the CONVERSION_EXIT_ALPHA_OUTPUT -
    >display -
    > F8
    in the input give 000000456
    and execute
    the out put will be 456
    for getting Zeros you can use
    CONVERSION_EXIT_ALPHA_INPUT--- to remove leading zeros
    Santosh
    Edited by: Santhosh Nagaraj on Oct 29, 2009 10:52 PM
    Edited by: Santhosh Nagaraj on Oct 29, 2009 10:54 PM

  • How to reduce the font size of the title of grid ALV without using OOPS

    Hello
    i have a title which i have displayed in a grid layout using this code
    DATA: GRID_TITLE TYPE LVC_TITLE.
    GRID_TITLE = 'FACTORY OVERHEAD '
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
      I_GRID_TITLE                      = GRID_TITLE.
    Now i would like to reduce the font size of the text which is displayed "'FACTORY OVERHEAD '.
    how do i do that,i am new to abap.
    Thanks

    Hi,
    Set the font size to your requirement
    Go this below code.
    CLASS ZCL_GUI_ALV_GRID DEFINITION INHERITING FROM CL_GUI_ALV_GRID.
      PUBLIC SECTION.
        METHODS TITLE_SIZE.
      PRIVATE SECTION.
    ENDCLASS.                   
    Then use the above method in the Implementation part as .
    CLASS ZCL_GUI_ALV_GRID IMPLEMENTATION.
      METHOD TITLE_size.
        ME->SET_TITLE_SIZE( EXPORTING SIZE = 1
                            EXCEPTIONS ERROR = 1  ).
      ENDMETHOD.
    ENDCLASS.
    Now when your reference variable should be
    Data :GRID type ref to ZCL_GUI_ALV_GRID.
    and Create the Object as
    CREATE OBJECT GRID
               EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.
    Before Calling Set_table_for_ first_display, Call the created method
    CALL METHOD GRID->TITLE_SIZE.

  • How to remove leading zeros for an item number within quickviewer

    how to remove leading zeros for an item number within quickviewer. Pls help

    ask your abap guy to do  it. not portal guys business.

  • Appending leading zeros to material number

    Hi,
    I want to form a object key for material number. so i need to append leading zeros to material number. but i am getting "TYPE CONFLICT" shot dump in FM 'BAPI_OBJCL_GETDETAIL'.
    The following code is giving the dump.
    data: wa_object(18) type c.
    wa_object = '100301010'. "Material No
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = wa_object
        IMPORTING
       OUTPUT        =  wa_object.
    CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
      EXPORTING
        OBJECTKEY              =  wa_object
        OBJECTTABLE            = 'MARA'
        CLASSNUM               = 'FINISHED_MATERIAL'
        CLASSTYPE              = '001'
        KEYDATE                = SY-DATUM
        UNVALUATED_CHARS       = ' '
        LANGUAGE               = SY-LANGU
      TABLES
        ALLOCVALUESNUM         = IT_ALLOCVALUESNUM
        ALLOCVALUESCHAR        = IT_ALLOCVALUESCHAR
        ALLOCVALUESCURR        = IT_ALLOCVALUESCURR
        RETURN                 = IT_RETURN
    but if I hard code to 18 characters, the following code is working fine:
    CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
      EXPORTING
        OBJECTKEY              =  '0000000000100301010'
        OBJECTTABLE            = 'MARA'
        CLASSNUM               = 'FINISHED_MATERIAL'
        CLASSTYPE              = '001'
        KEYDATE                = SY-DATUM
        UNVALUATED_CHARS       = ' '
        LANGUAGE               = SY-LANGU
      TABLES
        ALLOCVALUESNUM         = IT_ALLOCVALUESNUM
        ALLOCVALUESCHAR        = IT_ALLOCVALUESCHAR
        ALLOCVALUESCURR        = IT_ALLOCVALUESCURR
        RETURN                 = IT_RETURN
    Please tell me how to rectify the short dump which uses Conversion_exit_alpha_input.
    Thanks .
    Sankar

    Hi Shankar,
    When ever u pass parameters to any function module the type of parameters must match with the ones defined in function module. Here u defined ur object key like this
    data: wa_object(18) type c.(18 digits). But the in function module it referenced with BAPI1003_KEY-OBJECT (50 digits). So u have to define the variable with BAPI1003_KEY-OBJECT.
    Check this solution. It will work for u.
    data: wa_object(18) type c,
               wa_object1 TYPE BAPI1003_KEY-OBJECT.
    wa_object = '100301010'. "Material No
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = wa_object
    IMPORTING
    OUTPUT = wa_object.
    wa_object1 = wa_object.
    CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
    EXPORTING
    OBJECTKEY = wa_object1
    OBJECTTABLE = 'MARA'
    CLASSNUM = 'FINISHED_MATERIAL'
    CLASSTYPE = '001'
    KEYDATE = SY-DATUM
    UNVALUATED_CHARS = ' '
    LANGUAGE = SY-LANGU
    TABLES
    ALLOCVALUESNUM = IT_ALLOCVALUESNUM
    ALLOCVALUESCHAR = IT_ALLOCVALUESCHAR
    ALLOCVALUESCURR = IT_ALLOCVALUESCURR
    RETURN = IT_RETURN
    Thanks,
    Vinod.

  • Leading Zeros in SU Number

    We are using SU Managment
    How do we get rid of leading zeros in SU# number range. System is storing pallet ID # with leading zeros in the LEIN table. This is causing issues while we retrive SU data from the tables, systems ask to enter the SU#  number with leading zeros.
    My Pallet Tag is printed with out leading zeros SU # 1234567890 and when the user tries to put away using LM02 system does not read the pallet ID. It looking for 00000000001234567890.
    Even on desktop LS33 if I try to display a pallet with SU # 1234567890 system looks for SU Num. with leading zeros.  Is there a way to get the leading zeros off from SU#
    Appriciate your help

    Please check in SPRO whether the conversion exit is maintained for Storage Unit Management. Follow the below path to do so.
    SPRO -> Storage Unit Management - > Master Data - > Define Number Ranges. In the Pop Up choose "Conversion exit for storage unit number" .
    Here you can define the "length of SU Numbers "
    Regards,
    Kumaran

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

  • How to suppress leading zeros

    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

  • SAPSCRIPT: How to Remove Leading Zeroes?

    What syntax (or symbol) for the following field would I include so it will not print the leading zeroes of that field?
                                                   &CAUFVD-RSNUM&
                                                                                    Thank-You.

    Use the "Z"
    &CAUFVD-RSNUM(Z)&
    Regards,
    RIch Heilman

  • Leading zero for a character datatype field in ALV display

    I have field access sequence value(VAKEY) which is concatenated by sales org, distibution chnl and division
    (0100/01/01).  the field is populating proprerly in internal tables, but in ALV display it is displaying as 100/01/01. How to consider leading zero in ALV for a CHAR datatype field.
    Thanks in Advance.

    Hi Srnii,
    You can use the below sample statement
    Shift mara-matnr right deleting trailing ' '.
    overlay mara-matnr with '0000000'.
    Thanks,
    Chidanand

  • How can i fake a visa card number? so that i can use my apple id perfecto, how can i fake a visa card number? so that i can use my apple id perfecto

    how can i fake a visa card number? so that i can use my apple id perfecto, how can i fake a visa card number? so that i can use my apple id perfecto

    You aren't going to get any answers for this question for legal reasons...I would recommend you get a real visa card number under your name and do it the legal way.

  • How can I sync contacts from Outlook 2010 to my iPhone 4S without using iCloud?

    How can I sync contacts form Outlook 2010 to my iPhone 4S without using iCloud?

    THanks for that...I have done that BUT 43 of my most important contacts out of 883 are locked into a "Local Contacts" folder.  THey show up in my Contacts folder but are not included in the sync to my iPhone.  Any ideas?

  • How can I sync my iphone 4s calendar to my macbook pro without using cloud. I can sync from macbook to iphone but not visa versa.

    How can I sync my iphone 4s calendar to my macbook pro without using cloud. I can sync from macbook to iphone but not visa versa.  I have not upgraded to Lion so I am not using iCloud. I also have tried send an invite from the calendar so it will appear in my mac mail account. No luck on either.
    Thanks!

    Follow the steps given here...
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • How can I transfer video taken with my iPhone to my iPad WITHOUT using a computer or iTunes? I'm going to Europe for a month and want to use my iPhone to take pics and video, then come back to the hotel room and use my iPad to edit/store each evening.

    How can I transfer video taken with my iPhone to my iPad WITHOUT using a computer or iTunes? I'm going to Europe for a month and want to use my iPhone to take pics and video, then come back to the hotel room and use my iPad to edit/store each evening. I don't want to use my iPad to take the video...too large/bulky. And I WON'T have a computer with me...I purchased the iPad to take with me so I could use the RDC to my home computer and avoid taking my computer at all. Is this possible?

    here is a cheaper solution than camera kit and a lot easier if you have WIFI available.
    I use the PhotoSync APP (I think its a $1.99) will transfer videos and photos over WIFI to any other IOS device or even PC/MAC. Great app since I like doing video and photos on my IPHONE and transfer to IPAD2 without synching through computer or doing cloud based storage.
    You can even send photos/videos from your MAC/PC to your IOS devices that way too. Makes it so much easier.
    Here is the link;
    http://www.photosync-app.com/

  • How to convert mm/dd/yy to dd/mm/yy in ABAP PROGRMS without using offsets

    how to convert mm/dd/yy to dd/mm/yy in ABAP PROGRMS without using offsets

    Do this way..
    data: lv_date(8)   type c.
    write sy-datum to lv_date DD/MM/YY.
    or
    write:/ sy-datum using edit mask '__/__/__'
    Regards,
    Santosh
    Message was edited by:
            Santosh Kumar Patha

Maybe you are looking for

  • How to populate the top left corner of a pivot table

    Can anybody tell me in a pivot table of ADF DVT, whether it is possible to fill any content into the top left corner of the title row, which is the leftmost cell to the left of the column edge? I did not see any demo samples which can populate any co

  • QR Code reader for 5230 ?

    Hi, Where can I find a QR code reader for my Nokia 5230 that I can install via OVI suite (so a .sis file I can download)? regards, Wim

  • IDVD crashes after burning a DVD

    iDVD is crashing almost every time it completes a DVD. These are long DVD's, but the status screen tells me I'm at 3.9 out of 4GB, so it should be okay. Over 35 GB available on the hard drive. I'm seeing this problem elsewhere on this board. Is anybo

  • How to remove files from my macbook with out paying to remove them

    how

  • Error determining address for Employee

    Hi Experts, We are running SRM 5.5 (add-on) in a local scenario. We have an issue with one employee, where they won't show with a relationship to their Org unit. The employee has a current employee record, has a valid user id, is assigned in the Org