Problem with converting data types

Advertisement
November 30

Hi Experts,
I am stuck up with a little problem, i need your help
i am converting all the data types to CHAR but i am not getting the expected data out.........
My code is as below...where do i go wrong...
LOOP AT <T_ITAB> ASSIGNING <FIELD>.
DO.
   ASSIGN COMPONENT SY-INDEX OF STRUCTURE <FIELD> TO <RECORD>.
   IF SY-SUBRC = 0.
      LV_FIELD = <RECORD>.
      N = STRLEN( LV_FIELD ).
      IF N = '8'.
           IF LV_FIELD IS NOT INITIAL.
                  LV_DATE = LV_FIELD.
                  CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
                          EXPORTING
                          DATE                     = LV_DATE
                         EXCEPTIONS
                                PLAUSIBILITY_CHECK_FAILED = 1
                                OTHERS                     = 2.
                         IF SY-SUBRC <> 0.
                                 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                         ENDIF.
                     IF SY-SUBRC EQ 0.
                        CONCATENATE LV_FIELD+6(2) LV_FIELD+4(2) LV_FIELD+0(4) INTO LV_FIELD SEPARATED BY '.'.
                    ENDIF.
            ENDIF.
         ENDIF.
            IF LV_RECORD IS INITIAL.
                     LV_RECORD = LV_FIELD.
            ELSE.
                   CONCATENATE LV_RECORD LV_FIELD INTO LV_RECORD SEPARATED BY '  * '.
           ENDIF.
       ELSE.
     EXIT." DO
    ENDIF.
   ENDDO.
  APPEND LV_RECORD TO LT_OUTPUT.
CLEAR LV_RECORD.
ENDLOOP.
THE TABLE LT_OUTPUT     LIKE     THENV(CHAR 255)
My output looks some thing like this:
04  36876   15.09.2011  39600   1999
06  36960   15.09.2011  39600   2632
07  36874   15.09.2011  39541   9232
My expected output
04    36.876  15.09.2011    39.600  1.999
06    36.960  15.09.2011    39.600  2.632
07    36.874  15.09.2011    39.541  9.232
Regards
sam

Advertisement

Replay

At run time you can see all the data........ like what i have shown...
but if you clearly see, DATE will be in the internal format..but if you print it, it will be in dd:mm:yyyy
can you suggest me if i have a dynamic field symbol (table data) ,,,, How can i convert data types dynamically..
if it is a static internal table i am achieving with WRITE TO statement.....but i have huge data in field symbols...
Instead of all these , please specify the exact problem your are facing . What is it with date field ? . In SAP while printing the internal format will be converted to external. What is your requirement with this date field?
My output looks some thing like this:
04 36876 15.09.2011 39600 1999
06 36960 15.09.2011 39600 2632
07 36874 15.09.2011 39541 9232
My expected output
04 36.876 15.09.2011 39.600 1.999
06 36.960 15.09.2011 39.600 2.632
07 36.874 15.09.2011 39.541 9.232
I dont see any problems mentioned in your date field. Both your actual and expected outputs reflects the same in date field.
In SCN you will only get solutions if your question is precise.
Kesav

View 11 Replies

Problem with BLOB Data Type

October 11

