ALV ( leading zeroes not displaying)

I have a ALV field (type NUMC ) and i want to display the leading number of zeroes
ex 000,0001,01 has to be displayed It is corrently displayed as blank,1 and 1.
I have tried setting LZERO to X  and NOZERO to X.
It does not work.
IS there some way in a ALV by which the leeding zeroes can be displayed ?
Regards,
Ajay Kulkarni

Hi,
The problem is with the data type
try using Integer data type 'I'
or else you have to pad your variable with leading 0's
For eg.
data: var type n LENGTH 10.
var = '123'.
shift var RIGHT DELETING TRAILING space.
OVERLAY var with '0000000000'.
Hope this will resolve your problem
Regards,
Punit

Similar Messages

  • Leading zeros not displaying

    Hi All,
    I have a characterstic info object that is set up as CHAR-3 which is an attribute of another info object.
    The source of this characterstic is a R/3 field. In R/3 that field is showing value as 004 but in Bex it shows only 4.
    When I check the data in the info provider, it looks fine just like R/3 ie 004. The problem is just in Bex.
    How can I dispaly the two leading zeros before the 4 in Bex?
    Thanks in advance.

    Hi,
    You should be careful in doing this. Try to convince your user to use the present one itself.
    As if you want to perform this action then I think you need to remove ALPHA conversion manually in the next level systems before importing the object from D to Q and then P. As I think the Transport will not overwrite by removing the ALPHA directly in the target systems.
    When you import the transport in the target system then it will fail stating that the ALPHA is removed. So here you have two options either manually activating the object or by using the program to activate the object?
    So I ask you to be careful in this case, as for many of the clients in Q and P systems the objects can not be edited!!
    So check the same before proceeding further.
    Thanks
    Murali

  • ALV Leading ZERO issue

    There is leading zeros in internal table passing to FM 'REUSE_ALV_GRID_DISPLAY'
    but i am not able to see the leading zero in alv report display. how fix this.

    hi
    check out
    have u added no_zero(1)     type c, in fieldcatalog.
    if yes than remove it.
    else
    pass the value by function module 'CONVERSION_EXIT_ALPHA_INPUT' .
    hope this will help u.

  • ALV grid is not displaying few fields of final internal table of type DMBTR

    hello frnds,
    i am displaying 10 fields in ALV grid using field catalog.
    among them five fields are currency fields on which i doing some arithematic operations. but all these fields are not getting displayed in alv grid.
    here is my code....
    declaring final strucutre to generate report
    TYPES:BEGIN OF ty_final,
              gjahr   TYPE gjahr,       " Year
              wwert   TYPE wwert_d,     " Traslation date
              bukrs   TYPE bukrs,       " company code
              hkont   TYPE hkont,       " General ledger account
              txt20   TYPE txt20_skat,  " Account name
              belnr   TYPE belnr_d,     " Purchase order number
              shkzg   TYPE shkzg,       " Dt/Cr indicator
              dmbtr1   TYPE dmbtr,       " Ammount in local currency
              v_alc   TYPE dmbtr,       " Ammount in local currency
              wrbtr   TYPE wrbtr,       " Ammount in foreign currency
              ebeln   TYPE ebeln,       " Purchase order number
              ebelp   TYPE ebelp,       " Item number
              matnr   TYPE matnr,       " Material number
              menge   TYPE menge_d,     " Qunatity
              meins   TYPE meins,       " Unit of measure
              stprs   TYPE stprs,       " Std material master
              v_iv    TYPE dmbtr,       " Invoice value
              pswsl   TYPE pswsl,       " Currency
              v_erc   TYPE dmbtr,       " Exchange rate calculated
              v_op    TYPE dmbtr,       " Order price
              v_uos   TYPE dmbtr,       " Unit order to stock
              v_io    TYPE dmbtr,       " Invoice to order
              v_uv    TYPE dmbtr,       " Unit value
              v_t     TYPE dmbtr,       " Total
              v_d     TYPE dmbtr,       " Differecne
              netpr   TYPE bprei,       " Net price in purchasing document
              v_total TYPE dmbtr,       " Total
              v_os    TYPE dmbtr,       " Order to stock
              v_ito   TYPE dmbtr,       " Invoice to order
              saknr   TYPE saknr,       " G/L account number
           END OF ty_final.
    FORM move_data.
      IF NOT i_bseg[] IS INITIAL.
        LOOP AT i_bseg INTO wa_bseg.
          wa_final-gjahr  = wa_bseg-gjahr.
          wa_final-bukrs  = wa_bseg-bukrs.
          wa_final-hkont  = wa_bseg-hkont.
          wa_final-belnr  = wa_bseg-belnr.
          wa_final-shkzg  = wa_bseg-shkzg.
          wa_final-wrbtr  = wa_bseg-wrbtr.
          wa_final-ebeln  = wa_bseg-ebeln.
          wa_final-ebelp  = wa_bseg-ebelp.
          wa_final-matnr  = wa_bseg-matnr.
          wa_final-menge  = wa_bseg-menge.
          wa_final-meins  = wa_bseg-meins.
          wa_final-pswsl  = wa_bseg-pswsl.
          wa_final-dmbtr1  = wa_bseg-dmbtr.
          wa_final-saknr  = wa_bseg-saknr.
          wa_final-v_total = wa_bseg-dmbtr.
          READ TABLE i_bkpf INTO wa_bkpf WITH KEY bukrs = wa_bseg-bukrs.
          IF sy-subrc = 0.
            wa_final-wwert = wa_bkpf-wwert.
          ENDIF.
         CLEAR wa_bkpf.
          READ TABLE i_mbew INTO wa_mbew WITH KEY matnr = wa_bseg-matnr.
          IF sy-subrc = 0.
            wa_final-stprs = wa_mbew-stprs.
          ENDIF.
         CLEAR wa_mbew.
          READ TABLE i_ekpo INTO wa_ekpo WITH KEY ebeln = wa_bseg-ebeln.
          IF sy-subrc = 0.
            wa_final-netpr = wa_ekpo-netpr.
          ENDIF.
         CLEAR wa_ekpo.
          READ TABLE i_skat INTO wa_skat WITH KEY saknr = wa_bseg-saknr.
          IF sy-subrc = 0.
            wa_final-txt20 = wa_skat-txt20.
          ENDIF.
    calculating output values
          IF wa_bseg-shkzg = 'H'.
            wa_final-v_alc = -1 * wa_bseg-dmbtr.
          ELSEIF wa_bseg-shkzg = 'S'.
            wa_final-v_alc = 1 * wa_bseg-dmbtr.
          ENDIF.
         DATA : l_c_v_alc TYPE p DECIMALS 2,
         l_c_v_iv TYPE p DECIMALS 2.
         l_c_v_alc = wa_final-v_alc.
          IF wa_bseg-menge NE 0.
            wa_final-v_iv = wa_bseg-dmbtr / wa_bseg-menge.
          ENDIF.
          IF wa_bseg-dmbtr NE 0.
            wa_final-v_erc  = wa_bseg-wrbtr   / wa_final-dmbtr1.
          ENDIF.
          IF wa_final-v_erc NE 0.
            wa_final-v_op   = wa_ekpo-netpr   / wa_final-v_erc.
          ENDIF.
          wa_final-v_uos  = wa_mbew-stprs   - wa_final-v_op.
          wa_final-v_io   = wa_final-v_iv   + wa_final-v_uos.
          wa_final-v_uv   = wa_final-v_uos  + wa_final-v_io.
          wa_final-v_t    = wa_final-v_uv   + wa_bseg-menge.
          wa_final-v_d    = wa_final-v_t    - wa_final-v_alc.
          wa_final-v_os   = wa_final-v_uos  * wa_bseg-menge.
          wa_final-v_ito  = wa_final-v_io   * wa_bseg-menge.
          CLEAR wa_bseg.
          APPEND wa_final TO i_final.
          CLEAR wa_final.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "data_retrieval
    *&      Form  build_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcat.
      CLEAR wa_fieldcat.
    *  TYPES : v_alc TYPE dmbtr. "curr. " decimal 2.
    DATA: l_c_v_alc TYPE p DECIMALS 2,
    l_c_v_iv TYPE p DECIMALS 2 .
    l_c_v_alc = v_alc.
    l_c_v_iv = v_iv.
    Constant Declarations.
      CONSTANTS:
                l_c_gjahr(5)   TYPE c VALUE 'GJAHR',      " Year
                l_c_wwert(5)   TYPE c VALUE 'WWERT',      " Traslation date
                l_c_bukrs(5)   TYPE c VALUE 'BUKRS',      " company code
                l_c_hkont(5)   TYPE c VALUE 'HKONT',      " General ledger account
                l_c_txt20(10)  TYPE c VALUE 'TXT20',      " Account name
                l_c_belnr(5)   TYPE c VALUE 'BELNR',      " Doc number
                l_c_shkzg(5)   TYPE c VALUE 'SHKZG',      " Dt/Cr indicator
                l_c_dmbtr(5)   TYPE c VALUE 'DMBTR1',      " Ammount in local currency
               " l_c_v_alc      TYPE c VALUE 'V_ALC',      " Ammount in local currency
                l_c_wrbtr(5)   TYPE c VALUE 'WRBTR',      " Ammount in foreign currency
                l_c_ebeln(5)   TYPE c VALUE 'EBELN',      " Purchase order number
                l_c_ebelp(5)   TYPE c VALUE 'EBELP',      " Item number
                l_c_matnr(5)   TYPE c VALUE 'MATNR',      " Material number
                l_c_menge(7)   TYPE c VALUE 'MENGE',      " Qunatity
                l_c_meins(5)   TYPE c VALUE 'MEINS',      " Unit of measure
                l_c_stprs(5)   TYPE c VALUE 'STPRS',      " Std material master
               " l_c_v_iv(4)    TYPE c VALUE 'V_IV',           " Invoice value
                l_c_pswsl(5)   TYPE c VALUE 'PSWSL',      " Currency
                l_c_v_erc(5)   TYPE c VALUE 'V_ERC',      " Exchange rate calculated
                l_c_v_op(4)    TYPE c VALUE 'V_OP',       " Order price
                l_c_v_uos(5)   TYPE c VALUE 'V_UOS',      " Unit order to stock
                l_c_v_io(4)    TYPE c VALUE 'V_IO',       " Invoice to order
                l_c_v_uv(4)    TYPE c VALUE 'V_UV',       " Unit value
                l_c_v_t(3)     TYPE c VALUE 'V_T',        " Total
                l_c_v_d(3)     TYPE c VALUE 'V_D',        " Differecne
                l_c_netpr(5)   TYPE c VALUE 'NETPR',      " Net price in purchasing document
                l_c_v_total(7) TYPE c VALUE 'V_TOTAL',    " Total
                l_c_v_os(4)    TYPE c VALUE 'V_OS',      " Order to stock
                l_c_v_ito(5)   TYPE c VALUE 'V_ITO',      " Invoice to order
                l_c_saknr(5)   TYPE c VALUE 'SAKNR',      " G/L account number
                l_c_i_final(7) TYPE c VALUE 'I_FINAL'.    " Final internal table
    Fieldcat for fiscal year
      wa_fieldcat-col_pos   =  1.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_gjahr.
      wa_fieldcat-seltext_m = text-007.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Translation date
      wa_fieldcat-col_pos   =  2.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_wwert.
      wa_fieldcat-seltext_m = text-008.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Company code
      wa_fieldcat-col_pos   =  3.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_bukrs.
      wa_fieldcat-seltext_m = text-009.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for General ledger account
      wa_fieldcat-col_pos   =  4.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_hkont.
      wa_fieldcat-seltext_m = text-010.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Account name
      wa_fieldcat-col_pos   =  5.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_txt20.
      wa_fieldcat-seltext_m = text-011.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Doc number
      wa_fieldcat-col_pos   =  6.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_belnr.
      wa_fieldcat-seltext_m = text-012.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Dt/Cr indicator
      wa_fieldcat-col_pos   =  7.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_shkzg.
      wa_fieldcat-seltext_m = text-013.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Ammount in local currency
      wa_fieldcat-col_pos   =  8.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = 'DMBTR1'.
      wa_fieldcat-seltext_m = text-014.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Ammount in local currency
      wa_fieldcat-col_pos   =  9.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = 'V_ALC'.
      wa_fieldcat-seltext_m = text-015.
      wa_fieldcat-ref_fieldname = 'DMBTR'.
    wa_fieldcat-no_sign   = 'X'.
    wa_fieldcat-do_sum    =  c_x.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Ammount in foreign currency
      wa_fieldcat-col_pos   =  10.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_wrbtr.
      wa_fieldcat-seltext_m = text-016.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Purchse order number
      wa_fieldcat-col_pos   =  11.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_ebeln.
      wa_fieldcat-seltext_m = text-017.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Item No
      wa_fieldcat-col_pos   =  12.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_ebelp.
      wa_fieldcat-seltext_m = text-018.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Material number
      wa_fieldcat-col_pos   =  13.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_matnr.
      wa_fieldcat-seltext_m = text-019.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Qunatity
      wa_fieldcat-col_pos   =  14.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_menge.
      wa_fieldcat-seltext_m = text-020.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Unit of measure
      wa_fieldcat-col_pos   =  15.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_meins.
      wa_fieldcat-seltext_m = text-021.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Std material master
      wa_fieldcat-col_pos   =  16.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_stprs.
      wa_fieldcat-seltext_m = text-022.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Invoice value,
      wa_fieldcat-col_pos   =  17.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = 'V_IV'.
      wa_fieldcat-seltext_m = text-023.
      wa_fieldcat-ref_fieldname = 'DMBTR'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Currency
      wa_fieldcat-col_pos   =  18.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_pswsl.
      wa_fieldcat-seltext_m = text-024.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Exchange rate calculated
      wa_fieldcat-col_pos   =  19.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = 'V_ERC'.
      wa_fieldcat-seltext_m = text-025.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Order price
      wa_fieldcat-col_pos   =  20.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_op.
      wa_fieldcat-seltext_m = text-026.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Unit order to stock
      wa_fieldcat-col_pos   =  21.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_uos.
      wa_fieldcat-seltext_m = text-027.
      wa_fieldcat-do_sum    = c_x.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Invoice to order
      wa_fieldcat-col_pos   =  22.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_io.
      wa_fieldcat-seltext_m = text-028.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Unit value
      wa_fieldcat-col_pos   =  23.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_uv.
      wa_fieldcat-seltext_m = text-029.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Total
      wa_fieldcat-col_pos   =  24.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_t.
      wa_fieldcat-seltext_m = text-030.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Difference
      wa_fieldcat-col_pos   =  25.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_d.
      wa_fieldcat-seltext_m = text-031.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Net Price in Purchasing Document
      wa_fieldcat-col_pos   =  26.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_netpr.
      wa_fieldcat-seltext_m = text-032.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Total
      wa_fieldcat-col_pos   =  27.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_total.
      wa_fieldcat-seltext_m = text-033.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Order to stock
      wa_fieldcat-col_pos   =  28.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_os.
      wa_fieldcat-seltext_m = text-034.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Fieldcat for Invoice to order
      wa_fieldcat-col_pos   =  29.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_v_ito.
      wa_fieldcat-seltext_m = text-035.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    fieldcat for invoice to order
      wa_fieldcat-col_pos   =  30.
      wa_fieldcat-tabname   = l_c_i_final.
      wa_fieldcat-fieldname = l_c_saknr.
      wa_fieldcat-seltext_m = text-035.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    "build_fieldcat

    Hi romanch,
    defining the field catalog you must reference all currency fields to the respective currency key field (type CUKY).
    <alv_fieldcat>-cfieldname         = 'HWAER'.
    This is sample for alv output of a currency field. The alv structure has a field HWAER which carries the currency key, e.g. USD or so.
    Obviously you do not provide a cutrrency key for your values. If they are initial (zero), ALV will not display them as 0,00 but leave the field empty if the reference too currency key is not established.
    If you define a DDIC structure for the ALV output this refernce is enforced. You can pass the DDIC structure name to the ALV and don not have to create the field catalog manually.
    Regards,
    Clemens

  • Dynamic ALV Grid is not displaying !!

    Hi all,
      I am trying to create dynamic alv grids and upto five levels(five grids) out put is displaying fine without any problem. But when I try to display the 6th grid, the program is going into infinite loop and getting timed out. Even I tried to increse the height of the grid even though it is not displaying.
    Please correct me if any thing is wrong in below code.
    *1st Level grid
    IF <table1> IS ASSIGNED AND <table1> IS NOT INITIAL.
       CREATE OBJECT ob_split1
           EXPORTING
             parent      = ob_custom
             orientation = cl_gui_easy_splitter_container=>orientation_vertical.
        PERFORM set_split_height USING ob_split1  '20'.
        CREATE OBJECT ob_grid1
          EXPORTING
            i_parent = ob_split1->top_left_container.
    ELSE.
        CREATE OBJECT ob_split1
           EXPORTING
             parent      = ob_custom
             orientation = cl_gui_easy_splitter_container=>orientation_vertical.
        PERFORM set_split_height USING ob_split1  '0'.
    ENDIF.
    *2nd Level grid
    IF <table2> IS ASSIGNED AND <table2> IS NOT INITIAL.
       CREATE OBJECT ob_split2
           EXPORTING
             parent      = ob_split1->bottom_right_container
             orientation = cl_gui_easy_splitter_container=>orientation_vertical.
          PERFORM set_split_height USING ob_split2   '20'.
        CREATE OBJECT ob_grid2
          EXPORTING
            i_parent = ob_split2->top_left_container.
      ELSE.
         CREATE OBJECT ob_split2
            EXPORTING
              parent      = ob_split1->bottom_right_container
              orientation = cl_gui_easy_splitter_container=>orientation_vertical.
         PERFORM set_split_height USING ob_split2    '0'.
      ENDIF.
    (Created 3rd,4th,5th same like above).
    *6th Level grid
    IF <table6> IS ASSIGNED AND <table6> IS NOT INITIAL.
    CREATE OBJECT ob_split6
           EXPORTING
             parent      = ob_split5->bottom_right_container
             orientation = cl_gui_easy_splitter_container=>orientation_vertical.
         PERFORM set_split_height USING ob_split6  '20'.
         CREATE OBJECT ob_grid6
           EXPORTING
             i_parent = ob_split6->top_left_container.
      ELSE.
         CREATE OBJECT ob_split6
           EXPORTING
             parent      = ob_split5->bottom_right_container
             orientation = cl_gui_easy_splitter_container=>orientation_vertical.
         PERFORM set_split_height USING ob_split6  '0'.
      ENDIF.
    Appreciated your reply. Please let me know for additional info.
    Thanks,
    Ranjith.
    Edited by: Thomas Zloch on Dec 8, 2010 5:44 PM - please use code tags

    Hi romanch,
    defining the field catalog you must reference all currency fields to the respective currency key field (type CUKY).
    <alv_fieldcat>-cfieldname         = 'HWAER'.
    This is sample for alv output of a currency field. The alv structure has a field HWAER which carries the currency key, e.g. USD or so.
    Obviously you do not provide a cutrrency key for your values. If they are initial (zero), ALV will not display them as 0,00 but leave the field empty if the reference too currency key is not established.
    If you define a DDIC structure for the ALV output this refernce is enforced. You can pass the DDIC structure name to the ALV and don not have to create the field catalog manually.
    Regards,
    Clemens

  • Getting rid of leading zero using display string.

    I have a formula:
    If {BillHeader.SalesTax} < 0 then
    formula = Replace(CStr (-1 * {BillHeader.SalesTax}), "$", "") + "CR"
    else
    formula = Replace(CStr ({BillHeader.SalesTax}), "$", "")
    end if
    I need to change this formula so it won't show a leading zero.
    ex:
    0.00 to .00
    0.47CR to .47CR
    etc..
    I don't have much experience with VB or crystal code.  Since this is in the display string I can't use the number formatting.  Any ideas? Thanks for the help!

    Here is one solution:
    1.  Comment out the display string code.
    2.  From the menu, choose "Crystal Syntax".
    3.  Copy and paste this formula.
    If currentfieldvalue < 0 then
       if split(Replace(CStr (-1 * currentfieldvalue), "$", "") + "CR",'.')[1] = '0' then
          '.' & split(Replace(CStr (-1 * currentfieldvalue), "$", "") + "CR",'.')[2]
       else
          Replace(CStr (-1 * currentfieldvalue), "$", "") + "CR"
    else
    if split(Replace(CStr (currentfieldvalue), "$", ""),'.')[1] = '0' then
       '.' & split(Replace(CStr (currentfieldvalue), "$", ""),'.')[2]
    else
       Replace(CStr (currentfieldvalue), "$", "")
    PS:  In your first formula, you are using sales tax but in the second post, you are using amount due, not sure which one it is, but if the formula is on a display string the above should work.

  • New ALV field is not displaying

    Hi
    I have added the currency field in the existing ALV report.
    The final internal table having the currency field and it has value. Curreny field is not displaying in output. Pls help
    Below is my ALV code for currency.
    PERFORM FILL_FIELDCAT USING
    'WAERS' SPACE SPACE 'CURRENCY' 'CURRENCY' 'CURRENCY'.
    READ TABLE GIT_FIELDCAT INTO LX_FIELDCAT
              WITH KEY FIELDNAME = 'WAERS' .
      LX_FIELDCAT-OUTPUTLEN = 5.
      LX_FIELDCAT-JUST       = 'L'.
      MODIFY GIT_FIELDCAT FROM LX_FIELDCAT INDEX SY-TABIX.
    FORM FILL_FIELDCAT USING    P_FIELDNAME
                                P_NO_OUT
                                P_DO_SUM
                                P_SELTEXT_S
                                P_SELTEXT_M
                                P_SELTEXT_L.                    "#EC *
      DATA: LX_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      CLEAR LX_FIELDCAT.
      LX_FIELDCAT-TABNAME    = 'GIT_LIST'.
      LX_FIELDCAT-FIELDNAME  = P_FIELDNAME.
      LX_FIELDCAT-NO_OUT     = P_NO_OUT.
      LX_FIELDCAT-DO_SUM     = P_DO_SUM.
      LX_FIELDCAT-SELTEXT_S  = P_SELTEXT_S.
      LX_FIELDCAT-SELTEXT_M  = P_SELTEXT_M.
      LX_FIELDCAT-SELTEXT_L  = P_SELTEXT_L.
      APPEND LX_FIELDCAT TO GIT_FIELDCAT.
    ENDFORM.                               " FILL_FIELDCAT

    You have to [maintain maintenance dialog|http://help.sap.com/SAPHELP_NWPI71/helpdata/EN/a7/513484407a11d1893b0000e8323c4f/frameset.htm] as described in the link.
    Regards,
    Raymond

  • Leading zeros not reading in Barcode

    I am trying to get a number field to read in a barcode.  The field has leading zeros hard coded into the field to make it a uniform amount of digits. These zeros are not typed. The barcode will only read the information that is typed and will not read the zeros. Is there a way to change that.

    If you are getting the values form an unformatted text field, then use the "valueAsStrting" property or you could pad the value to include leading zeros.
    You can pad a value with leading zeros either by concatenating a string of zeros for the length to the value and them taking the right most number of digits or use 'util.printf()' method to format a fixed length string with leading zeros.

  • New ALV Grid Field not Displaying?

    I revised a report to have a new column. So I added this new field to the code.
    I see the field and the value when I call
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    Bbut the field I added does not display.
    Thank-you.

    Hi,
    Please ensure that you added the related logic in the FIELD CATALOG of the ALV.
    Regards,
    Nirmal

  • Alv grid problem  quantity zero not displaying

    Hi
    i am displaying quantity fields kwmeng and bmeng in alv, in code am subtracting the two quantities,
    the final subtracted value is displaying in alv when it is >0, when it is equal to zero ,it is displaying blank .
    Thanks
    Srini

    Hi Srinivas,
    See this link, it ll help you.
    Value Display with Currency/Quantity Unit - ALV Grid Control - SAP Library
    Cheers,
    pravin

  • Alv header logo not displaying in print-preview

    Hi all... I had displayed an ALV report with a header and logo init.  But when I had clicked on print preview ...  every thing is displaying except the logo...  How to overcome this...???

    Hello Kiran,
    <li> We can display LOGO using REUSE_ALV_GRID_DISPLAY only not using REUSE_ALV_LIST_DISPLAY. So when you click on print preview Grid output is displayed as REUSE_ALV_LIST_DISPLAY output. It is confirmed that using ABAP classical or ALV printing LOGO is not possible.
    <li>To print LOGO, you can go for SCRIPTS or SMARTFORMS.
    Thanks
    Venkat.O

  • Lead Questionnaire not displayed in WebUI

    Hi Experts,
    I have created a questionnaire in Lead settings and assigned to the transaction type. I have left out the determination criteria blank. When I run the lead transaction in Sapgui the questionnaire is displayed under the evaluation tab.The same transaction when called in the WebUI, the Assesment AB is empty.I have even tried to create a new transaction in WebUI, still the same result.Every relevant data for the lead is displayed under the AB except the questionnaire.
    Please help and points will be awarded.

    Hello Ashley ,
    Could you please specify what do you exactly mean by the statement below:
    "I searched the questionnaire in the UI under Power User and reactivated it and it works fine now."
    Thanks in advance,
    Rakshit.

  • ALV Grid is not Displaying after executing?

    Hi Guys,
                 I am using ALV grid in my program with OO Concepts.I was not able to see the final o/p after entering the data into the selection Screen.Can anybody tell me what's the reason.I am sending u the code.
         Call Method grid1->set_table_for_first_display
                Exporting I_Structure_name = 'T_FINAL_OUT'
                 Changing it_outtab = i_final_out1[]
                          it_fieldcatalog = I_FCAT
                 Exceptions
                          Invalid_parameter_combination = 1
                          program_error                 = 2
                          too_many_lines                = 3
                          Others                        = 4.
                 If sy-subrc <> 0.
                 ENDIF.
    Please respond to this mail
    Thanks,
    Gopi.

    Hi Ashish,
                  I tried like what u told. but its  not working.
    I am sending u the complete code.
      My only doubt is regarding Container does i need to crerate a conatiner .I created a custome control also but same problem
    Data : grid1 type ref to cl_gui_alv_grid,
           g_custom_container type ref to cl_gui_custom_container,
           i_FCAT TYPE  LVC_T_FCAT,
           i_FCAT_str type lvc_s_fcat,
    Structure  for layout
          i_layout_s   TYPE  lvc_s_layo,
          i_lvccat TYPE lvc_t_fcat,
    INITIALIZATION of Fields
    Initialization.
      v_repid = sy-repid.
      set screen '101'.
      MODULE STATUS_0101 output.
    if g_custom_container is initial .
         create object g_custom_container
             Exporting
                 Container_name = 'CCCONTAINER'
             Exceptions
                 cntl_error = 1
                 cntl_system_error = 2
                 create_error = 3
                 lifetime_error = 4
                 Others = 5.
                 If sy-subrc <> 0.
                 ENDIF.
         Create Object grid1
             Exporting
                 I_Parent = g_custom_container
             Exceptions
                 error_cntl_create = 1
                 error_cntl_init   = 2
                 error_cntl_link   = 3
                 error_dp_create   = 4
                 Others            = 5.
                 If sy-subrc <> 0.
                 ENDIF.
    Start-OF-Selection
    i_FCAT_str-col_pos = 1.
      i_FCAT_str-fieldname = 'MATNR'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_fcat_str-seltext = Text-024.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 2.
      i_FCAT_str-fieldname = 'GJAHR'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_fcat_str-seltext = Text-012.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 3.
      i_FCAT_str-fieldname = 'PERIO'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_fcat_str-seltext = Text-013.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 4.
      i_FCAT_str-fieldname = 'LIFNR_ND1'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_fcat_str-seltext = Text-014.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
    if  not grid1 is Initial.
      If sy-SUBRC = 0.
         Call Method grid1->set_table_for_first_display
                 Exporting
                          I_STRUCTURE_NAME = 'I_FCAT'
                          IS_LAYOUT = i_layout_s
                 Changing it_outtab = i_final_out1[]
                          it_fieldcatalog = I_FCAT
                 Exceptions
                          Invalid_parameter_combination = 1
                          program_error                 = 2
                          too_many_lines                = 3
                          Others                        = 4.
                 If sy-subrc <> 0.
                 ENDIF.
    ENDIF.
    Else.
    if g_custom_container is initial .
          create object g_custom_container
              Exporting
                  Container_name = 'CCCONTAINER'
              Exceptions
                  cntl_error = 1
                  cntl_system_error = 2
                  create_error = 3
                  lifetime_error = 4
                  Others = 5.
                  If sy-subrc <> 0.
                  ENDIF.
          Create Object grid1
              Exporting
                  I_Parent = g_custom_container
              Exceptions
                  error_cntl_create = 1
                  error_cntl_init   = 2
                  error_cntl_link   = 3
                  error_dp_create   = 4
                  Others            = 5.
                  If sy-subrc <> 0.
                  ENDIF.
         Call Method grid1->set_table_for_first_display
                 Exporting
                 I_STRUCTURE_NAME = 'I_FCAT'
                 IS_LAYOUT = i_layout_s
                 Changing it_outtab = i_final_out1[]
                          it_fieldcatalog = I_FCAT
                 Exceptions
                          Invalid_parameter_combination = 1
                          program_error                 = 2
                          too_many_lines                = 3
                          Others                        = 4.
                 If sy-subrc <> 0.
                 ENDIF.
       Endif.
       ENDIF.
    Thanks,
    Gopi.

  • How to remove pound symbol # and preserve leading zeros in BEx Query

    Hi,
    I have two questions regarding the display in BEx Query.
    1. How can I remove the pound symbol # for blanks in BEx Query?
    2. How can I preserve leading zeros? At the moment, value "001" will be displayed as "1". But I need the leading zeros.
    Thanks.
    Joon

    Hi ,
    You can apply these settings in Bex query designer.
    If you need to remove pound symbol jsut make a new formula and use NODIM function you will find this function under data functions.
    So NODIM(Your price keyfigure) this will remove the Pound symbol.
    For # just find out against which  characterstic you are getting # then go to default values panel there you will find all your characterstic which you are using in report---Rt click -Restrict-single valuesdirect input-#-Move to selection(That forward arrow)--select that # and choose exclude from selection (That red square icon).
    And yes for leading zeros check out this thread
    Leading zeros not displaying
    Hope it helps you.
    Regards,
    AL
    Edited by: AL1112 on Jun 9, 2011 1:43 PM
    Edited by: AL1112 on Jun 9, 2011 1:47 PM

  • Leading Zeros won't display on a PDF form

    Hey, I am using Acrobat 7.0 professional on my Windows XP system. I have a PDF that was sent to me by someone known. This PDF is already fielded (meaning, I can type in my name and other relevant info in the form). However; I am trying to populate info on this PDF using an online data collection tool. Therefore, I deleted all the original fielding from the PDF and fielded it again using the naming conventions that match with the online data collection tool variables. After doing so, all other information is populating very well on the PDF but the values with leading zeros are not populating on the PDF. When I double click that field to check the properties and go to the "Options" tab, I see the value with leading zero that is being extracted from the online data collection tool; however it is not displaying it on the form. Moreover, if I try to modify any of the properties of that field; the value with leading zeros suddenly appears on the PDF Form.
    Could anyone please assist me to identify as to what is causing the values with leading zeros not to populate on the PDF form...
    Any help would be much appreciated...
    Thanks!

    Well, that was my guess. It may be that it is there, but you can't see it. There have been some issues of the information in a field not always displaying correctly. I have not experienced it, but remember such happens. You might want to search the forum. Bill

Maybe you are looking for

  • How do I remove an old ipad from my account

    How do I remove an old ipad from my account

  • Delete/Cance/Reverse  service entry sheet

    Hi,    Plz help me out in the issue relating to the service entry sheet, where in i have done the service entry & posted invoice document with respect to the service entry sheet.But now my requirement is to delete/cancel/reverse the service entry she

  • Calendar events repeated in Outlook after synching

    Can anyone tell me how to avoid having the same appointments duplicated on my handheld after I sync.  I have synchronized my curve 8330 to outlook, but now I have every appointment 3 times on my calendar.  How wipe my calendar clean completely and st

  • Oracle r11i customize forms and reports

    Hi all, I want to watch and listen the video of how to cusomize form and registered with Application object library and same oracle reports in Oracle r 11i ebs Regards Rizwan Ali

  • Presonnel Area Wise Authorization

    Hi, I wanted to restrict individual users to their respective company codes when then are viewing and maintaining HR Master Data. I have created one user for testing purpose and restrict the user to one company code/personnel area also. But the assig