Saving long text

Hi experts,
Iam working on dialog programing and i have requirement to save two long texts at a time.
I put the long texts(custom controls) in tab strip control(container1,container2).
My problem is while saving....
1)if i enter data only in first container the data is getting saved.
2)If i enter data in second container it is getting saved.
3)But if i enter data in both the containers, <b>only second container data is getting saved.</b>
What might be the reason? What iam doing wrong?
(commit text written after the save_text.)
Reward guaraneed
thanks
kaki

Hi Kaki,
Include the logic to save data from TAB1 under SAVE of Tab2.
CASE ok_code.
    WHEN 'SAVE'.
      t_rhead-tdname = ag_no.
      t_rhead-tdid = 'Z001'.
      t_rhead-tdspras = sy-langu.
      t_rhead-tdobject = 'ZAGREEMENT'.
      CALL METHOD rem->get_text_as_stream
        IMPORTING
          text = rem_tab[].
      LOOP AT rem_tab.
        t_remk-tdformat = '/'.
        t_remk-tdline = rem_tab.
        APPEND t_remk.
      ENDLOOP.
      PERFORM SAVE_TEXT.
      CALL FUNCTION 'COMMIT_TEXT'.
  ENDCASE.
<b>This is tab2 container2 code</b>
  CASE ok_code.
    WHEN 'SAVE'.
      CALL METHOD notes->get_text_as_stream
        IMPORTING
          text = notes_tab[].
      IF flag_cont2 = 1.
        LOOP AT notes_tab.
          t_notes-tdformat = '/'.
          t_notes-tdline = notes_tab.
          APPEND t_notes.
        ENDLOOP.
      ENDIF.
      t_nhead-tdname = ag_no.
      t_nhead-tdid = 'Z002'.
      t_nhead-tdspras = sy-langu.
      t_nhead-tdobject = 'ZAGREEMENT'.
      PERFORM save_text.
      CALL FUNCTION 'COMMIT_TEXT'.
<i><b>* To updated Tab1, when SAVE is clicked on TAB2</b></i> 
<b>  t_rhead-tdname = ag_no.
      t_rhead-tdid = 'Z001'.
      t_rhead-tdspras = sy-langu.
      t_rhead-tdobject = 'ZAGREEMENT'.
      CALL METHOD rem->get_text_as_stream
        IMPORTING
          text = rem_tab[].
      LOOP AT rem_tab.
        t_remk-tdformat = '/'.
        t_remk-tdline = rem_tab.
        APPEND t_remk.
      ENDLOOP.
      PERFORM SAVE_TEXT.
      CALL FUNCTION 'COMMIT_TEXT'.</b>
  ENDCASE.
Best regards,
Prashant
Message was edited by: Prashant Patil

