SAVE_TEXT IN CO01

Hi,
       I had requirement,I need to populate the Long text in CO01. Iam using the FM SAVE_TEXT. But it doesnt worked.Iam using the Following code to save long text
DATA: BEGIN OF tlinetab OCCURS 100.  
        INCLUDE STRUCTURE tline.
DATA: END OF tlinetab.
DATA : fheader LIKE thead.
fheader-tdobject = 'AUFK'.
fheader-tdname = client+aufnr.
fheader-tdid = 'KOPF'.
fheader-tdspras = 'E'.
tlinetab-tdformat = '*'.
tlinetab-tdline = 'Test Data'.
APPEND tlinetab.
CALL FUNCTION 'SAVE_TEXT'
  EXPORTING
    header          = fheader
    insert          = 'X'
    savemode_direct = ' '
  TABLES
    lines           = tlinetab
  EXCEPTIONS
    id              = 01
    language        = 02
    name            = 03
    object          = 04.
No error messages are getting,But when i opened the transaction Co02 with AUFNR.. Iam unable to see the Long text..Help me up in solving the problem
Edited by: Prakash Naga on Oct 27, 2010 3:52 PM

Hi,
fheader-tdobject = 'AUFK'.
fheader-tdname = client+aufnr.
fheader-tdid = 'KOPF'.
fheader-tdspras = 'E'.
are you sure that this refers to Production Order, I found it as Process Order.
Please check the inputs again.
Thanks,
Anmol.

