Conversions in abap

Hi
I want to know what are the conversions and what are the different types of conversions in abap
Regards
Pavan

Hi
A conversion means data that is converted from one format to another format and from one system to another. So when you first implement SAP, you are actually replacing some of your legacy systems, but you are not completely trashing the data. You still need some of that data from the systems that are being replaced. So you pull the data out of your legacy systems and put them on some files. You then want to load that data into your new SAP system. That is when you write some programs which will read that data and load it into SAP. Imagine you had a home grown purchasing system. You are now replacing all that with SAP. But until SAP goes live, you want to keep using your home grown purchasing system. So during go live, you want to transfer the POs from your legacy system to SAP. Now a PO in your legacy system may not have the same fields as a PO in SAP. So you convert the data.
from sap help....
Conversion Rules for Elementary Data Types
There are ten predefined ABAP data types. There are 100 possible type combinations between these elementary data types. ABAP supports automatic type conversion and length adjustment for all of them except type D (date) and type T (time) fields which cannot be converted into each other.
The following conversion tables define the rules for converting elementary data types for all possible combinations of source and target fields.
C D F I N P STRING T X XSTRING
Source Type Character
Conversion table for source type C
Target
Conversion
C
The target field is filled from left to right. If it is too long, it is filled with blanks from the right. If it is too short, the contents are truncated from the right.
D
The character field must contain an 8-character date in the format YYYYMMDD .
F
The contents of the source field must be a valid representation of a type F field as described in Literals.
N
Only the digits in the source field are copied. The field is right-justified and filled with trailing zeros.
I, P
The source field must contain the representation of a decimal number, that is, a sequence of digits with an optional sign and no more than one decimal point. The source field can contain blanks. If the target field is too short, an overflow may occur. This may cause the system to terminate the program.
STRING
The occupied length of the source field is copied. All trailing spaces are truncated.
T
The character field must contain a six-character time in HHMMSS format.
X
Since the character field must contain a hexadecimal string, the only valid characters are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. This string is packed as a hexadecimal number, transported left-justified, and filled with zeros or truncated on the right.
XSTRING
As for fields of type X, except that the target field is not filled with zeros.
Source Type Date
Conversion table for source type D
Target
Conversion
C
The date is transported left-justified without conversion.
D
Transport without conversion.
F
The date is converted into a packed number. The packed number is then converted into a floating point number (see corresponding table).
N
The date is transported left-justified without conversion and, if necessary, filled with zeros on the right.
I, P
The date is converted to the number of days since 01.01.0001.
STRING
The date is converted to a character field, which is then converted to a character string.
T
Not supported. Results in an error message during the syntax check or in a runtime error.
X
The date is converted to the number of days since 01.01.0001 in hexadecimal format.
XSTRING
As for fields of type X, except that only significant bytes are copied.
Source Type Floating Point Number
Conversion table for source type F
Target
Conversion
C
The floating point number is converted to the <mantissa>E<exponent> format and transported to the character field. The value of the mantissa lies between 1 and 10 unless the number is zero. The exponent is always signed. If the target field is too short, the mantissa is rounded. The length of the character field must be at least 6 bytes.
D
The source field is converted into a packed number. The packed number is then converted into a date field (see corresponding table).
F
Transport without conversion.
N
The source field is converted into a packed number. The packed number is then converted into a numeric text field (see corresponding table).
I, P
The floating point number is converted to an integer or fixed point value and, if necessary, rounded.
STRING
As for fields of type C, except that the maximum number of places is used for the mantissa (maximum precision). Despite this, different signs or exponents can lead to different string lengths.
T
The source field is converted into a packed number. The packed number is then converted into a time field (see corresponding table).
X
The source field is converted into a packed number. The packed number is then converted into a hexadecimal number (see corresponding table).
XSTRING
As for fields of type X, except that leading zeros are not copied.
Source Type Integer
Type I is always treated in the same way as type P without decimal places. Wherever type P is mentioned, the same applies to type I fields.
Source Type Numeric Text
Conversion table for source type N
Target
Conversion
C
The numeric field is treated like a character field. Leading zeros are retained.
D
The numeric field is converted into a character field. The character field is then converted into a date field (see corresponding table).
F
The numeric field is converted into a packed number. The packed number is then converted into a floating point number (see corresponding table).
N
The numeric field is transported right-justified and filled with zeros or truncated on the left.
I, P
The numeric field is interpreted as a number, and transferred to the target field, where it is right-justified, and adopts a plus sign. If the target field is too short, the program may be terminated.
STRING
As for fields of type C. The length of the character string matches the length of the numeric text.
T
The numeric field is converted into a character field. The character field is then converted into a time field (see corresponding table).
X
The numeric field is converted into a packed number. The packed number is then converted into a hexadecimal number (see corresponding table).
XSTRING
As for fields of type X, except that leading zeros are not copied.
Source Type Packed Number
If the program attribute Fixed point arithmetic is set, the system rounds type P fields according to the number of decimal places or fills them out with zeros.
Conversion table for source type P
Target
Conversion
C
The packed field is transported right-justified to the character field, if required with a decimal point. The last position is reserved for the sign. Leading zeros appear as blanks. If the target field is too short, the sign is omitted for positive numbers. If this is still not sufficient, the field is truncated on the left. ABAP indicates the truncation with an asterisk (*). If you want the leading zeros to appear in the character field, use UNPACK instead of MOVE.
D
The packed field value represents the number of days since 01.01.0001 and is converted to a date in YYYYMMDD format.
F
The packed field is accepted and transported as a floating point number.
N
The packed field is rounded if necessary, unpacked, and then transported right-justified. The sign is omitted. If required, the target field is filled with zeros on the left.
I, P
A packed field is converted to type I. The resulting four bytes are placed into the target field right-justified. If the target field is too short, an overflow occurs. If the target field is longer, it is filled with zeros on the left.
STRING
As for fields of type C, except that leading zeros are not generated.
T
The packed field value represents the number of seconds since midnight and is converted to a time in HHMMSS format.
X
A packed field is converted to type I. The resulting four bytes are placed into the target field right-justified and in big-endian format. If the target field is too short, it is truncated from the left. If the target field is longer than 4, it is filled with zeros on the left. Negative numbers are represented by the two's complement (= bit complement +1).
XSTRING
As for fields of type X, except that leading zeros are not generated.
Source Type String
Conversion table for source type STRING
Target
Conversion
C
The target field is filled from left to right. If it is longer than the string, it is filled with trailing spaces. If it is too short, the contents are truncated from the right.
D
The string must contain an 8-character date in the format YYYYMMDD .
F
The contents of the string must be a valid representation of a type F field as described in Literals.
N
Only digits in the string are copied. The field is right-justified and filled with trailing zeros. If the target field is too short, it is truncated from the left.
I, P
The string must contain the representation of a decimal number, that is, a sequence of digits with an optional sign and no more than one decimal point. The source field can contain blanks. If the target field is too short, an overflow may occur. This may cause the system to terminate the program.
STRING
The source string is copied to the target string unconverted.
T
The string must contain a six-character time in HHMMSS format.
X
Since the character field must contain a hexadecimal-character string, the only valid characters are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. This character string is packed as a hexadecimal number, transported left-justified, and filled with zeros or truncated on the right.
XSTRING
As for target fields of type X, except that the field is not filled with zeros.
Source Type Time
Conversion table for source type T
Target
Conversion
C
The source field is transported left-justified without conversion.
D
Not supported. Results in an error message during the syntax check or in a runtime error.
F
The source field is converted into a packed number. The packed number is then converted into a floating point number (see corresponding table).
N
The date is converted into a character field. The character field is then converted into a numeric text field (see corresponding table).
I, P
The date is converted to the number of seconds since midnight.
STRING
The time is converted to a character field, which is then converted to a character string.
T
The date is transported left-justified without conversion and, if necessary, filled with zeros on the right.
X
The date is converted to the number of seconds since midnight in hexadecimal format.
XSTRING
As for fields of type X, except that only significant bytes are copied.
Source Type Hexadecimal Field
Conversion table for source type X
Target
Conversion
C
The value in the hexadecimal field is converted to a hexadecimal character string, transported left-justified to the target field, and filled with zeros.
D
The source field value represents the number of days since 01.01.0001 and is converted to a date in YYYYMMDD format.
F
The source field is converted into a packed number. The packed number is then converted into a floating point number (see corresponding table).
N
The source field is converted into a packed number. The packed number is then converted into a numeric text field (see corresponding table).
I, P
The value of the source field is interpreted as a hexadecimal number. It is converted to a packed decimal number and transported right-justified to the target field. If the hexadecimal field is longer than 4 bytes, only the last four bytes are converted. If it is too short, a runtime error may occur.
STRING
As for target fields of type C, except that the field is not filled with zeros. The length of the string is twice the length of the hexadecimal field.
T
The source field value represents the number of seconds since midnight and is converted to a time in HHMMSS format.
X
The value is transported left-justified and filled with X'00' on the right, if necessary.
XSTRING
The hexadecimal field is copied completely – that is, trailing zeros are not truncated.
Source Type Byte Sequence
Conversion table for source type XSTRING
Target
Conversion
C
The value in the byte sequence is converted to a hexadecimal character string, transported left-justified to the target field, and filled with zeros.
D
The byte sequence value represents the number of days since 01.01.0001 and is converted to a date in YYYYMMDD format.
F
The content of the byte sequence is converted into a packed number. The packed number is then converted into a floating point number (see corresponding table).
N
The content of the byte sequence is converted into a packed number. The packed number is then converted into a numeric text field (see corresponding table).
I, P
The content of the byte sequence is interpreted as a hexadecimal number. It is converted to a packed decimal number and transported right-justified to the target field. If the byte sequence is longer than 4 bytes, only the last four bytes are converted. If it is too short, a runtime error may occur.
STRING
As for target fields of type C, except that the field is not filled with zeros. The length of the string is twice the length of the byte sequence.
T
The byte sequence value represents the number of seconds since midnight and is converted to a time in HHMMSS format.
X
The byte sequence is transported left-justified and filled with X'00' on the right, if necessary.
XSTRING
The source byte sequence is copied to the target byte sequence unconverted.
Conversion Rules for Internal Tables
Internal tables can only be converted into other internal tables. You cannot convert them into structures or elementary fields.
Internal tables are convertible if their line types are convertible. The convertibility of internal tables does not depend on the number of lines.
Conversion rules for internal tables:
Internal tables which have internal tables as their line type are convertible if the internal tables which define the line types are convertible.
Internal tables which have line types that are structures with internal tables as components are convertible according to the conversion rules for structures if the structures are compatible.
Conversion Rules for Structures
ABAP has one rule for converting structures that do not contain internal tables as components. There are no conversion rules for structures that contain internal tables. You can only make assignments between structures that are compatible.
You can combine convertible structures in the following combinations:
Converting a structure into a non-compatible structure
Converting elementary fields into structures
Converting structures into elementary fields
In each case, the system first converts all the structures concerned to type C fields and then performs the conversion between the two resulting elementary fields. The length of the type C fields is the sum of the lengths of the structure components. This rule applies to all operations using structures that do not contain internal tables.
If a structure is aligned, the filler fields are also added to the length of the type C field.
A non-aligned structure without filler fields:
If you convert a structure into a shorter structure, the original structure is truncated. If you convert a structure into a longer one, the parts at the end are not initialized according to their type, but filled with blanks.
It can make sense to assign a structure to another, incompatible, structure if, for example, the target structure is shorter than the source, and both structures have the same construction over the length of the shorter structure. However, numeric components of structures that are filled in incompatible assignments may contain nonsensical or invalid values that may cause runtime errors.
DATA: BEGIN OF FS1,
INT TYPE I VALUE 5,
PACK TYPE P DECIMALS 2 VALUE ‘2.26’,
TEXT(10) TYPE C VALUE ‘Fine text’,
FLOAT TYPE F VALUE ‘1.234e+05’,
DATA TYPE D VALUE ‘19950916’,
END OF FS1.
DATA: BEGIN OF FS2,
INT TYPE I VALUE 3,
PACK TYPE P DECIMALS 2 VALUE ‘72.34’,
TEXT(5) TYPE C VALUE ‘Hello’,
END OF FS2.
WRITE: / FS1-INT, FS1-PACK; FS1-TEXT, FS1-FLOAT, FS1-DATE.
WRITE: / FS2-INT, FS2-PACK, FS2-TEXT.
MOVE FS1 TO FS2.
WRITE: / FS2-INT, FS2-PACK, FS2-TEXT.
Don't forget to reward if useful...

