EDI - triggering ORDCHG message when change in Sales Order

Hi Experts,
I am trying to capture the changes done to a sales order
in SD and outbound the information changed in the sales order? 
I was thinking that ORDCHG was the correct message type.
But seems that this is used for captureing purchase order changes instead of sales order change.
I know I can send a new idoc with ORDERSP but I want to capture what information was changed.
Any help is greatly appreciated.

Hi
You can try this method.
1. Typically what are the changes the customer is looking for is a) change in delivery schedule.
b) New line added
c)Change in order qnty
d) change in Price
List out all the changes that you want to capture.
2. Create a table with sales order number, sales order line number, schedule line number, date ,time as the key and add other fields that you want to check if they are changed or not.
3. write a program to update the table.
   The table is updated by checking if any of the data has been changed by comparing the data from this table and the one from standard tables like VBAK,VBAP,VBEP ETC.
4. Define an output and assign the above program.
5. Using the output determination procedure you can trigger the output.
6. This will update the table.
7. Write a program to check in this table if anything has been changed based on data and time stamp.
8. Then call a BDC to trigger the output for the changed document.
9. In the function module for sending ORDERSP write code to update what has changed and update the Idoc structure accordingly.
It is hard to explain the whole process but this is good enough for a start a thought process.
This works for me and hope it works for you as well.
Reward if this helps
Thanks

