How to save blob data (variable length string) in a customized table?

Dear Friends
I have written a very simple program to update table with 2 fields which
looks as follows.
========================================================
Table name ZTESTBLOBDATA
Field         Key          Init    Data Element   Data Type  Length  
ID          Checked                 ZID                 NUMC        2
BLOB                                   ZBLOB           STRING       0
=========================================================
FOllowing is the sample program that I have written (Transaction SE38).
=========================================================
REPORT ZTESTBLOBPROG
TABLES: ZTESTBLOBDATA
data :  itab like ZTESTBLOPDATA occurs 1 with header line.
select * from ztestblobdata into table itab.
ztestblobdata-id  =   sy-dbcnt +1.
ztestblobdata -blob = 'abcdefghijklmnopqrstuvwxyz.'.
insert ztestblobdata.
=========================================================
When I try to save and activate the program, I get the following
error message
'ztestblopdata' must be a flat structure. You cannot use internal
tables, strings, references, or structures as components.
==========================================================
Using the data type STRING is a must since it is a variable length
data which varies from few characters to few gig.
How can go around this problem.
Any feedback will be highly appreciated.
PS. I have checked old postings on SDN, spoken to my ABAP contacts and also couple of instructors from SAP when I took XI courses but didn't get a satisfactory answers.
Edited by: Ram Prasad on Oct 15, 2008 12:28 PM

Thanks a lot for the response.
The string that we are getting is from another application via netweaver XI integration and is being sent as a string which has to be saved in an SAP table. I am not sure if IDOC option will suit our needs, but will definitely read more about it.
If there is any other suggestion of feedback I would appreciate it a lot.;
Tks
Ram

