Doubt in ABAP Data types

Hi friends,
I want a clear idea of what is the diference between data type 'f' and 'p' with examples and in what situation which should be used.
Similary what and where is 'x' and 'xstring' is used .. In what situations we 'll handly BYTE data ?????
Iam not at all clear ... so eagerly waiting for ur responses with sample examples and clear explanations
thanks in advance
Cheers,
R.Kripa.

Hi Kripa,
Types X and XSTRING are for binary data. For type X, the length of the data is specified at declaration, whereas for XSTRING, it can arbitrarily grow as for STRING.
X      binary octets                 RAW       base64 string 
Type X is used for binary octets. The length of the octets sequence must be specified at declaration. The initial value of each octet is 0.
The lexical representation of binary octets is a sequence of characters in the MIME base64 format.
There are two possible representations of data of type X, namely base64 and hex. base64 is a preferred binary coding scheme in the Internet community. There are standard libraries for encoding and decoding. base64 uses about 33% less space over hex coding. Although ABAP MOVE uses hex coding for binary to character conversion, base64 will be used to represent data of this type in XML.
Note that the sequence of octets is transformed by the base64 encoding. The result, interpreted as a sequence of US-ASCII characters, appears as a sequence of Unicode characters in the content of that element.
Dictionary type RAW corresponds to this type.
XSTRING variable length binary octets RAWSTRING base64 string 
Type XSTRING is used for a variable length binary octets. The initial value is ''. The length can vary as the string grows.
The lexical representation of this type is the same as Type X.
This type corresponds to the binary type.
Dictionary type RAWSTRING corresponds to this type.
Regards,
Raj