Similar Messages

  • Creating a long text using ABAP code.. fm SAVE_TEXT

    When you create an order via IW31 one of the options is to click on the text button and create a long text. I am basically trying to mimic this action from within my ABAP code.
    The text id details are as follows:
    Text Name       500000015000046  which is (5000000 + order number)
    Language        EN
    Text ID            KOPF         Order header text
    Text Object      AUFK       Order text
    If i manually create the text within the transaction i am then able to view and update it via function modules READ_TEXT and SAVE_TEXT. But if the text has not already been created READ_TEXT obviously returns nothing as it does not exist and SAVE_TEXT does not seem to created it!
    Anyone know how i would go about creating this text using ABAP code?
    Hope this make a bit of sense
    Thanks in advance
    Mart

    I have implemented the code as i think it should be. See below, can any see what is wrong. If i add init_text it makes no difference and adding the commit_text just makes it hang
    DATA: IT_TEXTS type standard table of TLINE,
           wa_texts like line of it_texts,
           wa_txtheader type THEAD.
    wa_txtheader-TDID     = 'KOPF'.
    wa_txtheader-TDSPRAS  = 'EN'.
    wa_txtheader-TDNAME   = '500000015000056'.
    wa_txtheader-TDOBJECT = 'AUFK'.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
      wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
      wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
        CLIENT                = SY-MANDT
        HEADER                = wa_txtheader
        INSERT                = 'X'
       SAVEMODE_DIRECT       = ' '
       OWNER_SPECIFIED       = 'X'
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
      NEWHEADER             =
      TABLES
        LINES                 = IT_TEXTS
    EXCEPTIONS
       ID                    = 1
       LANGUAGE              = 2
       NAME                  = 3
       OBJECT                = 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.

  • SAVE_TEXT for long error Message not working.

    Hi Experts,
    I am Using SAVE_TEXT FM to Dynamically Change Long Text for  a message.
    1. i am able to run succesfully SAVE_TEXT with SY-SUBRC = 0.
    2. I can see the entry in STXH.
    3. I have also performed COMMIT_TEXT with all the parameters and COMMIT_WORK.
    4. I am able to See the changed Text using READ_TEXT FM.
    but if i go to SE91 to the message no. and see long text i am not able to see the changed text.
    also when change the long text of it in a program and call the error message we should be able to see the changed long text on click of error message in status bar but it shows the same message as in SE91.
    Earlier for this Text Object & Text ID in SE75 Save mode was SPACE so i changed the same to Update still its not working.
    Following are the details  of my code-
    REPORT  YTEST_MES message-id ZFQM.
    parameters : p_text type c.
    at selection-screen.
    if p_text <> 'C'.
    data: HEADER  LIKE  THEAD.
    data: t_lines type standard table of TLINE.
    data: ls_lines like line of t_lines.
    ls_lines-TDFORMAT = ' '.
    ls_lines-TDline   = 'TEST1 TEST2 TEST3'.
    append ls_lines to t_lines.
    Header-TDOBJECT   = 'DOKU'.
    Header-TDNAME     = 'ZFQM093'.
    Header-TDID       = 'NA'.
    Header-TDSPRAS    = 'EN'.
    Header-TDFORM     = 'S_DOCU_SHOW'.
    Header-TDSTYLE    = 'S_DOCUS1'.
    Header-TDLINESIZE = '72'.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
         CLIENT                = SY-MANDT
          header                = header
         INSERT                = 'X'
      tables
          lines                 = t_lines
       EXCEPTIONS
         ID                    = 1
         LANGUAGE              = 2
         NAME                  = 3
         OBJECT                = 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.
    CALL FUNCTION 'COMMIT_TEXT'
    EXPORTING
       OBJECT                = 'DOKU'
       NAME                  = 'ZFQM093'
       ID                    = 'NA'
       LANGUAGE              = SY-LANGU
    COMMIT WORK AND WAIT.
    message e093 with 'C'    'XXXX'.
    endif.
    I have tried calling SAVE_TEXT will possible combination's of  INSERT  = 'X' or space  or
    SAVEMODE_DIRECT       = 'X' or Both Space or 'X'.
    I know i am missing a small thing...but was unable to figure out the same.
    Please Help.
    Regards,
    Akash

    Hi  Keshav.T ,
    Thanks for your answer, but all the above FM u provided-
    read_text
    init_text
    edit_text
    Cannot be used as-
    Read_TEXT - I want to change Text not read it.
    INIT_TEXT- this cannot be used to change texts.
    EDIT_TEXT- this function module Opens the Long text screen
                       and we have to manually save it, but i want to save the text automaticaly
                       all this is done using SAVE_TEXT.
    Only problem is I am missing something after the call of SAVE_TEXT because text is changed
    as i can see that using read_text FM but if i go to SE91 and see long text for the corresponding message no. i cannot see the
    changed text done bu SAVE_TEXT.
    Please help.
    Akash

  • Use of SAVE_TEXT in customer exits / BADI for purchase order

    Hi All,
    I am trying to save some long text by using SAVE_TEXT function module in a badi implementation for purchase order header text. The same is working fine if i try to update the PO header text via a report. But if i try using badi (the code is written in a PAI event for the BADI), then though the text transfer and save is successful during the code excution, but for the first time when i add any text its not visible in ME22N tcode. Since its an online event. But when i double click on that editor and the sap script editor gets opened. then i press back button, the text is appearing on the same small screen edtor . after this any number of time i edit or delete text, the save_text function module works fine.
    My issue is why for the first time always i have to double click on the editor to open the sap script editor. I have also included commit_text in this case after save_text FM.
    the requirement here goes like this. in one tab for PO header the user will enter some number (This is a customizing screen implemented through badi.) and the corresponsing discription should appear when user clicks on text tab in po header screen (me21n / me22n).
    Kindly help.
    Thanks
    Mamata

    Hi  mamata rath
    I have solve the problem which similar to yours.  the code which is as the following
    DATA: textline TYPE tdline,
            name TYPE c LENGTH 70,
            glines TYPE TABLE OF tline,
            gline  LIKE LINE OF glines,
            ls_header TYPE thead.
         CONCATENATE ch_eban-banfn ch_eban-bnfpo INTO name.
             ls_header-tdobject = 'EBAN'.
             ls_header-tdname = name.
             ls_header-tdid = 'B01'.
             ls_header-tdspras = sy-langu.
             CALL FUNCTION 'SAVE_TEXT'
               EXPORTING
    *           CLIENT                = SY-MANDT
                 header                = ls_header
    *           INSERT                = ' '
    *           SAVEMODE_DIRECT       = ' '
    *           OWNER_SPECIFIED       = ' '
    *           LOCAL_CAT             = ' '
    *         IMPORTING
    *           FUNCTION              =
    *           NEWHEADER             =
               tables
                 lines                 = glines
               EXCEPTIONS
                 ID                    = 1
                 LANGUAGE              = 2
                 NAME                  = 3
                 OBJECT                = 4
                 OTHERS                = 5
              IF sy-subrc = 0.
                  CALL FUNCTION 'COMMIT_TEXT'
                    EXPORTING
                      OBJECT                = 'EBAN'
                      NAME                  = name
    *                ID                    = '*'
    *                LANGUAGE              = '*'
    *                SAVEMODE_DIRECT       = ' '
    *                KEEP                  = ' '
    *                LOCAL_CAT             = ' '
    *              IMPORTING
    *                COMMIT_COUNT          =
    *              TABLES
    *                T_OBJECT              =
    *                T_NAME                =
    *                T_ID                  =
    *                T_LANGUAGE            =
              ENDIF.

  • Save_text Function module is not update the data in the notification, Help!

    Here is the code snippet, does anybody know why? Thanks!
    form update_root_causes
       tables p_it_root_causes type zqmtxt_t
       using notif_no.
      data:
          ls_header type thead,
          lit_lines type standard table of tline,
          lwa_line like line of lit_lines,
          lv_index type i value 0.
      field-symbols:
          <fs> like line of p_it_root_causes.
    fill the header
      ls_header-tdobject = 'QMEL'.
      ls_header-tdname = notif_no.
      ls_header-tdid = 'LTXT'.
      ls_header-tdspras = sy-langu.
    fill the lines table
    fill from line #2 ...
      lv_index = 0.
      loop at p_it_root_causes assigning <fs>.
        if lv_index gt 0.
          lwa_line-tdformat = '*'.
          lwa_line-tdline = <fs>-qmtxt.
          append lwa_line to lit_lines.
        endif.
        lv_index = lv_index + 1.
      endloop.
    update the save_text
      call function 'SAVE_TEXT'
        exporting
          header          = ls_header
          insert          = 'x'
        tables
          lines           = lit_lines.
      call function 'COMMIT_TEXT'
       exporting
         object                = ls_header-tdobject
         name                  = ls_header-tdname
         id                    = ls_header-tdid
         language              = ls_header-tdspras.
    endform.                    " UPDATE_ROOT_CAUSES

    Hi Anthony,
    Two things you can check:
    1. Ensure the notification number you are passing is valid, i.e. it has the requisite number of leading 0s (apply CONVERSION_EXIT_ALPHA_INPUT to ensure to the field notif_no before passing it to ls_header)
    2. In the function module to SAVE_TEXT - INSERT should be 'X' not 'x'
    Please check.
    Adi

  • Update error while creating production order (TCODE CO01)

    Hello,
    We have created new plant into development server for testing. We have created production Order few days back at that time we have not faced any problem. But from last two days , when we create new production Order , system gives following error:
    ORA-00947: not enough values
    DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB
    SAPLCOVB" or "LCOVBF10"
    HEADER_POST"
    and
    Update was terminated
    System ID....   DEV
    Client.......   500
    User.....   HPLSU
    Transaction..   CO01
    Update key...   4B6E4F48C08D027FE1008000C0A802F3
    Generated....   08.02.2010, 10:35:48
    Completed....   08.02.2010, 10:35:49
    Error Info...   00 671: ABAP/4 processor: DBIF_RSQL_SQL_ERROR
    Our work is held up.
    Please also note that If we increase the QTY in the existing Order ( already created few days back) , System accept the same and Order is saved.
    We are looking for the solution for the above.
    Early reply will be highly appreciated.
    thanks
    harish

    Hi Rishi,
    You better check with your BASIS team.
    Check this link also
    Supervisor Error ADM0015
    Regards,
    Satyajit Kumar
    Edited by: Satyajit Kumar on Feb 8, 2010 7:47 AM

  • Issue with length of text field - READ_TEXT & SAVE_TEXT

    Hi,
        I need to allow user to enter max 400 char in one field and that needs to be updated in the VA02 for the corresponding sales order.
        I can able to save the text max 132 chars since TLINE-TDLINE will allow max 132 chars in both READ_TEXT & SAVE_TEXT.
        So here i am looking for the solutions for the below...
    1) How to design one input field to take 400 chars at one shot .... do i need to use table control ?
    2) Once i get the 400 char may be i will split in to 3-4 lines and i can append 130130130... like that through those FM... if not possible can you tell me the alternative.
    regards
    jaya

    You need to use class CL_TEXT_EDIT....
    Kindly stolen from Rich Heilman -:)
    report zrich_0001 .
    data:
          dockingleft  type ref to cl_gui_docking_container,
          text_editor    type ref to cl_gui_textedit,
          repid type syrepid.
    data: itext type table of tline-tdline,
          xtext type tline-tdline.
    parameters: p_check.
    at selection-screen output.
      repid = sy-repid.
      create object dockingleft
                  exporting repid     = repid
                            dynnr     = sy-dynnr
                            side      = dockingleft->dock_at_left
                            extension = 1070.
      create object text_editor
                  exporting
                       parent     = dockingleft.
      xtext = 'http:\www.sap.com'.
      append xtext to itext.
      call method text_editor->set_text_as_r3table
         exporting
               table              = itext
         exceptions
               others             = 1.
    start-of-selection.
      call method text_editor->get_text_as_r3table
         importing
               table              = itext
         exceptions
               others             = 1.
      loop at itext into xtext.
        write:/ xtext.
      endloop.
    You can use <b>RKD_WORD_WRAP</b> to wrap the text into an internal table -;)
    Greetings,
    Blag.

  • No Funds Center error while creating Production Order in CO01

    Hi SAP Consultants,
    I am trying to save production order in transaction CO01 but I am getting error saying "No funds center entered/derived in item 00001"
    Diagnosis
    In company code (&2) the component Funds Management is active. This requires the entries or the derivation of a funds center.
    You can use the following elements to derive the funds center: company code / account  or CO object .
    Procedure
    Enter a funds center or ensure that the funds center can be derived from the possible assignments by:
    assigning a funds center in the commitment items- master record or maintaining the assigning of a funds center to the CO object.
    My company is a public sector company and Funds management is active.
    Any help would be appreciated.
    Thanks in advance.

    Hi,
    Kindly check for item 0001 in the Material Master which Profit Center is maintained and check if a Funds center is assigned to it. This should solve your problem.

  • How to get the Text name to pass in the  parameter header in save_text

    Hi,
      I am trying to change the long text of operation for historical order by using the flat file.I am using the save_text to do this.I would like to know how  to get the text name in order to pass the parameter header in save_text.
      I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates and where is this value updated in the table so that i can link it thru the order no  to get the link and pass it in the text_name.
      can anyone help me out?
    krishnan

    Hi,
    Your query is.
    I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates
    In above number
    300 - Client
    1000000092 - AUFPL - Routing number of operations in the order (You can fetch this from table HIVG)
    00000001 - APLZL - General counter for order ( You can fetch this from table HIVG).
    BR,
    Vijay

  • To find  an Exit For Tcode: CO01(creation of Production Order)

    HI all,
      I want to create a Production order against a Sales order in transacttion CO01.
    After enetering the required details like quantity(eg.1000), the scheduling type and mandatory fields i schedule the order.It opens a Subscreen where i have to select a grp.After selecting it, it throws me a popup saying that all the workcenters are overloaded and gives me three options:
    1.Detailed Info
    2.Finite Scheduling.
    3.Cancel.
    If the user selects Finite scheduling the system allows it to release and create the order.
    My reqt. is that i want to restrict the user from creating a prod. order if the work centre is overloaded.
    Is there a solution where the popup that appears displays the first 2 options in display mode and allows the 3 option in the normal mode or can i throw a error message saying that the work center are over loaded so a production order cannot be created..
    I tried to find a  user exit at the time of release or scheduling but cldnt find one..
    Pls Help.
    Awaiting reply shortly.
    Thanks,
    Lailu Philip

    Hi
    Try below exits:
    CIFORD03  Enhancement for In-House Prod. Order Inc.for Customer Fields
    PPAPO003  Production Order R/3->APO: Check if Operation is APO-Relev.
    PPAPO007  Overriding Checkbox Fields for Production Order APO -> R/3
    PPCO0012  Production Order: Display/Change Order Header Data
    Hope it helps
    Regards
    Tushar Mundlik

  • How to change Production Order Number in CO01

    Hi,
    I have requirement to change the system provided production order number AUFNR to alphanumeric while creating Production Order in CO01 based on plant(WERKS) and Order Type(AUART).
    I have tried using below exits:-
    PPCO0006    - no exporting parameter for AUFNR
    PPCO0001   
    IQSM0001     - doesn't getting triggered
    But unable to resolve the issue.
    Please suggest any EXIT/BADI to meet the requirement.
    Thanks,
    Mayank

    Hi Dengyong,
    Thanks for your reply.
    My doubt is, Order type is already created in the system and whenever I am trying to change the number range it is asking for 'Numeric type only'. I am trying to do the same through CO82.
    We have to change the number range of Order Types which is already created in the system. Is it possible???
    Thanks
    Mayank

  • How to make sales order entry mandatory in CO01

    Hi,
    I have a scenario where the system should not allow to create production order without the reference of sales order.
    I can achieve this by using transaction code CO08.But in some special cases i have to use CO01 transaction for creation of production order.Will the system prompt for sales order entry through Co01 transaction.
    Regards
    Sreenath

    Hy Sreenath,
    For this you have to use User Exit.
    -  Enhancement when Creating an Order :-
    PPCO0006 Enhancement to predefine fields in order header
    -  Enhancement During Order Release :-
    PPCO0021    Enhancement for Order Release
    Better will be create saprate Order type for such type of requirements and then include that order type in User Exit.
    Regards,
    Dhaval
    Edited by: Dhaval Choksi on Aug 7, 2008 6:12 PM

  • CO01 - automatic release

    Hello,
    When I create a new PO with CO01, I have to release manually each PO with CTRL-F1.
    I know there is a way to perform an automatic release during the creation of the PO (it worked on our previous system).
    Could you please let me know how I can fix the automatic release?
    Thank you very much for your help.
    Best regards.
    François.

    Hi François,
    The setting for automatic release is maintained in prod scheduling profile as told by our members.
    This production scheduling profile can be ,
    1. Assigned to a production scheduler (transaction OPJ9)
    2. Assigned in the work scheduling profile (material master)
    In your case if production schd profile is not maintained in the material master, then the one assigned to the prodn scheduler will be used & this prod schd profile should have tick mark in the automatic release check box
    Also if prod sched profile is maintained both in OPJ9 & material master then the profile assigned to the material master will be considered. i.e. Higher priority for the profile in material master.
    Let us know if you have any questions.
    Regards,
    Senthilkumar

  • After using SAVE_TEXT in VA01 getting problem

    Hi Friends ,
    As per below link i have used SAVE_TEXT with vbeln "XXXXXXXXXX"
    'SAVE_TEXT' or 'CREATE_TEXT' unable to use
    But text is copied default to other orders also in VA01 ..
    I tried using CALL FUNCTION 'FREE_TEXT_MEMORY' but it did not worked .
    Please help .
    Regards ,
    Kumar.

    hi...
    where u getting the user input text and which field......
    where u done the coding for this.....can u tell me user exit name....
    if u use the user exit no need to use save_text . just modify that field which u get input text...
    just send ur coding...

  • Using SAVE_TEXT in VF01 for item texts

    Hi guys,
    A colleague wants to save an item text in the billing process (VF01 transaction). As you should know, there is no billing document number yet when we are creating the invoice using that transaction. He is programming at RV60AFZZ include, FORM userexit_save_document_prepare. This is his try:
    LOOP AT xvbrp.
             CONCATENATE xvbrp-vbeln xvbrp-posnr INTO lw_thead-tdname.
    *        CONCATENATE c_objectname xvbrp-posnr INTO lw_thead-tdname.
             lw_thead-tdid = 'ZZZZ'.
             lw_thead-tdobject = 'VBBP'.
             lw_thead-tdspras = 'E'.
             lw_thead-tdfuser = sy-uname.
             lw_thead-tdfdate = sy-datum.
             lw_thead-tdftime = sy-uzeit.
             CALL FUNCTION 'SAVE_TEXT'
               EXPORTING
                 client          = sy-mandt
                 header          = lw_thead
                 savemode_direct = 'X'
               TABLES
                 lines           = t_tline
               EXCEPTIONS
                 id              = 1
                 language        = 2
                 name            = 3
                 object          = 4
                 OTHERS          = 5.
             IF sy-subrc = 0.
               CALL FUNCTION 'COMMIT_TEXT'
               EXPORTING
                 OBJECT   = lw_thead-tdobject
                 NAME     = lw_thead-tdname
                 ID       = lw_thead-tdid
                 LANGUAGE = lw_thead-tdspras
               EXCEPTIONS
                 OTHERS   = 1.
               IF SY-SUBRC NE 0.
               ENDIF.
               CLEAR: lw_thead-tdname.
             ENDIF.
           ENDLOOP.
    But he is not saving the text, we dont know why. Constant c_objectname has been defined so:
    c_objectname TYPE vbeln_vf VALUE 'XXXXXXXXXX'.
    But without success... We saw XXXXXXXXXX000010 as tdname in debugger...  Do you know if the issue is the TDNAME field? What should be a correct value for LW_THEAD-TDNAME? We know the item position but not the billing document number yet, where can we get correct tdname?... or did he fail in some other point?
    Thank you!

    Hi guys,
    one of my workmates got the answer. I share that: there is a user exit call '001' in the include LV60AB07 (FORM XVBRK_KIDNO_FILL). The FM for that user exit is EXIT_SAPLV60A_001 (Billing User Exit. Processing KIDNO (Payment Reference Number)). My friend put code logic inside the include of that FM (ZXVVFU09). We used that because there the structure XVBRK already has value for the field VBELN (the number of the billing document) and we can use SAVE_TEXT and COMMIT_TEXT there without problem, concatenating billing number and item in the header. I am not sure if the billing document already was created at this point, but worked fine for us. Thanks anyway! 

Maybe you are looking for

  • Max File Size in PI 7.1

    Hi, Here we have to scenario that, File with 30MB has been XI and in XI we have to sort this file based on some number..& we have to group this record,finally Inbound Idocs are created ... There will huge performance issue when we were sorting this 3

  • N79 display problem

    My new N79 is having some stange problem,the display light goes off in 5 seconds and the screen turns black in 10 seconds I have tried to hard format it but it didnt solve my problem. I have even change the settings from the display option in setting

  • User groups.

    Hi, I want to create an Admin and a user class in java but I want them to have different rights to the DB. For example for an admin: He can delete an user's account or he can change a user's password and that stuff.. with the user having basic access

  • What is the effect of the planned order after it is converted to production

    Hello Gurus, 1.There was a planned order with wrong date 2041 instead of 2011 2. plannedorder is already converted to production order and is visble in assignment tab of the production order 3.when I  am tryng to display the planned order it gives er

  • CE 7.2 trial - Rules Composer not available

    I downloaded the trial version CE 7.2, updated it, but there is no SAP perspective visible, like Rules Composer, WebDynpro etc. How can they be added? Does the trial version need special authorization?