Similar Messages

  • Patching ST_PI, open conversions in ABAP dictionary

    Hello
    during a patching of ST-21 2008 the tool stops at CHECK_REQUIREMENTS phase with the screen:
    open conversions in ABAP dictionary
    Some open conversion requests still exist in the ABAP Dictionary for the
    following ABAP Dictionary objects. To avoid inconsistencies and loss of 
    data, you must process these conversions first.                                                                               
    Proceed as follows:                                                                               
    - Open a new session.                                                   
    - Start the Database Utility (transaction SE14).                        
    - Correct the inconsistencies for the specified objects.                
    - Repeat the import phase. If no more inconsistencies are found, the    
      import continues.                                                     
    INDEX GLPCA-Z01
    Now , no index exists in dictionary and database but in the past probably it existed and was cancelled . Anyway the table GLPCA is consistent  in database and like runtime object.
    I've activated it again but the problem is always the same
    any idea?
    thanks
    Nicola

    - start transaction SE14
    - use the menue to "DB Requests - Created with import"
    Check if there are any outstanding conversions.
    Markus

  • SQL Command conversion in abap code

    Hi,
    I want to implement the UNION, INTERSECT and MINUS SQL commands in abap code. Please give me the appropriate solutions asap.
    For Example:
    select field1, field2, . field_n
    from tables
    <b>UNION</b>
    select field1, field2, . field_n
    from tables;
    select field1, field2, . field_n
    from tables
    <b>MINUS</b>
    select field1, field2, . field_n
    from tables;
    select field1, field2, . field_n
    from tables
    <b>INTERSECT</b>
    select field1, field2, . field_n
    from tables;
    Thanks,
    Ravi

    Hi Ravi
    Check out this procedure...
    DATA: FRANKFURT(4) TYPE X,
          FRISCO(4)    TYPE X,
          INTERSECT(4) TYPE X,
          UNION(4)     TYPE X,
          BIT          TYPE I.
    DATA: CARRID TYPE SPFLI-CARRID,
          CARRIER LIKE SORTED TABLE OF CARRID
                              WITH UNIQUE KEY TABLE LINE.
    DATA WA TYPE SPFLI.
    SELECT CARRID FROM SCARR INTO TABLE CARRIER.
    SELECT CARRID CITYFROM FROM SPFLI
                           INTO CORRESPONDING FIELDS OF WA.
      WRITE: / WA-CARRID, WA-CITYFROM.
      READ TABLE CARRIER FROM WA-CARRID TRANSPORTING NO FIELDS.
      CASE WA-CITYFROM.
        WHEN 'FRANKFURT'.
          SET BIT SY-TABIX OF FRANKFURT.
        WHEN 'SAN FRANCISCO'.
          SET BIT SY-TABIX OF FRISCO.
      ENDCASE.
    ENDSELECT.
    INTERSECT = FRANKFURT BIT-AND FRISCO.
    UNION     = FRANKFURT BIT-OR  FRISCO.
    SKIP.
    WRITE 'Airlines flying from Frankfurt and San Francisco:'.
    DO 32 TIMES.
      GET BIT SY-INDEX OF INTERSECT INTO BIT.
        IF BIT = 1.
          READ TABLE CARRIER INDEX SY-INDEX INTO CARRID.
          WRITE CARRID.
        ENDIF.
    ENDDO.
    SKIP.
    WRITE 'Airlines flying from Frankfurt or San Francisco:'.
    DO 32 TIMES.
      GET BIT SY-INDEX OF UNION INTO BIT.
        IF BIT = 1.
          READ TABLE CARRIER INDEX SY-INDEX INTO CARRID.
          WRITE CARRID.
        ENDIF.
    ENDDO.
    This produces the following output list:
    The program uses four hexadecimal fields with length 4 - FRANKFURT, FRISCO, INTERSECT, and UNION. Each of these fields can represent a set of up to 32 elements. The basic set is the set of all airlines from database table SCARR. Each bit of the corresponding bit sequences representes one airline. To provide an index, the external index table CARRIER is created and filled with the airline codes from table SCARR. It is then possible to identify an airline using the internal index of table CARRIER.
    In the SELECT loop for database table SPFLI, the corresponding bit for the airline is set either in the FRANKFURT field or the FRISCO field, depending on the departure city. The line number SY-TABIX is determined using a READ statement in which no fields are transported.
    The intersection and union of FRANKFURT and FRISCO are constructed using the bit operations BIT-AND and BIT-OR.
    The bits in INTERSECT and UNION are read one by one and evaluated in two DO loops. For each position in the fields with the value 1, a READ statement retrieves the airline code from the table CARRIER.
    Comparing Bit Sequences
    Use the following three operators to compare the bit sequence of the first operand with that of the second:
    <operator>
    Meaning
    O
    bits are one
    Z
    bits are zero
    M
    bits are mixed
    The second operand must have type X. The comparison takes place over the length of the second operand. The first operand is not converted to type X.
    The function of the operators is as follows:
    O (bits are one)
    The logical expression
    <f> O <hex>
    is true if the bit positions that are 1 in <hex>, are also 1 in <f>. In terms of set operations with bit sequences, this comparison is the same as finding out whether the set represented by <hex> is a subset of that represented by <f>.
    Z (bits are zero)
    The logical expression
    <f> Z <hex>
    is true if the bit positions that are 1 in <hex>, are 0 in <f>.
    M (bits are mixed)
    The logical expression
    <f> M <hex>
    is true if from the bit positions that are 1 in <hex>, at least one is 1 and one is 0 in <f>.
    Caution: The following programs are no longer supported in Unicode systems:
    REPORT demo_log_expr_bits .
    DATA: text(1) TYPE c VALUE 'C',
          hex(1) TYPE x,
          i TYPE i.
    hex = 0.
    DO 256 TIMES.
      i = hex.
      IF text O hex.
        WRITE: / hex, i.
      ENDIF.
      hex = hex + 1.
    ENDDO.
    The output is as follows:
    00          0
    01          1
    02          2
    03          3
    40         64
    41         65
    42         66
    43         67
    Here, the bit structure of the character 'C' is compared to all hexadecimal numbers HEX between '00' and 'FF' (255 in the decimal system), using the operator O. The decimal value of HEX is determined by using the automatic type conversion during the assignment of HEX to I. If the comparison is true, the hexadecimal number and its decimal value are displayed on the screen. The following table shows the bit sequences of the numbers:
    Thanks
    Ashok

  • Regarding Conversion Of ABAP program from non unicode to uni code

    Hi Can you please let me know the procedure for converssion of non unicode to unicode?
    Thanks in advance,
    zubera

    Hi
    The Link will be helpful to you.
    Re: Upgrade 4.6 to ECC - What are the responsibilites
    regarding Unicode influence in Standard programs
    Very good document:
    http://www.doag.org/pub/docs/sig/sap/2004-03/Buhlinger_Maxi_Version.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d37d1ad9-0b01-0010-ed9f-bc3222312dd8
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/589d18d9-0b01-0010-ac8a-8a22852061a2
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f8e316d9-0b01-0010-8e95-829a58c1511a
    You need to use the transaction UCCHECK.
    The report documentation is here
    ABAP Unicode Scan Tool UCCHECK
    You can use transaction UCCHECK to examine a Unicode program set for syntax errors without having to set the program attribute "Unicode checks active" for every individual program. From the list of Unicode syntax errors, you can go directly to the affected programs and remove the errors. It is also possible to automatically create transport requests and set the Unicode program attribute for a program set.
    Some application-specific checks, which draw your attention to program points that are not Unicode-compatible, are also integrated.
    Selection of Objects:
    The program objects can be selected according to object name, object type, author (TADIR), package, and original system. For the Unicode syntax check, only object types for which an independent syntax check can be carried out are appropriate. The following object types are possibilities:
    PROG Report
    CLAS Class
    FUGR Function groups
    FUGX Function group (with customer include, customer area)
    FUGS Function group (with customer include, SAP area)
    LDBA Logical Database
    CNTX Context
    TYPE Type pool
    INTF Interface
    Only Examine Programs with Non-Activated Unicode Flag
    By default, the system only displays program objects that have not yet set the Unicode attribute. If you want to use UCCHECK to process program objects that have already set the attribute, you can deactivate this option.
    Only Objects with TADIR Entry
    By default, the system only displays program objects with a TADIR entry. If you want to examine programs that don't have a TADIR entry, for example locally generated programs without a package, you can deactivate this option.
    Exclude Packages $*
    By default, the system does not display program objects that are in a local, non-transportable package. If you want to examine programs that are in such a package, you can deactivate this option.
    Display Modified SAP Programs Also
    By default, SAP programs are not checked in customer systems. If you also want to check SAP programs that were modified in a customer system (see transaction SE95), you can activate this option.
    Maximum Number of Programs:
    To avoid timeouts or unexpectedly long waiting times, the maximum number of program objects is preset to 50. If you want to examine more objects, you must increase the maximum number or run a SAMT scan (general program set processing). The latter also has the advantage that the data is stored persistently. Proceed as follows:
    - Call transaction SAMT
    - Create task with program RSUNISCAN_FINAL, subroutine SAMT_SEARCH
    For further information refer to documentation for transaction SAMT.
    Displaying Points that Cannot Be Analyzed Statically
    If you choose this option, you get an overview of the program points, where a static check for Unicode syntax errors is not possible. This can be the case if, for example, parameters or field symbols are not typed or you are accessing a field or structure with variable length/offset. At these points the system only tests at runtime whether the code is sufficient for the stricter Unicode tests. If possible, you should assign types to the variables used, otherwise you must check runtime behavior after the Unicode attribute has been set.
    To be able to differentiate between your own and foreign code (for example when using standard includes or generated includes), there is a selection option for the includes to be displayed. By default, the system excludes the standard includes of the view maintenance LSVIM* from the display, because they cause a large number of messages that are not relevant for the Unicode conversion. It is recommended that you also exclude the generated function group-specific includes of the view maintenance (usually L<function group name>F00 and L<function group name>I00) from the display.
    Similarly to the process in the extended syntax check, you can hide the warning using the pseudo comment ("#EC *).
    Applikation-Specific Checks
    These checks indicate program points that represent a public interface but are not Unicode-compatible. Under Unicode, the corresponding interfaces change according to the referenced documentation and must be adapted appropriately.
    View Maintenance
    Parts of the view maintenance generated in older releases are not Unicode-compatible. The relevant parts can be regenerated with a service report.
    UPLOAD/DOWNLOAD
    The function modules UPLOAD, DOWNLOAD or WS_UPLOAD and WS_DOWNLOAD are obsolete and cannot run under Unicode. Refer to the documentation for these modules to find out which routines serve as replacements.
    Regards
    Anji

  • Hi What are topics involved in Interfaces,Conversions in ABAP?

    Please Explain me.
    Thank u in advance

    Actually I am asking What are Interfaces?
    What are Conversions in the sense of ABAP?
    mean WE r using BDC for transferring from legacy to SAP, Does this a conversion technique?
    Edited by: Srinivasa RAo on Oct 8, 2009 10:15 PM

  • Exponential to Numeric Conversion in ABAP

    Hi,
    This is regrardng the conversion of Exponential to Numeric values in ABAP.I have an exponential Value 4.8E+47 .I want to convert to numerical .If i use the Exponential Function ,It is agian yielding another Exponent value.
    If the Power is more than 47,then there could be multiple steps and In all the case ,it is giving exponent values only.
    But I need the numeric value which later should rounded off to 3 decimals.
    Please guide me if there is any Function module or a way to resolve this issue.
    Regards,
    Kranti Yamparala.

    Hey Vikas,
    did you ever try the given FM there? First of all there is no FM called "QSS0_FLTP_TO_CHAR_CONVERSION" in every system, as you maybe take notice of the prefix. There are just these FMs called " CHAR_FLTP_CONVERSION" or "FLTP_CHAR_CONVERSION". Maybe you mean them. But, nevertheless these are not easy to use FM. Maybe you should try and read the other postings in advance.
    As I said in my post - and this is the fastest way - you just have to move. That's all. No FM, no Method no nothing ...
    Just:
    e_output = l_float = i_input.
    Yavuz

  • Script conversions to ABAP BADI's

    Hello,
    I am currently working on conversions of script logic files of BPC MS 7.0 into ABAP BADI's of BPC NW 7.5
    Few of the keywords that I do not understand are:
    GET, LOOKUP, FLD, XDIM_GETINPUTSET, FUNCTION
    Also when I create the BADI, filter definition is part of it, so what values will the filter have.
    Regards,
    Pankaj

    Hi Pankaj,
    Filter name is like a keyword and the badi's in bpc are called using the filter names.
    Please check the pdf for badi creation and can be easily found on sdn.
    I would advise you not to convert everything in Badi's as some things can be retained in script logic in NW version also.
    Creating BADI's can be quite complicated for tasks which could be written in few lines in script logic.
    Hope this helps .
    Regards,
    Sachin

  • XML to internal table conversion within ABAP mapping class

    I am doing a ABAP mapping for file to Idoc. My requirement is to convert XML file into ABAP internal table (within ABAP mapping class). Is there any standard FM, method, transformation etc, which can be used here.
    Thanks, Dehra

    Dehra,
    Have you seen this weblogs which talks about this:
    /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
    /people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    /people/r.eijpe/blog/2006/02/20/xml-dom-processing-in-abap-part-iiib150-xml-dom-within-sap-xi-abap-mapping
    Hope this helps you....
    ---Satish

  • Rows to Column Conversion in ABAP

    Hello guys,
    I wanted to create a report in which I need to convert rows in to column.
    e.g.
    I have a itab_col which contains my column header as follows.
    itab_col-plant        itab_col-name
    1000                     Plant A
    2000                     Plant B
    3000                     Plant C    
    I have a itab_data which contains my data as follows .
    itab_data-date    itab_data-qty       itab_data-plant
    01.06.2006           10                  1000
    01.06.2006           20                  1000
    01.06.2006           50                  2000
    02.06.2006           20                  3000
    I need to print the report as follows
      Date       Plant A      Plant B      Plant C
    01.06.2006     30           50           0
    02.06.2006     0            0            20
    Could you tell me how I can do it in abap.

    Hi,
    first create table with following attribute.
    table_row_to_column
    1. date
    2. Plant A
    3. Plant B
    4. Plant C.
    .............D E F ..number of plant possible.
    Sum Up The data
    01.06.2006 10 1000
    01.06.2006 20 1000
    01.06.2006 50 2000
    02.06.2006 20 3000
    01.06.2006 30 1000
    01.06.2006 50 2000
    02.06.2006 20 3000
    to new data_table_sum_value
    <b>for that u have to</b>
    1) Sort the table date & plant.
    2) sum up records for similar plant based on date
    <b>Convert rows in to column.</b>
    loop at data_table_sum_value.
      case data_table_sum_value-plant.
        when 1000.
           table_row_to_column-plant_A = data_table_sum_value-qnty.
        when 2000.
           table_row_to_column-plant_B = data_table_sum_value-qnty.
        when 3000.
           table_row_to_column-plant_C = data_table_sum_value-qnty.
        when 4000.
           table_row_to_column-plant_D = data_table_sum_value-qnty.
        when 5000.
           table_row_to_column-plant_E = data_table_sum_value-qnty.
      endcase.
       at end of date.
         append table_row_to_column.
       endat.
    endloop.
    <b>Please Mark Helpful Answers & Rewards Points.
    Dont Forget to mark as problem solved if solved</b>
    Regards

  • How to do codepage conversion in ABAP?

    I received a data in UNICODE in my ABAP program.
    I need to convert the data into Shift-JIS.
    How do I convert the data from Unicode to Shift-JIS in ABAP?
    Please help and I promise points.

    Hi,
    Check these links....
    http://help.sap.com/saphelp_nw70/helpdata/en/6e/880e405c538f5ce10000000a155106/content.htm
    http://publib.boulder.ibm.com/infocenter/printer/v1r1/index.jsp?topic=/com.ibm.printers.ipmaix/com.ibm.printers.ipmref/iprrjmst131.htm
    http://www.sap-press.de/katalog/buecher/inhaltsverzeichnis/gp/titelID-1454
    abapprogramming.blogspot.com/2007/10/communication-interface-3.html
    Reward points if useful.
    Cheers....

  • Conversion of ABAP Reports to BW

    Hi all,
    I am pretty much aware of the scenarios where in we build the infocubes based on the business requirements, thru the gap analysis (business content approach). I would really be thankful if somebody can provide me a good overview and the possible documents on the scenario, where the client has already ABAP reports in place and now they are moving into BW. I need to figure the best way and understand the best way to create those reports in BW.
    Could somebody who has already in this type of scenario, pls help me out.I would appreciate the good answers.Pls provide any useful docs to [email protected]
    Thanks a lot.

    Hi Pratibha
    I dont have any docs to share now. For docs, go to service.sap.com/bi and you would find many ASAP docs, How to docs etc
    For the programs, do this
    1. Go the se38. enter the name of the program. Click display.
    2. Go to the code. See the data declrations and search specifically for select statements. See which tables from which the select is run. These would typicall be the standard SAP tables (if theres a lot of custom configuration in client's R/3 system, then these tables could be Z or Y tables).
    3. If its a sales report,it would typicall pick data from VBAK, VBAP, VBRP, VBEP, etc. If its a FI report, it could typically pick up data from BSEG, BKPF, GLTO, GLPCA, etc...just examples!!
    4. And if you are comfortable in ABAP, simply add a breakpoint in any of the data declrations in the begiining of the code and press F8.
    Hope this helps.
    Prakash
    Assigning points is a way of saying thanks in SDN!

  • Conversion of ABAP struct to XML and XML back to ABAP structure in ECC

    We would like to convert many ABAP structure and internal tables into an XML string and later on convert these XML strings back to ABAP structures and internal tables. Can someone let us know if there are any function modules in ECC which can import the structures or internal tables and export the XML. Also if there are any function modules which can do the reverse i.e. import the XML string and convert it back to Structure or internal table.
    We found the some method called "Call transformation" but it gives an error such as version not active. CRM has FMs which do these functionalities.
    Any guidance would be appreciated.
    Thanks.

    If you look into the FM's BANK_API_PP_UT_DATA_TO_XML and BANK_API_PP_UT_XML_TO_DATA they again use CALL TRANSFORMATION, so probably u might have to figure how to eliminate the errors ur getting using CALL TRANSFORMATION.

  • Conversion of ABAP procedural ABAP OO in TRs, URs

    Hello:
    We are planning on migrating from NW04 to NW04s n Q3.
    We have a quite bit of ABAP routines in TRs, URs and User Exits.
    We have plans on using 04s Datasource features
    I have following questions:
    1. When Datasource is migrated to 04s, are we forced to migrate existing routines to ABAP OO ?
    2.Is there a tool that converts the existing routines to ABAP OO?
    3.If we are forced to migrate to ABAP OO, What happens to custom ABAP code used to extend extractors in the source system?
    Appreciate your responses
    Vijay

    Hi Vijay,
    from my limited experience with 04s and my not so limited experience with user exits I recommend the following way to handle the upgrade:
    1. Do the upgrade.
    2. Check out the new features and check where you need them. Normally you have a handful of Info-/DataSources where you want to use the new features and dozens of master data sources where you don't need to change the process.
    3. For those DataSources you want to change you should check out if you still want to keep the InfoSources. A transformation can directly connect the DataSource and the InfoProvider but if you load data into multiple InfoProviders you may want to keep the InfoSource.
    4. I wasn't able to check the tool to do the transformation but from my understanding it switches either a transfer rule or an update rule to a transformation and doesn't condense both rules and the InfoSource into a single transformation. (Andreas, is this true?) So you should use this on these UR/TR where you keep the InfoSource.
    5. If you want to skip the InfoSource create a new transformation for your new DS. Here you need to copy and adjust your coding to ABAP OO. But don't worry, it didn't change a lot and you don't need to think about classes and inheritance to do the implementation.
    Best regards
       Dirk

  • How to master data conversion in ABAP/4 programming

    I only know there is no special syntax to data conversion and put an "=" between destination data object and source object.
    But I don't know whether the conversion is legal or not.
    Who can help me?

    For conversions between structured fields or a structured field and a singlefield , flat structures were previously treated like C fileds, With the implementation of Unicode this approach has become too error prone, since it is not clear if programs can be executed with platform-independent semantics.
    aRs

  • Amount conversion in ABAP...

    Hello,
    I want the following kind of conversion.
    0000000000.53   ->  0.53
    0000000123.00   ->  123.00
    0000000001.23   ->  1.23
    0000000005400  ->   5400
    Please help.
    Regards,
    Rajesh.

    Is this what you are looking for.
    PROGRAM ztest.
    DATA:ts(100) TYPE c VALUE '0000000000.53'.
    SHIFT ts LEFT DELETING LEADING '0'.
    WRITE: ts.
    For values with no decimals you can use conversion exits as well. For others just use SHIFT statement.
    Amandeep

Maybe you are looking for

  • My ipod touch 3rd gen is zoomed in on all screens....how do i unzoom it?

    I was having trouble getting my ipod to charge and now it is zoomed in on all screens!! how do i UNzoom it? it just zoomed in all by it self when i went to try to charge it!!

  • I can't install extensions in CS 5.1

    I am trying to install the WebZap V1.0 extension but it is not working. This is what I have done so far: I downloaded the Extension Manager for CS5 patch and tried to install it. The patch does not intall and I get the response, "Update is not applic

  • Home Button Troubleshooting Question

    Hello Is there a way to see if the home button assembly (screen side), or the home button terminals (battery/case side) to see which is causing my home button not to work? I have one ordered to replace, but I just want to test it out to make sure I a

  • I just downloaded ios 6.1.2 and now my iphone 4 wont hook up to a charging device

    i just downloaded ios 6.1.2 and now my iphone 4 wont accept a charging device there is no error message, there is no little lightening bolt in the battery icon to show its charging, i have tried several cords and several wall outlets and hard reboote

  • Call DLL function with pointer to simple struct

    Hello, I try to call a function using CLFN. My problem is the parameters of the function I try to access. Here is the function and his parameter: typedef struct { int major; int minor; int revision; int build; } VersionNumberType; int Comm_BTE_softVe