How an sale order Created in CRM online will be reflected in MSA

Hi,
Could any one explain how the sale order created in CRM online reflected in MSA.
Give me an idea how data from CRM application is tranfered to MSA.?what is the role of MDW and MAR(mobile application repository) in mobile sales?.
Edited by: Shiva kumar avvula on Jul 23, 2008 11:36 AM

hi,
  You can create sales transactions, that is, quotations or sales orders, on both the mobile client and in CRM Enterprise. You can access your documents at any time and place. You can make changes to them as required, for example in the office, or on a laptop during a customer visit. Sales transactions are exchanged between systems using CRM Middleware so that you are always informed about current quotations and inquiries.
First CRM data will store in CDB( consolidate data base), from here transactional data will transfer to MObiles through communication station.
Database that contains data relevant to replication (CDB tables) for mobile scenarios. The CDB is a logical part of the entire CRM database, which also contains application data.
What evet the data coming from CRM online that will convert into SBDOC and thorugh communication station it will reach mobiles.
for more details check the link.
http://help.sap.com/saphelp_crm60/helpdata/en/29/53583c2e39e433e10000000a114084/frameset.htm
Regards
Srinu

Similar Messages

  • SCM Issues with Sales Orders Created through CRM

    Hi All,
    I'm trying to ascertain any issues with ERP processing that will not update orders created through CRM, i see there was a OSS Note some time back informing that the backorder reschedule program would not update orders created in the CRM system. Is this still the case and are there any other process that we should be marking as an issue?
    Thanks

    Hi Sirisha,
    The solution depends on the exact issue you are facing.
    The CRM Sales Order is created OK, but you only see the error when you open the Sales Order?
    If this is the case, then you can follow the steps below:
    1. Find the Message ID and Message No for the error message
    2. Use Program - CRM_MESSAGES_DELETE to delete error messages from the error producing Sales Orders.
    Let me know if this is not the issue you are facing.
    Regards,
    Nelson

  • Why two Sales order created in CRM 7.0 for every 1 ECC 5.0 sales order ?

    Hi all
    We had CRM 7.0 system integrated with ECC 5.0 in backend, all related configuration for four document type had been done and following scenarios are working OK
    [1] Initial Load of Sales documents from ECC 5.0 does bring correct same sales document in CRM 7.0
    [2] Delta Loads (Manual Requests) also brings correct sales document from ECC 5.0
    [3] Update of any existing sale document in ECC 5.0 also updated corresponding sales document in CRM 7.0
    Only in fourth scenarios, when any new order is created in ECC 5.0 either directly or with reference to Quotation then its bdoc on CRM system create two sales documents of same type in CRM 7.0 system, one in scenario  A A by user RFCCRM (defined in RFC connections) and other in scenario BX by user who created order in ECC 5.0
    Now our Question is that is this something generic issue with CRM 7.0 and ECC 6.0\ ECC 5.0 or our landscape specific issue
    May I request some one to confirm this for us who have ECC 6.0 \ ECC 5.0 \ ECC EHP4 integrated with CRM 7.0 and confirm if they are also getting similiar issue for fourth scenario ?
    Regards
    Manish Joshi

    Follow below thread . Looks like similar issue but on ECC.
    Re: Delimma on using CRM006 Consumer 5.0 to 7.0 multiple companies

  • EDI Sales order creation in CRM through inbound IDocs from non SAP system

    Hi Friends,
    We are having a scenario where we need to create a Sales Order in CRM for a B2B EDI transmission through IDoc. Customer is sending the EDI Transmission of his Sales order , which is passing through PI and then reaching to CRM to create a Sales order.This is the design we need to follow to make it happen,we are initially trying to create an order using WE19 for testing and the details are:
    Basic Type - CRMXIF_ORDER_SAVE_M01
    Message Type - CRMXIF_ORDER_SAVE_M
    Functional Module - APPL_IDOC_INPUTI which is automatically giving a status text as " Function module CRMXIF_ORDER_SAVE has been called successfully", but no sales order is saved in CRM.
    We are getting idocs posted successfully with status 53 with the statuses sequence 74, 50 ,64, 62 and 53.Our issue is inspire of the Idoc having status 53 and the FM called successfully we are not seeing the sales order created in CRM.
    We are stuck here no sales order is created in CRM.
    Are we missing any config. - set up  - Prerequisit  -  Any OSS note need to be applied  --  ANy middle ware setting ?
    Any help will be greatly appreciated.
    Thanks
    Vijay

    Hi Christophe,
    Awesome!!!!!! it worked, You are the best.
    I could able to create a sales order in CRM,but below are the valid data I passed in the respective segment fields.Except for first 3 values rest all did not get reflected in teh Sales order.I feel i am missing some qualifiers.
    Can you kindly share the  IDoc data to be passed in...along with respective segments and fields:
    Segment                                                 Field
    E101CRMXIF_BUSTRANS     OBJECT_TASK         
    E101CRMXIF_BUSTRANS     PROCESS_TYPE
    E101CRMXIF_BUSTRANS     POSTING_DATE
    E101CRMXIF_PARTNER                          PARTNER_NO
    E101CRMXIF_PARTNER                RELATION_PARTNER_NO
    E101CRMXIF_ORGMAN         SALES_ORG
    E101CRMXIF_ORGMAN          DIS_CHANNEL
    E101CRMXIF_ORGMAN         DIVISION
    E101CRMXIF_SALES             PO_NUMBER_SOLD
    E101CRMXIF_SALES            YOUR_REF_SOLD
    E101CRMXIF_SALES            PO_NUMBER_SHIP
    E101CRMXIF_BUSTRANS_ITEM     ITEM_NUMBER
    E101CRMXIF_BUSTRANS_ITEM     ITEM_TYPE
    E101CRMXIF_BUSTRANS_ITEM     ORDERED_PRODUCT
    E101CRMXIF_PRODUCT_I     PROCESS_QTY_UNIT
    E101CRMXIF_PRODUCT_I     PROCESS_QTY_UNIT_ISO
    E101CRMXIF_PRODUCT_I     BASE_QTY_UNIT
    E101CRMXIF_PRODUCT_I     BASE_QTY_UNIT_ISO
    E101CRMXIF_SCHEDLIN_I     ORDER_QTY
    Thanks a ton in advance .
    Vijay

  • Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in oracle and yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in Oracle and  yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Thanks for your advise.
    However, I missed to mention that we have two set of users  One is for Finished Goods and another for Spares.
    Only Spares users need to be prevented from creating Direct/Manual Sales Orders in Oracle.
    As you suggested, if this will be done at Form level, that may Disallow FG users also to create Manula Sales Orders which should not be the case.
    Further, I tried to test one scenario through Processing Constraints but it did not work.
    Application
    OM
    Validation Type
    Entity
    Temp
    Short Name
    TBL
    Validation Semantics
    Created By
    Equal To
    User(Myself)
    Processing Cosntraint
    Application
    OM
    Entity
    Order Header
    Constraint
    Operation
    User Action
    Create
    Not Allowed
    Conditions
    Group
    Scope
    Validation Entity
    Record Set
    Validation Template
    101
    Any
    Order Header
    Order
    Above Created
    Please advise.

  • How Sales Order Created,Cancelled

    Hi Experts
    Can any one explain me on
    How a Sales Order is Created and Line Items are included to the Sales Order
    How the Created Sales Are Cancelled and How does
    What happens a Sales Order is cancelled at Header Level...technicall speaking all the line items in that sales order will also be cancelled
    When i checked the Change Logs are Header Level for a particular Sales Order it is displaying that sales order is cancelled
    But when i check the Change logs at litem level the cancelled info is not replicated
    How does this whole sales order is processed.......
    In which tables (I checked CDHDR,CDPOS)...THESE SALES ORDER ARE SAVE
    THANKS in advance

    hi,
    the first option is the right one. the FM invoked makes a direct input, so all the functionalities in S.O. are the standard one in the same way as if you are making it manually.
    Also you can have some exits in the Idoc FM, so you can manipulate data there before loading the sales order.
    pls. reward if helpful
    regards
    Roberto

  • Error while creating and opening a ERP sales order in SAP CRM

    Hi,
    I am getting an error while creating or opening a ERP sales order from SAP CRM.
    "Creation of the ERP Transaction failed" this is the error i'm getting while creating. when i try to open an existing sales order I'm getting a dump.
    Attached the dump screen shot. From the dump analyasis it seems the transactions are not loaded through LORD framework.
    The RFC connection seems to fine as i have tested accessing an ECC RFC FM through a sample program and its successful..
    please help..
    Thanks
    Krishna

    Hello Krishna,
    Did you get a solution to this? I have the same dump message.
    As a matter of fact, we already use ERP Sales Order and it works fine. But I have recently configured a new sales order document type, and the dump occurs only for this new Z order type.
    Thanks a lot,
    Luis.

  • Consume Sales Order webservice in CRM 7.0

    Hello Experts,
    Basically I am an ABAP/XI expert, I have never used CRM. But I have a business case where in I need to consume Sales Order (Create) webservice to create one on to CRM.
    Please provide me with some Doc's, which talks about the webservices and there consumption. If there are no doc realted please give me a brife process of consuming it. Like how to generate WSDL and use it on to a java client.
    Thanks,
    Srikanth

    Follow below thread . Looks like similar issue but on ECC.
    Re: Delimma on using CRM006 Consumer 5.0 to 7.0 multiple companies

  • Stop sales order replication from CRM to R/3

    Hi friends,
    How can we stop the sales order Replication from CRM to  R/3? Pls Guide me.
    Thanking u in advance.

    Hi Madhu,
    You can do by making distribution lock set in further statuses  of the CRM sales order.
    It will stop replication of CRM sales order to ECC.
    Regards,
    Madhu

  • How a sales order for a MTO sku can always have required date populated bas

    Hi,
    how a sales order for a MTO sku can always have required date populated based on full lead time ?
    Thanks,
    Raja

    Hi,
    If you run MRP against sale order by tcode MD50, system will generate planned order.
    System will generate basic or lead time scheduling depends on MRP run parameter selected in initial screen of MRP run.
    If you select lead time scheduling, system will time from routing and thus generate scheduled start date & finish date.
    If your requirement date say 10/08/08. Lead time 10 days. So system create scheduled start date on 01/08/08 during MRP run.
    Regards,
    Dharma

  • Is the time column in VA05 the time the sales order created?

    i have added a time column in VA05. May i know whether it is the time the sales order is created? How do i know if it it the created time? Need to know the sales order created time, for example at 7:00. Thank you

    Hi
    Yes this is the order creation date. You can cross check by seeing the time by checking the entry in table (VBAK-EZERT) by passing the VBAK-VBELN as the order number.
    Thanks
    Indranil

  • Sales Order data from CRM

    Hi all,
    I want to upload Sales Order data from CRM to BW with DataSource "0CRM_SALES_ORDER_I".
    The upload fails due to missing information that are needed in the first update rule of the Sales ODS "0CRM_SALO". In this update rule some formulars on data field level are created that require this information.
    Examples of fields that are not delivered from the CRM:
    0CRMLREQSCH     L. Req. Deliv. Date
    0CRM_DLVSCH     Last Delivery Date
    0CRMPAVSCHW     MAD (Requested)
    0CRMPAVSCHC     MAD (Confirmation)
    0CRMPGISCHW     Pl. GI Date (Req.)
    0CRMPGISCHC     Pl. GI Date (Conf.)
    So what is to do? Enhance the extractor or are there alternatives.
    Cheers
    jb

    Hello jb,
      Were you able to resolve your problems with Sale Order?
          thanks,
              dmitriy.

  • Sales order Creation in CRM using Interface

    Hi Experts,
    I am developing  Interface to create Sales order/s in CRM.
    As per my requirement  I need to create with below mentioned parameters.
    Process type
    Sold to party
    Organization data
    Parties involved
    Transaction History
    Item Data
    However,  I got CRM_SALESORDER_MASS_UPDATE & BAPI_SLSTRANSACT_CREATEMULTI.
    As per  my requirement these FMs are not usefull.
    Please suggest me right function module.
    Thanks in advance.
    Sai

    Hi Sai,
    you will need to use the FMs CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE to create the orders.
    Put a break point in CRM_ORDER_MAINTAIN and try creating an Order in the transaction CRMD_ORDER in GUI. This FM will be called a couple of times. Note the inputs being passed to this FM.
    You need to pass all those inputs at one go to the FM 'CRM_ORDER_MAINTAIN' and after that call the FM 'CRM_ORDER_SAVE'.
    Note that you need to call the FM 'GUID_CREATE' to create the header and line item GUIDs.
    This is for one order. If you need to create multiple orders at one go, loop at this code. If you are calling this code from another system, make this a remote enabled function module.
    Regards,
    Kris.
    Edited by: Kris on Aug 2, 2011 9:25 PM

  • BAPI Sales order create with reference

    Hi
    I need to use BAPI to create sales order with reference to Quantity Contract. The line item material quantity would be less than or equal to quantity contract quantity.
    Sales order needs to be created with new quantity.
    Quantity contract quantity change needs to be maintained.
    Document flow needs to be maintained.
    Is any one aware if this is possible using BAPI_SALESORDER_CREATEFROMDAT2. If yes, how?
    Any insights would be highly appreciated.

    Hi Maninder,
    The BAPI does not allow the Pricing Conditions to be sourced from the Contract. I debugged the BAPI and it uses a piece of code (don't recall which subroutine though) from SAPMV45A which is relevant for dialog processing where it reads from the VBAP and *VBAP structures. Well this structure is only populated when you are using the Front End transaction (VA41, VA42, etc). Because this structure is empty, pricing conditions do not flow across.
    Here is a little prototype program I whipped up to test my method of creating a Sales order and then changing the Sales Order:
    REPORT  ypat_salesorder_create LINE-SIZE 256.
    * This program will create a ZOC Sales Order with Reference to Contract
    * 20000720 / 10. This will be done via BAPI. There are 2 BAPi calls,
    * BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_CHANGE. We need to
    * perform 2 BAPI calls as the BAPI to create the Sales Order does not
    * bring across the Pricing Conditions properly. To get around this we
    * create the Order with reference to the Contract, then we get the
    * related Pricing Conditions from the COntract and then update the newly
    * created Order.
    * Constants
    CONSTANTS: c_contract  LIKE vbak-vbeln VALUE '0020000720',
               c_item      LIKE vbap-posnr VALUE '000010'.
    * Structures
    * Structure to hold BAPI Header
    DATA: st_bapisdhd1   LIKE bapisdhd1.
    * Internal Tables
    * Sales Order Create BAPI Return Messages
    DATA: tbl_return     TYPE STANDARD TABLE OF bapiret2
                         WITH HEADER LINE.
    * Sales Order BAPI Line Item
    DATA: tbl_bapisditm  TYPE STANDARD TABLE OF bapisditm
                         WITH HEADER LINE.
    * Sales Order BAPI Line Item
    DATA: tbl_bapisditmx  TYPE STANDARD TABLE OF bapisditmx
                         WITH HEADER LINE.
    * Sales Order BAPI Pricing Conditions
    DATA: tbl_bapicond   TYPE STANDARD TABLE OF bapicond
                         WITH HEADER LINE.
    * Sales Order BAPI Partner Functions
    DATA: tbl_bapiparnr  TYPE STANDARD TABLE OF bapiparnr
                         WITH HEADER LINE.
    * Sales Order BAPI Schedule Lines
    DATA: tbl_bapischdl  TYPE STANDARD TABLE OF bapischdl
                         WITH HEADER LINE.
    * Sales Order BAPI Schedule Lines
    DATA: tbl_bapischdlx TYPE STANDARD TABLE OF bapischdlx
                         WITH HEADER LINE.
    * Sales Order BAPI Pricing Conditions
    DATA: tbl_bapicondx    TYPE STANDARD TABLE OF bapicondx
                           WITH HEADER LINE.
    * Customer Enhancement for VBAK, VBAP, VBEP
    DATA: tbl_bapiparex    TYPE STANDARD TABLE OF bapiparex
                           WITH HEADER LINE.
    * Table to hold BAPI Detail Conditions
    DATA: tbl_bapisdcond   TYPE STANDARD TABLE OF bapisdcond
                           WITH HEADER LINE.
    * Table to hold Return Messages from Sales Order Change BAPI
    DATA: tbl_return_chg  TYPE STANDARD TABLE OF bapiret2
                          WITH HEADER LINE.
    * Variables
    DATA: g_vbeln_created   LIKE vbak-vbeln,
          g_valid_contract  TYPE c,
          g_cont_price_date TYPE d.
    * Start of Selection
    START-OF-SELECTION.
      PERFORM validate_contract.
      PERFORM create_sales_ord.
      PERFORM update_sales_ord.
    * End of Selection
    END-OF-SELECTION.
      PERFORM write_output_report.
    * Subroutines
    *&      Form  create_sales_ord
    *       Create the Sales Order
    FORM create_sales_ord .
      PERFORM populate_bapi_tables.
      PERFORM call_create_sales_ord_bapi.
    ENDFORM.                    " create_sales_ord
    *&      Form  populate_bapi_tables
    *       Fill up the BAPI Tables
    FORM populate_bapi_tables .
      PERFORM populate_bapi_header.
      PERFORM build_bapi_partners.
      PERFORM build_bapi_items.
      PERFORM build_bapi_sched_lines.
    ENDFORM.                    " populate_bapi_tables
    *&      Form  populate_bapi_header
    *       Build BAPI Header Details
    FORM populate_bapi_header .
      CLEAR st_bapisdhd1.
      st_bapisdhd1-doc_type     = 'ZOC'.         "Order type
      st_bapisdhd1-sales_org    = '026'.         "Sales Org
      st_bapisdhd1-distr_chan   = '00'.          "Dist Channel
      st_bapisdhd1-division     = '00'.          "Division
      st_bapisdhd1-purch_no_c   = 'Cust Po No'.  "Cust PO No
      st_bapisdhd1-name         = 'Orderer'.     "Name of Orderer
      st_bapisdhd1-ord_reason   = ''.            "Order Reason
      st_bapisdhd1-sales_off    = '3001'.        "Sales Office
      st_bapisdhd1-sales_grp    = '301'.         "Market Area
      IF g_valid_contract = 'X'.
        st_bapisdhd1-price_date = g_cont_price_date.
      ENDIF.
    ENDFORM.                    " populate_bapi_header
    *&      Form  build_bapi_partners
    *       Build BAPI Partner Functions
    FORM build_bapi_partners .
      CLEAR tbl_bapiparnr.
      tbl_bapiparnr-partn_role   = 'AG'.
      tbl_bapiparnr-partn_numb   = '0000100750'.
      APPEND tbl_bapiparnr.
      CLEAR tbl_bapiparnr.
      tbl_bapiparnr-partn_role   = 'WE'.
      tbl_bapiparnr-partn_numb   = '0000504472'.
      APPEND tbl_bapiparnr.
    ENDFORM.                    " build_bapi_partners
    *&      Form  build_bapi_items
    *       Build The BAPI Line Items
    FORM build_bapi_items .
      DATA: l_matnr LIKE mara-matnr.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = '10000072'
        IMPORTING
          output = l_matnr.
      CLEAR tbl_bapisditm.
      tbl_bapisditm-itm_number  = c_item.
      IF g_valid_contract = 'X'.
        tbl_bapisditm-ref_doc     = c_contract.
        tbl_bapisditm-ref_doc_it  = c_item.
        tbl_bapisditm-ref_doc_ca  = 'G'.       "Contract
      ENDIF.
      tbl_bapisditm-material    = l_matnr.
      tbl_bapisditm-plant       = '3012'.
      tbl_bapisditm-target_qty  = '5.000'.
      tbl_bapisditm-target_qu   = 'M3'.
      tbl_bapisditm-item_categ  = 'ZZOC'.
      tbl_bapisditm-sales_dist  = '301'.
      tbl_bapisditm-dlv_prio    = '02'.
      tbl_bapisditm-prc_group5  = '080'.
      tbl_bapisditm-cust_mat35  = 'kdmat'.
      tbl_bapisditm-route       = 'TESYS'.
      tbl_bapisditm-usage_ind   = 'CIV'.
      APPEND tbl_bapisditm.
      CLEAR tbl_bapisditmx.
      tbl_bapisditmx-itm_number = c_item.
      tbl_bapisditmx-ref_doc    = 'X'.
      tbl_bapisditmx-ref_doc_it = 'X'.
      tbl_bapisditmx-ref_doc_ca = 'X'.
      tbl_bapisditmx-material   = 'X'.
      tbl_bapisditmx-updateflag = 'I'.
      tbl_bapisditmx-plant      = 'X'.
      tbl_bapisditmx-target_qty = 'X'.
      tbl_bapisditmx-target_qu  = 'X'.
      tbl_bapisditmx-item_categ = 'X'.
      tbl_bapisditmx-sales_dist = 'X'.
      tbl_bapisditmx-dlv_prio   = 'X'.
      tbl_bapisditmx-prc_group5 = 'X'.
      tbl_bapisditmx-cust_mat35 = 'X'.
      tbl_bapisditmx-usage_ind  = 'X'.
      tbl_bapisditmx-route      = 'X'.
      APPEND tbl_bapisditmx.
    ENDFORM.                    " build_bapi_items
    *&      Form  build_bapi_sched_lines
    *       Build the BAPI Schedule Lines
    FORM build_bapi_sched_lines .
      CLEAR tbl_bapischdl.
      tbl_bapischdl-itm_number  = c_item.
      tbl_bapischdl-req_qty     = '1'.
      tbl_bapischdl-req_date    = sy-datum.
      APPEND tbl_bapischdl.
    ENDFORM.                    " build_bapi_sched_lines
    *&      Form  build_bapi_conditions
    *       Pull the BAPI Pricing Conditions from the Contract
    FORM build_bapi_conditions .
      LOOP AT tbl_bapisdcond.
        CLEAR tbl_bapicond.
        MOVE-CORRESPONDING tbl_bapisdcond TO tbl_bapicond.
        APPEND tbl_bapicond.
        CLEAR tbl_bapicondx.
        tbl_bapicondx-itm_number = tbl_bapicond-itm_number.
        tbl_bapicondx-cond_st_no = tbl_bapicond-cond_st_no.
        tbl_bapicondx-cond_count = tbl_bapicond-cond_count.
        tbl_bapicondx-cond_type  = tbl_bapicond-cond_type.
        tbl_bapicondx-updateflag = 'I'.
        tbl_bapicondx-cond_value = 'X'.
        tbl_bapicondx-currency   = 'X'.
        tbl_bapicondx-cond_unit  = 'X'.
        tbl_bapicondx-cond_p_unt = 'X'.
        tbl_bapicondx-varcond    = tbl_bapicond-varcond.
        APPEND tbl_bapicondx.
      ENDLOOP.
    ENDFORM.                    " build_bapi_conditions
    *&      Form  call_create_sales_ord_bapi
    *       Call the Sales Order Create BAPI
    FORM call_create_sales_ord_bapi .
      CLEAR g_vbeln_created.
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
          order_header_in    = st_bapisdhd1
        IMPORTING
          salesdocument      = g_vbeln_created
        TABLES
          return             = tbl_return
          order_items_in     = tbl_bapisditm
          order_items_inx    = tbl_bapisditmx
          order_partners     = tbl_bapiparnr
          order_schedules_in = tbl_bapischdl.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDFORM.                    " call_create_sales_ord_bapi
    *&      Form  update_sales_ord
    *       Update the newly created Sales Order with the Pricing Conditions
    *       from the Contract
    FORM update_sales_ord .
      CHECK g_valid_contract EQ 'X'.
      PERFORM get_contract_details.
      PERFORM build_bapi_conditions.
      PERFORM call_change_sales_ord_bapi.
    ENDFORM.                    " update_sales_ord
    *&      Form  get_contract_details
    *       Get Contract Details
    FORM get_contract_details .
    * Need to manually get the relevant Pricing Conditions as the BAPI
    * BAPISDORDER_GETDETAILEDLIST causes problems when we call the BAPI
    * BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_CHANGE (I think
    * this is due to the fact that these BAPIs belong to the same Function
    * Group and there must be some common structures that are not cleared
    * causing us all sorts of grief when we try and call the next BAPI)
      DATA: tbl_konv TYPE STANDARD TABLE OF konv WITH HEADER LINE.
      DATA: tbl_komv TYPE STANDARD TABLE OF komv WITH HEADER LINE.
      DATA: tbl_vbak TYPE STANDARD TABLE OF vbak WITH HEADER LINE.
    * Pricing Condition Master
      DATA: BEGIN OF tbl_t685a OCCURS 0,
              kschl     LIKE t685a-kschl,
              kaend_wrt LIKE t685a-kaend_wrt,
            END OF tbl_t685a.
      SELECT *
             INTO TABLE tbl_vbak
             FROM vbak
             WHERE vbeln = c_contract.
      READ TABLE tbl_vbak INDEX 1.
      SELECT *
             INTO TABLE tbl_konv
             FROM konv
             WHERE knumv = tbl_vbak-knumv AND
                   kposn = c_item.
      CHECK sy-subrc EQ 0.
    * We now need to make sure we only bring across the Condition Types that
    * are EDITABLE. If we bring across non editable conditions (such as
    * 'ZPR1') the Change Sales Order BAPI will fail
      SELECT kschl kaend_wrt
             INTO TABLE tbl_t685a
             FROM t685a
             FOR ALL ENTRIES IN tbl_konv
             WHERE kappl     EQ 'V'             AND  "Sales
                   kschl     EQ tbl_konv-kschl  AND
                   kaend_wrt EQ 'X'             AND  "Value is Editable
                   kmanu     NE 'D'.                 "Process manually
    * Prepare for Binary Search
      SORT tbl_t685a BY kschl.
      LOOP AT tbl_konv.
        READ TABLE tbl_t685a WITH KEY kschl = tbl_konv-kschl BINARY SEARCH.
        IF sy-subrc EQ 0.
          MOVE-CORRESPONDING tbl_konv TO tbl_komv.
          APPEND tbl_komv.
        ENDIF.
      ENDLOOP.
      CHECK NOT tbl_komv[] IS INITIAL.
    * Map KOMV into the more BAPI friendly BAPISDCOND structure
      CALL FUNCTION 'MAP_INT_TO_EXT_STRUCTURE'
        TABLES
          fxvbak        = tbl_vbak
          fxkomv        = tbl_komv
          fxbapikomv    = tbl_bapisdcond
        EXCEPTIONS
          entry_missing = 1
          OTHERS        = 2.
    ENDFORM.                    " get_contract_details
    *&      Form  call_change_sales_ord_bapi
    *       Call the Change Sales Order BAPI
    FORM call_change_sales_ord_bapi .
      DATA: st_head_chg      LIKE bapisdh1x,
            st_logic_switch  TYPE bapisdls.
      CHECK NOT g_vbeln_created IS INITIAL.
      CHECK g_valid_contract EQ 'X'.
      st_head_chg-updateflag     = 'U'.
      st_logic_switch-cond_handl = 'X'.
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = g_vbeln_created
          order_header_inx = st_head_chg
          logic_switch     = st_logic_switch
        TABLES
          return           = tbl_return_chg
          conditions_in    = tbl_bapicond
          conditions_inx   = tbl_bapicondx.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDFORM.                    " call_change_sales_ord_bapi
    *&      Form  write_output_report
    *       Produce Output Report
    FORM write_output_report .
      IF NOT g_vbeln_created IS INITIAL.
        WRITE:/ 'Success! Sales Order', g_vbeln_created, 'was created!'.
      ELSE.
        WRITE:/ 'Failure! Sales Order was not created!'.
      ENDIF.
      SKIP.
      WRITE:/ 'Sales Order Create Log'.
      LOOP AT tbl_return.
        WRITE:/ tbl_return-type, tbl_return-id, tbl_return-number,
                tbl_return-message.
      ENDLOOP.
      SKIP.
      WRITE:/ 'Sales Order Change Log'.
      LOOP AT tbl_return_chg.
        WRITE:/ tbl_return_chg-type, tbl_return_chg-id,
                tbl_return_chg-number, tbl_return_chg-message.
      ENDLOOP.
    ENDFORM.                    " write_output_report
    *&      Form  validate_contract
    *       Make sure that the Contract is Valid
    FORM validate_contract .
      DATA: l_gueen  LIKE vbak-gueen,
            l_prsdt  LIKE vbkd-prsdt.
      SELECT SINGLE  vbak~gueen vbkd~prsdt
             INTO (l_gueen, l_prsdt)
             FROM vbak
             INNER JOIN vbkd
             ON vbak~vbeln = vbkd~vbeln
             WHERE vbak~vbeln = c_contract AND
                   vbkd~posnr = '000000'.
      IF sy-datum LE l_gueen.
    * Contract is valid! Set Order Price Date
        g_valid_contract  = 'X'.
        g_cont_price_date = l_prsdt.
      ENDIF.
    ENDFORM.                    " validate_contract
    Hope this helps.
    Cheers,
    Pat.

  • Using of sales orders data in CRM in Trdade promotion managemnet?

    hai
    can we use the sales orders data in CRM for the cubes Trade promotions management in BW-BPS for calucating the uplift volume?
    can any body tel me how this uplift volume calculates.

    Hi Kallis ,
    Refer this
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fbiw%2fs-u%2ftrafficLightsforTradePromotion.pdf
    or just search for Traffic lights for Trade Promotion on home page of SDN with options as all  to get the PDF version.
    Assign points if it helps
    Cheers
    Raja

Maybe you are looking for

  • Can I install Windows Applications on an External Drive?

    I would like to install Windows apps on an external drive. Is this possible? Windows Vista will of course reside on the internal drive. (on a 2009 Mac Mini)

  • AAARRRRGGGGG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

    I got an Ipod mini in June and have been having lots of problems that come and go. The battery hasen't been holding it's charge very long. And today I went to update it and it will only charge. Itunes dosen't show that there is even an ipod connected

  • How to save folders in MDS

    Hi All, I have included my own folder in ${AIA_HOME}/AIAMetaData/AIAComponents and want to save it in MDS by running ANT command for UpdateMetadata.xml but it is not saving it. It is saving only files not directories. I have mentioned the UpdateMetaD

  • How to know whether my ipad is under warranty

    How to know whether my ipad 2 is under warranty

  • Howto avoid disk I/O?

    I hate when my disk spins up every 10 seconds just to write 28k and a 4k block (at least that's what dstat tells me). I use laptop mode tools (http://paste.pocoo.org/show/271842, hard disk settings begin on line 214), and I think I have configured it