Dear all I am using APEX 4.0, to show an image in my report I have this sql statement (built by using wizard) : SELECT ProductID, Pro_Name, Pro_Description, Pro_Quantity, Pro_SerialNo, Pro_ModelName, Pro_ModelNo, Pro_Retail, dbms_lob.getlength(Pro_Im

View All Replies

Problem with the date conversion

October 11

Hi Friends, i am facing the problem with the date conversion,  Actuall my requirement is to pass the date to the screen based on the user setting roles(SU01). I have fetched the user setting date format by using the funciton module SUSR_GET_USER_DEFA

View All Replies

Problem accessing basic data types

October 11

Hi, I am a newbie at using JNI so please don't mind if I am asking something trivial. I have a JNI wrapper for a native C code. The C code is a Gtk+ application using GLib library. This library has it's own basic data types. For example, "gchar"

View All Replies

Saving result from sp_executesql into a variable and using dynamic column name - getting error "Error converting data type varchar to numeric"

October 11

Im getting an error when running a procedure that includes this code. I need to select from a dynamic column name and save the result in a variable, but seem to be having trouble with the values being fed to sp_executesql DECLARE @retval AS DECIMAL(1

View All Replies

Error converting data type nvarchar to numeric 'witholding tax' (OWHT)

October 11

Hi Guys. After I have upgraded my clients 2007 PL 30 database to 8.81 PL05, and running a repair to fix inconsistincies, I am receiveing some error when opening any sales documents. It takes place when I open a sales document, or browse previous docs

View All Replies

CF9, no hotfix, VendorErrorCode 8114, cfprocresult error converting data type

November 30

Hello, everyone. I've got an issue that really has me scratching my head.  Not sure where the issue lies, but I'll explain as best I can. Basically, I _think_ I'm being told that one of the fields in the recordset is not being converted. On one page,

View All Replies

Is anyone else having problems with Apertures Date fields?

November 30

After experiencing a sysems failure I began restoring my images from backups.  I have had no end of problems with Image dates.  I have come to the determination that Aperture is NOT using either the "Create Date" or "DateTimeOriginal"

View All Replies

What is the problem with converting objects with gradients to gradient mesh?

November 30

What is the problem with converting objects with gradients to gradient mesh?slange, There may arise some smaller corruption states that may be cured by what you did, as you can see in the list. Sometimes, restarting thrice is needed. The following is

View All Replies

Problem with the "date" field

November 30

Which is the correct way to insert a date in the attribute specified with a "date" type of a table? For example: 02-03-1999, 02-mar-1999, 02/03/1999......or what else? Thank you. MarcoHi, Date can be in ay formats you had mentioned. You can use

View All Replies

ITunes Match: There was a problem with your payment type.

November 30

This Morning i received the following email from apple regarding my itunes match account. I have no idea why this has happened, i am now worried of loosing all my music. I have itunes match set for AUTORENEWAL, and there ist enough credit on my itune

View All Replies

Problem with loading data to Essbase

October 11

Hi All, I have a problem with loading data into Essbase. I've prepared maxl script to load the data, calling rule file. The source table is located in RDBMS Oracle. The script works correctly, ie. generally loads data into Essbase. But the problem li

View All Replies

Problem with info package :Type variables in dataselection tab

October 11

hi, i am facing a problem with the info package where, instead of date 'from and to' values if i am providing a Variable, info package is not loading data and the request status flag is in yellow for a long time though the no of records are less. the

View All Replies

Problem with pass data to smartform

November 30

hi guru. i found a question and need advise for solve this problem. i create a smartform about tax, this form use sorted and index data from zreport to display in form. i declare structure of tab and structure of type in report as same as structure o

View All Replies

Problem with converted PDF from OTF

October 11

Hello, im having a problem with character interpretation in PDF document when i convert it from OTF. At the moment im using Arial true type font in my smartform, im using function module CONVERT_OTF to convert OTF to PDF. When i open PDF document wit

View All Replies

Working with timestamp data type.

November 30

Hi all!, I have some problems working with the timestamp data type. Let's say that i have a table named order, where i store (in two timestamps) the date where the order was made, and the date where the order was executed. I want: 1) first to find th

View All Replies

No-rounding while converting data type F to Packed

November 30

Hi All, I want to pass value of a variable of data type F to another variable of dtata type P with decimals 3. While converting values decimals are getting rounded to next higher value. Can any one tell me how to retain the actual values,without roun

View All Replies

Import from Designer crashes with IMAGE data type

October 11

Hello, I'd like to report an issue with Data Modeler while importing from Oracle Designer. If you consider this a bug, please let me know if I need to do anything else to request a fix for it. I've used the import > Oracle Designer Model tool to impo

View All Replies

Problem with large data report

October 11

I tried to run a template I got from release 12 using data from the release we are using (11i). The xml file is about 13,500 kb. when i run it from my desktop. I get the following error (mostly no output is generated sometimes its generated after a l

View All Replies

Problem with show data of system R/3

November 30

Hi all, I have a proyect with web dynpro, and i like get data of system R/3. I get this data with the connection JCO. I have make all steps for crate the web dynpro and i see the application when deploy and run, but data of system R/3 i not see. I ha

View All Replies

Tags:

  1. macbook pro periodic sound
  2. hp 2000-2313tu clean install os
  3. hp omni 10 touch bloccato
  4. me22n save enhancement
  5. CC&B xai
  6. using outline load utility
  7. LFJ9
  8. stepa89
  9. minerals11i
  10. barnduu
Copyrights 2019 Fcffair BigData Resource, All rights reserved