PHP MaxDB - update on long text column

Hi!
I'm getting problem with update statement on long text column via PHP MaxDB.
As far as there is no example on maxdb_stmt_send_long_data in php documentation, i'm completely stuck with this.
My table definition:
CREATE TABLE "ADMIN"."PRESS"
     "ID"  Integer  NOT NULL,
     "R_PUBLICATION"  Varchar (100) ASCII,
     "NUM"  Integer,
     "R_DATE"  Date,
     "R_TITLE"  Varchar (100) ASCII,
     "R_B_TEXT"  Varchar (1000) ASCII,
     "ID_TYPE"  Integer,
     "R_FILENAME"  Varchar (500) ASCII,
     "R_TEXT"  Long ASCII,
     PRIMARY KEY("ID")
PHP code:
$stmt = maxdb_prepare($db, "update press set r_publication=?, num=?, r_title=?, r_text=?, r_b_text=?, id_type=?, r_date=?, r_filename=? where id=?");
maxdb_stmt_bind_param($stmt, 'sisbsissi', $r_publication, $num, $r_title, $r_text, $r_b_text, $id_type, $str_date, $r_filename, $id_f);
maxdb_stmt_execute($stmt);
maxdb_stmt_send_long_data ($stmt, 3, $r_text);
maxdb_stmt_close_long_data($stmt, 3);
maxdb_stmt_close($stmt);
After calling the above php-script I get this warning:
Warning: maxdb_stmt_execute(): Wrong parameter type. Expected: long.
Has anyone an example on how to update (or insert) LONG string value via the php MaxDB extension?
Thanks in advance.
Operating system: CentOS 5.3 Final
PHP: 5.2.10
Apache: 1.3.41
MaxDB: 7.7 Linux 32 Bit
PHP MaxDb Extension: 7.6.00.38

We using the procedure to insert and update. Procedure will called to update or insert only one record at a time from XX databse to YY database.
We are not using SQL * PLUS for this operation.
Thanks
Ram