Similar Messages

  • Error while saving Long Texts

    Hello
    We are using SRM7 Extended classic scenario.
    We don't use shopping carts, rather create POs directly in SRM which will be transferred to ECC as per the standard.
    Error:
    I am getting an error "Error while saving Long Texts" during my PO creation. I get this message in a small pop-up screen. As soon as i click ok or close the pop up screen it kicks me out of the PO creation screen back into the main SRM screen.
    When:
    During the PO Creation
    Any specific situation:
    Yes, only for Material POs
    This is happening when I am creating the PO with a Material code. I can create free text PO without any issues.
    This is a standard message and the message number is 022.
    Thaks for the help guys.

    Hi,
    To confirm can you check commeting "getOADBTransaction().commit();" gives any error message?
    If yes then you can try the following option:
    Have you checked whether the "/" is changed to "\" in the dbc file?
    In the following two entries the slash has to be made as shown below:
    APPS_JDBC_URL=jdbc\:oracle\:thin\:@(DESCRIPTION\=(ADDRESS_LIST\=(LOAD_BALANCE\=YES)(FAILOVER\=YES)(ADDRESS\=(PROTOCOL\=tcp)(HOST\=10.100.503.6)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=VIS)))
    JDBC\:processEscapes=true
    Thanks and Regards,
    Lacman

  • Issue while saving long text through MS Word Editor in SAP

    Hi All,
    I am facing some issue while saving text through Word editor in SAP(like Notes in Installation or Long Text in device location).
    After entering the text, when I am pressing the Back button, it says text transferred successfully, but when I try to see the text again, its not in the proper format.
    Every time I go to the word editor, some text is deleted.
    Thanks in advance for your help.
    Manoj Vatwani

    Hi Manoj,
    Can you share some screenshot for the formatting issue that you are facing.
    Thanks,
    Amlan

  • Problem in Saving long texts from IC Webclient

    Hi,
    I have a little problem with BP long text transfert.
    In IC Webclient, I identify a account and I create a long text (for exemple a Accounting Note).
    I can find this text in CRM (t-code BP->long text) but, it is not transfert to ECC (XD03->Extra->text).
    If I create a accounting note directly in CRM, it is transfert to ECC !!
    The transaction PITX is customized in ECC.
    I work with CRM5.0 and ECC6.
    What I missed ?
    Gaétan

    Hi Gaétan,
    Maybe the BDOC BUPA_MAIN responsible to export the change to ECC is not being created when you make the change in IC Webclient.
    Can you confirm it in SMW01? Try to make a change in a partner long text in IC webclient, and check if the bdoc was sent to R3.
    Then try it in BP t-code, and check it again.
    If this is the problem, maybe you should contact OSS suport.
    Kind regards,
    Garcia

  • Saving long text - problem

    Hi,
    I am having a long text which has 10lines.. i need to save that long text from a file using migration.
    first i need to store that text in a field for of an internal table & then save it in a long text ..
    can any one help me out in providing the soln/alternatives to fix this..
    Pls. do the needful.
    thanks
    john

    Hi John,
    From what I know about long text in SAP is that they are stored based on ID, Object and Language. First you probabaly need to set them using tcode SE75(Change / Add New Object and ID)
    Then in your program you can use several FM that process long text.
    My favorite is
        CALL FUNCTION 'LANGTEXT_ONLY'
             EXPORTING
                  object           = *Object
                  object_nr      = *Object_no
                  spras           = *language
                  txtid              = *ID
                  x_xaktyp      = *aktyp
               save_mode   = 'X'
               text_history  = 'x'
               text_property = 'x'
             IMPORTING
                  ind_inv       = *line
                  inv_exist     = *exist
             TABLES
                  t_inlines     = t_linetab.
    This FM will call longtext editor and also set the mode
    aktyp = H => create new,
    aktyp = V => change
    aktyp = A => read only
    Another useful FM is READ_TEXT and SAVE_TEXT. Try to experiment with it and see any documentation for detail.
            CALL FUNCTION 'READ_TEXT'
              EXPORTING
                id              = *ID
                language  = *Language
                name        = *Name
                object        = *Object
              IMPORTING
                header    = t_headltx
              TABLES
                lines     = t_linetab
              EXCEPTIONS
                not_found = 1.
            CALL FUNCTION 'SAVE_TEXT'
              EXPORTING
                header          = t_headltx
                savemode_direct = 'X'
              TABLES
                lines           = t_linetab.
    Hope it helps
    Regards
    Hadi

  • Problem in saving long text data from custom

    Hi Expert,
    I am working on a screen exit in QM01. I have created a editor box(like the description box under Description tab in QM01) using class cl_gui_custom_container and cl_gui_textedit. I am able to create and display the text I type in the box alongwith other standard changes but if I try to change and save the text only in the custom text box, it is not getting saved. I  debugged and found out that the standard does not recognize any change in the custom controller box.
    Please suggest.
    Thanks in advance,
    Sangeeta.
    Edited by: Sangeeta on Oct 1, 2009 7:01 AM

    Solved on my own. Consider all the scenarios by Using read_text in PBO and edit_text FM in PAI. At last save_text in the PAI.

  • Best practice for saving long text messages?

    I'm writing a cook book type program and for the instructions I expect that some of the steps can get quite lengthy. Is it acceptable to store a paragraph in a single string object or is there a better method?
    Thanks in advance.

    If there's no further structure to it, String sounds fine.

  • Tcode FV50: How to find long text in FI Document line item Before Saving.

    Hi,
    How to find long text in FI Document line item.
    During Parking of the FI document through Tcode FV50 i m giving the some text in the long text not in the text field.
    I would like to validate the Long Text Before Saving in user exit "U300" under  the  "Sunstitution" .
    Please anybody can be help me out where exactly this long text is going to be stored or in which internal table or memory id.
    Please give me the answer as soon as possible .
    Note:- Read_Text function module is not useful. Because Read_text useful after saving document.

    Hi Amit,
    In application area FINANCIAL ACCOUNTING , go for node LINE ITEM. Here create a step & maintain the prerequisite as per your requirement & in the check you can mention the code or you can direct it to a custom program like ZFI_RGGBR000.
    Here while maintaining the check you will get structures BKPF & BSEG in which you will get the desired field you are looking for.
    Just try to explore in your system how the other validations are maintained.
    After you are done with all your code, you have to run the regeneration program RGUGBR00.
    Here utmost care should be taken while running regeneration program, you should select all the checkboxes in the selection screen except  GENERATE SETS, GEN SUBSTN ROUTNS IN ALL CLNTS  & TRACE PROG. GENERATE CALLS .
    Hope this make your doubt clear.
    Regards
    Abhii

  • User Exit: Saving data in Production Order Header Long Text

    Hi PP Gurus,
    Can any one let me know which user exit can be used to save some data in the Long Text of Production Order Header.
    We try PPCO0007, it works well on ECC, but my client's system version is 4.7, it does not work.
    In 4.7 version, is there any other User Exit or BADI can be used to comply with this requirement?
    It's quite common requirement, hope someone can help me. Thanks.
    Best regards,
    Sun Qiang

    Hi All,
    Thank for your reply.
    After saving the text using 'SAVE_TEXT' function module and commiting it you need to update the 'ltext' field in AUFK table.
    SELECT SINGLE * INTO wa_aufk FROM aufk WHERE aufnr EQ '000012345678'.
    wa_aufk-ltext = 'D'.
    MODIFY aufk FROM wa_aufk.
    It works in Enhancement PPCO0007.
    This call can be closed. Thanks.
    BR
    Qiang

  • Saving/Commiting the Long Text

    Hi,
    I am trying to save the long text created in a Z Transaction (Table Control). While saving it, I am getting the message as “Text Saved". But It is not actually stored in SAP. I am not sure, what is that I am missing. I am using the SAP Standard Routine to Save the Long Text. I am also calling the FM: COMMIT_TEXT explicitly after the long text is saved. Can any one please suggest me, what should I do to commit the long text in SAP?
    Appreciate Your Help.
    Thanks,
    Kannan

    May be my earlier post was confusing, I was asking you to set the Insert parameter to SPACE and the Savemode_direct to 'X' and see if it works or not.  I had the same issue and resolved it using the above parameters.  Also try and see if Srinivas's suggestion in the following thread:
    Problem with SAVE_TEXT FM
    hith
    Sunil Achyut

  • Regarding Saving of LONG TEXT in QP02/QP03

    Hi All,
    I am saving the long texts for Inspection Characteristics using SAVE_TEXT.
    The Text is getting saved but i am not able to see it in Display (QP03).
    To see it in display I need to Save the text first in QP02 and then it is available in QP03.
    I tried using COMMIT_TEXT after SAVE_TEXT..but it's not happening.
    Your help is needed on this.
    Regards,
    Priyanka

    Hi
    one way to upload the long text is to run a bdc.... in BDC check the long text and put the default data in the text with the length greater than 40 characters ........now use  the create_text to upload the long text with the data u need to upload with....
    second one in uploading the BOM header i had also updated a field LTXSP in table STKO for those BOM's..this field is required to be updated for the display of long text in BOM.....
    Similarly u can also find the field in the table for Inspection plan.....i m sory i dnt know much about inspection plan....but there also a similar logic can be applied....can u tell me about the table u are using to update the QP02
    kanishak

  • How to create a long text in VF01 before saving the document

    Hi,
      Im tring to create a perfama invoice with the help of delivery number and document type (F8) , by pressing the enter key im going to the second screen, once i get into the second screen im suppose to get the Header text and Item text, i.e long text for both header and item..
    Can u please help me to solve this issue.
    Thanks,
    Reni

    Hi
    Generally in the Sales Flow all the Header and Item texts from sales order are copied into Delivery when it is created and when you create a Invoice using that delivery all those texts are copied into the invoice. check with functioanl consultant once and see.
    We can also create/upload  the texts explicitely using the fun modules
    CREATE_TEXT and SAVE_TEXT .
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Short coming in BAPI for saving Document Long Text

    Hello Experts,
    I would be thankful to you if anyone of you offer a solution to the problem below.
    I have found that the tables parameter LONGTEXTS of function BAPI_DOCUMENT_CHANGE/CHANGE2/CREATE/CREATE2 (structure BAPI_DOC_TEXT) could include the field TDFORMAT so that the user can specify how the next line should be interpreted by the editor.  This would be in accordance with the tables parameter LINES of function SAVE_TEXT which is used to save long text.  Currently only the text line is catered for in the BAPI and the TDFORMAT is therefore defaulted to u2018*u2019 in the SAVE_TEXT function which causes each line in the table to be treated as a new line. 
    What if the user wanted the lines to be treated as continuous text?
    With Best Regards,
    Mientjie Ferrie

    Hi,
       1. From se37, check for function group STXD
    2. There will be many Fm.
    3. The commonly used are
    READ_TEXT
    EDIT_TEXT
    SAVE_TEXT
    Regards

  • Problem with long text

    Hi folks,
    iam uploading longtext in transaction KP06 in bdc programing using create_text.
    now my problem is if i pass selection criteria
    case 1:
    Vertion : N0
    fiscal year : 2007
    planner profile: CCPLAN4
    then the budeget plan data uploading successfully along with long text.
    case2: Vertion : N1
    in this case also everthing wrking fine
    case3: Vertion : 001
    in this case budgetplan data uploading sucessfully but longtext is not uploading,
    i debbug the proragm , create_text also returning sy-subrc = 0. but if i check in KP06  the long text is not there.
    data declaration
    vertion : VERSN type C(3)
    can u tell me the problem is in logic or with FM ?
    note : i checked with save_text also.
    regards
    neeru

    HI Naimesh,
    the FM Create_text internally contains both FMs save_text and commit_text,
    even i debug the FM in case of vertion N1, N0 and 001,
    all the cases sy-subrc = 0.
    code:
    CLEAR G_OBJNR.
    LOOP AT RECORD.
    COST = RECORD-BDC01.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = COST
        IMPORTING
          output = COST.
        CONCATENATE 'KS' p_kokrs record-bdc00 INTO g_objnr.
            SELECT SINGLE * FROM COSP WHERE OBJNR = g_objnr
                              AND GJAHR = P_GJAHR
                              AND VERSN = p_ver
                              AND KSTAR = COST.
      IF SY-SUBRC = 0.
          LEDNR = COSP-LEDNR.
          OBJNR = COSP-OBJNR.
          GJAHR = COSP-GJAHR.
          WRTTP = COSP-WRTTP.
          VERSN = COSP-VERSN.
          KSTAR = COSP-KSTAR.
          HRKFT = COSP-HRKFT.
          VRGNG = COSP-VRGNG.
          VBUND = COSP-VBUND.
          PARGB = COSP-PARGB.
          BEKNZ = COSP-BEKNZ.
          TWAER = COSP-TWAER.
    CONCATENATE LEDNR OBJNR INTO OBJNR.
    CONCATENATE OBJNR GJAHR INTO TNAME1 separated BY SPACE10.
    CONCATENATE TNAME1 WRTTP VERSN INTO TNAME2.
    CONCATENATE TNAME2 KSTAR INTO TNAME3 separated BY SPACE.
    CONCATENATE TNAME3 VRGNG INTO TNAME4 separated BY SPACE4.
    CONCATENATE TNAME4 BEKNZ INTO TNAME5 separated BY SPACE10.
    CONCATENATE TNAME5 TWAER INTO TNAME.
    I_THEAD-TDOBJECT = 'CCSS'.
    I_THEAD-TDID = 'COSP'.
    I_THEAD-TDNAME = TNAME.
    I_THEAD-TDSPRAS = 'E'.
    APPEND I_THEAD.
    i_tline-tdformat = '*'.
    I_TLINE-TDLINE = RECORD-LONGTEXT.
    APPEND I_TLINE.
    loop at i_thead.
    CALL FUNCTION 'CREATE_TEXT'
      EXPORTING
        FID               = I_THEAD-TDID
        FLANGUAGE         = I_THEAD-TDSPRAS
        FNAME             = I_THEAD-TDNAME
        FOBJECT           = I_THEAD-TDOBJECT
      SAVE_DIRECT       = 'X'
      FFORMAT           = '*'
      TABLES
        FLINES            = i_tline
    EXCEPTIONS
      NO_INIT           = 1
      NO_SAVE           = 2
      OTHERS            = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
    CLEAR I_TLINE.
    REFRESH I_TLINE.
    CLEAR I_THEAD.
    REFRESH I_THEAD.
      SELECT SINGLE * from cokp into itab WHERE OBJNR = g_objnr
                              AND GJAHR = P_GJAHR
                              AND VERSN = p_ver
                              AND KSTAR = COST.
    if sy-subrc = 0.
       itab-TXFLG = 'X'.
       append itab.
       write:/ 'Text saved for', record-bdc00 , record-bdc01.
       else.
          write:/ 'Text saved for', record-bdc00 , record-bdc01.
          ENDIF.
    ENDIF.
    my program wrking fine but the long text is not visible for vertion 001.
    regards
    niru

  • How to get Long text in IW33

    Hi Everyone,
    I have a requirement where I need to display the Longtext that is displayed in transaction IW33.
    Its is not the KTEXT feild pf table AUFK as this feild contains data upto 40 characters.
    My requirement is to fetch all the characters that are in Longtext.
    There must be a table where the long text is saved.
    Please let me the table ???
    Regards,
    Raj

    Press Display Text button in front of long text.You will go to editor.Then from the munubar select Go to->Header.Use these header details:
    Text Name   <Order no.>
    Language        EN
    Text ID         KOPF Order header text
    Text Object     AUFK       Order text
    Pass this to FM READ_TEXT.You can also refer the tables STXH and STXL but i guess FM will solve your problem.

