Update according to a condition

how do i update a table according to a condition (i.e. dynamically update).
I have a table which i need to insert a new record for each customer if they have purchased a specific item before.
my purchase table has the following columns (id, cust id, purchase id, date).
how do i insert a new record (sequence id, cust_id, 55, today) for every customer if they have a record in my purchase table with a purchase_id=54?

how do i update a table according to a ....
how do i insert a new record Confusing requirement....
Though from whatever I understand, you want following
INSERT INTO <TABLE_NAME>
      SELECT sequence id, cust_id, 55, SYSDATE
      FROM purchase_table
      WHERE purchase_id = 54 ;

Similar Messages

  • Process message according to a condition

    Gentlemen,
    I created a process, which modifies a table column when a certain button is pressed.
    I want to modify the column in that case only, if the sysdate is later than the "begindate" column of the table. So I modified my process to be conditional.
    It works fine, however I want to notify the user, if the process is not executed because of the condition.
    I'd like to put a message something like: "The event has not started so far".
    I tried to put this message to the Process Error Message region, but it did not work. I think this is not an error, just the condition result was FALSE.
    What is the way to give the above message to the user, according to the condition ?
    Thanks, Attila v

    i'd probably do this: i'd use similar logic from your Condition to set some hidden item in your app that serves as a flag. set that flag up to get set just before your update process. next, i'd make your update process run based on a condition that checks the flag (so you don't have to check your table values twice). lastly, i'd have the next page of your app conditionally display a region with your "The event has not started so far" message if your flag item indicates as much.
    hope this helps,
    raj
    ps-if your update process is regular pl/sql, there's even more flexibility wrt how you set your flag and display your message. you could set your success/didnt_process message to an item within that process, for example, and refer to the item in your process success message using the &ITEM_NAME. syntax.

  • What G/L Accounts are Updated Accordingly when the Posting Date is Changed?

    We are on SAP 2007 PL15, and our new fiscal year started 1 July 2008. Beginning on 1 July, whenever we change the posting date on a marketing document to a date in June, the following message appears:
    Newly Entered Posting Date Relates to Another Posting Period. Do you want to update G/L accounts accordingly? [Yes]  [No]
    Does anyone know what G/L accounts would be "updated accordingly" based on Posting Date? We did not get any such message last year when we were on SAP 2005.
    Thank you,
    Mike

    Dear Mike,
    Make be the exchange rate difference acount or related.
    Wish it is useful for you .
    Regards
    Apple

  • Update value of Pricing condition

    Hi all,
    I am having existing custom program in which sales order get display through ALV. and when user select records through ALV and execute, All pricing conditions of selected sales order gets updated. For this BDC is written( in which Update button is clicked on condition tab at line item in sales order)
    My requirement is to add new field for pricing condition on selection screen.  and if user  puts any pricing condition on the field,  only that pricing condition should get updated with new value for selected  sales order. It should not update all the pricing condition for the sales order.
    Problem: I can not use BDC in this particular case because if i use Update button on condition tab(line item ) in sales order  on BDC, it will update all the pricing condition of sale order.
    Question: How i will trace new value of any pricing condition. Functional are saying that it is maintained in VK13. If this is a case
    then
    1)How I will come to know in which config table, Condition record exist  i.e New value of pricing .
    2)Each pricing Condition will have multiple condition tables ( Lot of combinations) and I will come to know about the tableu2019s    only at runtime. For getting the values from  table I need the value of there respective key fields.
    How I will get the values of all the key fields of  the condition tables ?
    If there is any better way to get the new reprising value of pricing condition please let me know?
    Thanks in advance

    Hi,
    Please check if any other standard pricing types suits your requirement.  Assuming that your current pricing type is 'B'-carry out automatic pricing. So, when you update pricing, you can choose the best that suit your case.
    [http://help.sap.com/saphelp_46c/helpdata/en/dd/560f03545a11d1a7020000e829fd11/content.htm]
    Regards,
    P Gomatheeswaran

  • Bottom round pad beneath square not updated according to design rules

    I saw this problem with the last couple of sets of boards I ordered so I decided to track it down.
    It turns out that if you have a throughhole component with a square pad on top and a round pad underneath that the round pad doesn't get updated according to design rules even though that is checked in the pad properties. 
    I was using the DIP8300 and DIP14300 footprints from the master database and I set up PCB design rules to set the annular ring to 100% of drill-radius so I could actually see some pad to solder to.  This works perfectly for all the pins except pin 1 and it even works there on the top layer.  If you go in and manually select that pad and look at the copper bottom layer, you can see that the annular ring hasn't been resized though.  If you change the shape to square or rounded square and change it back to round, it updates from the design rules properly.
    This is in v.11.  Not sure if this problem is still there in 12 ...
    Mike

    Hi Mike,
    I was able to re-produce the issue. Thank you for bringing it to our attention. I will report it to R&D.
    Regards,
    Tayyab R,
    National Instruments.

  • Unable to download because it says "You are running an operating system that InDesign no longer supports. Refer to the system requirements for a full list of supported platforms." But its updated according to the system requriements

    Unable to download because it says "You are running an operating system that InDesign no longer supports. Refer to the system requirements for a full list of supported platforms." But its updated according to the system requirements. What can I do to fix this?

    Which versions of InDesign are you referring to?  What are the operating system specs for the machine?

  • When we clicked on Update for new pricing,condition type is repeated twice

    Hi Friends,
    For new pricing,I clicked on the Update pushbuttion in the conditions tab of sales order,Condition type is repeated twice .So value is increased.I checked in the pricing  analysis,it is showing only once.
    I searched all threads and I tried all the possibilities.
    I checked exclusive indicator,it is correctly checked.
    Condition type manual entries selected as B automatic as priority
    Item condition check box is checked only.
    Mandatory check box is selected in the Pricing procedure for that condition type.
    Anything i missed out .
    Please suggest me how to go.
    Thanks in advance.
    Rgds....VM
    Edited by: vm on Nov 2, 2011 5:55 PM
    Edited by: vm on Nov 2, 2011 5:56 PM

    Condition type is repeated twice
    Ensure that the pricing condition is not maintained for multiple combinations in VK11
    G. Lakshmipathi

  • Itunes windows has apps to update according to my phone, but itunes says all apps are up to date

    My iTunes Windows has apps to update according to iPhone adn iPad, but on Apps page, when I click "Update" message is all apps are up to date. Any reason why?

    Here is some more information. I am able to update an app on the iPhone directly. When the iphone is syneced with iTunes, this one app is updated in the apps section of itunes.

  • How to update sale order haeder conditions

    hi
    how to update header conditions using sale order bapi ' create from data 2'.
    regards
    Siva Shanmugam.A.V.

    u can use  'BAPI_SALESORDER_CHANGE'
    and see the following link
    http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE
    Edited by: krupa jani on Nov 25, 2008 11:15 AM

  • Vendor field not updated in CRM pricing condition table

    Hi,
    We have maintained condition table with Material and Vendor fields in ECC and table is active
    After replicating this table from ECC to CRM, vendor field not updated in table and it is inactive.
    There is any mapping settings required to update vendor field in CRM table from ECC.
    Please help me out to solve this issue
    Regards
    kishore kumar

    hi,  the data field of vendor is a standard one or custimizing one?
    I remeber there is a data mapping setting in CRM, for condition field.   If you want to mapping a ERP standard field to a CRM custmizing one, you need to setting your rule in it.  Maybe you can find it in SM30 view.
    I can't login a CRM system now, so sorry for not offer your the view name.

  • Updating Vendor of Freight Condition Type in STO

    Hi,
    I am facing a problem in updating KOMP-LIFNR in my program. I have below scenario
    I have created a Z program which gets all materials from mchb and creates a STO order thru a BAPI_PO_CREATE1. Anyway STO is getting created but i am facing a program to update a freight condition type. I need to LIFNR(Vendor) in freight condition type.
    Pls help is how to update is there any bapi to update.
    Regards,
    Sreekanth

    Hi
    We dont have any fields in the BAPI_PO_CREATE1 to directly input the Freight vendor , But by maintaining the freight vendor in the purchase infor record will update the Conditons in the PO at the time of creation of the PO.
    You can also acheuive this by using the user exit enhancement SAPL2012
    Exit : EXIT_SAPL2012_001.Customer Exit for Creating a Purchase Order in Enjoy Using BAPI_PO_CREATÊ1
    You can chek out using SMOD.Please take the help of ABPERs to develop the code as per the requirement.
    Award points if useful
    Thanks & Regards
    Kishore.

  • User exit for Price Conditions in VA02 (update,insert or delete conditions)

    Hi folks. I would like to know if anyone of you has already worked with transaction VA02...I need a user exit, which could be capable to: Erase, Update and Insert new Price Conditions.
    Scenario: The user will not enter into the Price Conditions Tab. He will only make some modifications to the document via VA02 and when he saves the document, then the user exit should update, erase or include new conditions based on some logic that the user exit will implement. does anyone know a user exit for this particular case, please !
    Thanks in advance.

    HI,
    Check this.
    V60F0001                                SD Billing plan (customer enhancement) diff. to billing plan 
    V46H0001                                SD Customer functions for resource-related billing           
    V45W0001                                SD Service Management: Forward Contract Data to Item         
    V45S0004                                Effectivity type in sales order                              
    V45S0003                                MRP-relevance for incomplete configuration                   
    V45S0001                                Update sales document from configuration                     
    V45P0001                                SD customer function for cross-company code sales            
    V45L0001                                SD component supplier processing (customer enhancements)     
    V45E0002                                Data transfer in procurement elements (PRreq., assembly)     
    V45E0001                                Update the purchase order from the sales order               
    V45A0004                                Copy packing proposal                                        
    V45A0003                                Collector for customer function modulpool MV45A              
    V45A0002                                Predefine sold-to party in sales document                    
    V45A0001                                Determine alternative materials for product selection        
    SDTRM001                                Reschedule schedule lines without a new ATP check                                                                               
    Business Add-in                                                                               
    BADI_SD_SCH_GETWAGFZ                    Scheduling Agreement: Read WAGFZ from S073                   
    BADI_SD_V46H0001                        SD Customer functions for resource-related billing           
    Regards
    Rajendra

  • In FF 26, all default plug-in deactivated. We met some cases where it seems to be not on every FF update.Is there any condition for which it is not deactivated?

    It seems that with Firefox 26, all default plug-in are desactivated but can be reactivated on demand :
    http://www.mozilla.org/en-US/firefox/26.0/releasenotes/
    Can you confirm this behavior ? We met the cases but it seems to be not on every FF update. Do you have more information about this ? what are the conditions that does not deactivate a plugin?

    See:
    *https://support.mozilla.org/kb/why-do-i-have-click-activate-plugins
    *http://kb.mozillazine.org/Issues_related_to_plugins#Click_to_Play
    All plugins are disabled by default. A possible exception can be Flash if it is the latest version as that is a very common plugin).
    If you make changes on the "Firefox/Tools > Add-ons > Plugins" page then a specific pref (plugin.state.<plugin>) setting is created that may survive updates.
    You can open the <b>about:config</b> page via the location bar to inspect prefs.
    *http://kb.mozillazine.org/about:config

  • UDO update in matrix with conditions deletes data

    Hi,
    I have a form binded to a MasterData and MasterDataLines tables.
    I have three folders in this form.
    When I click a folder I set a conditions to the matrix datasource so that I can see only the relevant data for each folder.
    The problem is when I update.
    The lines that are visible in the matrix are updated but the rest of it are deleted!
    Any ideas in how can I update without loosing data?
    Best Regards,
    Ana Silva

    Hello Ana,
    Try to debug your addon to determine the number of rows in the matrix by RowCount and VisualRowCount. If 2 numbers are differs, than do not flush the data before you sav action.
    if the numbers are same, than i suggest to use the following procedure before saving:
    0. filter matrix data by conditions (this is what you do)
    1. press save
    2. receive and load data has been filtered out (wich is not visible in edited mode)
    3. flush to datasource
    4. save the data by default udo process.
    Regards
    János

  • Delete a Freight condition according to Price condition value

    Hello,
    we defined a Freight condition category  ZTRA with an access sequence, we set condition records. When we create a sale order ZTRA value comes automaticly.
    But if header price condition ZR00 is more than 1000 euros we delete manually header Freight condition as a special discount.
    Can we delete it automaticly ?
    I trier to define exclusion but I do not think it works.
    Is it possible to delete a condition according to another one's value ?
    Should I create a requirement  ?
    Thanks
    Regards,
    Pierre

    hi,
    _*( if header price condition ZR00 is more than 1000 euros we delete manually header Freight condition as a special discount)
    This is clearly a Requirement and hence a routine to be Used.
    Rgds
    Srinivas D

Maybe you are looking for

  • Subcontracting

    Hi How to trasport material from Sale order stock to Subcontractor? Raju

  • KM2M serial port not working in Linux

    I noticed a few Linux postings so I thought I'd give this a shot. I'm running Fedora Core and for some strange reason I can't seem to send any communications out to the ttyS0 (COM 1) or ttyS1 (COM 2) ports. Does anyone have any suggestions on making

  • Validation at the network level

    Hi Experts,          I am doing the validation for the network at the header level for the resposible cost center field. I am giving Prerequiest as Req.cost center = 'X' Check as i am not entering anything in the check condition Message I am entering

  • Need Start routine logic

    Hi, Can anyone please let me know the code in start routine for the below. I want to delete the unwanted datapackage in start routine for the below condition. For  system PCR For purch.org Z300, only those purchase orders shall be loaded to further l

  • In Safari some web pages are jibberish

    Hi, I am having problems with safari showing correct text. The text on certain websites shows up like jibberish. This problem just started yesterday and I'm not sure what to do. (It doesn't happen to all websites) Firefox displays the web pages norma