Similar Messages

  • SQL Server Long Text column to Oracle CLOB via DB Link

    Does anyone know how to load a SQL Server Long Text column into an Oracle CLOB column using DB Link? When I try to Select from SQL Server table into Oracle table, I receive the error "ORA-00997: illegal use of LONG datatype".
    Thanks,
    Susan

    Hi,
      This is a known restriction involving long columns -
    (1) LONG datatype not supported with use of DBLINK when insert or update involves a select statement
    (2) LONG datatype cannot be used in a WHERE clause, in INSERT into ... SELECT ... FROM
    constructs, and in snapshots.
    The workround is to use a PL/SQL procedure or try the SQLPLUS COPY command.
    If you have access to My Oracle Support then review these notes -
    Cannot Move A Long From non Oracle database Ora-00997: Illegal Use Of Long Datatype (Doc ID 1246594.1)
    How To Workaround Error: Ora-00997: Illegal Use Of Long Datatype (Doc ID 361716.1)
    Regards,
    Mike

  • Insert bullets in a long text column seperated by Enter Sign!

    I have a long text column
    For example my text looks like
    <TEXT>
    A
    B
    C
    D
    </TEXT?
    I want the output as
    ·A
    ·B
    ·C
    ·D
    I tried <?position> its giving me numbers. I want the bullets and not the numbers.
    Any idea?
    Thanks,
    -Ritu

    REPLACE(the_field, chr(10), chr(10)||chr(149)||'   ')

  • Updating a LONG RAW column

    I have a table with a column of type LONG RAW that can take binary content of arbitrary length (up to 2 GB). I try to copy content from one row to another using the following SQL:
    UPDATE TEAM_ADM.Content SET (Content, ContentType) =
    (SELECT Content, ContentType FROM Content WHERE ContentId = in_SourceContentID)
    WHERE ContentID = in_TargetContentID;
    Content.Content is the column in question.
    Oracle returns with error ORA-00997:
    ORA-00997 illegal use of LONG datatype
    Cause: A value of datatype LONG was used in a function or in a DISTINCT, WHERE, CONNECT BY, GROUP BY, or ORDER BY clause. A LONG value can only be used in a SELECT clause.
    Action: Remove the LONG value from the function or clause.
    Question: How can I copy a LONG RAW column from one row to another?
    Regards,
    Kjell Tangen

    Hello,
    It seems that the Long datatypes in Oracle have a lot of restrictions. According to
    this blog:LONG and LONG RAW columns cannot be used in distributed SQL statements.
    In that case, you should update the long raw column on the Oracle side. You can try to use openquery as Rick post above to send the SQL statment to Oracle and execute.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Issue in updating the long text for Routings

    Hello,
    I am developing an onject to update Long text(which are already created but need to be overwritten).
    Can this be done using /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW.
    I developed an LSMW witht this, I am able to retrieve the required field for name which are needed as key from tables.But how can I dynamically update this field for the correct value relating the operation.One issue regarding this I am facing is that in conversion, I have operation number in the source field and have maintained source field according to source file but use values just to retrieve correct value for name field in mapping,it is taking only the last operation number into account from the source file itself and not earlier values.please guide.
    Regards

    yes you can use /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW
    In the SAP system, there is no uniform rule for the structure of the actual text key Textname. However, in order to be able to maintain the structures and fields, you have to know what the structure of text name as well as the values for text object and text ID are.
    Procedure
           1.      Display a text of the required text type.
           2.      Branch to the editor.
           3.      Choose Goto > Header.
    The Text header dialog box appears.
    Result
    In the Text header dialog box, you gather the required information.

  • How can we update the Long texts in BP

    Hi experts .
    How can we maintain  the long text tab  in Business Partner  at the time of Business partner creation using FM .

    This is the way I did it .
          CALL FUNCTION 'INIT_TEXT'
         CALL FUNCTION 'SAVE_TEXT'
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • How to make single column scrollable in ALV report (for long Text)

    I have a 20 columns which we need to display in ALV grid, including one column for long text. In long text column currently it showing 40 character. I tried to change output length of field catalog but it's not working.
    Can any one help me ....
    Thanks
    Guru
    Message was edited by:
            gurusharan mandal

    hi,
    pls remeove if u give like this in the layout.
    gd_layout-colwidth_optimize = 'X'.
    rgds
    Anver

  • How to update long text in symptoms/problems ?

    Hi All,
    Can anybody help me regarding how to update the long text of a symptom/problem?
    Please help.
    Regards,
    Jeetu

    Hi Jeetu,
    Can you Please elaborate your query.
    Are you talking about Problem/solutions created using Tcode: IS01( used in service scenario)
    Or
    The Text Management i.e. Text Types
    Regards.
    Shalini Chauhan

  • About updating  long text  in the document item  with bdc of fb02

    HI,
    I have a question about updating  long text  in the document item of sap:
    Can I directly updating the long text information with the fuction save_text?
    The long text is in :
    tcode: fb02 -->input document no ... --> Document overview --> select one document
    long text --> updating the value.
    Becaust I want to update some items in a G/L Account with bdc or other technique, but I found I can't   choose the items in the G/L Account with bdc automatically .That means I can't get the selected items and update them.So I try to update them with the function save_text  directly (I know the doc no,bukrs,fiscal year ,item no which will decide the long text item).
    Who can help me ?Or is there any way to solve the problem? Thanks very much.

    Yes, you can update directly using SAVE_TEXT.
    Check this for the same.
    [update long text in FB02|https://forums.sdn.sap.com/click.jspa?searchID=22194840&messageID=5418662]

  • Update Time confirmation and Long text of Work Order in single FM or BAPI

    Hi,
    I would like to know, which standard FM or BAPI will update the longtext along with the confirmation text while doing the time confirmation of a work order.
    I have tried with standard BAPI BAPI_ALM_CONF_CREATE for updating the time confirmation. This is updating the time and confirmation text properly but not the long text. I would like to know how can I update the long text while doing the time confirmation. Is there any other standard FM/BAPI will update both?
    Thanks in Advance,
    Mohan.

    There is no standard SAP enhancement we can use for this purpose.
    We have developed another program to maintian the long text in production order.
    This call can be closed.
    Cheers,
    Qiang

  • BAPI_SERVNOT_ADD_DATA-update long text of activities in Change Notification

    Hi All,
    I am trying to use this "BAPI-BAPI_SERVNOT_ADD_DATA" call to change a Service Notification.
    The partners,activities get updated. I am unable to update the long text of each of the actvities item.
    I am using the following code to update the longtext.
    Defects/activities table
    data: activities like table of bapi2080_notactvi with header line.
    long text table
    data: longtext like table of bapi2080_notfulltxti with header line.
    *partnr table
    data:  notifpartnr  like table of bapi2080_notpartnri with header line,
            longtext-objtype = 'QMFE'.
            longtext-objkey = activities-act_sort_no.(item # of the activity)
            longtext-format_col = 'U1'.
            longtext-text_line = zwin-misc_text1.
            append longtext.
            longtext-format_col = 'U1'.
            longtext-text_line = zwin-misc_text2.
            append longtext.
            longtext-format_col = 'U1'.
            longtext-text_line = zwin-misc_text3.
            append longtext.
    call function 'BAPI_SERVNOT_ADD_DATA'
        exporting
          number                  = zwin-qmnum
      I_BAPI                  = ' '
    IMPORTING
      NOTIFHEADER             =
      NOTIFHDTEXT             =
       tables
       notfulltxt               = longtext
      NOTITEM                 =
      NOTIFCAUS               =
          notifactv             = activities
      NOTIFTASK               =
        notifpartnr             = notifpartnr
      KEY_RELATIONSHIPS       =
         return                 = lt_return
    Any help appreciated.
    Thanks
    Mala

    Hi Neil,
    Thanks for the update.  The issue has been resolved.
    The BAPI- 'BAPI_SERVNOT_ADD_DATA'   cannot be used to update the item long text. (activities long text ) . The length of the object key is only 8 characters.
    I used the following function module('IQS0_ADD_ACTIVITY_LONGTEXT')  to update the item>>activties>> long text after the  BAPI  call to  'BAPI_SERVNOT_ADD_DATA' .
    data:  v_line like table of  tline with header line.
    call function 'IQS0_ADD_ACTIVITY_LONGTEXT'
                 exporting
                   i_qmnum             = wa_qmnum
                   i_manum             = wa_item_no
                   i_post              = 'X'
                    I_RESET             =
                 tables
                   t_inlines           = v_line
                  EXCEPTIONS
                    SHOW_MESSAGES       = 1
                    OTHERS              = 2
    The call to 'BAPI_SERVNOT_ADD_DATA'  took care of all changes to the Notification except the update of the item>> long text. After committing this transaction, I did a BAP  call to 'IQS0_ADD_ACTIVITY_LONGTEXT' to update the item>>actvities>>long text.. This has been working fine and is currently in productin.
    Appreciate all your feedback .
    Thanks
    Mala

  • RFBIBL00 - updating long text

    Hello Experts,
    I am using RFBIBL00 program to post documents through FB01.
    I have a requirement to update longtexts.
    I updated BBKPF, BBSEG structures and wrote to a file which is the input for the program RFBIBL00.
    Everything is working fine but i could not able to find the way to update the long text.
    Please guide me how to deal with this issue.
    I seen some posts for this type of issues but no where I got solution.
    Thanks in Advance,
    Venkat

    Since there is no option in RFBIBL00, I have developed a program separately using Save_text and run the program take text from flat file and create long text

  • How to update CC02 Chng Header Long Text?

      Hello everyone,
         I'm trying to better understand how to dynamically update the long text in transaction CC02 from a custom program. I have debugged through CC02 and found that it uses SAVE_TEXT and COMMIT_TEXT so I too, have tried the same.
    What I've found is that as long as a Change Header Long Text was created first in CC02, the code below works successfully without issue, and is reflected when I go into CC02 - I can see my changes.
    On the other hand, if the Change Header Long Text was not already created, and I create it for the first time, this text is stored and I can successfully read it using READ_TEXT Function Modules. However CC02 does not show this saved text. Therefore, any changes made in CC02 will then overwrite my changes made in my custom program.
    I have explored the INSERT parameter of SAVE_TEXT, and pass an X if the Change Header Long Text does not already exist (Determined using READ_TEXT). However, this did not seem to yield any success.
    Can anyone explain why this works correctly when it is already created, but does not work correctly if I am creating the long text for the first time in my program?
    CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            client          = sy-mandt
            header          = lwa_thead
            savemode_direct = c_x
    *        insert          = i_new_longtxt
          TABLES
            lines           = lwa_ltext_tmp
          EXCEPTIONS
            id              = 1
            language        = 2
            name            = 3
            object          = 4
            OTHERS          = 5.
        IF sy-subrc = 0.
          CALL FUNCTION 'COMMIT_TEXT'
          EXPORTING
            object          = lwa_thead-tdobject
            name            = lwa_thead-tdname
            id              = lwa_thead-tdid
            language        = s_lang
          IMPORTING
            commit_count    = iv_updated_texts.
        ENDIF.
    Useful hints or tips will be rewarded! Thank you!

    Hi Custodio,
    Thanks for the reply. To further elaborate, the parameters I've tried passing through lwa_thead are the following:
    CONSTANTS:
        w_tdid            TYPE thead-tdid       VALUE 'AENR', " Change Master Table
        w_tdobject        TYPE thead-tdobject   VALUE 'CHANGE', " Static Object
        w_linesize        TYPE thead-tdlinesize VALUE '72', " 72 characters per line
        w_tdform          TYPE thead-tdform     VALUE 'ECM_LTXT', " Form Name in CC02 Header Long Text
       * Setup header information
      lwa_thead-tdid        = w_tdid. " AENR (Change master table)
      lwa_thead-tdobject    = w_tdobject. " CHANGE
      lwa_thead-tdname      = w_tdname. " Client + ECM
      lwa_thead-tdspras     = s_lang. " Language
      lwa_thead-tdlinesize  = w_linesize. " Characters per line
      lwa_thead-tdform      = w_tdform. " Form ECM_LTXT
      lwa_thead-TDLUSER     = SY-UNAME. " Changed by User
      lwa_thead-TDLDATE     = SY-DATUM. " Date changed
      lwa_thead-TDLTIME     = SY-UZEIT. " Time changed
      lwa_thead-TDLRELES    = SY-SAPRL. " SAP Release
      lwa_thead-TDTXTLINES  = l_records. " Number of records
    For testing purposes, I even mocked the following tran code and program name from CC02 in tdmacode1 to see if that triggered a different result. This did not visibly change anything as far as I could tell.
        w_tdmacode1       TYPE thead-tdmacode1  VALUE 'CC02SAPMC29C',
        lwa_thead-tdmacode1   = w_tdmacode1.

  • How to add the long text in Production order through FM

    Hi,
    Iam having custom program which has BAPI (BAPI_PRODORD_CREATE) inside it and this program is used to create Production orders with the details of Sales order Number,Line item,Plant,Order type,Quantity and Start date. This program is scheduled in Background.
    Now client wants to add the Long text (seperate TAB in production order and they want to update the VC details of Sales order in the Long text area).
    One option is after creation of Production order, through BDC(calling CO02 and update the long text) we  can update the long text and client doesn't want this option.
    Another option is after creation of Production order, using Function module SAVE_TEXT, Update the Long text in Production Order and this is not working in Production order (already my ABAP consultant checked it ).
    If any one of you came across this requirement, pl share with me how you addressed it.
    Regards
    A.Sureshbabu

    Hi,
    The method is quite simple, i presume you're quite well versed with doing recording, so the key thing to keep in mind is how to prepare the input file.
    At my end i had about 5 lines of data which needed to be uploaded, hence i had a tab-delimited file with the order nos. in the first column & the five lines of text in five different columns (Refer format below)
    Order No.
    Line - 1
    Line - 2
    Line - 3
    Line - 4
    Line - 5
    12345
    txt - 1
    txt - 2
    txt - 3
    txt - 4
    txt - 5
    67890
    txt - a
    txt - b
    txt - c
    txt - d
    txt - e
    Now provide this input file for your lsmw or bdc program & it will work. You can work with your abaper if you're not so comfortable with LSMW or BDC programming he / she should be able to easily make it work for you.
    Regards,
    Vivek

  • How to save long text for IA01 Transaction using BDC

    Hi All,
    In my requirement I have to create a Task List Equipment and Task List Functional Location using BDC.Here I need to upload the long text for both IA01 and IA11 transactions.I am using SAVE_TEXT function module to save the text and COMMIT_TEXT also after save text.But I am not able to see the text in IA12 and IA02 transactions.But using READ_TEXT I am able to get the text what updated using SAVE_TEXT.
    Please answer for this if any one worked on this requirement <Priority normalized by moderator>
    Thanks,
    Satya.
    Edited by: Vinod Kumar on Jan 2, 2012 9:02 PM

    Hi Satya,
    There is a simple way to update the long text. There is  direct input object in the LSMW for long text.
    Object            : 0001
    Method          : 0001
    Program type : D
    SImply go and create the LSMW with first option and follow the steps. No need to call the function modules separately. This standard program will take care of every thing.
    If you have multiple lines to populate in the equipment master at the header level then you need two set of files. Then key will be equipment number with leading zeros if it will not be alpha numeric.
    1) First file with field EQUNR.
    2) Second file will be
    EQUNR                          C(018)    Technical identification number
    TXPARGRAPH                     C(002)    Tag column
    TXLINE                         C(072)    Text editor text line
    TEXT_MARK                      C(001)    Description Indicator for RIIBIP00 (IBIP) Processing
    Please let me know if you need more in detail.
    Thanks,
    Satheesh

Maybe you are looking for

  • My ipod shows up in itunes but

    but it doesn't seem to want to work when I disconnect it from my computer. I get the folder icon and its useless

  • Virtual pc on mac: will it play pc games with virtual pc

    i was just wondering if i got virtual pc, if that would allow me to take advantage of playing pc games this way. Just wondering thanks for anyone who answers this.

  • Disc drive doesn't read discs but says it's working properly

    I have a Pavilion dv6000 with vista.  I can put in any cd and the disc drive will start spinning but will not read the disc.  For example, i put the game "Empire Earth" into the drive and i can here the disc spinning but it will not start.  The drive

  • Can not locate iPhoto 9.6 (910.29) files to import into iMovie (10.0.6) on Yosemite (10.10.2)

    Hello, I am trying to import some photos and movies into iMovie (10.0.6) from iPhoto 9.6 (910.29) but I can't do it. I've searched for solutions but can't figure it out. I can't locate my iPhoto files and it's driving me bonkers! It's probably a very

  • JAVA 1847 ERROR

    I just recompiled a class and when trying to use it got this java.lang.UnsupportedClassVersionError: Bad version number in .class file      java.lang.ClassLoader.defineClass1(Native Method)      java.lang.ClassLoader.defineClass(Unknown Source)