Problem in populating PO item text using FM:SAVE_TEXT

Hi All,
I am having an issue with SAVE_TEXT FM,
I need to populate the item text field:
This FM works fine if the Item text field is blank and i am populating it with text, say "This is a test case",
How ever if the text field is already populated say the item text field has "Testing", my requirement is i will append the new text to the previously existing, in this case it should come as "Testing This is a test case",
For doing this i am reading the existing text using READ_TEXT FM and concatenating both the texts separated by space, and passing this to i_lines, how ever the O/P which i get in the text field is "Testing".
Please advice.
The cod is shown below:
CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    CLIENT                = SY-MANDT
     header                = t_head
     insert                = 'X'
     savemode_direct       = 'X'
    OWNER_SPECIFIED       = ' '
    LOCAL_CAT             = ' '
  IMPORTING
    FUNCTION              =
    NEWHEADER             =
    TABLES
      lines                 = i_lines
   EXCEPTIONS
     id                    = 1
     language              = 2
     name                  = 3
     object                = 4
     OTHERS                = 5.

hi,
once u use the save_text also
with save_text u are updating the STXH table .
there is one field in stxh table which is once updated shows the text in the sceen.
or u can run a bdc put the default text where u want to put and afterwards when u use create_text and commit_text,u ll be able to see the text in the screen.
regards
kanishak

