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 .

Similar Messages

  • Adding zeros before quantity or price

    hey can you people tell me how to add Zeros in front of quantity field or price field.
    I used conversion_alpha_input FM before writing to file but its not writing with front zeros..
    any alternatives.
    Ambichan

    Hi,
    Please have a look, logic is quite simple.
    REPORT  ZLEADQUANTZEROS                         .
    DATA: L_MENGE(17).
    DATA: L_DEC(13), L_FRACTION(3).
    DATA: T_MSEG TYPE STANDARD TABLE OF MSEG WITH HEADER LINE.
    SELECT * FROM MSEG
    INTO TABLE T_MSEG
    UP TO 100 ROWS.
    LOOP AT T_MSEG.
      L_MENGE = T_MSEG-MENGE.
      SPLIT L_MENGE AT '.' INTO L_DEC L_FRACTION.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = L_DEC
        IMPORTING
          OUTPUT = L_DEC.
          CONCATENATE L_DEC L_FRACTION INTO L_MENGE
          SEPARATED BY '.' .
      WRITE: / L_MENGE.
    ENDLOOP.

  • Adding leading zeros before data loaded into DSO

    Hi
    In below PROD_ID... In some ID leading zeros are missing before data loaded into BI from SRM into PROD_ID. Data type is character. If leading zeros are missing then data activation of DSO is failed due to missing zeros and have to manually add them in PSA table. I want to add leading zeros if they're missing before data loaded into DSO.... total character length is 40.. so e.g. if character is 1502 then there should be 36 zeros before it and if character is 265721 then there should be 34 zeros. Only two type of character is coming either length is 4 or 6 so there will be always need to 34 or 36 zeros in front of them if zeros are missing.
    Can we use CONVERSION_EXIT_ALPHPA_INPUT functional module ? As this is char so I'm not sure how to use in that case.. Do need to convert it first integer?
    Can someone please give me sample code? We're using BW 3.5 data flow to load data into DSO.... please give sample code and where need to write code either in rule type or in start routine...

    Hi,
    Can you check at info object level, what kind of conversion routine it used by.
    Use T code - RSD1, enter your info object and display it.
    Even at data source level also you can see external/internal format what it maintained.
    if your info object was using ALPHA conversion then it will have leading 0s automatically.
    Can you check from source how its coming, check at RSA3.
    if your receiving this issue for records only then you need to check those records.
    Thanks

  • Error while adding a new field to the Segment in we31

    Hi ,
    I am getting error when i am trying to add the new field to the cust. segment.
    It is released for the adding the new fields i am cancelling the release , but i got a message like this
    Error while resetting release of segment 'segment name'.
    it is comming from the message class EA and message number 259.
    Thanks in advance.
    Reagrds,
    bharani

    Hi,
    Have you tried Cancelling the release before adding the version?
    Select the active version of the IDOC Segment and cancel its release first. Only then you will be able to add a version.
    Please let me know if it worked!
    Vijay

  • Adding a new field to a DB table

    Hi,
    I am working on 4.6C.
    The requirement is to add an extra field to a database table which already has data in it...
    Will this effect the system in any way...if I add a field with the data in the table.
    What precuations do i have to take before adding an extra field to a DB table.
    I was wondering what will happen when i need to transfer the TR.. Basically the data is there in Production and Quality and not in development... so it will not be a problem in development...
    I mean changing the structure of the table with data in it ... Is it Ok...
    Thanks & regards

    Hi Sam,
    you can add a new field to any database table if even
    if contains data in production, only thing to do is u just
    have create an append structure to that table and in that
    append structure just create the new field.
    NOTE : Naming Conventions as follows:
    For Append Structure e.g :
    In se11 enter Table Name and select change button.
    now select GOTO option in the menu bar and select APPEND STRUCTURE option.
    now the screen shows u an default name for ur append structure, so dont change the name
    just hit enter button and
    now enter the your new field name with two Z's infront of the field.
    e.g if ur field name is MATNR then enter ZZMATNR as ur field in the append structure.
    and now save and activate and also adjust in the DATABASE UTILITY.
    thanks & regards,
    CH Vamsi Bharath

  • Adding a new field to Emigall

    Hi All,
    I was interested in knowing how we can add a new field to an existing emigall object and also how to process the logic after adding the field ie. how would emigall handle the field after we have added the field in emigall.
    I would appreciate if you can share the screen shots (if any) at karanchopra dot kc at gmail dot com.
    Thanks,
    Karan

    Hello,
    Before I provide you with solution, can you be more ellobrative with your requirement.
    a) Are you adding new 'Z' field?
    b) Do you want to just extend the existing Structure?
    Depending on your requirements, there are different approaches to solve this problem.
    Regards,
    Anup Mohite

  • Reconciliation difference must be zero before reconciling  [Message 3821-8]

    Dear Experts,
    Are there any possible solutions to retrieve the AP Invoice & CN that has been manually deleted from database? My backup database is not working and I have made mistakes by adding 2 invoices & 1 CN in the live system. 
    Problems:
    I have created AP CN 2872 by copying from AP INV 56482 with partial amount (Inv total =15345.77 while CN total = 11205.65). Then I cannot find that AP CN in the list available in Outgoing Payment as it’s already being knocked off by the AP Inv. I need to get the manual AP CN to make the payment. Also, I found that the balance due of AP INV 56482 was incorrect as it was being deducted by CN 2872. So we have tried to create another AP invoice to cancel that AP CN. Unfortunately the balance due in Outgoing Payment is not tally with BP balance. Then, I have deleted the wrongly created invoices & CN in database and recreate the CN using SQL. Now, I am getting this error message “Reconciliation difference must be zero before reconciling  [Message 3821-8]” when I tried to add the Outgoing payment.
    I have messed up the tables. I have gone through SAP Note 1258628 & 1264090 but still do not know how to solve my problems yet.
    Kindly assist me on the above issue.
    Thanks & BR,
    Leng

    Hi
    Check log tables: ADOC, ADOx - maybe you'll be able to find your data there. You'll still need to take care about lots of things: header and lines for docs, reconciliation, accounting etc.
    but this just as an emergency - as Frank stated: you broke the rules and cannot count on SAP support.
    Maybe your database's recovery model is set to 'Full' - in such case you could be able to make restore to point in time. Otherwise do what Frank suggested.
    Kind regards,
    Radek

  • Impact of adding new value fields in ongoing operating concern.

    Hi All,
    Want to know the steps of adding new value fields in the existing operating concern in COPA?
    What is the overall impact of addition of New Value fields in the running Operating Concern?
    How do we test the addition of new value fields?
    Is the addition of New Value fields to the running Operating Concern advisable?
    Your support and advice is highly anticipated and appreciated.
    Thanks & Regards
    9819528669

    HI,
    please search in SCN forum before you post:
    Re: Adding a ValueField to an existing Operating Concern?
    Best regards, Christian

  • Signature field detected - I never added a signature field

    Hi, when I open my PDF in Reader, I suddenly get a green bar along the top saying "Signature field detected." I never added a signature field to the PDF. How do I remove this green bar? Thanks, Siegfried

    Windows 7, 64.  MSIE 10. All updates installed.  And BTW, I am now in "compatability mode" - still nogo. 
    Perhaps related: I've noticed since... maybe a few months ago: The paste "cache" (or whatever it's called) works differently now.  Now if I "copy", then open a program, then hit "paste", nothing happens. That is: I have to open the target ap before copying from the original ap. 
    And so, if I want to copy from Word to Excel... If I copy, then open Excel... "paste" does nothing.  I have to go back to Word, copy again, and then paste. 
    Caveat: I have not done any troubleshooting with this.  And so, I can't say 100% that that is what's happening there.  Maybe just 95%.
    I've assumed this apparent change is some sort of new security thing from MS to prevent cross-ap pasting instigated by malware.  But other than that, paste works in every other ap I have - whether I copy from Text Editor to paste into another ap, or copy & paste within an ap, etc.  Except right here.

  • Added custom date fields at contract;need to trigger mail using those dates

    Hi,
    II have added 14 custom fields in the service order quotation for handling waranty start date and end dates capturing for the maximum of 7 years contract.
    Then its usual yearly action of the waranty team to put the dates in those fields.
    The first set of 2 input fields will be filled at the quotation creation itself; rest the set of 12 fields will be updated in this 7 years time.
    My requirement is such that to the capture all the waranty end dates filled in the input fields and trigger a mail 30 days prior to that days.
    Example : I have contract from 01/08/2004 to 31/07/2010.
    Then my waranty startdate / end date can be filled by waranty team as 01/08/2004 to 31/07/2005 in the waranty first year.the i need to trigger a mail to waranty team on 01/07/2005.
    For the second year if we have dates filled as 01/08/2005 to 31/07/2006; then to trigger mail on 01/07/2006.
    I have tried using ACTIONS but couldn't get much help.
    As a work around thinking for a report to fetch the contract for that Trans.type and check the dates with the present date + 30 and collect those to perfrom the respective actions.This is workaround.
    Tried using the DATE TYPES creating 7 different DATE TYPES and assigning the ( end dates - 30 ) to that manually upon save.
    and using this DATE TYPE along with the action definition can we acheive ?  but it too will be work around.
    How to acheive this one. It became critical now in the project. 
    Thanks and Regards,
    Satish Akkina

    Hi,
    In your scenario, you don't need synchronous email facility.
    Probably you can create a z table and maintain all required dates in this table (before saving your transaction somewhere you would have to read your custom fields and save them in this table along with object ID/GUID). Then create a report that would read dates from z table and then send emails to your warranty team. Schedule this report in background with frequency of once day.
    Hope that helps.
    Regards,
    BJ

  • Adding zeros to filenames when exporting in Lightroom "Filename-001" "Fliename-002" etc?

    Hi, does anyone know if it is possible to add zeros before numbers when exporting files eg: "Filename-001" "Fliename-002" etc? The default setting is "Filename-1" "Filename-2" ect. The reason I want to have zeros in the number sequence is that certain software will display files in the wrong numerical sequence eg: "Filename-1" "Filename-10" Filename-11" etc and then "Filename-2" after "Filename-19". If zeros are added the files will always be displayed in the correct sequence "Filename-001" "Filename-002"... "Filename-009" "Filename-010" "Filename-011" etc.

    Just customize the filename using the template editor, and use the Sequence token set to the number of leading zeroes you want, as shown.

  • DELETE ZERO BEFORE NUMBER

    hallow
    i have field type numc20 and i wont to delete all zero before num
    how can i do that
    example
    i have
    000000000317
    i wont 317
    REGARDS

    hi,
    CONVERSION_EXIT_ALPHA_OUTPUT is the Fm used for giving desired o/p and takes a input from user
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input         = int [int is avaraible of type num20
    IMPORTING
      OUTPUT        = k. [ resultant value by FM]
    if useful reward some points.
    with regards,
    suresh.

  • Adding Addtional Telephone Field

    Hi,
    I have a requirement to add an Additional Telephone Number field with Extension in the Component:         "ICCMP_BP_CP",
    View         :          "BuPaContactPersonCreate"
    Please note we have already added Mobile Number and the requirement is for additional Telephone Number.
    Can anyone guide me on the process to do so. 
    Regards,
    Deepak

    Hi Binno,
    I had tried adding those two fields for telephone and extension but unfortunately after I added those fields and then when I accessed the corresponding view in Web UI I got an exception.
    If you have access to a sandbox system can you kindly confirm whether you are also having similar problem in your system.
    Hi Xavier,
    I know there is an option to add fields through EEWB. But, before I go through that option I want to confirm that there are no existing Telephone fields that are available.
    Regards,
    Deepak

  • Error while adding a custom field with Input help via AET

    Hi All,
    I need to add two custom field under Service orders at Item level in component BT140I_SRVP.
    One field is required to have the input search help f4 and autopopulates the second field
    I am able to add one field(not requiring help) successfully through AET .
    I have created one Zsearch_help in se11 and its successfully running  and Autopopulating seocnd field while I am testing it
    While adding second field through AET,I need to enter following details as -
    field label,search relevant ,serach help etc.
    When I type the name of my 'Zsearch_help' against field search help it gives me following error
    'Search help is not compatible'.
    Secondly,not getting getter and setter methods for the attrributes in BTAdminI.
    Last,please tell me if i create zhelp and activate it,would it automatically appear in the list on AETwhile assiging it to input field?
    Please help me out.Kindly be detailed as I am new to SAP CRM.
    Thanks,
    Shivani

    The question is answered in CRM 7.0 forum:
    Getting error while adding a custom field (with input help) through AET

  • Adding a signature field takes a lot of time

    Case: I have a Microsoft excel sheet that I save as PDF directly from excel. I use Adobe Acrobat X PRO to create 3 signature fields on this PDF to allow document signing in Adobe Reader.
    Problem: Adding a signature field in form editing mode are extremly slow. After placing the signature field, Adobe Acrobat stops responding for about 1-3 minutes. I need to do this for a lot of documents, so it's time-consuming to say the least..
    Is it possible to speed up this process?

    We don't control the forum emails, you do.
    For each separate message,
    1. Return to the forum ("View the full discussion")
    2. Sign in at top if your login isn't shown
    3. Click Stop email notifications

Maybe you are looking for

  • F4IF_INT_TABLE_VALUE_REQUEST

    Hi All, I have 2 parameters on my selection screen for which  i have given on value request help using fm F4IF_INT_TABLE_VALUE_REQUEST. the 2 para are firstname and lastname.when the user press f4 help he can see both first name and last name. my req

  • Material handling at Depot

    Hi, I have a scenario (MM-CIN) to configure....I am explaining below the scenario: Company has a depot which procures Steel coils as Raw Material from local as well as import vendor. Raw materials from local suppliers are received with excise invoice

  • Goods receipt not possible for delivery 800015869: error code 1

    Dear friends, I am doing MIGO-GR for outbound delivery, but getting error once inputting outbound delivery no. Goods receipt not possible for delivery 800015869: error code 1 Message no. M7865 Diagnosis The goods receipt for the delivery cannot be po

  • I lost all of my information updating to iOS 6 on my IPhone 4. How do I get it back?

    I lost all of my information updating to iOS 6 on my IPhone 4. How do I get it back?

  • Can't Create the ODBC connection for Oracle 10g

    Hi,      I am working with Oracle 10g Database Release 2 in windows XP professional. I am trying to create an ODBC connection for oracle but become failure because its generating the following errors: system error code 998 could not locate the setup