Similar Messages

  • ABAP Data type to XI data type mapping

    Hi,
    I am creating a message type in XI corresponding to a ABAP structure. There are couple of data types on the ABAP side (for example: RAW, QUAN, CURR CUKY, UNIT, NUMC etc) which i have no idea on what it should be mapped to on the XI side(xsd:string, xsd:token, xsd:int etc).
    Is there is any document on mapping from ABAP data type to XML data type ? if yes please send it across.([email protected])
    if no doc available, if some body could let me know what these ABAP data type would map on the XI side it would great.
    Best Regards,
    Kiran

    Hi Kiran,
    just some more background information to the data types CURR, CUKY, QUAN, UNIT:
    1) Each field of data type CURR must be assigned to a field of data type CUKY (the financial amount must be assigned to a currency) and each field of data type QUAN must be assigned to a field of data type UNIT (each quantity must have a dimension). If you want to know this assignment for your specific ABAP structure, you can find it using transaction SE11 with your ABAP structure and go to the tab <i>Currency/Quantity fields</i>. Here you find the information under <i>Reference table</i> and <i>Ref. field</i>.
    2) The default number of decimals for a field of data type CURR is 2, but this can be overwritten by the assigned CUKY field. You can check the actual number of decimals for a specific currency with transaction OY04. Here are all currency list that do <b>not</b> have 2 decimals.
    3) The default number of decimals for a field of data type QUAN is 3, but this can be overwritten by the assigned UNIT field. You can check the actual number of decimals for a specific unit with transaction CUNI. Click on <i>Units of measurement</i> (pick the correct dimension first), double click on your unit and you find the info in the field <i>Decimal places</i>.
    4) Depending on the data you receive your conversions can get quite tricky. Lets take as an example a field of type CURR. If you find the value 1000 in there, this would convert to 10.00 USD if the assigned CUKY field contains the value USD (US dollar). But the same value ca represent 1000 JPY (Japanese Yen) if the assigned CUKY field contains the value JPY. What i try to say is that the value in the field of type CURR alone does not give you the actual amount, you have to know the value of the CUKY field as well. Similar for QUAN and UNIT.
    Regards,
    Claus

  • File Adapter NFS: Doubt with th Data Type corresponding to the XML

    Hi All!!
    On my scenario, a file is caught from the server and its information is passed to a proxy.
    My doubt is how must be the XML format and the Data Type to the data be correctly retrieved?
    The XML I have designed is the next:
    Is correct? If yes, How must be defined its Data Type?
    Thanks and regards,
    Manuel Míguez.

    Hi!
    I will try to elaborate my question.
    I have the next XML Data on the Server:
    <?xml version='1.0' encoding='UTF-8'?>
    <DT_File_Req>
    <NumeroDocumento>2/0211/M015010010N</NumeroDocumento>
    <Tipo>ZEP</Tipo>
    <Version>000</Version>
    <Parcial>00</Parcial>
    <Descripciones>
    <Item>
    <Idioma>ES</Idioma>
    <DescripcionCorta>Prueba descripcion corta</DescripcionCorta>
    <DescripcionLarga>Prueba descripcion larga swfiwjeflijwelifjlwejlkfdsjfelsdjflkjdslkfjsjdoifjposdjfojsdkjfslkdjfwehjfjdslfkjsdlfhswfsdfl</DescripcionLarga>
    </Item>
    <Item>
    <Idioma>FR</Idioma>
    <DescripcionCorta>Prueba descripcion corta en frances</DescripcionCorta>
    <DescripcionLarga>Prueba descripcion larga en frances ejlkfdsjfelsdjflkjdslkfjsjdoifjposdjfojsdkjfslkdjfwehjfjdslfkjsdlfhswfsdfl</DescripcionLarga>
    </Item>
    </Descripciones>
    <Caracteristicas>
    <Item>
    <Nombre>Fecha Inicio Plano</Nombre>
    <Valor>12032008</Valor>
    </Item>
    <Item>
    <Nombre>Fecha Fin Plano</Nombre>
    <Valor>20032008</Valor>
    </Item>
    </Caracteristicas>
    </DT_File_Req>
    This XML is polled by XI.
    I have created the next Data Dype corresponding with structure of the XML (I hope will be understable):
    DT_File_Req
    Numero Documento STRING
    Tipo STRING
    Parcial STRING
    Descripciones
    Item 1..n
    Idioma STRING
    DescripcionCorta STRING
    DescripcionLarga STRING
    Caracteristicas
    Item 1..n
    Nombre STRING
    Valor STRING
    My question is if this XML structure and this Data Type are compatible. I get on SXMB_MONI an error on the Mapping and I guess that the error is produced because the XML Format is not correct.
    Thanks and regards,
    Manuel.

  • Data types in ABAP

    what is the significance of initial field and valid field in data type like float,numeric,int etc.

    hi,
    With data types p, n, c, and X you can enter a length in parentheses after the type name. If no length
    is entered, the default length for this data type is used.
    With data type P you can use the DECIMALS addition to determine the number of decimal places that
    should be used (up to a maximum of 14). If this addition is missing, the number of decimal places is
    set to zero.
    If you do not specify a type, then the field is automatically type C.
    All other literals (character, numbers with decimal places, floating point numbers) are stored as text
    literals with data type C. If a literal is assigned to a variable that does not have type C, then a type
    conversion is carried out.
    The length specification after the type name for ABAP data types C, N, and X specifies the number of
    characters in the type. For type P fields, you can also set the number of decimal places. If you omit
    these specifications, the system uses the default values
    Hope this helps, Do reward.
    Edited by: Runal Singh on Feb 11, 2008 12:18 PM

  • What are the corresponding Data Types of some MDM Data Types

    Hi Guys,
    The MDM ABAP API involves creation of a DDIC structure in SRM. This structure should have the same fields with the MDM table fields. We would like to ask the corresponding ABAP Data Types for the following MDM Data Types.
         MDM                                                         SRM
    1.  Look up (flat)
    2.  Look up (taxonomy)
    3.  Look up (heirarchy)
    4.  Look up (qualified flat look up)
    Any significant inputs on this?
    Thanks and regards,
    RE

    Hi,
    Refer the below link. This is from the MDM Reference guide and contains the sample source code as well for almost all the things like creating repository, creating tables and fields etc. It would be helpful to you.
    http://help.sap.com/saphelp_mdm550/helpdata/en/47/5fd3f7cbd75518e10000000a421138/frameset.htm
    Regards,
    Jitesh Talreja

  • DS 4.2 get ECC CDHDR deltas in ABAP data flow using last run log table

    I have a DS 4.2 batch job where I'm trying to get ECC CDHDR deltas inside an ABAP data flow.  My SQL Server log table has an ECC CDHDR last_run_date_time (e.g. '6/6/2014 10:10:00') where I select it at the start of the DS 4.2 batch job run and then update it to the last run date/time at the end of the DS 4.2 batch job run.
    The problem is that CDHDR has the date (UDATE) and time (UTIME) in separate fields and inside an ABAP data flow there are limited DS functions.  For example, outside of the ABAP data flow I could use the DS function concat_date_time for UDATE and UTIME so that I could have a where clause of 'concat
    _date_time(UDATE, UTIME) > last_run_date_time and concat_date_time(UDATE, UTIME) <= current_run_date_time'.  However, inside the ABAP data flow the DS function concat_date_time is not available.  Is there some way to concatenate UDATE + UTIME inside an ABAP data flow?
    Any help is appreciated.
    Thanks,
    Brad

    Michael,
    I'm trying to concatenate date and time and here's my ABAP data flow where clause:
    CDHDR.OBJECTCLAS in ('DEBI', 'KRED', 'MATERIAL')
    and ((CDHDR.UDATE || ' ' || CDHDR.UTIME) > $CDHDR_Last_Run_Date_Time)
    and ((CDHDR.UDATE || ' ' || CDHDR.UTIME) <= $Run_Date_Time)
    Here are DS print statements showing my global variable values:
    $Run_Date_Time is 2014.06.09 14:14:35
    $CDHDR_Last_Run_Date_Time is 1900.01.01 00:00:01
    The issue is I just created a CDHDR record with a UDATE of '06/09/2014' and UTIME of '10:48:27' and it's not being pulled in the ABAP data flow.  Here's selected contents of the generated ABAP file (*.aba):
    PARAMETER $PARAM1 TYPE D.
    PARAMETER $PARAM2 TYPE D.
    concatenate CDHDR-UDATE ' ' into ALTMP1.
    concatenate ALTMP1 CDHDR-UTIME into ALTMP2.
    concatenate CDHDR-UDATE ' ' into ALTMP3.
    concatenate ALTMP3 CDHDR-UTIME into ALTMP4.
    IF ( ( ALTMP4 <= $PARAM2 )
    AND ( ALTMP2 > $PARAM1 ) ).
    So $PARAM1 corresponds to $CDHDR_Last_Run_Date_Time ('1900.01.01 00:00:01') and $PARAM2 corresponds to $Run_Date_Time ('2014.06.09 14:14:35').  But from my understanding ABAP data type D is for date only (YYYYMMDD) and doesn't include time, so is my time somehow being defaulted to '00:00:00' when it gets to DS?  I ask this as a CDHDR record I created on 6/6 wasn't pulled during my 6/6 testing but this 6/6 CDHDR record was pulled today.
    I can get  last_run_date_time and current_run_date_time into separate date and time fields but I'm not sure how to build the where clause using separate date and time fields.  Do you have any recommendations or is there a better way for me to pull CDHDR deltas in an ABAP data flow using something different than a last run log table?
    Thanks,
    Brad

  • Invalid data type conversions

    what are the invalid data type conversions in ABAP ???
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Mar 10, 2012 6:01 PM

    No Amanda,
    The values that I see in message monitor are also those that comes to XSLT programs as input.
    I investigated our problem a little further myself:
    1) XI always converts messages into XML format - this everybody knows.
    2) In XI documentation it is declared that XI uses ISO 8601 for DATE type formatting. That's why you see dates in format YYYY-MM-DD in XML data in message monitoring.
    3) The appearance of those decimal values are not that obvious for me. If XI uses ABAP transformation for message content then applies the rules for converting ABAP data types into XML. For this there is a SAP document 'ABAP - XML mapping' from TechEd2004. This document seems to describe how ABAP data types are handled by XML transformation.
    Anyway, we currently need to play with decimal values in XSLT mapping programs inside XI:
    a) add leading 0 integer if source value < 1
    RFC returns 0.123 -> XI converts to XML '.123' -> XSLT mapper should return '0.123' ->SOAP response returns '0.123'
    b) add decimal point and trailing zeros
    RFC returns 0.000 -> XI converts to XML '0' -> XSLT mapper should return '0.000' ->SOAP response return '0.000'
    With dates, the problem is actually on documenting mapping rules when writing interface specifications. If you would write an EAI-solution-independent conversion rule (RFC/date->SOAP/char) for date field it could sound like: YYYYMMDD -> dd.mm.yyyy. This works semantically between these systems but would not work for XI-developer, because he get YYYY-MM-DD from the RFC.
    Additionally the decimal type conversion requirements in XSLT mapping programs probably only applies XI and are therefore not reusable in other EAI environments.
    I would be glad if somebody would still have further comments for this data type conversion issue.
    br: Kimmo

  • Difference Between Data type and message type

    Hi,
        i have doubt on data type and message type.why we are mapping the message type why not data type?wht is the difference between data type and message type?

    Hi Narayanana,
    Data type defines the structure of your xml message.Message type is the wrapper of data type.You will be using your message type while mapping and not the data type.Its the abstraction concept used in oops
    kanan thiyam  
    Posts: 28
    Questions: 7
    Registered: 1/8/07
    Forum points: 24 
       Re: What is deffernce b/w Data type and message type  
    Posted: Jun 13, 2007 8:05 AM    in response to: suresh k         Reply      E-mail this post 
    Hi Suresh,
    Data Type defines the structure of the message and it will be wrapped under Message Type.
    Hope the details below will clearify your doubts.
    A data type in a programming language is a set of data with values having predefined characteristics. Examples of data types are: integer, floating point unit number, character, string, and pointer.
    The characteristic of columns and variables that defines what types of data values they can store.
    Check out the details:
    http://en.wikipedia.org/wiki/Data_type
    A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type:
    Details:
    http://help.sap.com/saphelp_nw04/helpdata/en/2d/c0633c3a892251e10000000a114084/content.htm
    kanan

  • Decimal data type

    Hi,
    I know this is a very silly thing to ask.
    But i got a doubt regarding the data types.
    look at this:
    <b>tables: zap.</b> " this is a custom table
    in this custom table "zap" the field "price" is defined like this:
    <b>field</b>| <b>field type</b>| <b>data type</b>| <b>length</b>| <b>dec. point</b>|
    price| zap_price| dec       | 11    | 6
    now in the program there is a field declared like this:
    <b>data: zap like zap-price.</b>
    now my doubt is:
    for the field <b>zap-price</b> is the value can be like this?
    a)     46578.654876
    or
    b)     4687.645478
    which one is correct.
    Please let me know.
    thnx for the help.,

    Hi,
    You a) point is right & so is point b).
    Your definition means..
    the total length of the field is 11,out of which a max of 6 places for decimals & ofcourse 1 will be assigned to the sign(- or +).
    Message was edited by: Phani Kiran Nudurupati

  • How to define MDM real data type in ABAP ?

    Hi,
    I want to fetch MDM Repository data using MDM API .
    I am strugling as one field in MDM is of real type .
    Please tell me how I could define Real data type field in ABAP ?
    Thanks.
    Sandesh

    I recently had a Real type added to a repository I'm working on and noticed a dump in the API itself when trying to fetch data from that field. I'm running 5.5 so you may be experiencing a different issue. I haven't resolved the issue yet as it isn't a priority but I will most likely move to a string field and just ensure that the field has its decimal rule respected logically.

  • Pack  and Floating Point Data Type in ABAP

    Dear All,
    I am new to ABAP. Started with data types. Came across pack and floating point.
    Please let me know what PACK  and Floating Point stands for with few examples and the main difference between them.
    Regards
    Arun V

    Hi,
    You'd better ask this question in ABAP forum http://forums.sdn.sap.com/forum.jspa?forumID=50 .
    Best Regards,
    Ada

  • Cannot Activate data type in ABAP Database Inconsistent

    Hi,
    can you please help me on this? We could not activate the data type abap proxy in SPROXY.
    Here is the error:
    Database inconsistent: TABL XYZ not found.
    The object is inactive. Is there a way to delete the object in the backend?
    Or do you know other way to solve this?

    I already recreated the object in ESR, but we are still getting the error in SPROXY whether you regenerate, delete or activate proxy. If I checked the proxy name, it is in a form of a structure and is  activated but the data type in SPROXY is still in inactive mode.
    I could not remember how this error came up but it seems dependent objects for the data type are not generated properly that's why the error is TABL object is not found.
    Do you have other way on how to delete the inactive proxy in ABAP?

  • DATA TYPE IN ABAP CORRESPONDING TO TYPE REAL IN MDM

    Hi all,
    I am working on a code to fetch data from MDM, using the  *MDM ABAP APIs*_._ I could retrieve almost all the Fields except for one, which has data type REAL in MDM. I need to find the type in ABAP, corresponding to the type REAL in MDM. I need to define this field in the structure but I am not sure as to which data type to put against it. I have already tried float, decimal, string, char... nothing works!!
    Kindly let me know if anybody has come across the same issue and resolved it.
    Thanks and regards,
    Aastha

    Hello,
    We're getting the same problem too.
    Have you deleted your Real fields and u've created them as a measurement field?
    Is it really necessary to create the fields with type 'measurement'?
    Or do you maintain in MDM your field with type Real and you treat it as type 'mesurement' into your ABAP API with measure 'none', while in SAP ECC it's created as a numeric with decimals.
    Thanks for your feedback!
    Carlos Santamaría.

  • Proper Data type for transferring XML from ABAP to XI

    Dear Colleagues,
    I have a question on how to wrap XML data, that itself contains an encoding
    declaration, so that it will be properly transferred to XI.
    XML Generation: "always use X"
    I have searched a lot on SDN and other resources but could not find
    information, describing how a web service should wrap unicode-data when
    making it available to XI. The XML processing group emphasizes that all generation of XML should be done using X-bases (HEX) datatypes in ABAP and preferably using UTF-8 as ancoding. This by itself is not a problem.
    But transferring UTF-8-XML - through which interface?
    When a webservice provides an XML Stream and wants to transfer it to XI then there is a bit of a paradox situation, because it has to choose between using an X-based or Character-based type for its interface
    -> as Binary data?
    - when using X-based data types in the interface, I have control of the character encoding, but I expect that the XML-information will probably be wrapped in base64 encoding and then the XI will receive a base64 encoded
    XML-block instead of "plain" XML.
    I did not find any reference information on how the soap interface of XI and the WAS behave when transferring X-based data, however.
    -> as Character data?
    - on the other hand when using Character-based data types (e.g. String), I have no control of the codepage being used. I have then only the choice to generate the default encoding of the application server. Maybe this encoding
    will be transformed later to a different encoding, but usually during this process the header, which declares the encoding in use will not be adapted as well.
    So if I have a unicode machine, it will generate UTF-16 - based XML. I have no other choice, if I use a character-based type for output. And this will also be stated in the header of the XML stream. If the XML stream
    leaves the system it will probably be transformed to UTF-8, but the XML-header will still state the content to be UTF-16, because the header will probably not be auto-converted together while adapting the Character
    encoding.
    Because of these issues I am quite insecure, on how to generate and wrap UTF-8 - based XML, so that I can properly hand it over to XI, ensuring that
    it stays UTF-8 and that XI can really unwrap it automatically.
    Does anyone have a tip in which type to wrap XML-based data on the ABAP stack so it will be usable in XI?
    Thank you very much for your attention and time.
    Yours
    Christian Steinert

    Something like this should work (with a little tweek I imagine)
    This would be in the 'Command on Target':
    OdiFtpGet "-HOST=<%=odiRef.getInfo("SRC_DSERV_NAME")%>" "-USER= '<%=odiRef.getInfo("SRC_USER_NAME")%>'" "-PASSWORD= <%=odiRef.getInfo("SRC_PASS")%>" "-REMOTE_DIR=<%=odiRef.getInfo("SRC_SCHEMA")%>" "-REMOTE_FILE=<%=odiRef.getTable("L", "COLL_NAME", "W")%>" "-PASSIVE_MODE=YES"
    Set the Technology of the 'Command on Source' as File, and the technology of the 'Command on Target' as ODI Tools
    Edited by: Bos on Jun 30, 2011 11:53 AM

  • JCO reading abap RAW data type (truncating?)

    Does anyone have experience reading an Abap RAW data type using JCO?  I am trying to read a GUID (via RFC_READ_TABLE) that is defined as RAW length 16.  When I view this field in SAP GUI, I see 32 characters.  However, when I read this field using JCO, I only see the first 16 characters. 
    The mapping documents state Abap RAW maps to a Java byte array.  I have tried that - no luck.  I have used the constructor of a string that takes a byte array - no luck.  I have made sure my character set is UTF-8 in case Unicode was a possibility.  I have turned on tracing to level 8 and only see 16 characters in the output.  I need the other 16 characters as all 32 characters are used as the primary key into other tables.
    I also posted this on the ABAP Java Development space.  I know the rule about not cross-posting, but I wasn't sure which was a better place to post something like this.  This my first post on here, so my apologies in advance.
    Larry

    Thanks for responding.  Unfortunately, the export parameter list is null. There are no export parameters.  However, there are tables.  I have tried:
    byte[] byteArray = funct.getTableParameterList().getTable("DATA").getByteArray(0);
    My SE16 query only returns one field: GUID.
    I only get 16 bytes back even though GUID is defined as raw length 32.
    Is there something I else I should try?  Do you see an error in my code?
    Thanks again,
    Larry