Similar Messages

  • Problem in chage FB02 item text

    Hi Freinds.
       I got one assignment to change the Item text in FB02(Change Document). I wrote one program to change the item text using FM FI_ITEMS_MASS_CHANGE. It's working fine. But as soon it changes the next line item's text, the previous is also changed to same as this one. And if there are 6 or 7 items ,at the end of the program , all the line items have same text as the last one.
    But we need different textx of line items for one Header document.
    Am I using the correct Function Module? Please suggest.
    Previously I tried doing recording and BDC of FB02, but failed because i think there is some enhancement done in this T-code.
    so please suggest how to complete my assignment.
    Thanx and regrads.
    Prashant Tiwari.

    perform bdc_dynpro    using 'SAPMF05L' '0102'.
    perform bdc_field                    using 'BDC_CURSOR'
                                        'RF05L-GJAHR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF05L-BELNR'
                                  l_belnr..
    perform bdc_field       using 'RF05L-BUKRS'
                                  l_bukrs     .
    perform bdc_field       using 'RF05L-GJAHR'
                                  l_gjahr.
    perform bdc_field       using 'RF05L-BUZEI'
                                  record-BUZEI_004.
    check the line item and call the screen based on the type
    if line item related to screen 300 then
    perform bdc_dynpro  using 'SAPMF05L' '0300'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'BSEG-SGTXT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BSEG-SGTXT'
                                  l_sgtxt.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'COBL-ANLN1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    else.
    perform bdc_dynpro      using 'SAPMF05L' '0301'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'BSEG-SGTXT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BSEG-SGTXT'
                                  l_sgtxt.
    endif.
    if line item related to screen 300 then
    perform bdc_dynpro      using 'SAPMF05L' '0301'.
    perform bdc_field          using 'BDC_CURSOR'
                                          'BSEG-ZUONR'.
    perform bdc_field       using 'BDC_OKCODE'
                                         '=AE'.
    perform bdc_dynpro  using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_CURSOR'
                                        'COBL-ANLN1'.
    perform bdc_field       using 'BDC_OKCODE'
                                       '=ENTE'.
    else.
    perform bdc_dynpro      using 'SAPMF05L' '0300'.
    perform bdc_field            using 'BDC_CURSOR'
                                            'BSEG-ZUONR'.
    perform bdc_field       using 'BDC_OKCODE'
                                         '=AE'.
    endif.

  • PROBLEM IN CREATING BOM ITEM TEXT FROM TEXT FILE

    Hi All,
    I am developing interface program for creating BOM based on data it text file. in my text file contain three column(material, qty and longtext). These text i need to upload to BOM TCODE CS01). Using SAVE_TEXT I have generated text object. it don't says any error. But while viewing text in CS03, text is not visible. Give me suggestion or give me any other method for updating item text from textfile.
    Thanks in advance.
    Regards.
    Peranandam.

    Hi Carl,
    Actually problem is SAVE_TEXT updates text but I cant able to view in CSO3 transaction. because while creating BOM I forget for updating language key for long text. After updating language key I can able to view text in CS03.
    Now I am facing another problem. If I am executing program directly without going to debug mode, It is not updates text. Logic everything is correct. Give me some suggestions for solving this issue. I am also tried with commit work, Commit_text and wait up n seconds statement.
    Regards,
    Peranandam

  • Problem in populating userfields in PO using BAPI_PO_CREATE1

    DATA: lw_poheader type BAPIMEPOHEADER,
          lw_poheaderx type BAPIMEPOHEADERX,
          lw_poitem type BAPIMEPOITEM,
          lt_poitem type standard table of BAPIMEPOITEM,
          lw_poitemx type BAPIMEPOITEMX,
          lt_poitemx type standard table of BAPIMEPOITEMX,
          lw_posched type BAPIMEPOSCHEDULE,
          lt_poshced type standard table of BAPIMEPOSCHEDULE,
          lw_poschedx type BAPIMEPOSCHEDULX,
          lt_poschedx type standard table of BAPIMEPOSCHEDULX,
          lw_extensionin type BAPIPAREX,
          lt_extensionin type standard table of BAPIPAREX,
          lt_return type standard table of bapiret2,
          lw_return type bapiret2,
          lw_mepoheader type bapi_te_mepoheader,
          lw_mepoheaderx type bapi_te_mepoheaderx,
          lw_mepoitem type bapi_te_mepoitem,
          lw_mepoitemx type bapi_te_mepoitemx,
          lw_hdr type BAPIMEPOHEADER-PO_NUMBER,
          lv_err type c.
    *xad
    data: begin of w_char_struc,
          po_item(5),
          ZINDVOGN(10),
          ZKATMIN(10),
          ZKATENH(30),
          ZKATNET(13),
          ZKATBNET(30),
          ZKATMGD(45),
          ZKATBME(30),
          ZKATVB(10),
          ZKAT(3),
          ZKATEAN(18),
          ZZYMOD_NRK(2),
          ZZYMOD_NR(15),
          ZZOMOD_NRK(2),
          ZZOMOD_NR(15),
          ZZOPLKODE(1),
          ZKATINDISC(3),
          ZZINIEND_DT(8),
          ZZINI_LGORT(4),
          CONS_ORDER(1),
          end   of w_char_struc.
    *xad
    data: begin of w_mepox,
            po_item(5),
            ZZINIEND_DT(1),
          ZZINI_LGORT(1),
          end of w_mepox.
    lw_poheader-comp_code = '0010'.
    lw_poheader-doc_type = 'NB'.
    lw_poheader-vendor = '000000030'.
    lw_poheader-purch_org = '0010'.
    lw_poheader-pur_group = '002'.
    lw_poheaderx-comp_code = c_x.
    lw_poheaderx-doc_type = c_x.
    lw_poheaderx-vendor = c_x.
    lw_poheaderx-purch_org = c_x.
    lw_poheaderx-pur_group =     c_x.
    lw_poitem-po_item = '00010'.
    lw_poitem-material = '000000000001000400'.
    lw_poitem-plant = '0020'.
    lw_poitem-stge_loc = '0011'.
    lw_poitem-quantity = '2.000'.
    append lw_poitem to lt_poitem.
    lw_poitemx-po_item = '00010'.
    lw_poitemx-material = c_x.
    lw_poitemx-plant = c_x.
    lw_poitemx-stge_loc = c_x.
    lw_poitemx-quantity = c_x.
    append lw_poitemx to lt_poitemx.
    lw_posched-po_item = '00010'.
    lw_posched-delivery_date = '02.10.2007'.
    lw_posched-quantity = '2.000'.
    append lw_posched to lt_poshced.
    lw_poschedx-po_item = '00010'.
    lw_poschedx-delivery_date = c_x.
    lw_poschedx-quantity = c_x.
    append lw_poschedx to lt_poschedx.
    lw_mepoheader-ZINIKUNAG = '0000000010'.
    lw_mepoheader-ZINIKUNWE = '1010004855'.
    lw_mepoheader-ZINIAUART = 'ZOTL'.
    lw_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
    lw_extensionin-valuepart1 = lw_mepoheader.
    append lw_extensionin to lt_extensionin.
    lw_mepoheaderx-ZINIKUNAG = c_x.
    lw_mepoheaderx-ZINIKUNWE = c_x.
    lw_mepoheaderx-ZINIAUART = c_x.
    lw_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
    lw_extensionin-valuepart1 = lw_mepoheaderx.
    append lw_extensionin to lt_extensionin.
    clear lw_extensionin.
    lw_mepoitem-po_item = '00010'.
    *lw_mepoitem-ZZINIEND_DT = '21.07.2007'.
    lw_mepoitem-ZZINI_LGORT = '0011'.
    lw_extensionin-structure = 'BAPI_TE_MEPOITEM'.
    *lw_extensionin-valuepart1 = lw_mepoitem.
    *move-corresponding LW_MEPOITEM to w_char_struc.
    w_char_struc-po_item = '00010'.
    *w_char_struc-zziniend_dt = '20070707'.
    w_char_struc-zzini_lgort = '0011'.
    *MOVE '00010' TO LW_EXTENSIONIN-VALUEPART1.
    lw_extensionin+30 = w_char_struc.
    append lw_extensionin to lt_extensionin.
    clear lw_extensionin.
    lw_mepoitemx-po_item = '00010'.
    *lw_mepoitemx-ZZINIEND_DT = 'X'.
    lw_mepoitemx-ZZINI_LGORT = 'X'.
    lw_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
    lw_extensionin-valuepart1 = lw_mepoitemx.
    append lw_extensionin to lt_extensionin.
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        poheader                     = lw_poheader
       POHEADERX                    = lw_poheaderx
      POADDRVENDOR                 =
      TESTRUN                      =
      MEMORY_UNCOMPLETE            =
      MEMORY_COMPLETE              =
      POEXPIMPHEADER               =
      POEXPIMPHEADERX              =
      VERSIONS                     =
      NO_MESSAGING                 =
      NO_MESSAGE_REQ               =
      NO_AUTHORITY                 =
      NO_PRICE_FROM_PO             =
    IMPORTING
       EXPPURCHASEORDER             = lw_hdr
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
    TABLES
       RETURN                       = lt_return
       POITEM                       = lt_poitem
       POITEMX                      = lt_poitemx
      POADDRDELIVERY               =
       POSCHEDULE                   = lt_poshced
       POSCHEDULEX                  = lt_poschedx
      POACCOUNT                    =
      POACCOUNTPROFITSEGMENT       =
      POACCOUNTX                   =
      POCONDHEADER                 =
      POCONDHEADERX                =
      POCOND                       =
      POCONDX                      =
      POLIMITS                     =
      POCONTRACTLIMITS             =
      POSERVICES                   =
      POSRVACCESSVALUES            =
      POSERVICESTEXT               =
       EXTENSIONIN                  =  lt_extensionin
      EXTENSIONOUT                 =
      POEXPIMPITEM                 =
      POEXPIMPITEMX                =
      POTEXTHEADER                 =
      POTEXTITEM                   =
      ALLVERSIONS                  =
      POPARTNER                    =
      POCOMPONENTS                 =
      POCOMPONENTSX                =
      POSHIPPING                   =
      POSHIPPINGX                  =
      POSHIPPINGEXP                =

    Hi Sree,
    You can create Item level texts using BAPI_SALESORDER_CHANGE.
    Just ensure that you pass correctly : Document number i.e. Sales order number , Item number , text ID and language  in tables parameter ORDER_TEXT of this BAPI.
    You will have to call BAPI_TRANSACTION_COMMIT after call to BAPI_SALESORDER_CHANGE.
    Hope it helps.
    Regards,
    Akshay Bhagwat
    Note: Some points will be fine if that helped you:)

  • Populating Invoice Item text

    Hi
    I'm migrating a SAPscript Invoice to Smartform and trying to figure out a way to display the Invoice Item text.
    Any ideas on how this can be accomplished will be highly
    appreciated!

    Use the TEXT ELEMENT and in that change the property to INCLUDE TEXT. This will prompt you to enter the parameters TDOBJECT / TDID and TDNAME.
    You should be using them already in your SAP Script.
    Regards,
    Ravi
    Note :Please mark the helpful answers

  • Problem in populating the delivery text in Idoc

    Hi Experts,
           We are using a custom EDI output type for VT02n transaction. Currently we are encountering a problem when we set the dispatch time as 'Send immediately'.
           The problem is some of the characters in delivery texts are missing in the segment of the idoc generated.
           The problem does not occur when we set the dispatch time as 'send with application own transaction'.
           But we did not do any coding based on the dispatch time.
           Please provide us suggestions to solve this problem.
    Regards
    K Arasu.

    Hi,
    Check whether you have maintained the condition records for output for the above combination & also the Print device in the Communication tab & Print immediately settings.
    If you haven't maintained the above, do the same & check.
    Thanks & Regards,

  • Having a problem with the dictation of texts using Siri.

    I am using the microphone on the text screen to dictate my message, and then I press done.  Siri completes the translation from voice to text (with fairly good accuracy I might add), BUT when I press the SEND button the message is not sent.  Rather the messaging screen shuts down and it returns me to the home screen. 

    Siri is still beta. Since Apple doesn't participate in this forum (strictly user-to-user), if you want to tell Apple anything, post it here:
    http://www.apple.com/feedback/iphone.html

  • Item text inconsistency for multiple item text in CRM Billling document

    Hi Experts,
    I am facing problem in adding item text in CRM Billiing document in Web UI.There are 3 line items in my billing document and their item text gets determined from Billing due list items but there is a requirement to change the item text at billling documnet level also to populate it in the invoice.Here comes the problem when I change item text of first item system alllows me to change in text type Sales Text but when I am doing the same with suceeeding items it throws me a exception like this.
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:
    Entry parameter ES_KEY of method CL_CRM_GENIL_CONTAINER_OBJECT->GET_KEY contains value , which is not allowed
    Exception Class CX_SY_IMPORT_MISMATCH_ERROR
    Error Name CONNE_IMPORT_WRONG_OBJECT_TYPE
    Program CL_CRM_GENIL_CONT_SIMPLE_OBJ==CP
    Include CL_CRM_GENIL_CONT_SIMPLE_OBJ==CM007
    ABAP Class CL_CRM_GENIL_CONT_SIMPLE_OBJ
    Method IF_GENIL_CONT_SIMPLE_OBJECT~GET_KEY
    Line 18 
    Long text During IMPORT it was ascertained that the object in the dataset has a different object type to the target object, or the structure of the complex object is not compatible with the structure of the target object. The target object has either a different length, a different number of decimal places or a different data type to the object that is to be imported.
    Error type: Exception
    Your SAP Business Server Pages Team
    This change in item text only works for first item and gives exception for all below items,Is this a standard SAP functionality or what can be done as same thing can be done from back end.

    Hi,
    The above given thread is the perfect solution for your requirement.
    Defaulting some data in the text field means, either you can use the the Substitution / BTE.
    Using the substitution, system not allows you to change the text field in case of any modification you want. But with the BTE you can specify only at the time of the document posting.
    BTE is the best option in this case.
    VVR

  • Line item text in Basket - doesn't seem to work in B2B standard

    I'm trying to input some text associated with a line item in the basket and I cannot get the standard to work or my custom text type either.
    The standard has a text id hard-coded as 1000 (Customer Wishes) in the SalesDocumentCRM class, but when I place an order using B2B standard, the text is not stored in the backend (CRM).
    It seems to me that standard should work so I'm quite puzzled.
    Has anyone else had success populating line item texts?
    Any hints would be appreciated.
    Regards,
    Tim

    It turns out to be an authorization issue.
    The CRM_TEXT_ID authorization object for the text id's configured are not set.

  • IDOC: Item text issue

    Hi gurus,
    Here's the scenario:
    I created a sales order (VA01) in Box A and automatically passes via IDOC to Box B. From there, I created Delivery (VL01) and Shipment (VT01). Then the 2 document will be copied back via IDOC. So in Box A, it has already Delivery and Shipment.
    The problem is, The delivery item text that I am getting is from the component of a BOM Material. I was thinking if I am getting the IDOCS from a sales order and not from the delivery doc. Since the materials in the delivery doc are not expanded..
    How will I get the IDOCS from the delivery instead from sales order.
    Point will be given...Thanks guys!

    Hi,
    If you wanted to trigger an IDOC from an delivery document follow the below steps:-
    Create a partner profile for that shipto party in WE20 transaction.
    While creating the partner profile use the partner function as SH,
    Basic Type :-  DESADV01
    Message Type:- DESADV
    Output Type :- LD00
    Process Code:- SD08
    Application :- V2
    USe all the things in your partner profile and trigger the output LD00 in your delivery document and check.
    An IDOC will be triggered from the delivery document of your SAP system.
    Thanks,
    Mahesh.

  • Getting Item Text  from sale order items

    Hi All,
    I am trying to get sale order item text using Include text in smartforms.
    my text object  is VBBP and my text id is 0004.
    What should I pass in Text Name  ?.---Order Number or Item Nunmber or Both.
    If both can you guys explain how to pass both ?.
    will be REVARDED.

    Hi,
    When you see the texts in the line item of va03..
    Double click on the text..
    Then in the menu..Goto -> Header..
    There you can find the Text name..
    Generally if it is Item text..Then the text name will be
    order number + line item
    Thanks
    Naren

  • Populating CRM marketing attributes using the APD

    Hi Experts
    We are having problems with populating CRM marketing attributes using the APD. When we run our process we get the error message:
    CRMBW_ATTR_WRITE005: Error when processing function module CRMBW_UPDATE_BPMKT_5. Message no. RSAN_MDL024
    As you can see, we are using the new function module CRMBW_UPDATE_BPMKT_5 since the old CRMBW_UPDATE_BPMKT did not work either.
    Do we have to add a reference to a infoobject in transaction CRMBWTARGETS? We have not done this because the marketing attribute in CRM doesn’t have decimals and all the objects in BI have. Could this be the cause of the error?
    Kind regards
    Erik

    Hi Ramesh,
    Thanks for quick reply.
    I have already followed the procedure you have described. Since there is not common objects between ODS and Bpatner infoobject, i am not able to do mapping.
    for eg. my ZBPARTNER infoobject has attributes like zfooty, ztennis and zrugby but my ODS has char name , char value, counter for multiple values infoobjects.
    I am following the example in the demo content to work out the process but could not understand how the data is getting uploaded from ODS to Business partner.
    http://help.sap.com/saphelp_nw70/helpdata/en/bf/5df63bf9deaf09e10000000a114084/frameset.htm
    Thanks,
    Sandeep Jogde

  • Display PO item text before save

    Need to display item text of Purchase Order in print preview before the PO is saved.
    How do I achieve this.
    When PO is saved Iable to get the Item text using FM : Read_Text.
    I have searched the thread mentioned solutions donot satisfy my requirement.

    Hi,
    Use the following sample code in ME_PROCESS_PO_CUST (BADI). for me it is working
      TYPES: BEGIN OF IT1," occurs 0 with header line,
              WORD1 TYPE C LENGTH 10 ,
              WORD2 TYPE C LENGTH 5,
             END OF IT1.
      DATA: IT2 TYPE IT1 ."occurs 0 with header line.
           IT2-WORD1 = '          '.
          IT2-WORD2 = ITM_DATA-EBELP.
          ST1 = IT2.
          TDNAME = ST1.
          OBJECT = 'EKPO'.
          ID = 'F01'.
          EN = 'EN'.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              CLIENT                  = SY-MANDT
              ID                      = ID
              LANGUAGE                = EN
              NAME                    = TDNAME "' 00010' "TDNAME
              OBJECT                  = OBJECT
            TABLES
              LINES                   = LINES1
            EXCEPTIONS
              ID                      = 1
              LANGUAGE                = 2
              NAME                    = 3
              NOT_FOUND               = 4
              OBJECT                  = 5
              REFERENCE_CHECK         = 6
              WRONG_ACCESS_TO_ARCHIVE = 7
              OTHERS                  = 8.
    regards,
    sathis

  • Detect purchase requisition item text changes

    Hi Abap Gurus,
    During a PR modification (ME52N), I need to read the purchase requisition item text at runtime to compare with the stored item text (read text) and detect if it have changes.
    Actually, I am using the badi ME_REQ_POSTED.
    How could I detect the PR item text changes? or How could I read the item text at runtime.
    Somebody could help me with this....
    Other ideas will be welcome.....
    Regards,
    Jaya Sankar.M

    Hi,
    But can you change the purchase requisition item text using the badi?

  • Updation of higher level item text to lower level item text

    Hi All,
    while creating sales order VA01   i need to pass the value of higher level item text to lower level item text
    for that i read the text of the higher level item text using the fm read_text
    and pass the text to the lower level items using save_text and commit_text
    this coding works only when the lower order item  text is empty
    my queries are
    1. if the lower level item having some text that text will be replaced by the higher level item text, that is happening but showing error that I/O error , how to solve this
    2. while gone to VA02 and add one more item then also same error is happening how to solve this please help me.
    regards
    krishna

    got the solution

Maybe you are looking for