Save_text not working when material changes

Hi,
I am working on a sales order exit. The requirement is to keep the text of the line items intact evn if material number changes. Let's assume tht there is a material 'A' on line item 10 which is having text ' This is test' maintained. If the user changes the material  on lineitem 10 from 'A' to 'B', the text 'This is test' shoud remain intact. I am using Userexit_read_document to read the text maintained in the line item 10 for 'A' and then using Userexit_save_document to save the text for material 'b'.
The problem is that the texts are not getting saved. I am using Read_text to get the texts and then using save_text in the userexit_save_document to save the chanes. The text name, id, object are same for both cases. Save_text does not give any exception and the sy-subrc is 0 but still the changes are not getting reflect on material 'B'. Am i missing something?Can some one help?
I have attached my save_text code along with this.
      l_thead-tdobject = 'VBBP'
            l_thead-tdname(10) = vbak-vbeln .
            l_thead-tdname+10 = w_lines_all-posnr .
            l_thead-tdid = 'ZEDI'
            l_thead-tdspras = sy-langu .
            l_thead-mandt = sy-mandt .
            CALL FUNCTION 'SAVE_TEXT'
              EXPORTING
                header          = l_thead
                savemode_direct = 'X'
              TABLES
                lines           = tbl_lines
              EXCEPTIONS
                id              = 1
                language        = 2
                name            = 3
                object          = 4
                OTHERS          = 5.
Regards,
Venkat

Hi,
Check whether the field w_lines_all-posnr is having a proper value. Have to used proper conversion exits, to chage the format of POSNR (line item 10 should be converted to 000010).  Also check whether the values are updated in STXH table after the order is saved.
But, I don't think you should use SAVE_TEXT with SAVE_MODE_DIRECT = 'X' in the user exit. (Does this triggeres an explicity commit during user exit processing ?  Any comments ?)
Regards
Vinod