Similar Messages

  • How to save hr data in Active directory  using abap

    Hi all
    can any one please help me out how to save hr data in Active directory using LDAP connector
    please help as this is very urgent requirement
    thanks in advance
    Thanks
    Chanti

    What form do you have the user's name in ?
    ANTIPODES\alberteString searchFilter = "(&(objectClass=user)(samAccountName=alberte))";[email protected] searchFilter = "(&(objectClass=user)(userPrincipalName=[email protected]))";Albert EinsteinString searchFilter = (&(objectClass=user)(givenName=Albert)(sn=Einstein))";or using Ambiguous Name Resolution (anr)String searchFilter = "(&(objectClass=user)(anr=Albert Einstein))";or it's even clever enough to useString searchFilter = "(&(objectClass=user)(anr=Einstein Albert))";

  • How to save a datas from serial port?

    How to save a datas from serial port?

    Hi
    I need some help about rs-232 communication. I want to make a vi witch can do this things:
    -read a txt file (to simulate a serial port like when the datas are coming)
    i will get 3 different data in serial port (like this: 121 213 135)
    i want to save in a txt file what datas get my vi
    so
    -write in a txt file or draw in a diagram (or both)
    so my problem is: read in serial port and save in a file and draw a diagram.
    if anybody can help pls HELP ME because im a beginner in this problem.
    I already do something but Im not sure that good.
    Thx for all.

  • How to save HR data in Active Directory using ABAP i.e thru LDAP Connector

    Hi All,
           Can any one please help me out how
           to save HR data in Active directory
           using LDAP Connector ?             
           Please help ASAP as it is very urgent .
    Thanks
    Jitendra

    There are 100 of such scripts are there online.
    here are few tips and codes. you will get more.  
    https://gallery.technet.microsoft.com/scriptcenter/Feeding-data-to-Active-0227d15c
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/31/use-powershell-to-modify-existing-user-accounts-in-active-directory.aspx
    http://powershell.org/wp/forums/topic/ad-import-csv-update-attributes-script/
    Please mark this as answer if it helps

  • How to save the data to sap abap using Adobe Flex

    Hi Everybody......
    I am new to Adobe flex with sap abap.
          How to save the data in sap abap using Adobe Flex coding is Action Script and using RFC web service.
    Please give me any suggisions on that.
    Thank you
    Venkatesh V

    Hi Venkatesh,
    Try with folowing coding...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
         initialize="initApp()">
         <mx:Label x="10" y="23" text="Airline" width="90" id="lblAirline"/>
         <mx:TextInput x="108" y="21" id="txtAirline"/>
         <mx:Button x="10" y="49" label="Get Data" id="btnGetData" enabled="false" click="getData()"/>
         <mx:DataGrid x="10" y="97" id="dgFlightData" dataProvider="">
         </mx:DataGrid>
           <mx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   import mx.rpc.AbstractOperation;
                   import mx.rpc.events.FaultEvent;
                   import mx.rpc.soap.LoadEvent;
                   import mx.rpc.events.ResultEvent;
                   import mx.rpc.soap.WebService;
                   [Bindable] public var flightData:ArrayCollection;
        private var flightWS:WebService;
         private function initApp():void{
              flightWS = new WebService();
              flightWS.wsdl = "http://uscib20.wdf.sap.corp:50021/sap/bc/soap/wsdl11?services=ZGTEST&sap-client=000";
            flightWS.addEventListener(FaultEvent.FAULT,onWSError);
              flightWS.addEventListener(LoadEvent.LOAD,onWSDLLoaded);
             flightWS.addEventListener(ResultEvent.RESULT,onFlightWSGotResult);
              flightWS.loadWSDL();
    private function getData():void{
              var operation:AbstractOperation = flightWS.getOperation("ZGTEST");
              var input:Object = new Object();
              input.Airline = txtAirline.text.toUpperCase();
              operation.arguments = input;
              operation.send();
         private function onWSError  (event:FaultEvent):void{
         private function onWSDLLoaded(event:LoadEvent):void{
              btnGetData.enabled = true;
         private function onFlightWSGotResult(event:ResultEvent):void{
              flightData = event.result.SFLIGHT;
              ]]>
         </mx:Script>
    </mx:Application>
    Regards,
    Vinoth

  • How to save the data present in TEXT BOX?

    Hi friends i am able to create a text editor in one of my screen but i want to know how to save the data when the text is entered in that text box and retrive when they open the screen?

    Hi ,
    Please check the format below since it is based on a working code
    first you need to create a text in s010 function module...
    there should be some key based on which you plan to save the text..imagine it is Purchase order then..PO+item numner is always unique.eg:0090010(900PO/item10).so in the code you can append these two and they will be unique..so you can always retrieve them,overwrite,save them anytime you need
    **************data declarations
    TYPES: BEGIN OF TY_EDITOR,
    EDIT(254) TYPE C,
    END OF TY_EDITOR.
    data: int_line type table of tline with header line.
    data: gw_thead like thead.
    data: int_table type standard table of ty_editor.
    ****************fill header..from SO10 t-code..when you save you need the unique key..youfill it here and pass it in save_text function module
    GW_THEAD-TDNAME = loc_nam. " unique key for the text -> our unique key to identify the text
    GW_THEAD-TDID = 'ST'. " Text ID from SO10
    GW_THEAD-TDSPRAS = SY-LANGU. "current language
    GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created in SO10
    *To Read from Container and get data to int_table
    CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
    IMPORTING
    TABLE = int_table
    EXCEPTIONS
    ERROR_DP = 1
    ERROR_CNTL_CALL_METHOD = 2
    ERROR_DP_CREATE = 3
    POTENTIAL_DATA_LOSS = 4
    others = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop data from int_table and save to int_line-tdline appending it.
    *save the text
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    HEADER = GW_THEAD
    TABLES
    LINES = InT_LINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    ENDIF.
    *To pass to Container
    CALL METHOD EDITOR ->SET_TEXT
    hope that the above sample with helps you solve the problem
    Please check and revert,
    Reward if helpful
    Regards
    Byju

  • Dynamically built query on execution How to save the data in Object Type

    Hi,
    In pl/sql I am building and executing a query dynamically. How can I stored the output of the query in object type. I have defined the following object type and need to store the
    output of the query in it. Here is the Object Type I have
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPE AS OBJECT(
    pkid NUMBER,
    pkname VARCHAR2(100);
    pkcity VARCHAR2(100);
    pkcounty VARCHAR2(100)
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPETAB AS TABLE OF FIRST_RECORDTYPE;Here is the query generated at runtime and is inside a LOOP
    --I initialize my Object Type*
    data := new FIRST_RECORDTYPETAB();
    FOR some_cursor IN c_get_ids (username)
    LOOP
    x_context_count := x_context_count + 1;
    -- here I build the query dynamically and the same query generated is
    sql_query := 'SELECT pkid as pid ,pkname as pname,pkcity as pcity, pkcounty as pcounty FROM cities WHERE passed = <this value changes on every iteration of the cursor>'
    -- and now I need to execute the above query but need to store the output
    EXECUTE IMMEDIATE sql_query
    INTO *<I need to save the out put in the Type I defined>*
    END LOOP;
    How can I save the output of the dynamically built query in the Object Type. As I am looping so the type can have several records.
    Any help is appreciated.
    Thanks

    hai ,
    solution for Dynamically built query on execution How to save the data in Object Type.
    Step 1:(Object creation)
    SQL> ED
    Wrote file afiedt.buf
    1 Create Or Replace Type contract_details As Object(
    2 contract_number Varchar2(15),
    3 contrcat_branch Varchar2(15)
    4* );
    SQL> /
    Type created.
    Step 2:(table creation with object)
    SQL> Create Table contract_dtls(Id Number,contract contract_details)
    2 /
    Table created.
    Step 3:(execution Of procedure to insert the dynamic ouput into object types):
    Declare
    LV_V_SQL_QUERY Varchar2(4000);
    LV_N_CURSOR Integer;
    LV_N_EXECUTE_CURSOR Integer;
    LV_V_CONTRACT_BR Varchar2(15) := 'TNW'; -- change the branch name by making this as input parameter for a procedure or function
    OV_V_CONTRACT_NUMBER Varchar2(15);
    LV_V_CONTRACT_BRANCH Varchar2(15);
    Begin
    LV_V_SQL_QUERY := 'SELECT CONTRACT_NUMBER,CONTRACT_BRANCH FROM CC_CONTRACT_MASTER WHERE CONTRACT_BRANCH = '''||LV_V_CONTRACT_BR||'''';
    LV_N_CURSOR := Dbms_Sql.open_Cursor;
    Dbms_Sql.parse(LV_N_CURSOR,LV_V_SQL_QUERY,2);
    Dbms_Sql.define_Column(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER,15);
    Dbms_Sql.define_Column(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH,15);
    LV_N_EXECUTE_CURSOR := Dbms_Sql.Execute(LV_N_CURSOR);
    Loop
    Exit When Dbms_Sql.fetch_Rows (LV_N_CURSOR)= 0;
    Dbms_Sql.column_Value(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER);
    Dbms_Sql.column_Value(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_BRANCH--'||LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_NUMBER--'||OV_V_CONTRACT_NUMBER);
    INSERT INTO contract_dtls VALUES(1,CONTRACT_DETAILS(OV_V_CONTRACT_NUMBER,LV_V_CONTRACT_BRANCH));
    End Loop;
    Dbms_Sql.close_Cursor (LV_N_CURSOR);
    COMMIT;
    Exception
    When Others Then
    Dbms_Output.put_Line('SQLERRM--'||Sqlerrm);
    Dbms_Output.put_Line('SQLERRM--'||Sqlcode);
    End;
    step 4:check the values are inseted in the object included table
    SELECT * FROM contract_dtls;
    Regards
    C.karukkuvel

  • How to convert an int variable into String type

    hi everybody
    i want to know how to convert an interger variable into string variable
    i have to implement a code which goes like this
    Chioce ch;
    for(int i=0;i<32;i++)
    // here i need a code to convert the int variable i into a string variable
    ch.add(String variable);
    how do i convert that int variable i into a String type variable??
    can anyone help me?

    Different methods:
    int a;
    string s=a+"";or
    String.valueOf(int) is the better option because Int.toString() generated an intermediate object to get the endresult
    Ema

  • How to save the data on the database

    Please tells me how to save the data on the database as soon as posible.
    Thank!!
    Michael

    Michael,
    What database? Citadel, or something that has an SQL?
    If the latter, use the SQL toolkit. You can get it from NI.
    Please elaborate if this is not your situation.
    Thank you

  • How to save ALV data at runtime...?

    Dear All,
    How to Save the data of ALV report at Runtime... (I have to save data in to an internal table).
    regards.

    You mean that you have to get the data from a submitted program's output(alv output)?
    Regards,
    Rich HEilman

  • How to know  pro-grammatically variable type(string ,numeric ....) of TestStand variable using CVI

    Hi,
    how to know  pro-grammatically  variable type(string ,numeric ....)  of TestStand  variable using Labwindows CVI.
    Thanks
    Mukesh Kumar

    Mukesh,
    You could use the TS_PropertyGetType() function in CVI to do this. Here is a reference page for the GetType function--you can see that it returns a PropertyValueType which will indicate which type the PropertyObject (variable) is. In CVI, you'll find this function in the NI TestStand API 2013 instrument methods, under PropertyObject > Static Properties. 
    Hope it helps, and let us know if you have any more questions about it!
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • Formula date variable ,which is processing by 'Customer exit' with ready in

    Hi ,
    I need to create 1 variable which takes date from user and do some calculation.irrespective of any date char.
    so I have created Formula date variable ,which is processing by 'Customer exit' with ready input .
    But when selection screen pop up date formula variable comes with the format yyyymmdd.
    but i need dd.mm.yyyy. i have checked my profile and it is dd.mm.yyyy.
    Waitin for reply

    Hi Babu
    Did you get the answer to the query....if yes please drop me a mail on this as I have the same requirement and thanks in advance...
    my id   [email protected]
    REgards
    Amit

  • Importing data from a model to a custom table

    Hi,
    I'm new to Configurator.
    Can someone please advice in detail how to import all possible combinations from a model in the configurator to a custom table?
    I have created a custom table based on the items in the model.
    I have also written a CIO which displays all the possible combinations in a html page when a button is clicked.
    What i want is, how to connect to a database and import into the custom table.
    Any Help Appreciated.
    Thanks in advance.
    --PK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    PK,
    You probably meant to post this in one of the E-Business Suite forums. This forum is for JDev ;) Try the [url http://forums.oracle.com/forums/forum.jspa?forumID=413]Configurator Forum
    John

  • How to convert BLOB data into string format.

    Hi,
    I have problem while converting blob data into string format.
    for example,
    Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
    will get me the first 4000 byte of BLOB .
    When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
    declare
    my_var CLOB;
    BEGIN
    for x in (Select X from T)
    loop
    my_var:=dbms_lob.substr(x.X,32767,1)
    end loop
    return my_var;
    I comfortably convert 32k BLOB field to string.
    My problem is how to convert blob to varchar having size more than 32K.
    Please help me to resolve this,
    Thanx in advance for the support,
    Nilesh

    Nilesh,
    . . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
    SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
    -- resulting string:
        ☺AW(⌂özßHAA
    Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
    Regards,
    Noel

  • How to Get Blob data(In String Form) using OCCI

    Hello frnds,
    I am new to OCCI,so i hvnt that much of master in that side.
    I have one problem while handling BLOb data.
    How to convert binary form of SDO_GEOMETRY data into string format. I am able to convert data by using PLSQL block,but its take so much time to execute.So performance is the main issue.So if there is any API in OCCI which convert directly blob data into string format.
    Thanx in advance for your support,
    Nilesh.

    Have you tried reading "http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28390/lobs.htm#BABDEGJD" ? This explains how you can read from BLOBs into a C vector (or C++ vector of chars).

Maybe you are looking for

  • I can't delete the files in my spam folder

    Spam email is existing in the spam folder. I can usually delete them. I click the box next to the spam items ad hit delete. Nothing happens. Is there a setting that has been changed?

  • Getting IP Address information from an NSNetService object

    I have an NSNetService object that I received from doing a Bonjour discovery. This object represents a web server that I want to connect to. I have the following (nasty) code for doing that: - (void) serviceReceived:(BonjourViewController*)bvc didRes

  • Disconnection problems with online gaming - world ...

    Other users on BT have alos reoported issues with game hangs and diconnection issues with World of Tanks. They seem to have started a few days ago. Someitme it is intermittant other times it can last for several minutes.

  • Newsstand for free Apps

    What subscription-settings do i have to choose in itunesconnect to make a free-multiviewer app ready for newsstand? Best jan

  • ITunes and iPhoto not recognizing my iPhone 4S!

    I asked a friend who works at apple to help me with this but he stop responding after a while... but it seems my computer is "seeing" my iPhone 4S but iTunes and iPhoto are not recognizing it. I have done all the recommended tricks including restarti