Maybe you are looking for

  • Windows 8.1 and Server 2012 R2 has 0 Settings available

    I've updated SCM with the 8.1/2012 R2 automatic updates. However, when trying to add an 8.1 or 2012 R2 setting, SCM says there are 0 settings available: The particular setting I'm looking to add to my custom pack is User Configuration\Administrative

  • Why Extended Classic Scenario

    Hello I understand the difference between Extended Classic and Classic Scenario with the follow on document creation. But, I need to understand the business benifits of implementing Extended Classic Scenario as opposed to Classic Scenario in SRM. In

  • Printing some text on A4 size paper

    Hi friends, I am trying to print a simple text on my printer using java, I have included the code for printing in an action event of a button as follows: private void sim_printActionPerformed(java.awt.event.ActionEvent evt) { PrintJob pjob = getToolk

  • Stop timeline exactly where it is

    I need help with stopping the timeline and audio exactly where it is when my pause button is pressed. The pause changes to a play button which on release I want to pick up from exactly where it is on the timeline and in the audio. Can this be done??

  • No signal after downloading iOs 6

    My phone is At&ti Phone 3gs, which was unclocked for worldwide SIM. After downloading iOS 6 I had promblem wiht activation, and I had to downgrede modem for 5.13.04-6.4_M3S2 version. Than phone is activated, but I had another problem - "No signal". W