Similar Messages

  • Delta update not working when i change material master data

    Hi SAP Guru's
    can any body help me in solving my issue.
    My issue is i created a data source with a function module to create delta in change date field LAEDA.
    .Full upload is working fine based on the selection screen but delta update is not working properly .
    it is working as full load run for every first run of the day.
    Please can any body help me in this.
    What i did in ECC.
    I copied the FM 'RSAX_BIW_GET_DATA_SIMPLE to Z function module.
    Done a select on three tables and passed the data into e_t_data
    In Rso2 i attached LAEDA filed after clicking generic delta field.
    after completing the steps in ECC
    Any help will be apperitiated .
    Thanks in advance

    Did you actually change the sold-to party though or just the payer?  The sold-to party's price list type controls the price list type value copied into the order header.  Even if the payer has a different value, it's not copied to the order header.  You can see this behavior in FV45KFKD_VBKD_FUELLEN.  If you switch sold-to's then you should get a pop-up that new pricing was carried out; you should also see your new price list type value in the order header and you can use the 'analysis' function at the item level to verify that the correct price was used.

  • Sales order: price condition not working when i change the sold to party

    Hi guys,
    I've a strange problem by making the following steps:
    1. Create a sales order:
         By VA01 i create an order by filling the SOLD TO and one material - all OK. The price is calculated correctly.
    2. Change SOLD TO:
        I change the sold to by filling another payer that has a different price list (PLTYP) - the price is not re-calculated
    If i change with another payer with the same price list everything is ok.
    Can you tell me what could be the problem?
    Many thanks

    Did you actually change the sold-to party though or just the payer?  The sold-to party's price list type controls the price list type value copied into the order header.  Even if the payer has a different value, it's not copied to the order header.  You can see this behavior in FV45KFKD_VBKD_FUELLEN.  If you switch sold-to's then you should get a pop-up that new pricing was carried out; you should also see your new price list type value in the order header and you can use the 'analysis' function at the item level to verify that the correct price was used.

  • GetRealPath not working when OS changes

    Hi,
    I have a piece of code like this
    String deployPath = ServletContext().getRealPath("/");
    String config = deployPath + "\\web-inf\xml";
    File directory = new File(config);
    File[] files = directory.listFiles();
    For (........) {
            //using javax.xml.parser...
            parser.parse( config + "\\" + filename
    }The above code works completely fine when I'm deploying the codes on my WinXP machine. However, I get null pointer when I deploy my codes into AIX machine.
    Please advise.
    Thank you.

    Don't use "\", use "/".
    String config = deployPath + "/web-inf/xml";

  • Save_text not working in change document

    Hi,
    I'm trying to save long text field for text id CD01 in BADI ORDER_SAVE by using SAVE_TEXT FM but it is not saving. Im passing crm_orderh as object id, change document guid as object name and EN as language. Interestingly, when im executing save_text fm standalone i.e. via. se37 by using same parameters it is saving it in change document. What could be the reason Please suggest.
    Rgds

    Hi,
    it seems pure abap ,why dont you paste the query over there. similar issue on [SAVE_TEXT not working|SAVE_TEXT not working]
    Thanks,
    Jansi

  • [Bug?] Defer Panel Update not working when changing scale property

    Hi,
    I found that Defer Panel Update [when True] does not work properly when changing the scale fit property of an intensity graph.
    Try the VI.
    When Defer Panel Update is True, and you change the Numeric controls, the Intensity graph is not updated (as expected).
    But now change the "Z Scale.Scale Fit" button and.... the Intensity graph is updated (only the Z-color, not the axis).
    This looks to be a bug to me!
    Nicolas
    Attachments:
    [Bug] Defer Panel Update not working when changing scale property.vi ‏27 KB

    Hi Nicolas,
    This indeed looks like a bug. I will do more research on it and file a bug report if it's not already filed.  Thank you for posting this information!
    Yi Y.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • My sistem preferences are not working, when I try to change the photo of the desk It stop working, what can i do?

    my sistem preferences are not working, when I try to change the photo of the desk It stop working, what can i do? I'm dieing cause I'm afraid

    Have you tried resetting your device by pressing and holding the Home button and power button until the silver apple appears?

  • Why is the Time Machine icon in menu bar not spinning when backing up? It stop working when I changed to Maverick.

    Why is the Time Machine icon in menu bar not spinning when backing up? It stop working when I changed to Maverick.

    my imac came with lion and don't think it ever span with lion and mtn lion and now maverick not sure if it's a setting

  • Partner function not working when creating PO with ref to PReq

    Partner function is not working when creating a Purchase Order with ref to a Purchase Requistion, Partner functions maintained in the vendor master are VN, OA & PI.
    But OA & PI are not appearing in the PO header partner tab when created with ref to PR.
    however it works when i create the PO directly ( without the PR ref )
    I am using the same material & Plant for both manual PO & PR to PO.
    Any idea what could be wrong .
    I have maintained the settings for schema groups for vendor master & purchasing doc in the partner determination.
    Thanks
    Dkmurthy

    Hi,
    I have also an issue that seems similar to one you are discussing.
    When we use ME59N and create a PO with ref. from a PR (created from a sales order), the message determination works well, it reads the condition set in MN04 (condition records for messages), and creates a message (with output type for EDI , medium: 6, and partner function LS: Logical system). Message is created and idoc is sent.
    When we try with ME21N, ME21 and we create the PO with ref. to the same PR, either by entering manually the PR in the document overview of ME21N or by selecting the PR (without entering the PR number), i.e with date, the message is not created in the PO.
    Company code is assigned to purchase organization, and so is purchase organization to plant.
    Any idea why there is no automatic message determination in the case of the transaction: ME21N
    Note: If I try ME21N, and enter the output type and partner, manually, I receive a warning message
    VN006 (Partner XXXX does not exist for partner function LS). If I accept this warning message, then message is saved- idoc is sent. However I can not overcome the warning message, if it plays any role, because I can not assign partner function LS to the vendor.Then I receive message CZ 327 (Can not use this partner role).
    Any input is wellcome.

  • Screen variant not working when assigned to transaction variant in SHd0

    Dear All,
    User requires tax code column for line items in MIRO to be made non-editable. I am using SHD0 transaction for the same. I am able to make the column grey-off by creating screen variant. The program is SAPLMR1M and screen number 6310. When tested individually thru SHD0 the variant is working perfect. But it is not working when assigned to a transaction variant. Any clues on the same would be really helpful.
    Thanks in advance
    Komal

    Hi,
    Try to record again for the whole set of screens instead of doing that for the individual tax screen and only for the tax screen make the required field disable.
    Once done and saved, you can see all the screens variants in the transaction variant.
    Use the Change WITH PROCESSING OPTION.
    Hope this solves your problem
    Regards
    Shiva

  • Report with JDBC connection does not work when they includes CommandTable

    I am trying to render using the new version of Crystal report java component - CRJ a report contains Data base Fileds of type Command Table (Row Set) which seems to be not working.
    when i use the previes version of crystal SDK it works fine.
    after deugging the Sample CrystalHelper.java file which contains the method .changeDatasource()
    i found that the DataBaseController.setLocation() method changes the CommandTable class to Table when using it on CommandTable instance and as result all the fields defined into that CommandTable were disappear.

    That appears to be a known issue:  Eclipse JRC: To change the JDBC connection at run time
    Sincerely,
    Ted Ueda

  • I have the iPad 2 16GB, bought it in August 2011, I worked perfectly but in mid-August 2012 I took her to the store because the microphone did not work reviewed and changed me, but to my surprise that the new iPad had the problem is disconnected WIFI sign

    I have the iPad 2 16GB, bought it in August 2011, I worked perfectly but in mid-August 2012 I took her to the store because the microphone did not work reviewed and changed me, but to my surprise that the new iPad had the problem is disconnected WIFI signal I have to be glued to the router, and I did everything he says is supported by the Apple and all other pages and forums regarding this problem is not solved and always disconnects when connected always disconnects again!! passing will be settled as no longer factory warranty although it has neither the three months I renewed new, please help because the investment has been great and I can not use only as "a mirror" I'm waiting a true solution, thanks ....
    Sincerely,
    Catlos

    This does help me because I am pondering on wether to buy an airport extreme to solve my ipad 2 connection woes.  I have an extremely old router dLink 524....but I have NEVER had any problems with it at all ever.  My xbox connected great to it and netflix ran flawless through my xbox.....now I have an ipad2 and an apple tv and they are BOTH having horrible connection problems.  I have read most of the forums on how to fix it by changing the settings on my router but since mine is so old I couldn't do some of the suggested solutions.  So here I am debating on whether to spend all this $ on an airport extreme?  I am just hoping that if I go and purchase this, my connectivity issues problems will go away like yours did.  Just wondering if you have ATV as well and if the AE solved its problems?  I have read about AE solving ipad2 wifi problems, I'm just hoping it will solve my ATV as well.
    **Glad they didn't "moderate into extinction" your post yet, lol, Thank

  • Reply to all using ItemReply does not work when specifying messageid

    Hello everyone,
    I am trying to use the ItemReply token to perform a "Reply to All"
    action on a mail item with a known message identifier and include the
    original message text in the response. According to the documentation,
    the call should be:
    ItemReply(7;1;"message-id")
    Still, when I execute this token, apparently only a normal reply action
    is performed because only the original sender is listed as recipient.
    (The message text is properly included)
    However, when I manually select the message in the GroupWise client
    first and then execute the same call without specifying the message id,
    all recipients of the original mail are listed in "To:" as expected:
    ItemReply(7;1)
    Could it be that the "ReplyTo" parameter is ignored or does not work
    when a message id is specified as parameter? (Setting "IncludeText" to 0
    does not change anything)
    Thanks in advance and best regards,
    Peter Hofer

    Worth bumping this message. I find the exact same behaviour as mentioned 5 years ago. Using both GW8 and GW2012.
    According documentation, when MessageId is not specified it defaults to the command ItemReplyOpenItem(). I assume that the reason "Reply To all" works without a MessageID is because of that. Someone needs to give a look to ItemReply().

  • Help! Javascript not working when object moved from one page to another!

    Hello all:
    I am new to Adobe Livecycle Designer (version 8.0). I have created a 3 page interactive pdf form with numerous objects (text fields, radio buttons, drop-down boxes, etc.), that our business wants to begin using soon.
    I am having difficulty with some of my Javascript not working with a few of my objects on page 2 of the form. Specifically, there is a drop-down box for "Country" on page 2 of my form. When the user selects, for example, "United States" from the list, I have Javascript that is supposed to change the "Currency" drop-down box rawValue to "US Dollars" accordingly (upon the change event).
    I think my Javascript syntax is proper, but I am not certain. Here is my simple Javascript associated with the "Country" drop-down box (Note: rawValue 80 = "United States" and rawValue 105 = "US Dollars"):
    form1.Page1.cmbContactInfoCountry::change: - (JavaScript, client) -
    if (this.rawValue == 80) {     
         cmbCurrency.rawValue = 105;
    This seems pretty straight forward and it WORKS when my "Country" drop-down box is moved to page 1 of the form, but it WILL NOT WORK when I move the "Country" drop-down box back to page 2 of the form (which is where it belongs).
    Does anyone have any suggestions or solutions? I have spent probably 6-8 hours racking my brain trying to figure out why it works when on one page, but it does not work when move to a different page. I am guessing that I may have corrupted something OR that I am not fully addressing the proper name of the object?
    Please help!
    Frustrated and helpless near Chicago!
    Taylor T

    Hi Jono:
    Thank you for your quick reply.I was able to obtain the full name of the cmbCurrency object using the method you taught me. That is brilliant! Great short-cut tool.
    Unfortunately, I am still having issues with getting Javasript for the cmbCountry object to work with the cmbCurrency object. I haved pasted my new Javascript below.
    JavaScript for cmbCountry object:
    //UNITED STATES
    if (this.rawValue == 1) {
              xfa.resolveNode("form1.#subform[1].cmbCurrency").rawValue = 1;
    else
    //CANADA
    if (this.rawValue == 2) {
              xfa.resolveNode("form1.#subform[1].cmbCurrency").rawValue = 2;
    I have checked the "Specify Item Values" checkbox of the cmbCurrency drop-down object and Value 1 = "US Dollars" and Value 2 = "Canadian Dollars".
    When I select "Canada" from the cmbCountry drop-down object, the rawValue of the cmbCurrency drop-down object is changed to "US Dollars" (when it is clearly defined as "Canadian Dollars"). When I select "United States" from the cmbCountry drop-down object, the rawValue of the cmbCurrency drop-down object stays blank for uknown reasons. Very strange.
    Since I am not able to further explain in detail on what I am experiencing, I have posted a link to my file below (I just signed up for an account at ShareFile). I would forever be indebted to you if you can help me figure this out!
    https://thomptk.sharefile.com/?cmd=d&id=07ede2fe11db4549

  • I baught Seagate Backup plus 2T hard drive to use as my Backup time machine. But its not working when i connect to time machine its not coping files, it keep saying preparing files. Can someone help me please...

    i baught Seagate Backup plus 2T hard drive to use as my Backup time machine. But its not working. when i connect to time machine its not coping files, it keep saying preparing files. Can someone help me please...

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Maybe you are looking for