Maybe you are looking for

  • Difference between SXPG_COMMAND_EXECUTE and Open data set mechanism

    Can you please help me to know the difference between moving a file using FM "SXPG_COMMAND_EXECUTE" and moving file using "open data set - transfer file- close data set" mechanism?

  • What do i need to completely fix my ipad?

    Guys, Let's be honest: As much as I love Steve Jobs and his company as a whole, why is it so difficult to fix these devices? I mean yes it is a cool piece of technology but it has its flaws that, when dropped or otherwise broken, FAR outweigh the ben

  • Tollerence group for multiple user

    hii all can any one tell me how shall i assign multiple tollerence group to multiple user? and also tell me, while creating tollerence group am i have to give the tollerence group with co code? or just only co code?? please solve regards rajesh Kr Ma

  • Getting 500 Error when calling XI from Siebel

    Hi,   We have generated a WSDL file from XI and gave it to Siebel team. They are getting a 500 Error when they try to call us using that WSDL file. Below is the error message they are getting. "[1] Error Invoking service 'MI_SIEBEL_WS_ORDER_TOXI_OUT'

  • Sharepoint webservice call - Invalid Response Code: (401) Unauthorized.

    Hello, when I try to call a webservice provided by Sharepoint Services 3.0 I always get the following: InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://[myserver]/_vti_bin/dws.asmx?WSDL, used user