Change pointer for Sales Order

Hi,
Using change pointers I want to create an IDOC when ever a specific field in the sales order line item is changed. I have activated the change pointer for message type ORDRSP. Also maintained the following entries in BD52
VERKBELEG(Object) VBAP(Table) ABGRU(field).
After this when I change this field at the sales order line item, it inserts entries into change pointer table.
But my problem is creating IDOC's from those change pointer entries. I am not sure which function module (MASTERIDOC_CREATE_XXXXX) works for this.
Anyhelp on this highly appreciated.
Thanks
Ram

Hi Ram,
I don't think so you can use change pointer for sales order changes. Usually, it is done through transaction code<b> NACE</b> - configuring condition for output type.
You can setup requeirement in procedure control to trigger IDoc ORDRSP for any changes in item level.
Hope this will help you and give an idea.
Regards,
Ferry Lianto

Similar Messages

  • New/Change Indicator for Sales Order IDoc

    Hi Gurus,
    Does anyone knows if there's a field in the IDoc Segment for ORDERS that shows or indicate if it's a new or changed order.
    We are sending IDocs to our freight company for sales order, but we are trying to see if there's a way we can let them know if its a new or changed IDoc for sales order.
    Is there any field for this or any work around on this?
    Thanks for your help.

    Segment Field ACTION is not been changed. I've just tested it and made changes to the Sales Order, the ACTION field is still carrying "000".
    Like thomas said, can this be because I'm using message type ORDRSP instead of ORDCHG?
    Does this make any difference?
    Edited by: Basil Balogun on May 10, 2011 4:54 PM
    Edited by: Basil Balogun on May 10, 2011 9:43 PM

  • Create and Change functionality for Sales order

    Hii All,
                Can any one please suggest me any Standard program or BAPI or IDOC for Sales order, it should cover create as well as change fuctionality of Sales order.
    this is very urgent to me.
    Suitable Answer will be Rewarded.
    Thankyou,
    Shobha.

    For change you can use:
    BAPI_SALESORDER_CHANGE         Sales order: Change Sales Order
    For create you have the following choices:
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
    BAPI_SALESDOCU_CREATEFROMDATA with business object 'BUS2032'
    The difference between the create ones is the functionality you get e.g. create_from_data2 is the 'most powerful' but you also have to provide the most data. It just depends on what you want it to do.
    In terms of IDOCS:
    message type:
    SALESORDER_CREATEFROMDAT201 or
    SALESORDER_CREATEFROMDAT202 or
    ORDERS05
    Hope that helps,
    Michael
    Here is an example we use, you might want to populate additional fields or leave fields out in case you want different data to be transferred to the IDOC - however some fields are mandatory.
    create the order header structure
      ls_header-doc_type   = ls_screen-order_type.
      ls_header-sales_org  = gc_vkorg_aa01.
      ls_header-distr_chan = gc_distr_aa.
      ls_header-division   = gc_divis_aa.
      ls_header-purch_no   = ls_screen-po_num.
      ls_header-po_method  = ls_screen-po_source.
      ls_header-ship_cond  = ls_screen-ship_cond.
    create partner input table (sold to)
      ls_partner-partn_role = gc_role_sold.
      ls_partner-partn_numb = ls_screen-sold_to.
      APPEND ls_partner TO lt_partner.
    create partner input table (ship to)
      ls_partner-partn_role = gc_role_ship.
      ls_partner-partn_numb = ls_screen-ship_to.
      APPEND ls_partner TO lt_partner.
    items are added by looping at a table
        ls_item-material = <fs_upload>-matnr.
        ls_item-req_qty  = <fs_upload>-quantity.
      process the quantity, it needs to be three decimals, because it
      will be moved into a string in the BAPI and divided by 1000 before
      it is moved back into a number field (1.500 => 001500 => 1.5)
        ls_item-req_qty = ls_item-req_qty * 1000.
      truncate remaining decimal places if exist (1.2525 => 1252.5 => 1252 => 1.252)
        ls_item-req_qty = trunc( ls_item-req_qty ).
        price is taken from the file
          ls_item-cond_type = gc_cond_so_upld_price.
          ls_item-cond_val1 = <fs_upload>-price.
        condition one (price) is multiplied by 10 in the BAPI
          ls_item-cond_val1 = ls_item-cond_val1 / 10.
        no discount
          ls_item-cd_type2   = gc_cond_so_upld_disc.
          ls_item-cd_value2  = 0.
        ls_item-item_categ = ls_screen-item_cat.
          APPEND ls_item TO lt_item.
    then BAPI is called
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
        EXPORTING
          order_header_in           = ls_header
          business_object           = gc_bus_obj
        IMPORTING
          SALESDOCUMENT             = lv_vbeln
          RETURN                    = ls_return
        tables
          order_items_in            = lt_item
          order_partners            = lt_partner.
      IF ls_return-type NE gc_msgty_error AND
         ls_return-type NE gc_msgty_abend.
      No errors where found
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ELSE.
      There was an error or abend
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.

  • Change status for sales order in crmd_order

    Hi,
    I am creating a report which has to change for all sales order with status "Open" to status "Processed". Is there any function or bapi to do this ?? Supposing, there is no function, which tables do i have to change ???
    thanks in advance!!!
    Maria

    Mmmm it doesn't work... I have tried this:
        CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
          EXPORTING
      CHECK_ONLY                = ' '
            OBJNR                     = i_crmd_orderadm_h-guid
            USER_STATUS               = 'I1003'
      SET_INACT                 = ' '
      IV_REF_KIND               =
      IV_OBJECT_TYPE            =
      IV_NO_1O_MAINTAIN         =
    IMPORTING
      STONR                     =
    EXCEPTIONS
       OBJECT_NOT_FOUND          = 1
       STATUS_INCONSISTENT       = 2
       STATUS_NOT_ALLOWED        = 3
       OTHERS                    = 4.
    If sy-subrc = 0.
    endif.
    But noting has change in tag Status in tx. CRMD_ORDER.. still have in "system status": In process and in "User status": Order Rep Processed.
    Thanks in advance !!!

  • Change Documents for Sales Order (VA03)

    Hello,
    Is it possible to track changes to the text (VA03 - Header Detail - Text Tab) from a Sales Order by using change documents?
    Thanks in advance for your help,
    CL

    I don't think that is possible. These are getting stored in Longtext (ie STXH & STXL) by retrieving this also we need to use fm READ_TEXT.
    and also in change document table CDPOS fields VALUE_NEW & VALUE_OLD have length limit of 254.

  • Triggering event through Change Management for Sales order

    I am working on three different scenarios of workflow which is triggered on change of sales order.  I am trying to put conditions in SWEC for the workflows to start but not sure how to go about it.  I created change doc object VERKBELEG and assigned bus2032 and changed as my event.  I inserted a value in condition editor like vbap_(fieldname)_new etc.  Nothing seem to be working.
    I would like to know once we assign event here in SWEC, should we also assign and activate it in the triggering tab of workflow or just create an entry in the linkage table.
    Please guide me as to how I need to work on the sales order change.  I am basically want to trigger a sales order only when a field value is updated or inserted which pertains to my requirement.
    Thank you very much.

    Karthik,
    My problem is still not resolved.  I am trying to put something like this.  Let me know if you have were able to do this in any other way.
    DATA : i_cdhdr LIKE cdhdr OCCURS 0 WITH HEADER LINE.
    DATA : lt_editpos LIKE cdshw OCCURS 0 WITH HEADER LINE.
    DATA : it_vbap LIKE vbap OCCURS 0 WITH HEADER LINE.
    DATA : flag(1) TYPE c.
    DATA : text LIKE message-msgtx.
    DATA: BEGIN OF ITAB OCCURS 10.
            INCLUDE STRUCTURE cdshw.
    DATA:   UDATE LIKE CDHDR-UDATE,
            USERNAME LIKE CDHDR-USERNAME,
            CHANGENR LIKE CDHDR-CHANGENR,
            VBELN(10),
            POSNR(6),
            ETENR(4),
            INDTEXT(200),
      END OF ITAB.
    data : lv_vbeln like vbap-vbeln.
    data : lv_posnr like vbap-posnr.
    SELECT vbeln posnr FROM vbap INTO TABLE it_vbap WHERE
                                           vbeln = '               ' AND
                                           posnr = .
    i_cdhdr-objectclas = 'VERKBELEG'.
    i_cdhdr-objectid   =  '      '.
    CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
         EXPORTING
              objectclass       = 'VERKBELEG'
              objectid          = '            '
              username          = space
              time_of_change    = i_cdhdr-utime
         TABLES
              i_cdhdr           = i_cdhdr
         EXCEPTIONS
              no_position_found = 1
              OTHERS            = 2.
    IF sy-subrc EQ 0 AND NOT i_cdhdr[] IS INITIAL.
      sort i_cdhdr by CHANGENR UDATE UTIME descending.
      LOOP AT i_cdhdr.
        CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
             EXPORTING
                  changenumber      = i_cdhdr-changenr
             TABLES
                  editpos           = lt_editpos
             EXCEPTIONS
                  no_position_found = 1
                  OTHERS            = 2.
      ENDLOOP.
    **change in fname is eq lprio delete the records.
    loop at lt_editpos.  
        if lt_editpos-fname = 'LPRIO' and
           lt_editpos-CHNGIND = 'U' and
           lt_editpos-F_NEW = '03' and
           lt_editpos-tabname = 'VBAP'.
          flag = 'X'.
            concatenate lt_editpos-fname lt_editpos-f_new into text.
          exit.
        elseif lt_editpos-fname = 'KEY' and
               lt_editpos-CHNGIND = 'I' and
               lt_editpos-tabname = 'VBAP'.
          lv_vbeln = lt_editpos-tabkey+3(10).
          lv_posnr = lt_editpos-tabkey+13(6).
          select single * from vbap into it_vbap where
                                           vbeln eq lv_vbeln and
                                           posnr eq lv_posnr.
          if sy-subrc = 0 and it_vbap-lprio = '03'.
            flag = 'X'.
             concatenate lv_vbeln lv_posnr it_vbap-lprio into text.
            exit.
          endif.
        endif.
      endloop.
    endif.

  • Creating change log for sales order

    hi all,
    i want to create change log for any given sales order if it exists.
    can any one tell me how to do that??

    Hi Gouri,
    CDHDR and CDPOS are the tables for all change history.
    CDHDR contains the details such as who made the change, when, using what tcode and the change type ie. update, delete.
    CDPOS contains the field name which was changed, its old value and its new value.
    The change document object is VERKBELEG for sales documents.
    The object value is the SD document number with leading zeros.
    The following link will be also useful.
    http://www.sap-img.com/ab024.htm
    Regards,
    Nitin.

  • Change indicator for sales orders

    Hi All,
    I would like to know when a change is done to a sales order (in VA02), in order to automatically change its status to the default.
    Does SAP stores a flag that indicates whether the order was changed?
    Thanks!
    Amit

    Hi Amit,
    Whenever any changes done to any object(eg. Sales Order, Material Master, Customer Master,etc.) in SAP, it is recorded in change document table CDHDR. This table records following important fields,
    Object Value
    Old Value
    New Value
    Change date
    Time
    Transaction(By which changes are done)
    So you can find all the changes done to your sales order in this table.
    Just Run SE16 >> Table CDHDR >> put your sales order no in field OBJECT VALUE and execute.
    I hope this answers your question.
    Regards,
    Mohit

  • User Exist for Sales Order

    Hi All,
    When the Route changes in the Sales Order, I want to add the Forwarding agent to the Partfner function atutomatically. So I written the code in the User-Exist "userexit_check_vbap" with the following logic.
    IF sales order is creating with VA01, Add an entry
    and Changing the Sales order with VA02, modifiy an exisiting entry as follow.
    But at the time of Creating with VA01, it is sucessfully adding an entry, but
    whenever you the change Route for sales order with va02, Modify statement is working fine and showing the correct Partner function in the Partner Tab.
    If you save the document and open it again then Changed Route is sucessfully saved but not the partner function. It always having the partner function which you given at the time of creation.
    Can we write the modify statement in the "Userexist_check_vbap"
    READ TABLE xvbpa WITH KEY parvw = 'ZR'
                                posnr = xvbap-posnr.
      IF sy-subrc NE 0.
        SELECT SINGLE * FROM lfa1 INTO CORRESPONDING FIELDS OF xvbpa
            WHERE lifnr = tdlnr.
        xvbpa-mandt  = xvbap-mandt.
        xvbpa-vbeln  = xvbap-vbeln.
        xvbpa-posnr  = xvbap-posnr.
        xvbpa-fehgr  = '08'.
        xvbpa-nrart  = 'LI'.
        xvbpa-lifnr  = tdlnr.
        xvbpa-updkz  = 'I'.
        CLEAR: xvbpa-kunnr, xvbpa-stceg.
        xvbpa-parvw  = 'ZR'.
        APPEND xvbpa.
      ELSE.
        xvbpa-lifnr  = tdlnr.
        MODIFY xvbpa TRANSPORTING lifnr WHERE parvw = 'ZR'
                                          AND posnr = xvbap-posnr.
      ENDIF.
    Please suggest me , how can i solve this problem.
    Thanks and Warm Regards,
    Vijay

    I solved the problem by pass the following value
    xvbpa-updkz  = 'U'.
    It solved my problem.

  • PCA substituion for Sales Order

    Hi,
    Our requirement is to create the sales order substition for the followins
    For each region different PCA values, we have 20 regions.
    Can you please tell us how to achieve this through substituion.
    Thanks,

    Hi
    The standard solution is defined in the link
    http://wiki.sdn.sap.com/wiki/display/ERPLO/ProfitCenterSubstitutioninSales+Orders
    You can also look at the following notes
    173798 - User exit for PCA substitution
    1532865 - FAQ: Profit center in the billing document
    167912 - Substitution call-up points for sales order/billing document
    114954 - Partner profit center for intercompany billing
    112974 - Subst. Prof.ctr subst.,create KDAUFf.cross-CC sales
    39254 - Profit Center - cross-company code sales
    If you want to write your own logic, you can use the User Exit MV45AFZZ.
    There is a perform which moves the Value to VBAP. This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    Regards
    Sanil Bhandari

  • Report for Sales Order Change History   CDPOS and CDHDR

    How to take a report of the data for the Sales Order Change history for a particular period of time. It is required to take a report of all the Sales Orders for which the basic price has been changed. Please let me know the procedure. I could not get the data from the table CDPOS and CDHDR
    Helpful answer would be rewarded.
    Regards
    Praveen

    Dear Praveen Kumar
    Have you tried with VBAP where sale order details at item level would be stored.
    Moreover, to my knowledge, there won't be any changes as for as pricing is concerned at sale order level but there is at billing level.  Normally, any price increase / decrease would reflect in billing.  So why dont you to table join through SQVI VBAP (for sale order details) and VBRP (for billing details) so that you can compare the selling price in sale order with billing. 
    Thanks
    G. Lakshmipathi

  • Program for mass change in the sales order.

    Hi,
      I have a requirement where If we make changes in  the availability check rule of the material master(for e.g. 02 to 01),then the same rule should be changed in the sales order as well.
      Though this will be changed for the new orders but is there any program which we can run manually or in the background in order to make changes in the old sales orders.
    Regards
    Karan

    Hi,
            U cannot change checking group or checking rule for availabillity check at sales order level, u can change requirements type.
            If u want to change requirements type determined into sales orders, which  r already created go to t.code MASS and select the object type sales orders and press execute, select sales order item data on tables tab,and select requirements type on fields tab and press execute.specify sales documents number from and to and item numbers, and press execute and specify the new value and press carryout mass change button and then save.
    with regards,
    kirankumar vemula

  • Impact Analysis: Business Area, Profit Center changed for Sales Order type

    Hi All,
    Can you please let me know the impact of changing the Business Area and Profit Center for Sales Order Document types.
    Scenario:
    Let's say that sales document type ZOR has been used for sometime. On this document x number of sales orders have been raised, delivered and invoiced over the years.
    Now, if you change the Business Area and Profit Center what would be the business impact.
    thanks,

    Hi,
    First of all itu2019s not a good business practice to change the Business area and Profit Centre.
    However if at all l you change the Business area and Profit centre the following is the impact::
    Business Area: effects the sales order in accounts assignment at Header level.
    Profit centre: effects the accounting part at Item level
    Overall in MIS reporting w.r.t Profit and Business Analysis in Finance will be affected.
    Thanks and regards
    DSR

  • Detecting change on header and item texts for sales order in user exit

    Hi,
    In the user exit of VA02, I need to identify/detect if header or item texts for sales order is changed or not.
    Please advise on this.
    Regards,
    Shreyas

    Normally system stores the old values in XTables and new values in YTables.  Check if you have access to these in your user exit.  If you give the user exit name, someone will be able to guide you.
    hith
    Sunil Achyut

  • Tcode for displaying the changes made to sales order

    hi,
    i want to know is dere any tcode which displays how many times and by whom and what are the changes made to sales order.

    hiii
    use VA03 for display..
    also refer to following link
    Regarding 'display of changes in the sales order'.
    regards
    twinkal

Maybe you are looking for

  • How can I download free apps from the App Store without a credit card?

    I'm trying to make an account so that I can download free apps but there is no option where I can select no credit card.

  • Poor quality on regular copying.

    I recently bought a wireless eprinter to use with my new laptop.  I just changed the ink cartridges and I am having trouble copying regular papers.  The printing from my laptop is fine but when I put something in to be copied it comes out with lines

  • OPA vs Business Rules - Input / Output formats

    We're thinking about using OPA to write rules, however our input is xml and output is the same xml currently (which is used to create a large number of reports). Does OPA support that? I only see CSV and Databases as the valid inputs? We would like t

  • OIM OID CONNECTOR

    i interfaced OIM with Oracle 10 g database instance using database connector. i installed the connector using a database user account by giving some privileges (sysadmin which is admin account of that database instance was not able to install the con

  • Lexmark all in one wont connect to computer

    I have a lexmark x5060 but when i try to scan with it it says not conntected to computer ?? does anyone have anything i can try or does anyone know if the product is still anygood