Leading zero being truncated on IRECORDSET return data

I am using EP6 SP14.  I have a RFC call from the portal to R/3 that brings back a table (availresult).  One of the elements in the table is the UPC code.  When I run the bapi using SE37 in R/3 the UPC code has a leading zero(s).  However, when the iview displays the UPC code the leading zero(s) are truncated.  The data is processed as type IRECORDSET. All the other data on the iview is correct just the UPC code is truncating the leading zero(s). 
Here's a sampling of my code.
IRecordSet availResult = (IRecordSet)output.get("AVAIL_RESULT");
lvecAvailResColNm.add(1,"EAN_UPC");
int counter = 0;
if(!availResult.isAfterLast()){
     availResult.beforeFirst();
     while(availResult.next()){
lvedAvailResDataRecord = new Vector();
lvedAvailResDataRecord.add(1,availResult.getString("EAN_UPC"));
lvecAvailResData.add(counter++, lvedAvailResDataRecord);
The availResult.getString("EAN_UPC")); comes back with a UPC code with the leading zeroes truncated.
Any suggestions would be greatly appreciated.
Thanks
Angie.

I'm having the exact same problem with UPC codes being returned by an RFC, did you ever find a solution?

Similar Messages

  • Leading zeros getting truncated in plsql report

    Hi,
    I've a requirement of a plsql report with an excel output. When i see the output in excel, the leading zeros get truncated. Is there any suggestion for this, other than enclosing within ' '. Because this particular solution prints the output along with quotes which is not acceptable. Please help me with this.
    -Divya Goteti

    Just prefix with =" and " at teh end of column. like
    select '="' || bank_account_no || '"' from employee_bank_list
    but if you are using same report for pdf also then use decode in pre/postfix.
    Imran

  • XL Reporter - item code starting with leading zeros was truncated

    Hi,
    Anybody knows how to prevent XL reporter from truncating the leading zero(s) in the item code?
    I had done a XL report where one of the field is to retrieve Item Code. In the report generated, the formula was as below:
    =ixDimGet("00100068")
    However, when MS Excel display it in the spreedsheet, the item code becomes "100068" where the leading zeros was truncated. The correct item code was supposed to be "00100068". I had tried to change the cell format to "text", "number", "general" and etc, but it doesn't work. Any method to correct the item code display in the Excel spreadsheet?
    Thanks,
    sianghing

    Chan,
    There is a simple solution for this.  Highlight the cell with the Item Code selection in it.
    Click the formula builder icon in Excel to open the formula builder
    In the bottom box, type TRUE
    This tells Excel that you want to display exactly what comes out of the database, without having to predetermine it with a Custom format, etc.
    I think that will solve your issue.
    Let me know if this needs further explanation.
    Regards,
    Brad Windecker
    [Orchestra Team|http://www.orchestrateam.com]

  • Leading zero getting truncated in .CSV format GUI_DOWNLOAD

    Hello experts,
    I am trying to download the data using GUI_DOWNLOAD in .CSV format but the leading zeros are getting truncated. For instance Company code 0001 is displayed as 1 in the CSV File. But when I open the same file in notepad I am seeing 0001. Is this a known issue or this is how .CSV format should be?
    I have gone through some threads in SDN but they are not helpful.
    Your expert advise is much appreaciated.
    Thanks
    Abdul Hakim

    That is how excel displays values like 0001. It interprets them as a number and removes leading zeros.
    If you don't want this happen and you want excel to treat them like text, you need to append a quote at the beginning of the token like '0001
    You can use concatenate like below to append a single leading quote
    field = '0001'.
    CONCATENATE ''''  field INTO field.

  • Leading zeros from Adobe form web service data connection

    I created a web service for BAPI_PRODORD_GET_DETAIL and used it as a data connection in an Adobe form. When executing the connection using request parameters of:
    Number = [Production Order #]
    OrderObjects.Operations = 'X'
    no production orders are found.
    I debugged and discovered the BAPI only found production orders when the Number importing parameter contained padded leading zeros. After searching the forums, I suspect (1) I have the wrong field type and / or pattern for the production order number input field or (2) SAP Note 1050826 may apply.
    Does anyone have suggestions on which field types and patterns to use? I have tried each of Text, Numeric, and Decimal. When using Numeric, I set the data format to Float instead of Integer. I tried data patterns such as: num , the data displays with leading zeros but does not pass to the BAPI with them.
    I was also thinking a Formcalc or Javascript may be the solution.
    Livecycle version: 8.1.2
    Component SAP_APPL: 603 (for SAP note relevancy)
    Thank you,
    --- Scott

    Hello,
    maybe it would be the fastest approach here to work with the value as a string and check the length of the "string" and if needed add some leading zeros. You may try some validations, so the value entered by the user is denied if not in the respective format.
    For a smooth start with scripting start here:
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
    Regards, Otto

  • Leading zeros are truncated during EXPORT

    I am having a report consist of some numberic columns like Emplid (0011, 0223, 00045). When I do the export, these zero's are getting dropped in the csv file.
    so in csv file I am having 11, 223, 45 values
    How to avoid this??

    Hi,
    I tried with following query...just added =
    select empno ,'="'||empno||'"' empno_excel from emp;
    it's working perfectly. Can someone explain me how putting = is removing the leading zero's.
    Also I want to show only Excel coulmn in my CSV file. How can I do that.
    Is there any API to hide columns in Excel file??
    thanks,
    deepak

  • Coldfusion json truncates leading zeroes

    Hi All -
    I am using jquery jqgrid with Coldfusion. I have a cfc whose return format is JSON. I have a database column of type varchar, but it returns values which starts with zeroes. On displaying data, the leading zeroes are truncated. I verified in firebug, the JSON response itself is cutting off the leading zeroes.
    Any suggestions or thoughts on this?

    If you are using CF 9.0 there was a documented bug that has been fixed in Adobe® ColdFusion® 9.0 Update 1:
    ID
    Area
    Bug Description
    82706
    AJAX Plumbing
    When you use  serializeJSON or   deserializeJSON, data type conversion occurs  automatically. For example,   000001 is converted to numeric 1.
    I know that there are new bugs introduced with Updater 1 so it would probably be wise to get the ColdFusion 9.0.1 Cumulative Hot Fix 1 also. As always, test the updates before using in production.

  • Web Services  from ABAP function modules return values- leading zeros

    I am using several web services from SAP CRM (5.0) that were created from Function modules ( I am assuming that that they are in ABAP).
    I can call the web services fine and they work as expected, but I am seeing a lot of leading zeros in the return values of fields in tables from the Web service.
    The ABAP er’s are telling me that they cannot see the leading zero’s.
    So my question is where these are appended to the values in the whole process. When I execute the Function Module in SAP CRM from transaction SE37 I can see the leading zeros. So I think that this is something that has to be handled by the ABAP er’s and not in the client consuming the web service.
    Are the functions in SAP CRM that can remove leading zeros for fields in a table (that is an export parameter?)
    Jawahar

    Hello Jawahar
    If you run your (RFC-enabled) function modules using the SAP-GUI (i.e. in dialog) then the GUI automatically replaces leading zero when the function module returns any data. However, calling the same function module remotely you will always see these leading zeros.
    These so-called conversion exits are defined as attribute of domains in the ABAP dictionary. If the function module used for the WebService is a standard fm then you have little chances to get rid of the leading zero. Perhaps the WebService has some attribute to suppress conversion exits or activate them when retrieving the data.
    Regards, 
       Uwe

  • 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

  • IR - Column with leading Zeros issue

    Hello,
    I've got an IR report which includes as "default report settings" 1 column with leading 0s. In order to export to Excel that column as text rather than as a numeric I followed a workaround proposed before in this forum (excel copy drops leading zeros
    In essence this workaround is to create an identifical column but in "excel text format" and display the columns depending on the request value: INSTR(NVL(:REQUEST,'YABBADABBADO'),'CSV') <> 0 for example.
    This works just fine for the default report.
    The problem arise when a user creates his own customise report that includes the mentioned column and saves it as a named report. Here, when the results are exported to excel the "excel" column does not appear.
    In fact, just hiding one of the displayed columns produces the same undesired result.
    I would appreciate any comments or suggestions.
    Many thanks
    Edited by: Javier Gil on Jul 20, 2010 7:52 AM

    I have found a better method. In your IR query:
    SELECT LPAD(v.vendor, 7, ' ') vendor,
    /*Just LPAD to a length of the column defined in the database table or to 7, whichever is greater. */
    FROM v, r
    WHERE v.VENDOR = r.VENDOR
    AND date_rcv <= to_date(:P150_CUTOFF,'yyyy/mm/dd')
    AND inv_nbr = ' '
    AND to_stores <> 'T'
    AND (V.VENDOR = RPAD(:P150_VENDOR,10,' ') OR :P150_VENDOR = 'ALL')
    When you download to Excel by Download/XLS (Request=XLS), it preserves the leading zeros.
    In the case of dates, you should LPAD 10 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YY'), 10, ' ') date_rcv,
    I haven’t tried it yet but I think in the case of ‘MM/DD/YYYY’, you should LPAD 12 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YYYY'), 12, ' ') date_rcv,
    Drawbacks of this method:
    Since the string has leading white spaces, you cannot use the filter for the ‘=’ comparison operator. Even filtering using leading white spaces will not return anything. You must use the LIKE and NOT LIKE operator instead.
    Advantages of this method over the original one I posted yesterday:
    1)     You do not have to create another column for download, just one column will suffice.
    2)     Even though the query has leading white spaces, they will not display in the IR region.
    Edited by: richardlee on Aug 5, 2010 11:10 AM
    Edited by: richardlee on Aug 5, 2010 11:16 AM

  • Suppress leading zeros for ALV column

    Hello,
    I have an ALV with a column mapped to a context attribute of type NUMC and would like to suppress the leading zeros being displayed.  My initial solution was to change the attribute to a char/string type and remove the zeros in my code, but then, the sort functionality no longer works correctly.  Any ideas if the ALV can use a 'hidden' field to do the sorting for a certain column... that way, I can display the number as a char/string without the zeros and when the user sorts the column, the ALV will use the hidden NUMC type field.
    Thanx for any directions...

    Hi,
    You can follow the following way which i implemnted for one of my application. Here i am setting this property for the context attrubute. May be this will work. But in ALV there is no separate method for this type of setting.
    **This method is used to display the Leading zeros for the Lot Number in Step-1
      DATA:
        node_do_not_change                  TYPE REF TO if_wd_context_node,
        node_d0130_sapmf05a                 TYPE REF TO if_wd_context_node,
        node_pstap                          TYPE REF TO if_wd_context_node,
        node_info                           TYPE REF TO if_wd_context_node_info,
        ls_fprops                           TYPE wdy_attribute_format_prop.
      node_do_not_change = wd_context->get_child_node( name = wd_this->wdctx_do_not_change ).
      node_d0130_sapmf05a = node_do_not_change->get_child_node( name = wd_this->wdctx_d0130_sapmf05a ).
      node_pstap = node_d0130_sapmf05a->get_child_node( name = wd_this->wdctx_pstap ).
      node_info = node_pstap->get_node_info( ).
      ls_fprops = node_info->get_attribute_format_props( 'VALUE' ).
      ls_fprops-null_as_blank = if_wd_context_node_info=>c_format_null_as_BLANK.
      node_info->set_attribute_format_props(
        name              = 'VALUE'
        format_properties = ls_fprops ).
    Warm Regards,
    Vijay

  • EAN values truncationg the leading zeroes

    Hi experts,
    I have created two new EAN category for one category accepts one leading zeroes another category accepts two leading zeroes.
    In the material master i am trying to enter the same EAN values with different unit of measure system accepts the EAN value for one UOM and when i am trying to enter the same value for another UOM with two leading zeroes the leading zeroes are truncating.I can see the below warning message.When i press enter the leading zeroes are truncated.
    _EAN already used for unit of measure EA of this material_
    Please help me how to solve the issue.

    i guess this is coming because you have already mentioned the EAN no in one material amster and the data is maintained at client level so system is not allowing redundntcy

  • Leading zeroes substring query in SQL Server

    Can Someone please help me in padding leading zeroes for the months in End date
    Example: actual data is like    6222007
    ,11301998 in end date column the following query works fine for 11301998 and converts it as 19981130 which was correct.
    But 6222007
    fails because month has no leading zero and it converts it as 0076222 which is wrong.
    How can i make it as 20070622 with the following code
    select (case when replace (ltrim(rtrim(ltrim([end date]))), '|', '') in ('99999999','00000000') then NULL 
        else substring ([END DATE],5,4)+SUBSTRING([END DATE],1,2)+SUBSTRING([END DATE],3,2) end) as ConvEnd_date
    from AdventureWorks.dbo.[AccountTable]

    Something like:
    declare @i int = 6222007
    select @i%10000 year_number, @i/1000000 month_number, (@i/10000)%100 day_number
    select DATEFROMPARTS(@i%10000,@i/1000000,(@i/10000)%100)
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How to delete decimal point and adding leading zeros....

    Hi,
    I have one requirement in the report   i.e.
            <b>Present Value    :</b>  44567.98
            <b>Expected Value  :</b> 0000004456798
    In the present Value how will I remove that decimal point and how to add those six ing zeros. I tried with CONVERSION_EXIT....but it is not giving. Help me...
    Thanks in advance.
    Regards,
    Kumar.

    Hi,
    Use SPLIT and COMCATENATE fnctions.
    Eg:  split l_v at '.' into l_v1 l_v2
            concatenate l_v1 l_v2 into l_v.
    For adding leading zeros
    Use FM CONVERSION_EXIT_ALPHA_INPUT.
    Eg:
    data: tknum type vttk-tknum value '99156'.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
         exporting
              input  = tknum
         importing
              output = tknum.
    Sri
    Message was edited by:
            Sri Tayi

  • Adding leading zeros...

    I have a number (let's say 12345) and I need to add 3 leading zeros to it and make it 00012345. I could do it by first converting the number to a string, concatenating '000' to it and then converting it back to a number.
    I realize this is a trivial question, but how do you convert a number to a string and then back to a number in Oracle 10g?
    Thanks.

    In reference to the above, I need to store a total of 8 characters in vTgtSALES.EMPLOYEE_ID. For example, if the vTempEmpID variable has 5 characters, I need to add 3 zeros, etc. I have the following code:
    vTgtSALES.EMPLOYEE_ID:=CASE Length (LTrim(RTrim(vTempEmpID)))
              WHEN 0 THEN WriteLog (pCmdID, pSubCmdID, 'Employee ID value has length of zero. WMC: ' || srcSALESNNM.WMC)
              WHEN 1 THEN '0000000' || vTempEmpID
              WHEN 2 THEN '000000' || vTempEmpID     
    WHEN 3 THEN '00000' || vTempEmpID
              WHEN 4 THEN '0000' || vTempEmpID      
    WHEN 5 THEN '000' || vTempEmpID
              WHEN 6 THEN '00' || vTempEmpID
              WHEN 7 THEN '0' || vTempEmpID                WHEN 8 THEN vTempEmpID
              ELSE WriteLog (pCmdID, pSubCmdID, 'Employee ID value too long for field. WMC: ' || srcSALESNNM.WMC)          
         END;
    The CASE clause does not seem to work - the actual value of vTempEmpID is stored in vTgtSALES.EMPLOYEE_ID without leading zeros being asses. What am I doing wrong?
    Thanks.

Maybe you are looking for

  • Abap Routine(Urgent)

    Hi All, I have a requirment  i,e for example i got a infoobject named product and the data for that product is cumin as ABCD,but in the target it should be passed as CD by supressin AB in transformation. So in wot way i can achevie this ,by field rou

  • Why whenn I go to local files in Muse Export it does not load the pages in my browser?

    I was testing and tried to winzip the files to upload to a site (blackboard) but when I tested to view them straight from local files is not uploading in browser properly? Urgent, help please PS It does look wonderful from business catalyst site. Is

  • ABAP Program to close BPC CUBE Request

    Hi I urgnetly need abap program to close BPC Open request. I tried program RSAPO_SWITCH_TRANS_TO_BATCH and function module : RSAPO_CLOSE_TRANS_REQUEST It never worked on BPC infocube at all. Please help me close yellow request to green ON BPC CUBES.

  • ADOBE ACROBAT 8 PRO. COMPATIBILITY WITH READER 8

    I have been creating forms successfully with them being edited by people with any version of Acrobat Reader. All of a sudden, certain version of Reader can not save my interactive forms and can only print hard copies - is this the result of a recent

  • Installing 10.5 Server on Macbook pro 2.9.3 extern. HD Issues -booting loop

    Hey all, system: • macbook pro 2.93 • external firewire drive Objective: • installing 10.5 Server from dvd on external drive Issue: • macbook pro when trying to boot up from the 10.5 Server dvd is stuck in a reboot loop Additional info • this dvd was