Create data type string

HI
There is a way to create date type string using the command
Create data type "string"...
I know that I can create data type C but string dont have any restrication so how I can hanlde it ?
Regards
Joy

Hi,
You can use the create data statement:
DATA: lo_data TYPE REF TO data.
FIELD-SYMBOLS: <str> TYPE ANY.
CREATE DATA lo_data TYPE string.
ASSIGN lo_data->* TO <str>.
Here <str> will be of type string.
Kr,
m.

Similar Messages

  • Performance issue while using data type 'STRING'.

    Hello All,
    I have created a table for storing values of different features coming under a particular country. Since the last field 'Value field' have to hold text upto 800characters for some features, i have used the data type 'String' with character length specified as 1000. I am able to store values upto 1000characters using this. Also, the table has to hold lots and lots of value, and it will increase in future also.
    Since i have mentioned the data type as 'String', I have one doubt whether this will affect the performance. Because length of most of the values in my value field is less than 75characters and in some case only it will exceed 700characters. So, my question is whether the 'String' data type will allocate the length which am specifying in the table for each entries, though the values entering is less than the specified length.
    For example, if the value of my value field is 'Very High Complexity' which is of length 20characters, will the space allocation be reduced to 20 or will it be still 1000characters?
    Hope someone can clarify my doubt.
    Thanks In Advance,
    Shino
    Moved to appropriate forum
    Edited by: Rob Burbank on Feb 23, 2009 4:27 PM

    Hi Shino,
    Well it is possible to store using STRING or LCHR in the transparent tables. There are some underlyning facts here:-
    1. You can only have one such field per table
    2. You cannot view them in the se11 / se16 table content browser
    3. You will need to maintain an additional field for storing the length of the STRING or LCHR field.
    Regarding the performance:
    even though ABAP allows storing STRING or LCHR type fields in the transparent tables but as soon as the lenght of the field crosses 255 chars it is not advisable to store it directly in the transperant tables.
    You should store that field in the knowledge repository and only a pointer to the knowledge repository in the transperant table field.
    Anyways, Since you have only one field with such a requirement then i would suggest you use STRING instead of LCHR as in LCHR you will have to mandatorily assign a length (like 1000) so even if you are storing only 20 chars or 300 chars the system will reserve a slot of 1000 chars; this is not with string as in case of string everything would be dynamic.
    The result being that the reading time increases in case of LCHR.
    I Hop this answered your question.
    Regards,
    Sagar.

  • Import  XSD to create Data type in Design

    hi,
      I know that we can import XSD in Design and create data type,my question is:
    1.  Can i import an XSD thats been created in message mapping and use that to create my data type in design.
    (or)
    2.Should i have to write an XSD on my own and then import it to create my data type, and is there any standard format to write it.

    Hello Prashanth,
    For your first question: i don't know exactly what you mean that the the xsd you create in the data mapping steps. So can you explain it in details?
    For your 2nd question:  Sure you can write your own XSD to create a data type. And i will give you an example xsd file format. Then you can import it in the XSD tab view.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/hansteel" targetNamespace="http://sap.com/xi/XI/hansteel">
         <xsd:complexType name="CustomerInfo">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   a6c26c80000f11dac45e00096b1669b3
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="ID">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             dfe699c0e7bc11d9c736d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="10" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="NAME">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             dfe82060e7bc11d9b2efd51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="35" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="CUSTTYPE">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             dfe82061e7bc11d9c193d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="4" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="POSTCODE">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             e93039a0e7bc11d9c7c6d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="10" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="CITY">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             f0122850e7bc11d99189d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="35" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>
    Hope this will be helpful.
    Eric Ma

  • Validation while create data type

    HI All ,
    I have a pop-up in my report that user can create data type in  didc,
    There is a simple way to support validation for data types ,
    I have pop-up where the user need  to provide name of attribute
    he need to create and the data type for it (char ,string ,int etc )
    and he also need to provide the leng of the attribute he want to create
    (e.g. char10 ) and also decimal places .
    the issue here that i need to do some validation in the pop-up
    for e.g. if user choose
    case 1
    name     - attribute1
    datatype  - string
    leng   - in this case he dont need to provide leng (string )
    dec - dont need to provide (string )
    case 2
    name     - attribute1
    datatype  - char 
    leng   - 10
    dec - dont need to provide (char )
    Any idea how to do this validation in a simple way  (maybe to use standard functionlity)
    Regards
    Alex

    HI Keshav.
    What i did is created a popup with FM in the popup i have 4 field
    the field with the data type which i want to trigger event to it is domain and not ref to FM
    The ppoup have 4 field
    attr name
    datatype
    length
    decimal
    so from what you are say there is not option to trigger event when the user press F4
    and choose a entry from it ,
    since what i want to do is that if user for instance chose string i want that the next to fields (length and dec ) will be
    remove from the popup since he dont need them .
    and for he choose char the the decimal field will remove from the popup
    Any idea how to solve this issue ?
    Regards
    Alex
    Edited by: Alex Dean on Oct 12, 2010 3:02 PM

  • Create Data Type from XSD

    Hey guys
    i need to create Data Type from and XSD,in the beginning i had an XML document which i converted to XSD using Altova ,then i imported this XSD in IR under External definition,now how should i go ahead with creating Data Type?
    my sample XSD is something like this
    <?xml version="1.0" encoding="UTF-8"?>
    <!W3C Schema generated by XMLSpy v2007 sp2 (http://www.altova.com)>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <xs:element name="WorkOrderNumber">
              <xs:simpleType>
                   <xs:restriction base="xs:short">
                        <xs:enumeration value="10942"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="VendorNumber">
              <xs:simpleType>
                   <xs:restriction base="xs:int">
                        <xs:enumeration value="109845"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
    Its not the complete XSD,just the first few lines.
    thanx
    Ahmad

    Hey Prabhu
    my XSD looks like this
    <?xml version="1.0" encoding="UTF-8"?>
    <!W3C Schema generated by XMLSpy v2007 sp2 (http://www.altova.com)>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <xs:element name="WorkOrderNumber">
              <xs:simpleType>
                   <xs:restriction base="xs:short">
                        <xs:enumeration value="10942"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="VendorNumber">
              <xs:simpleType>
                   <xs:restriction base="xs:int">
                        <xs:enumeration value="109845"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="UnitPrice">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="MonetaryAmount"/>
                        <xs:element ref="UnitOfMeasureCode"/>
                        <xs:element ref="CurrencyCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="UnitOfMeasureCode">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="EA"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="TotalLineItems">
              <xs:simpleType>
                   <xs:restriction base="xs:byte">
                        <xs:enumeration value="6"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="TaxTypeCode">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="GoodsAndServicesTax"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="TaxReference">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="GST"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="TaxAmount">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="MonetaryAmount"/>
                        <xs:element ref="CurrencyCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Tax">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="TaxTypeCode"/>
                        <xs:element ref="TaxAmount"/>
                        <xs:element ref="TaxReference"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Requisition">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="Number"/>
                        <xs:element ref="LineItemNumber"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Quantity">
              <xs:simpleType>
                   <xs:restriction base="xs:decimal">
                        <xs:enumeration value="1.0"/>
                        <xs:enumeration value="2.0"/>
                        <xs:enumeration value="6.0"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="PrimaryCurrency">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="CurrencyCode"/>
                        <xs:element ref="ExchangeRate"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Pricing">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="UnitPrice"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="PaymentTerms">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="NT30"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="Number">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="Q173849"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="MonetaryAmount">
              <xs:simpleType>
                   <xs:restriction base="xs:decimal">
                        <xs:enumeration value="1.98"/>
                        <xs:enumeration value="12.48"/>
                        <xs:enumeration value="12.63"/>
                        <xs:enumeration value="16.75"/>
                        <xs:enumeration value="24.96"/>
                        <xs:enumeration value="240.0"/>
                        <xs:enumeration value="33.84"/>
                        <xs:enumeration value="43.83"/>
                        <xs:enumeration value="5.64"/>
                        <xs:enumeration value="74.81"/>
                        <xs:enumeration value="87.66"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="LineItemTotal">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="MonetaryAmount"/>
                        <xs:element ref="CurrencyCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="LineItemNumber">
              <xs:simpleType>
                   <xs:restriction base="xs:byte">
                        <xs:enumeration value="10"/>
                        <xs:enumeration value="20"/>
                        <xs:enumeration value="30"/>
                        <xs:enumeration value="40"/>
                        <xs:enumeration value="50"/>
                        <xs:enumeration value="60"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="LineItemMaterialNumber">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="108739"/>
                        <xs:enumeration value="192740-A"/>
                        <xs:enumeration value="380495"/>
                        <xs:enumeration value="43998"/>
                        <xs:enumeration value="54727S"/>
                        <xs:enumeration value="5746"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="LineItemInformation">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="LineItemMaterialNumber"/>
                        <xs:element ref="LineItemDescription"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="LineItemDescription">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="ABSRBT PAD 17 IN X 19 IN X 3/8 IN UNIV P"/>
                        <xs:enumeration value="BSHG HEX 1 IN X 1/2 IN THD FS A105N"/>
                        <xs:enumeration value="GGE 4 IN 1M / 7000 DL SCALE 1/2 IN LM WI"/>
                        <xs:enumeration value="PEN REC RD MED GRAPHIC 39-202"/>
                        <xs:enumeration value="PL ORF 3 IN .5 IN ORF SER 500 316 SS"/>
                        <xs:enumeration value="WPR F-200 FLC NOV LABEL 20"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="Invoices">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="Invoice"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="InvoiceTypeCode">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="ProductOrService"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="InvoiceTotal">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="MonetaryAmount"/>
                        <xs:element ref="CurrencyCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="InvoiceSummary">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="TotalLineItems"/>
                        <xs:element ref="InvoiceTotal"/>
                        <xs:element ref="Tax"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="InvoiceQuantity">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="Quantity"/>
                        <xs:element ref="UnitOfMeasureCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="InvoiceProperties">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="InvoiceNumber"/>
                        <xs:element ref="InvoiceDate"/>
                        <xs:element ref="VendorNumber"/>
                        <xs:element ref="InvoiceTypeCode"/>
                        <xs:element ref="PrimaryCurrency"/>
                        <xs:element ref="PaymentTerms"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="InvoiceNumber">
              <xs:simpleType>
                   <xs:restriction base="xs:int">
                        <xs:enumeration value="98815236"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="InvoiceLineItem">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="WorkOrderNumber"/>
                        <xs:element ref="LineItemNumber"/>
                        <xs:element ref="InvoiceQuantity"/>
                        <xs:element ref="LineItemInformation"/>
                        <xs:element ref="Pricing"/>
                        <xs:element ref="LineItemTotal"/>
                        <xs:element ref="Requisition"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="InvoiceDetails">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="InvoiceLineItem" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="InvoiceDate">
              <xs:simpleType>
                   <xs:restriction base="xs:date">
                        <xs:enumeration value="2007-01-25"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="Invoice">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="InvoiceProperties"/>
                        <xs:element ref="InvoiceDetails"/>
                        <xs:element ref="InvoiceSummary"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ExchangeRate">
              <xs:complexType/>
         </xs:element>
         <xs:element name="CurrencyCode">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="CAD"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
    </xs:schema>
    can you please tell me how to nest the structures,i m fairly new to XSD and stuffs
    thanx
    ahmad

  • Why need message type when u create data type...

    why need message type when u create data type...

    Hi,
    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:
    ·        More than one message interface can use the same message type. For example, an asynchronous outbound message interface and an asynchronous inbound message interface can reference the same message type because the request message does not need to be mapped.
    ·        When defining a message mapping you can directly reference message types to map messages from an outbound interface to messages from a receiver interface.
    For technical reasons, a data type is not sufficient to describe the instance of a message. In XML schema, data types are defined as abstract types that are not yet fixed to an element. You can only describe an instance of a message when you have specified a data type as an element type. Therefore, a message type defines the root element of a message.
    A message type does not define the direction of the message exchange, in other words, whether it is a request or a response. In exceptional cases you can use the same message type for both the request and the response message.
    A message type has the following characteristics:
    ·        It comprises exactly one data type, which determines the content of the message to be transferred.
    ·        It is identified by a name and an XML namespace. The name (together with the namespace) of a message type is located in the uppermost tag of the message to be exchanged. This is an element tag.
    You have defined a message type GreetingRes that references a simple data type of type xsd:string. The XML namespace of the message type is http://sap.com/xi/myExample. The corresponding payload might look like this:
    <?xml version="1.0" encoding="utf-8" ?>
    <ns1:GreetingRes xmlns:ns1="http://sap.com/xi/myExample"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       Hello Mrs. Miller
    </ns1:GreetingRes>
    You can specify how a message type is used in more detail in the description
    hope this will help you.
    regards
    Aashish Sinha
    PS : reward points if helpful

  • Data type STRING

    Hi all,
    i have creted a ztable and in that for one field the length is to be more than 300  chars.
    so i am using the data type directly as STRING. i tried to check the table but i am getting warning as 'data type string  not allowed in DB tables'.
    plz help what to do.
    regards,
    siri.

    Hi,
        Here is the sample code to store the xml file into ABAP DB table.
    First create a table called YTEST_BIN with following fileds.
    Filed Nmae      Data Elemen     type      
    MANDT             MANDT              CLNT       
    DESCRIPTION     HTTPBODY     RAWSTRING
    Now create a program to read the XML file from your desktop and load it into the table.
    Below given is the code for loading the table.
    REPORT  y_store_xml.
    DATA: wf_filetab TYPE filetable .
    DATA: wf_filerc TYPE i ,
          wf_filename TYPE string ,
          wf_path TYPE string ,
          wf_full_path TYPE string ,
          wf_file_length TYPE i .
    DATA: wf_extension TYPE string ,
          wf_fname TYPE string .
    DATA: BEGIN OF int_tab1 OCCURS  0,
            int_txt(1000) TYPE x ,
          END OF int_tab1.
    DATA: upd_tab TYPE STANDARD TABLE OF ytest_bin .
    DATA: wa_upd_tab LIKE LINE OF upd_tab .
    DATA: temp_xstring TYPE xstring .
    PARAMETERS: p_file LIKE file_table-filename LOWER CASE  VISIBLE LENGTH 80  .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file .
      PERFORM browse_file CHANGING p_file .
    AT SELECTION-SCREEN ON p_file .
      IF p_file IS INITIAL .
        MESSAGE e398(00) WITH
           'Enter Filename and path' .
      ENDIF.
    START-OF-SELECTION .
      CLEAR wf_filename .
      MOVE: p_file TO wf_filename .
      PERFORM load_file USING wf_filename .
      PERFORM save_file_contents .
    *&      Form  browse_file
          text
         <--P_P_FILE  text
    FORM browse_file  CHANGING p_p_file.
      CLEAR wf_filename .
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = 'Select the File'
       DEFAULT_EXTENSION       = cl_gui_frontend_services=>FILETYPE_TEXT
       DEFAULT_FILENAME        =
        FILE_FILTER             = cl_gui_frontend_services=>FILETYPE_EXCEL
       INITIAL_DIRECTORY       =
       MULTISELECTION          =
        CHANGING
          file_table              = wf_filetab
          rc                      = wf_filerc
       USER_ACTION             =
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5
      IF sy-subrc <> 0.
        MESSAGE e398(00) WITH 'Error Opening File' .
      ELSE .
        READ TABLE wf_filetab INDEX 1 INTO p_file .
      ENDIF.
    ENDFORM.                    " browse_file
    *&      Form  load_file
          text
         -->P_WF_FILENAME  text
    FORM load_file  USING    p_wf_filename.
      CLEAR int_tab1 .
      REFRESH int_tab1 .
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = p_wf_filename
          filetype                      = 'BIN'
    IMPORTING
       filelength                    = wf_file_length
      HEADER                        =
        TABLES
          data_tab                      = int_tab1
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17
      IF sy-subrc <> 0.
        MESSAGE e398(00) WITH 'File may be open - Error loading' .
      ENDIF.
    ENDFORM.                    " load_file
    *&      Form  save_file_contents
          text
    -->  p1        text
    <--  p2        text
    FORM save_file_contents .
      CLEAR :wa_upd_tab , temp_xstring .
      LOOP AT int_tab1 .
        CONCATENATE temp_xstring int_tab1-int_txt  INTO temp_xstring  IN BYTE MODE.
      ENDLOOP .
      IF NOT temp_xstring IS INITIAL .
    optional
        TRY.
            CALL METHOD cl_abap_gzip=>compress_binary
              EXPORTING
                raw_in   = temp_xstring
              IMPORTING
                gzip_out = wa_upd_tab-description.
          CATCH cx_parameter_invalid_range .
          CATCH cx_sy_buffer_overflow .
          CATCH cx_sy_compression_error .
        ENDTRY.
        APPEND wa_upd_tab TO upd_tab .
      ENDIF .
      IF NOT upd_tab IS INITIAL .
        MODIFY ytest_bin FROM TABLE upd_tab .
        IF sy-subrc EQ 0 .
          MESSAGE i398(00) WITH wf_filename ` Saved!`.
        ENDIF .
      ENDIF.
    ENDFORM.                    " save_file_contents
    <b>Reward points</b>
    Regards

  • Error while creating data type

    Hi
    I am creating data type for the scenario from File to IDOC
    Namespace urn:xiworkshop:groupxx:legacy is not defined in the software component version NEWPRODUCT , 100 of sap Object Message Type Vendor | urn:xiworkshop:groupxx:legacy references the inactive object Data Type Vendor | urn:xiworkshop:groupxx:legacy
    Please help me

    Hi;
    First activate your namespace and then create the data type.
    Namespace + default datatypes should be activated together.
    Then your data type
    Mudit

  • Why should we create data type

    Hi all,
    I have a basic question!
    why do we create data type and then wrap it as message type?
    why dont we directly create a message type and use that ?
    please give the answers. Thanks in Advance.

    Hi Seshu,
    Please go through below links, you get answer
    message type and datatype
    Difference between Data type and Message type - Process Integration - SCN Wiki
    Regards,
    Krupa

  • Problem in creating data type

    hi..
    i've problem in creating data type in xi after importing idoc from the R/3 sender
    plz tell me the basic steps for creating data type in the receiver i.e xi.....
    thanks in advance

    Hi,
    You don't need to create a data type after importing the IDOC.
    Idoc itself acts as message type and message interface.
    check this for creating a data type..
    http://help.sap.com/saphelp_nw70/helpdata/en/2d/c0633c3a892251e10000000a114084/frameset.htm
    Thanks,
    Vijaya.

  • How  create data type for coulmn name having special characters in IR

    hi ,
    any idea how to create how to do create data type for coulmn name having special characters

    Hi Amit,
    Can you ellaborate ?
    Actually if you are reading a file(or anything else) which contains special characters, the data type can be created as done for other interfaces. But it is in the adapters that we actually take care of handling these special characters.
    ShabZ

  • Creating data types

    Hi
    How do u create a data type when u get an input file.
    How do u know when to create header , footer n all?
    Can some one tell me or send a url on how to create data types. would be of great help!
    Thanks!

    HI,
    Generally identifying the structure from the input file need  some analysis work.
    You may refer some of the below tips while creating the data types
    1. List down the input structure of data fields  from input file.
    2. Decide the Header and detail information based on the data and go for sub-structure.
    3. With File adapter try to maintain the structure level max. upto 2.
      i.e. Root>Header>Fields etc.
    4. Try to avoid the substructure for the internal fields.
    5. Decide the Occurances fo every root and sub structures and fields.
    6. Identify if there any relations within Header and detail fields.etc.
    Check with SAP Help for various activities
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/content.htm
    Thanks
    Swarup

  • Demantra - Create New Series - Mdp_matrix - Data Type String Issue

    I created a new series (MDP_matrix) that has the data type as String. The display format is BLANK.
    I was able to load the data into mdp_matrix table for the series i created.
    However, when i look at the series in a worksheet, it does not display the string value. It display zero. for some reason, it considers the series as numeric and not string. Any idea why that would be happening?
    This is on version 7.2 using SQL server/tomcat

    Hi
    1. Have you tried giving display format i.e ###?
    2. Is your server expression something like max (mdp_matrix. column_name)?
    Tks
    MJ

  • Error While Creating Date type condition query

    Hi All,
    I am getting following error while creating a multiple condition query.
    ERROR:java.lang.IllegalArgumentException: Unexpected field type for D: java.lang.String
    I am pasting the scrap of the code for review below.
    pls note after removing the condition cond6; it works fine, and cond6 is for date type field.
    for(int j=1;j<7;j++){                          
    fd[j] =trd.getFieldDescriptor(arrayHeaderFieldNames[j]);
    BasisFieldType bft1 =  fd[j].getFieldType();
    if (bft1 == BasisFieldType.C) {
      filterOperator[j] = RelationalOperatorType.CONTAINS;       }
    else{
      filterOperator[j] = RelationalOperatorType.EQUALS;
    order[j] =queryFactory.createSortOrder(fd[j],true);
    cond1 =queryFactory.createCondition(fd[1], filterOperator[1], values[0]);
    cond2 =queryFactory.createCondition(fd[2], filterOperator[2], values[1]);
    cond3 =queryFactory.createCondition(fd[3], filterOperator[3], values[2]);
    cond4 =queryFactory.createCondition(fd[4], filterOperator[4], values[3]);
    cond5 =queryFactory.createCondition(fd[5], filterOperator[5], values[4]);
    cond6 =queryFactory.createCondition(fd[6], filterOperator[6], values[5]);
    Condition cond = queryFactory.createCondition(new Condition[]{cond1,cond2,cond3,cond4,cond5,cond6},LogicalOperatorType.AND);
    Please Help!
    Thanks n regards,
    Kapoorchand.

    Hi,
    well that problem is a long time back -. I only have in mind that the date I had to transfer to the quesry was in a "strange" format. Have a lock into the documentation for the date field - your date field is not recognised as a date field from the quesry engine and so this fails - but unfortunately I have no idea at the moment how I fixed it last time - how I converted my date field......
    Sorry, thast I can not give you the real point - but I will have a lock into the old code - hopefully I find it soon.
    Regards,
    Oliver

  • Problem with data type 'STRING'

    Hi All,
    I have created a table named as zproject_mat and there is a field 'LONG_D' for long description and its size is not limited, so i used 'STRING' data type for this field. But the problem is: when i use this field in where condition with 'SELECT QUERY'  in my abap program , it throws me an error..'The field long_d is a long string , so it cannot be used in WHERE, ON, or having conditions'.
    Can anyone help me regarding this. I dont know which data type will be suitable in both conditions, LONG DESC AND SELECT QUERY.
    Regards
    Rahul

    Hi Rahul,
    As mentioned your Table name is 'zproject_mat' and there is a field 'LONG_D'.
    The field 'LONG_D' will have a Data Element associated with it. Create a new input Data Element & Domain 'ZLONG' of Type CHAR with Length = 1100. This will used in the code.
    For the Table 'zproject_mat', you need to need to break up your field as 'LONG_D1', 'LONG_D2', ........, 'LONG_D5' with Data Element as 'BAPI_MSG'.
    To INSERT data in table:
    In your code, you need to write your logic where the field 'LONG_D' is SPLIT into 5 words and saved in your table against the 5 fields.
    To SELECT data from table:
    In your code, again you need to write your logic where the field 'LONG_D' is SPLIT into 5 words as abaove and pass them to your SELECT query...
    SELECT SINGLE *
    FROM zproject_mat
    INTO wa_zproject_mat
    WHERE long_d1 = v_split1
          AND long_d2 = v_split2........
         AND long_d3 = v_split3.
    The limitation of a table length is 4096 whereas of a field is 255 to make it RFC compatible. Table/Structure fields that are passed via RFC for integration have this limitation and to maintain database standards, these limitations exist.
    Hope this helps.
    Regards,
    Pranav.

Maybe you are looking for

  • RRI issue in UAT.

    Hi All, I have created the RRI  to navigate between BW report to the R/3 transaction. This navigation works fine in DEV, but when it is moved to UAT it is not navigating to R/3 transaction. After clicking on the GOTO option the navigation fails to ki

  • Acrobat Pro XI - Crashes when Acrobat Preferences is Opened

    Hi Brief History: I am in the UK and run Mac OS X 10.8.2. Other Adobe products are CS3 Master Suite and Acrobat Pro 8. All installed on the Start Up Drive. Downloaded and installed the Trial version of Acrobat Pro XI, intent on UpGrading on the basis

  • Oracle 11g spatial query

    An Oracle 11g spatial database with 5 features in it. A doughnut, triangle, line, trapezium, pentagon. I want to query what coordinates of features exist in a rectange box including the last point that intersects the rectangle box. It really difficul

  • M$view need to create with Fast Refersh?

    Hi All, I have to create m$veiw with Fast Refresh for only two table join. CREATE MATERIALIZED VIEW pup_sub_poc_mv REFRESH FAST START WITH SYSDATE NEXT SYSDATE+(1/48) select a,b,c from x, y where x.id=y.id and x.a in (select a from z) i am getting be

  • Access GPU on PHYSICAL terminal servers

    Hello, How can i get access to GPU on PHYSICAL terminal servers (2008R2/2012R2)? GPU is required for D3D/OGL apps in remote sessions. Two variants are acceptable: 1) access to server GPU 2) access to client GPU