To add one zero before a table field

Hi experts
I am new in abap 
I have one problem that i have one field  mara-EAN11 on char 18
we are storing data like 604 etc .
now requirment  has been changed that we need to store data leading one zero
like  0604 .
but when i try to store data leading one zero  system remove zero & store data  604 .
when i try to use function module 'CONVERSION_EXIT_ALPHA_INPUT'    it place more leading zero like
'000000000000000604'
but my requirment is only padd one zero like 0604 .
Please help me .
Thanks
Vikram
FOR MODERATOR : PLEASE DO NOT REMOVE THREAD & HELP ME TO GIVE EXACT ANSWER .

Check in DDIC (via SE11) field MARA-EAN1 belongs to data element and domain EAN11, this domain is associated to conversion exit EAN11, perform some try with FM, i fear it will remove the leading 0
Reference : [EAN11 Conversion Routine|http://help.sap.com/saphelp_nw04/helpdata/en/81/111d9286492545b01356e9aeb82495/frameset.htm]
So you may be forced to change the domain definition for your requirement (*), in this case build your own FMs that check code length and if less than 4 character long will add leading 0.
You will no longer be conform to EAN specification....
Regards,
Raymond
(*) or delete function CONV_EXIT_EAN11_INPUT_INTERN then conversion-exit will become inactive (...)

Similar Messages

  • How to add prefix zero to all matnr fields in itab

    Hi,
      I ve a internal table with following fields
      Matnr                                                  bwkey                            
      6                                                        678                                 
      67                                                      rty     
      678                                                    78k                                
      How to add prefix zero to all tha matnr fields.
      like
    matnr                                     bwkey
    00000000000000006                678
    00000000000000067                rty
    00000000000000678                78k
    Thanks in advance

    Hi,
    commonly used conversion routine is ALPHA.
    It is conversion used to insert leading zero for document number.
    For example, in sales order (VBAK-VBELN length 10),
    when we key in order no, for example we key in '4302',
    conversion routine input will automatically add leading zero,
    so it will become '0000004302', this is real value stored in table VBAK.
    On conversion routine output, it will delete leading zero
    function CONVERSION_EXIT_ALPHA_INPUT, this will add leading zeros to a character based field of any length.
    Ex:
    data: lv_c(10) type c value '123'.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                      input = lv_c
              importing
                     output = lv_c.
    write:/ lv_c.
    Regards.

  • ALV: ADD leading ZEROs in a CHAR field

    Hello Everybody!
    I have a problem and I hope you can help me
    What I have:
    1. ALV (hier)
    2. Char field 'DEBIT' type SAKNR.
    3. Field catalog TYPE slis_t_fieldcat_alv,
       created by FUNCTION MODULE 'REUSE_ALV_FIELDCATALOG_MERGE'.
    The problem is: i need to show leading zeros in ALV.
    For example: an account '07110000' (in the inner table) is shown as '7110000'.
    What I've done:
    1. ls_fieldcat-lzero = 'X'.
         ls_fieldcat-no_convext = 'X'.
    2. CLEAR ls_fieldcat-ref_tabname.
         ls_fieldcat-lzero = 'X'.
    ( ls_fieldcat-ref_fieldname was clear after filling by the function module)
    I'm realy waiting for your advice!

    >
    nagaraj kumar nishtala wrote:
    > Hi,
    >
    > try to give refernce table name and reference field name for the field after the fieldcatalog merge FM.
    >
    > i mean to say modify the fieldcatalog for that particluar field  by giving refernce table name and reference field name .
    I've tried it, but it doesn't work:
        ls_fieldcat-outputlen = 8.
        ls_fieldcat-lzero = 'X'.
        ls_fieldcat-no_convext = 'X'.
        ls_fieldcat-ref_tabname = 'T599I'.
        ls_fieldcat-ref_fieldname = 'PARAM'.
        ls_fieldcat-datatype = 'NUMC'.
        ls_fieldcat-inttype = 'N'.
    >
    nagaraj kumar nishtala wrote:
    > or use conversion_exit_alpha_input to add zero's to it.
    >
    > Regards,
    > Nagaraj
    How can I use conversion_exit_alpha_input? I have no idea...

  • How to add One Button to the Table Header.

    Hi,
    I would like to have few Table Header columns as Button and Other Table Header Columns as String. And each Button should have separate action. Please let me know, how can i implement this one.
    Thanks
    Mohan

    do not cross post, this is a bad habit. now do you know about www.google.com. well this is a search engine, learn how to use it before you post. i got this link with this keyword search.
    http://www.exampledepot.com/egs/javax.swing.table/pkg.html
    http://forum.java.sun.com/thread.jspa?threadID=560605&tstart=15
    hope this helps you
    regards
    Aniruddha

  • How to add one default value in table type value set?

    Hi All
    I have the below requirement:
    Need to display all the organization ids in the parameter for one concurrent program along with one default value of 'ALL'.
    I have created a table value set which picks up the organization name from hr_all_organization_units. But while submitting the program I should also be able to give 'ALL'.
    Any pointer/idea how to achieve this will be highly appreciated!!
    Thanks in Advance!!
    Regards,
    Shashank Mishra

    HI
    i get below error when i change the script 
    PS C:\scripts> C:\Scripts\updatedefaultvalue.ps1
    Cannot index into a null array.
    At C:\Scripts\updatedefaultvalue.ps1:8 char:7
    + IF($i[ <<<< "Title"] -eq $null)
        + CategoryInfo          : InvalidOperation: (Title:String) [], RuntimeExce
       ption
        + FullyQualifiedErrorId : NullArray
    $web = Get-SPWeb http://tspmcwfe:89/
    $list = $web.Lists["test"]
    $item = $list.Items | Where { $_["Name"] -eq "Emc" }
    foreach($i in $items)
    IF($i["Title"] -eq $null)
             $i["Title"] = "test"
           $i.Update()
    adil
    Why are you piping a where in the items? Do you only want to add the "test" to ones matching
    a name?
    If you have ISE installed on your server I recommend you put your code in there and debug it. 
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • Add one year to date/time field

    Hi All.
    In my form I have date/time field DATE with format MM/DD/YYYY. Add I would like when user selected according date in that field, the other field should display date on one year late then user selected in field DATE. I mean. If user install 8/27/2010 on DATE field in other field will display date 8/27/2011.
    Thanks.

    Hi Paul,
    Thanks for replay. In your example you used CLICK event. Is it possible to get date on other field without click button? For instance, if user just press TAB key on keyboard.
    Thanks.

  • ANY FUNCTION MODULE TO ADD LEADING ZEROS FOR A CHARACTER FIELD

    THE CHARACTER FIELD IS OF LENGTH 40 AND IT HAS 5 NON NUMERIC CHARACTERS

    Hi ,
    Try this
    DATA : c4(40).
    data : P_FIELD(40) TYPE N.
    UNPACK P_FIELD to c40.
    <b>Reward Points if useful</b>
    Regards
    Saket Sharma

  • Adding zeros before field.

    HI Experts,
    I have one requirement, which i need to add zeros before filed, if field length is less than 6 characters.
    Ex: 1005--> 001005
    12345--->012345
    like above.
    Please give me the code.
    Regards
    Rajini

    data: result(6).
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = <ur field>
    IMPORTING
       OUTPUT        =  result .

  • Checkbox that refers to one number(1) table field

    Hi,
    Did anyone experience this, like having an ASP check box that refers to one number type Oracle table field, in a Gridview. I now even have used one number(18) Oracle table field instead (since in ASP, it seems I have to choose one int16 as the type for the corr. updateparameter of that template field).
    <asp:CheckBox runat="server" ID="chkitem" Checked='<%# Eval("Selected") %>'
    Text='<%# Eval("Selected") %>' />
    Now I've got one exception for the above line. Can anyone pls share your knowledge/experience with me?
    Bst Rgds,
    HuaMin

    Have anyone on this planet successfully run this ever? I do have a problem with this.
    <ItemTemplate>
    <asp:CheckBox runat="server" ID="chkitem" Checked='<%# Eval("selected") %>'
    Text='<%# Eval("selected") %>' />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:CheckBox runat="server" ID="chkupdate" Checked='<%# Eval("selected") %>'
    Text='<%# Eval("selected") %>' />
    </EditItemTemplate>

  • Add one day to a binding

    Hi all,
    I assume this is a very dumb question... How can I add one day to a date that is like this :
    #{bindings.ChooseDateCrah.inputValue}
    It's a binding in a the header text property of a column.
    That : #{bindings.ChooseDateCrah.inputValue + 1} or that : #{bindings.ChooseDateCrah.inputValue} +1 does not work.
    Thanks.
    Frédéric.

    Hi Frédéric,
    Yeah, you cannot apply a converter on the headerText attribute of a column. However, you can instead place an outputText in the header facet of the column, then the converter option still works.
    As for the code, no, in the RowImpl object in the getter method of your calculated attribute. (That method is quite complicated for a read only value though).
    You can check my reply at Re: How to access menbers of the current row of an af:table component? as for how to create a custom converter. In your specific case, however, you would have to extends DateTimeConverter and decorate the getAsObject and getAsString methods in order to add one day before calling super.getAsString and remove one day from the returned value of super.getAsObject before returning to ensure reversibility.
    A managed bean solution would imply the use of the implements Map EL hack which is both easy and hard, depending on your experience level with JSF and EL.
    Regards,
    ~ Simon

  • After adding one column in a table can't get the header line

    hi all,
    i have make a SMART FORM which was working perfectly.Now the requirement of user is to add one column in my table at smart form which i did and after modification i execute it it give me data as well but issue which i'm facing is that the TABLE at smart forms in which i have add one field is not displaying the HEADER LINE which i have define with SELECT PATTREN option.
    Thanks & Regards,
    sappk25

    Hi,
    Have you created the Header Text? If yes, then might be the case that your smartforms
    table which was already created is with Multiple Line. Check weather you have added
    customer field in Header Line or Not?
    Regards,
    SUjeet

  • Table & fields

    Hi
    Can any one tell about the table & fields for following items,
    Total sales
    Finance FTEs
    Active customer accounts
    Total Collection FTEs
    Total Customer Services FTEs
    Total Orders for the period
    Total Purchase Orders issued
    Total Purchasing & Vendor Management FTEs
    Total Vendor Invoices Processed
    Total Accounts Payble FTEs
    Vendor Claims
    Other Vendor Debit Receivables
    Vendor Claims W/O
    Reserved Vendor/claims processed
    Here FTEs full time employees
    Thanks
    Deepak
    Edited by: SDeepakKr on Apr 23, 2010 5:21 AM

    Total sales : Table  BSEG for all (field SAKNR) sales GL accounts that are counted for sales
    Finance FTEs
    Active customer accounts Table KNA1, filter if any fields maintained for inactive customers
    Total Collection FTEs Table BSID and BSAD totals of payment type DZ + any customized.
    Total Customer Services FTEs
    Total Orders for the period Table AFPO/AFKO
    Total Purchase Orders issued Table EKPO look to amount field
    Total Purchasing & Vendor Management FTEs
    Total Vendor Invoices Processed Table RKBP
    Total Accounts Payble FTEs Tables BSIK and BSAK
    Vendor Claims
    Other Vendor Debit Receivables BSIK and BSAK
    Vendor Claims W/O BSEG table for the GL account that is used for writing off. SAKNR
    Reserved Vendor/claims processed

  • Table field name

    Hi
    Good afternoon to all ,
    can any one tell me the table fields name for
    1. bill amount : ?
    2. tds : ?
    3>passed amount : ?
    transaction use is mir7 .
    Regards
    Rakesh kumar singh

    Use transaction ST05 and run an SQL trace when running this transaction.
    It is what I would do if I needed to know this information, instead of coming on here and getting someone else to tell me.

  • How to add leading zeros to a packed variable

    Hi all,
    I have a to add leading zeros for a packed field.
    eg.
    Data : brgew like mara-brgew.
    brgew = '12.063'.
    but I have to display the field as '0000000000012.063'.
    How can we achieve this?
    Regards.

    Execute the code .
    REPORT zex13 .
    Data : brgew like mara-brgew.
    brgew = '12.063'.
    data:val(18) type c,
         in(13) type n ,
         dec(6) type c.
    data :  a type i ,
            b type i.
            a = TRUNC( brgew ).
            write:/ a .
    in = a.
    write:/ in.
            dec = frac( brgew ).
            write:/ dec.
            concatenate in  dec+2(4) into val separated by '.'.
            write:/ val.
    see if this works for u .
    regards,
    vijay

  • What  balance value  in sales order  and iwant to know table field name in

    where the balance value come in sales order i want make sales order report in which i want to add this filed how we add it  and tell me table field name of balance vlue and how we give it in FS please help me in this my report are left without it please give me solution

    Hello
    where the balance value come in sales order
    Please note that when you raise your question at SDN forum, your question needs to be clear...
    What do you mean by BALANCE VALUE ????
    Regards,
    Sarthak

Maybe you are looking for