Similar Messages

  • VA01, message when save a sales order

    Hi,
    I need to validate each one of the amounts of each position of an order of sales, this validation must allow that when finding an error shows the message and leaves to the user the possibility of modifying the amount with error, this validation only must become at the time of saving the order.
    I have proven several alternatives with userexit_save_document and badi_sd_sales_item in the method item_check, but it does not use it because the amounts are valued always and I only need that it is validated when is going to save it. Please if somebody can give some idea. 
    Thanks,
    Claudia

    Hi,
    I use the user exit save_document_prepare and already shows the message but me it leaves disabled the positions and  I cannot modify them, when changing the message class it shows the message but at the same time save the sales order, i need that when find an error show the message and i can modify this position before save the sales order. 
    Thanks,
    Claudia

  • Can't change quantity when copy from Sale order for Delivery

    Hi all!
    Can i use authorization for can't change quantity when copy from Sale order for Delivery.

    Tien,
    Approval will not work when you have mutiple rows of data.  You would have to work with SP Transaction Notification
    There has been threads before on the forum on the same topics.
    Block the Quantity in Sales Delivery
    Approval Procedure for chaning quantity in Delivery Document
    Suda

  • Error message when changing from portrait to landscape when printing

    I receive an error message when changing from portrait to landscape when trying to print.  How do I resolve this issue?

    Hi hillclimbing,
    Can you please let me know the exact error message you see as that would be helpful.
    Does this occur with all the pdf files.
    What OS and Acrobat version are you using?
    Regards,
    Rave

  • How to trigger workflow from changes in Sales Order in CRM?

    Hi Experts,
    I want to trigger event at the time of saving the changes in sales order (TCODE- CRMD_ORDER).
    I have found one BO - BUS2000115 but it is getting triggered only after new creation of sales order.And there is no BO available when we change the sales order.For this reason I have created one customize event in BO(BUS2000115).
    Now my question is How should I link this customize event so that it will trigger after saving the changes ?
    I have seen SWEC transaction but was not able to find anything to link this customize event.
    Please help ....!!!
    Good response will be rewarded.
    Thanks
    Snehasish Das
    Edited by: Snehasish Das on Feb 14, 2008 2:31 PM

    In SWEC, actually you link the change document object to a Business object and its corresponding event , to which workflow should react to.
    If yo udo not find the entry then, yo unedd to create one with finding out the respective chage documnet object.
    Hope that helps.
    Regds,
    Akshay

  • Change of sales order

    hi all
    when i am changing the sales order i am getting this error
    You are not authorized
    Message no. ZMSG000
    Please advise to solve this
    Regards
    Raj

    Hi ,
    This is a standard error  message. Take help of ABAPer to locate the relevant table and to proceed further.
    Link :--
    order closing problem
    At selection screen event
    http://www.scribd.com/doc/49868757/rascunho
    Thanks/Rajesh

  • Warning popup when raising a sale order

    Hi
    I have a reqt, where in when raising a sale order, the user will enter the Price manually, the PR00 has to compare with the VPRS of the material master & if the sale price is less than the cost, a pop up should appear on the sale order screen (Warning Message).
    Could anyone tell how to achieve this.
    Thanks in advance
    Aravind

    Dear Aravind,
    You can try this requirement through User Exit with the help of ABAPer
    Try with this User Exits in the program MV45AFZZ    
    USEREXIT_SAVE_DOCUMENT                                                 
    Use this user exit to fill user-specific statistics update tables.     
    The user exit is called up by the FORM routine BELEG-SICHERN before    
    the COMMIT command.                                                    
    Note                                                                   
    If a standard field is changed, the field r185d-dataloss is set to     
    X. The system queries this indicator at the beginning of the safety    
    routine. This is why this indicator must also be set during the        
    maintenance of user-specific tables that are also to be saved.                                                                               
    USEREXIT_SAVE_DOCUMENT_PREPARE                                         
    Use this user exit to make certain changes or checks immediately       
    before saving a document. It is the last possibility for changing or   
    checking a document before posting.                                    
    The user exit is carried out at the beginning of the FORM routine      
    BELEG_SICHERN.        
    I hope this will help you,
    Regards,
    Murali.

  • Trigger IDoc when ever a Sales Order is rejected

    Hello Experts,
    How to trigger an IDoc when ever a sales order is rejected.
    Thanks,
    Srikanth

    you have to define a message type that is triggered when the reason of rejection in not initial.
    You can do it by a standard access sequence. Then issue the message with medium 6.
    Best regards
    Roberto Mazzali

  • Changing Rejected Sales Order Items with BAPI?

    Hi Forum,
    I have the following challenge, would be great if someone of you could help me out. Will help me solve some of my performance problems.
    I have sales orders which are temporary and have 'rejected order items'. Now the requirement is that I have to change the 'rejected order items' (quantity and Delivery dates) based on some XYZ criteria. Now using the BAPI_SALESORDER_CHANGE bapi I have to
    1. first get rid of the 'REJECTION REASON'
    2. Change the order item and then reset the above.
    I tried doing it by populating the order_items internal table with two entries but to my surprise it works once and fails twice!!! I get some errors that are totally irrelated and wierd.
    As for now, I've just adjusted the program(dirtily??) and will be calling the BAPI twice for a change !!!(Huh!)
    Now if anybody knows how to deal with the above problem just drop a few lines, will be of good help to me.
    Thanks and regards,
    ZAM

    Hi Srinivas,
    Thanks for the reply. The rejection reason is set manually, when creating the sales order. I do set the update flag to 'U' and also activating all the X structures. But still it did not work.
    Let me put it very simple. Is it possible to change the rejected order items, through BAPI's? If yes, how?
    Regarding the error messages I will have to change the code again to recreate the messages will let you know as soon as I am finished with some things. But however here are some errors
    Field 'WMENG' cannot be changed, VBEPKOM 000100 0001 ready for input
    Field 'WMENG' cannot be changed, VBEPKOM 000100 0001 ready for input
    Sales document 0030000031 was not changed                           
    there are few others which appear now and then indicating a system error !!
    thanks,
    ZAM

  • Message No V 0102 (Sales Order Error During Saving)

    We are using SAP ECC 6 version and the client is related to Beverage Industry.
    Problem:
    The scenario is this that we created a Sales Order. In the Sales Order we have entered let say 20 items and the item have sub item as well. We are using BOM usage 5. Once the order is confirmed the user creates the Delivery Order but doesn’t Post the Good Issue.
    Now the requirement is that the user wants to change and delete some item in sales order.
    For this first we amend the delivery order and then we change the sales order according the amendments made in Delivery Order.
    In this scenario we also want to completely delete the Main item but as its default that the Bom item will be deleted with the main but we want to enter the sub item again in the order because it’s the process requirement.
    Now when I make all the necessary changes in Delivery Order and Sales Order Respectively System saves the Delivery order with the changes values but gives an error message after Saving the Sales Order and doesn’t update the Sales Order as well
    Attached are the Screen Shot of Sales Order Error Screen.
    Note: This Error comes randomly

    Refer OSS 740280

  • Credit status change through Sales order - change log

    Hi Friends,
      I'm currently facing a scenario were it was reported by the client that
      credit release is happening automatically.
      Brief details : 
       Order was created on 4th Of Oct and it was blocked (reaches the VKM1 bucket )
       since the customer reaches the credit limit.The same order on 5th Oct was not in VKM1
       bucket were the status of order in Sales document header states that it's  released.
      Initial check : (Sales order change log)
      1, I've checked the change log on 5th Oct were the  field VBUK - CMGST  "Overall status of credit checks changed"  from  B to A.
       ((  Status and details below
          A - Credit check was executed and document is OK.
          B - Credit check was exectued and Document is not OK (credit block).
          C - Credit check was executed document not OK, Partial release.
          D-  Document released by Sales representative. ))
    2, I tried to replicate the order status for block and release, But when I release through  VKM1 / VKM3
         the change logs are getting updated with Status - D .(ie from B to D) .
      I'm  wondering that  what could be the reason that causes the system to update in the table - VBUK  - CMGST from A to B
      or because of what change from the client in the sales document header level could impact this changes.
      Note - There is no payment which received from customer on that day.
      Please let me know in case if you are getting the clue...
      Thanks in Advance..
      - Pugal stalin

    Hi
    A simple credit check, as the name suggests, is very simple in nature. The functionality is limited and considers only open A/R items and open items from special G/L and sales orders for performing the credit checks. When you create/change a sales order that is relevant for a simple credit check, SAP calculates the payer/customeru2019s credit exposure by adding the open A/R balance for the customer, open item balances from the special G/L, and the net sales order value. This credit exposure is then compared against the customer credit limit maintained in the customeru2019s credit master. If the credit exposure is greater than the credit limit, the system sets the credit check status as u201Cfailu201D and shows a warning, generates an error message, or performs a delivery block
    Regards from Pakistan

  • Automatic creation of intercompany PO when creating a Sales Order

    Hi Experts
    Is there a standard way of triggering an intercompany PO when creating a sales order to the final customer (or the other way around, triggering a sales order to the end customer upon creation of an intercompany PO)? Scenario: business has setup a logistics company (company code X), which its purpose is to deliver goods to the final customer (home customers). However, sales orders are created from seperate chain of stores which belong to another company code (company code Y). This chain of stores have one sales organisation (since there is over 1000 stores under a chain). I need a way to represent that a sale originated from a store/plant belonging to company Y to end customer A. Also, I need a billing document (intercompany) from company code X to store/plant beloning to company Y.
    Issues: in the intercompany config (assign intern customer numbers to sales org) - is there a way to assign a customer number at site/plant level so that when creating an intercompany billing it can be picked instead of the one assigned to the sales org and where can this be specified in the sales order (remember: in my scenario there are multiple stores/plants that belong to one sales organisation and it is not possible to use one customer number linked to the sales organisation.)
    Desired results:
    Sales order from store/plant YY belonging to company code Y to end customer A
    Intercompany billing from plant XX belonging to company code X to store/plant YY
    End customer billing from store/plant YY to end customer A
    Thank you in advance for your help.

    Hello Tsmash  
    I think you can acheive this with Regular Sales order + Inter Company STO combination.
    Maintain customer numbers for each of the Plants from Company Y for the sales area belonging to Company X.
    Then do the config for STO in MM using this menu path:
    SPRO/Materials Management/Purchasing/Purchase Order/Set up Stock Transport Order
    Here, in the activity 'Define Shipping Data for Plants',  enter each of the plant-customers and the Sales area belonging to Comany code Y. Carry out other activities in this area appropriately.
    Similarly set up Custom ( say Z1) Special Procurement type for Plant YY for stock transfer from XX using this menu path:
    SPRO/Production/Material Requirements Planning/Master Data/Define Special Procurement Type:
    Here maintain procurement type as F, Special procurement as U and plant as XX. You may need to repeat this config for each of the receiving plants (over 1000 stores under a chain)  from co code Y.
    In the material master MRP 2 for Plant YY,  maintain procurement type as F and Special Procurement as Z1.
    Sales order will be received under Co Code Y and sales area belonging to Y form customer A,
    Because of the MRP config, a PO (STO) requirement will be raised on Co code X and plant XX. XX will send the goods to YY via a STO delivery using the Shipping data from 'Set up STO' config,
    Plant YY will send the goods to A and bill that customer. Co Code X will raise an inter-comany bill on Co code Y.
    That's how it should work. Try it and revert with any issues.

  • Report on changes to sales orders

    Hi Experts,
    I am looking for a way to report on changes to sales orders, specifically the row shipping date and quantity.
    I can see that the data is apparently in tables ADOC and ADO1 but am having trouble getting useful results. What I need is a report that, for sales orders only and for a date range, shows all changes to row quantities or row shipping dates. The type of output that would be useful is:
    Change date  - document # - row# - Item code - old shipping date - new shipping date - old qty - new qty
    filtered on change date for sales orders only. This seems beyond my preferred option of XL-Reporter and I'm getting lost in the history tables in creating a query.
    Best Regards
    Matthew

    Hi,
    Without doing the query for you, history tables are linked as the "normal" table but with the addition of the LogInstance column. Then the UpdateDate column (from base table ie. ADOC) will tell you when it was changed.
    Your query isn't an easy one... SInce you have to link an instance (ie. LogInstance = 1, which will be the original created object) to all the modified ones.
    Regards,
    Eric

  • Idoc not gettind created when saving a sales order

    Hello,
    In my system a sales orders has been created using ORDERS05 Idoc. We wanted a confirmation Idoc to be created automatically by this sales order but it didn't. The output type for EDI processing is in yellow for this sales order. I checked 'Dispatch time' in further data and it was 'Send immediately'.
    When I click on save again on the 'output types' screen I get an update error in my inbox saying that "AM 117: Form of address key & is not defined".
    Can anyone tell me where I am going wrong?
    Kind Regards,
    Priyanka Gupta.

    Hi,
    Try this.
    In some cases, even after setting the trigger immediately in the partner profile, the idoc status will be in yellow color. For this add the below code and trigger it.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
          EXPORTING
            master_idoc_control            = wa_ctrl
          TABLES
            communication_idoc_control     = i_comm
            master_idoc_data               = i_edidd
          EXCEPTIONS
            error_in_idoc_control          = 1
            error_writing_idoc_status      = 2
            error_in_idoc_data             = 3
            sending_logical_system_unknown = 4
            OTHERS                         = 5.
        IF sy-subrc EQ 0.
          READ TABLE i_comm INTO wa_comm INDEX 1.
    *Unlock table created by master data
          CALL FUNCTION 'EDI_DOCUMENT_DEQUEUE_LATER'
            EXPORTING
              docnum = wa_comm-docnum
            EXCEPTIONS
              OTHERS = 1.
          REFRESH it_idoc_range.
          lwa_idoc_range-sign   = 'I'.
          lwa_idoc_range-option = 'EQ'.
          lwa_idoc_range-low    =  wa_comm-docnum.
          APPEND lwa_idoc_range TO it_idoc_range.
    Send the idoc
          CALL FUNCTION 'ISU_EDATEX_IDOC_SEND' IN BACKGROUND TASK
            EXPORTING
              xt_idoc = it_idoc_range.
          GET TIME.
    Ensure background task is called immediately
          CALL FUNCTION 'START_OF_BACKGROUNDTASK'
            EXPORTING
              startdate = sy-datum
              starttime = sy-uzeit.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
       ENDIF.
    Regards,
    Sharin.

  • Change in Sales order deleted all process production order

    Dear All,
    We have Make to order scenario for our export sales. When we have receive order we make production with reference of sales order with help of t-code MD50 then convert plan order into production order.
    IF sales department do changes in sales order it'll delete all processing production orders So, we have to do revoke all production orders manually.
    2 query is that, Is there any way to run MRP (Make-to-order) on all line items of sales order ?
    Please provide solution.
    Thanks,
    Farrukh khan

    Dear Farrukh,
    There is not tcode to run sales order for all line items, but if you run MD02 it will plan all sales order & line items also. You can run MD02.
    Regards
    Abhijit Gautam

Maybe you are looking for