BADI for return order creation in CRM

Hi group,
I have an requirement. In CRM ,Return order should be created from UBB service contract when change process takes place(Contract termination), ie throgh actions in the UBB service contract. these steps are configured through Actions.
The requirement is, I need to enhance the  BADI implemention(COPY_DOCUMENT) by creating a function module. this function module should provide the necessary data for Return Order creation. Is there any function module to create a Return order in CRM or how to proceed? Appreciate if any suggestions
Regards,
Sankar

Hi,
       You can use BAPI_SALESORDER_CREATEFROMDAT2 .
In import TESTRUN = X
Description
This parameter is a test switch.
If you activate the switch, the system does not save the document.
Value range
Space = Document should be saved
  X   = Document should not be saved
Default
Space

Similar Messages

  • Error during return order creation in CRM online

    Hi all,
    When I create return order via transaction CIC0 with reference to standard order ( B2C ) then some times system gives error after saving the return order. The text of the error message is very confusing , It says"
    Message no. CRM_ORDER_MISC 020
    Diagnosis
    Errors have occured while transferring the document into another system. Remove the error messages from the enclosed log.
    <i><u>"Transmission log
    Message no. CRM_ORDER_MISC 020
    Diagnosis
    Errors have occured while transferring the document into another system. Remove the error messages from the enclosed log.
    Document xxxxxxxxxx doesn't have document category  but (Notification E V2 068)
    Sales document xxxxxxxxxx was not changed (Notification E V4 219)"</u></i>
    I have tried to replicate this return order with all the available tools but during save this message is coming from R/3.
    Regards,

    I would suggest you to try to create a return order in R3 system (from where the error is coming) with the same parameters.
    Usually that should give you the same error... Resolve the issue, then try to create order in CRM online. Now error should not be there.
    Regards,
    Kaushal

  • Return Order creation referanace to billing document.

    Hi , Experts,
                   I have one issue regarding return process , Pls do the needful ASAP.
    My question : I have created one direct sales order , After thet i have created PGI & billing , But after created billing document , I want to take return taht goods, So i had created return for same sales order quantity, & also created credit memo. But my problem is, that system allow me futher create return sales order with referance to billing document no. At a return order creation time system only give warning message - (There are already returns for item 000010: 2 EA)
    & allow to save return document no. But i want to erroe message after take return all billing quantity. Can any body suggest me, what is the customizing require for this,
    Thanks a lot in advance.
    Regards;
    Happy

    Hi, abdul sir,
                     Here no any error message, My problem is that , why all line item comes in delivery, B'cause i had already deliver 5 line item out of 10 item, Here system take delivered line item with 0 quantity, I don't want that delivered  line item at a time in delivery,
    Regards:
    Happy

  • Return order creation.

    Hi, Expert,,
    My issue:
    1 ) I had create sales order for 2 Quantity.
    2 I had completed PGI for 2 Quantity
    3 ) I had complleted billing for this 2 Quantity,
    But after billing customer want to return,
    then
    1 ) I had created return order with references to billing no - for 2  Quantity
    2 ) I had completed PGR.- for 2  Quantity
    3 ) I had created credit memo for -  for 2  Quantity
    But by mistake user - created two times return process for that billing document no,
    User receive worning message at a time return order creation - is There are already returns for item 000010: 2 EA
    But i want to set error message if user create more quantity return order wrt to billing no.
    Can anybody send me it's solution ASAP,
    Thanks a lot in advance
    Regards:
    Happy

    Hi ..
    Since user is creating returns with reference to billing doc , he will not be able to create more quantity than in billing doc.
    if he try's it will give error message , since in your case there was already a return order excist that why the erro message displayed an order already excist.
    Hope it helps
    jinoy

  • Getting errors when iam using  BAPI_PO_CREATE1 for Purchase Order creation

    Hi sap Gurus,
      I am getting Errors when iam using  BAPI_PO_CREATE1 for Purchase Order creation that Material (144) does not exist but it is alreardy maintained in MM01.
    I dont get how it is coming.and what are the mandatory fields in bapi BAPI_PO_CREATE1 in item level .that is too material only.
    pls let me know .
    thanks in advance.

    Hi,
    Check the sample code..
    report  zpo_test             .
    *DATA DECLARATION
    constants : c_x value 'X'.
    *Structures to hold PO header data
    data : header like bapimepoheader ,
    headerx like bapimepoheaderx .
    *Structures to hold PO account data
    data : account like bapimepoaccount occurs 0 with header line ,
    accountx like bapimepoaccountx occurs 0 with header line .
    *Internal Tables to hold PO ITEM DATA
    data : item like bapimepoitem occurs 0 with header line,
    itemx like bapimepoitemx occurs 0 with header line,
    *Internal table to hold messages from BAPI call
    return like bapiret2 occurs 0 with header line,
    *Internal table to hold messages from BAPI call
    pocontractlimits like bapiesucc occurs 0 with header line.
    data : w_header(40) value 'PO Header',
    purchaseorder like bapimepoheader-po_number,
    delivery_date like bapimeposchedule-delivery_date.
    data : ws_langu like sy-langu.
    *text-001 = 'PO Header' - define as text element
    selection-screen begin of block b1 with frame title text-001.
    parameters : company like header-comp_code default '122' ,
    doctyp like header-doc_type default 'NB' ,
    cdate like header-creat_date default sy-datum ,
    vendor like header-vendor default '2000000012' ,
    pur_org like header-purch_org default 'PU01' ,
    pur_grp like header-pur_group default '005' .
    *sociedad like HEADER-COMP_CODE default '122' ,
    *vendedor like HEADER-SALES_PERS default 'sale person'.
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-002.
    parameters : item_num like item-po_item default '00010',
    material like item-material default '12000000' ,
    tipo_imp like item-acctasscat default 'K' ,
    *pos_doc like ITEM-ITEM_CAT default 'F' ,
    shorttxt like item-short_text default 'PRUEBA BAPI' ,
    grup_art like item-matl_group default '817230000' ,
    plant like item-plant default '3001' ,
    mpe like item-trackingno default '9999' ,
    *contrato like ITEM-AGREEMENT default '4904000003' ,
    *quantity like ITEM-QUANTITY default 1 .
    po_unit like item-po_unit default 'EA'.
    selection-screen end of block b2.
    Par?mnetros de imputaci?n
    selection-screen begin of block b3 with frame title text-004.
    parameters : centro like account-costcenter default '1220813150',
    cuenta like account-gl_account default '6631400' ,
    num_pos like account-po_item default '10' ,
    serial like account-serial_no default '01' ,
    ind_imp like account-tax_code default 'I2' .
    selection-screen end of block b3.
    start-of-selection.
    *DATA POPULATION
      ws_langu = sy-langu. "Language variable
    *POPULATE HEADER DATA FOR PO
    *HEADER-COMP_CODE = sociedad .
      header-doc_type = doctyp .
      header-vendor = vendor .
      header-creat_date = cdate .
      header-created_by = 'TD17191' .
      header-purch_org = pur_org .
      header-pur_group = pur_grp .
      header-comp_code = company .
      header-langu = ws_langu .
    *HEADER-SALES_PERS = vendedor .
    *HEADER-CURRENCY = 'DOP' .
    *HEADER-ITEM_INTVL = 10 .
    *HEADER-PMNTTRMS = 'N30' .
    *HEADER-EXCH_RATE = 1 .
    *POPULATE HEADER FLAG.
      headerx-comp_code = c_x.
      headerx-doc_type = c_x.
      headerx-vendor = c_x.
      headerx-creat_date = c_x.
      headerx-created_by = c_x.
      headerx-purch_org = c_x.
      headerx-pur_group = c_x.
      headerx-langu = c_x.
    *HEADERX-sales_pers = c_x.
    *HEADERX-CURRENCY = c_x.
    *HEADER-ITEM_INTVL = c_x.
    *HEADER-PMNTTRMS = c_x.
    *HEADER-EXCH_RATE = c_x.
    *HEADER-EXCH_RATE = c_x.
    *POPULATE ITEM DATA.
      item-po_item = item_num.
      item-quantity = '1'.
    *ITEM-MATERIAL = material .
      item-short_text = 'prueba bapi_po_create1'.
    *ITEM-TAX_CODE = ''.
      item-acctasscat = 'K' .
    *ITEM-ITEM_CAT = 'D' .
      item-matl_group = '817230000' .
      item-plant = '3001' .
      item-trackingno = '99999'.
      item-preq_name = 'test'.
    *ITEM-AGREEMENT = '' .
    *ITEM-AGMT_ITEM = ''.
      item-quantity = '1' .
      item-po_unit = 'EA'.
    *ITEM-ORDERPR_UN = 'EA'.
      item-conv_num1 = '1'.
      item-conv_den1 = '1'.
      item-net_price = '1000000' .
      item-price_unit = '1'.
      item-gr_pr_time = '0'.
      item-prnt_price = 'X'.
      item-unlimited_dlv = 'X'.
      item-gr_ind = 'X' .
      item-ir_ind = 'X' .
      item-gr_basediv = 'X'.
    *ITEM-PCKG_NO = '' .
      append item. clear item.
    *POPULATE ITEM FLAG TABLE
      itemx-po_item = item_num.
      itemx-po_itemx = c_x.
    *ITEMX-MATERIAL = C_X.
      itemx-short_text = c_x.
      itemx-quantity = c_x.
    *ITEMX-TAX_CODE = C_X.
      itemx-acctasscat = c_x.
    *ITEMX-ITEM_CAT = c_x.
      itemx-matl_group = c_x.
      itemx-plant = c_x.
      itemx-trackingno = c_x.
      itemx-preq_name = c_x.
    *ITEMX-AGREEMENT = C_X.
    *ITEMX-AGMT_ITEM = c_x.
      itemx-stge_loc = c_x.
      itemx-quantity = c_x.
      itemx-po_unit = c_x.
    *ITEMX-ORDERPR_UN = C_X.
      itemx-conv_num1 = c_x.
      itemx-conv_den1 = c_x.
      itemx-net_price = c_x.
      itemx-price_unit = c_x.
      itemx-gr_pr_time = c_x.
      itemx-prnt_price = c_x.
      itemx-unlimited_dlv = c_x.
      itemx-gr_ind = c_x .
      itemx-ir_ind = c_x .
      itemx-gr_basediv = c_x .
      append itemx. clear itemx.
    *POPULATE ACCOUNT DATA.
      account-po_item = item_num.
      account-serial_no = serial .
      account-creat_date = sy-datum .
      account-costcenter = centro .
      account-gl_account = cuenta .
      account-gr_rcpt = 'tester'.
      append account. clear account.
    *POPULATE ACCOUNT FLAG TABLE.
      accountx-po_item = item_num .
      accountx-po_itemx = c_x .
      accountx-serial_no = serial .
      accountx-serial_nox = c_x .
      accountx-creat_date = c_x .
      accountx-costcenter = c_x .
      accountx-gl_account = c_x .
      account-gr_rcpt = c_x.
      append accountx. clear accountx.
    *BAPI CALL
      call function 'DIALOG_SET_NO_DIALOG'.
      call function 'BAPI_PO_CREATE1'
        exporting
          poheader         = header
          poheaderx        = headerx
        importing
          exppurchaseorder = purchaseorder
        tables
          return           = return
          poitem           = item
          poitemx          = itemx
          poaccount        = account
          poaccountx       = accountx.
    *Confirm the document creation by calling database COMMIT
      call function 'BAPI_TRANSACTION_COMMIT'
      exporting
      wait = 'X'
    IMPORTING
    RETURN =
    end-of-selection.
    *Output the messages returned from BAPI call
      loop at return.
        write / return-message.
      endloop.
    Regards
    Sudheer

  • What are the User Exits for Sales Order creation process?

    Hi,
    what are the User Exits for Sales Order creation process? how can I find them?
    thanks in advance,
    will reward,
    Mindaugas

    Please check this info:
    User Exits In Sales Document Processing
    This IMG step describes additional installation-specific processing in sales document processing. In particular, the required INCLUDES and user exits are described.
    Involved program components
    System modifications for sales document processing affect different areas. Depending on the modification, you make the changes in the program components provided:
    MV45ATZZ
    For entering metadata for sales document processing. User-specific metadata must start with "ZZ".
    MV45AOZZ
    For entering additional installation-specific modules for sales document processing which are called up by the screen and run under PBO (Process Before Output) prior to output of the screen. The modules must start with "ZZ".
    MV45AIZZ
    For entering additional installation-specific modules for sales document processing. These are called up by the screen and run under PAI (Process After Input) after data input (for example, data validation). The modules must start with "ZZ".
    MV45AFZZ and MV45EFZ1
    For entering installation-specific FORM routines and for using user exits, which may be required and can be used if necessary. These program components are called up by the modules in MV45AOZZ or MV45AIZZ.
    User exits in the program MV45AFZZ
    The user exits which you can use for modifications in sales document processing are listed below.
    USEREXIT_DELETE_DOCUMENT
    This user exit can be used for deleting data which was stored in a separate table during sales document creation, for example, if the sales document is deleted.
    For example, if an additional table is filled with the name of the person in charge (ERNAM) during order entry, this data can also be deleted after the sales order has been deleted.
    The user exit is called up at the end of the FORM routine BELEG_LOESCHEN shortly before the routine BELEG_SICHERN.
    USEREXIT_FIELD_MODIFICATION
    This user exit can be used to modify the attributes of the screen fields.
    To do this, the screen fields are allocated to so-called modification groups 1 - 4 and can be edited together during a modification in ABAP. If a field has no field name, it cannot be allocated to a group.
    The usage of the field groups (modification group 1-4) is as follows:
    Modification group 1: Automatic modification with transaction MFAW
    Modification group 2: It contains 'LOO' for step loop fields
    Modification group 3: For modifications which depend on check tables or on other fixed information
    Modification group 4: is not used
    The FORM routine is called up for every field of a screen. If you require changes to be made, you must make them in this user exit.
    This FORM routine is called up by the module FELDAUSWAHL.
    See the Screen Painter manual for further information on structuring the interface.
    USEREXIT_MOVE_FIELD_TO_VBAK
    Use this user exit to assign values to new fields at sales document header level. It is described in the section "Transfer of the customer master fields into the sales document".
    The user exit is called up at the end of the FORM routine VBAK_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBAP
    Use this user exit to assign values to new fields at sales document item level. It is described in the section "Copy customer master fields into the sales document".
    The user exit is called up at the end of the FORM routine VBAP_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBEP
    Use this user exit to assign values to new fields at the level of the sales document schedule lines.
    The user exit is called up at the end of the FORM routine VBEP_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBKD
    Use this user exit to assign values to new fields for business data of the sales document. It is described in the section "Copy customer master fields into sales document".
    The user exit is called up at the end of the FORM routine VBKD_FUELLEN.
    USEREXIT_NUMBER_RANGE
    Use this user exit to define the number ranges for internal document number assignment depending on the required fields. For example, if you want to define the number range depending on the sales organization (VKORG) or on the selling company (VKBUR), use this user exit.
    The user exit is called up in the FORM routine BELEG_SICHERN.
    USEREXIT_PRICING_PREPARE_TKOMK
    Use this user exit if you want to include and assign a value to an additional header field in the communication structure KOMK taken as a basis for pricing.
    USEREXIT_PRICING_PREPARE_TKOMP
    Use this user exit if you want to include or assign a value to an additional item field in the communication structure KOMP taken as a basis for pricing.
    USEREXIT_READ_DOCUMENT
    You use this user exit if further additional tables are to be read when importing TA01 or TA02.
    The user exit is called up at the end of the FORM routine BELEG_LESEN.
    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.
    User exits in the program MV45AFZA
    USEREXIT_MOVE_FIELD_TO_KOMKD
    Use this user exit to include or assign values to additional header fields in the communication structure KOMKD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination".
    USEREXIT_MOVE_FIELD_TO_KOMPD
    Use this user exit to include or assign values to additional item fields in the communication structure KOMPD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination".
    USEREXIT_MOVE_FIELD_TO_KOMKG
    Use this user exit to include or assign values to additional fields in the communication structure KOMKG taken as a basis for material determination and material listing. This is described in detail in the section "New fields for listing/exclusion".
    USEREXIT_MOVE_FIELD_TO_KOMPG
    Use this user exit to include or assign values to additional fields in the communication structure KOMPG taken as a basis for material determination and material listung. This is described in detail in the section "New fields for listing/exclusion".
    USEREXIT_REFRESH_DOCUMENT
    With this user exit, you can reset certain customer-specific fields as soon as processing of a sales document is finished and before the following document is edited.
    For example, if the credit limit of the sold-to party is read during document processing, in each case it must be reset again before processing the next document so that the credit limit is not used for the sold-to party of the following document.
    The user exit is executed when a document is saved if you leave the processing of a document with F3 or F15.
    The user exit is called up at the end of the FORM routine BELEG_INITIALISIEREN.
    User-Exits in program MV45AFZB
    USEREXIT_CHECK_XVBAP_FOR_DELET
    In this user exit, you can enter additional data for deletion of an item. If the criteria are met, the item is not deleted (unlike in the standard system).
    USEREXIT_CHECK_XVBEP_FOR_DELET
    In this user exit, you can enter additional data for deletion of a schedule line. If the criteria are met, the schedule line is not deleted (unlike in the standard system).
    USEREXIT_CHECK_VBAK
    This user exit can be used to carry out additional checks (e.g. for completion) in the document header. The system could, for example, check whether certain shipping conditions are allowed for a particular customer group.
    USEREXIT_CHECK_VBAP
    This user exit can be used to carry out additional checks (e.g. for completion) at item level.
    USEREXIT_CHECK_VBKD
    The user exit can be used to carry out additional checks (e.g. for completion) on the business data in the order.
    USEREXIT_CHECK_VBEP
    This user exit can be use to carry out additional checks (e.g. for completion) on the schedule line. During BOM explosion, for example, you may want certain fields to be copied from the main item to the sub-items (as for billing block in the standard system).
    USEREXIT_CHECK_VBSN
    You can use this user exit to carry out additional checks (e.g. for completion) on the serial number.
    USEREXIT_CHECK_XVBSN_FOR_DELET In this user exit, you can enter additional criteria for deletion of the serial number. If the criteria are met, the serial number is not deleted (unlike in the standard system).
    USEREXIT_FILL_VBAP_FROM_HVBAP
    You can use this user exit to fill additional fields in the sub-item with data from the main item.
    USEREXIT_MOVE_FIELD_TO_TVCOM_H
    You can use this user exit to influence text determination for header texts. For example, you can include new fields for text determination or fill fields that already exist with a new value.
    USEREXIT_MOVE_FIELD_TO_TVCOM_I
    You can use this user exit to influence text determination for item texts. For example, you can include new fields for text determination or fill fields that already exist with a new value.
    User-Exits for product allocation:
    The following user exits all apply to structure COBL, in which the data for account determination is copied to item level.
    USEREXIT_MOVE_FIELD_TO_COBL
    Option to include new fields in structure COBL.
    USEREXIT_COBL_RECEIVE_VBAK
    Option to assign values from the document header to the new fields.
    USEREXIT_COBL_RECEIVE_VBAP
    Option to supply values from the item to the new fields.
    USEREXIT_COBL_SEND_ITEM
    A changed field can be copied from the structure into the item. You could use the user exit to display a certain field in the account assignment block (see also MV45AFZB).
    USEREXIT_COBL_SEND_HEADER
    A changed field can be copied from the structure to the header (see source text MV45AFZB)
    USEREXIT_SOURCE_DETERMINATION
    You can use this user exit to determine which plant will be used for the delivery. In the standard system, the delivering plant is copied from the customer master or the customer-material info record. If you want to use a different rule, then you must enter it in this user exit.
    USEREXIT_MOVE_FIELD_TO_ME_REQ
    With this user exit you can include additional fields for the following fields:
    EBAN (purchase requisition)
    EBKN (purchase requisition-account assignment)
    USEREXIT_GET_FIELD_FROM_SDCOM
    Option to include new fields for the variant configuration. Fields that are included in structure SDCOM can be processed and then returned to the order.
    USEREXIT_MOVE_WORKAREA_TO_SDWA
    You can use this user exit to format additional work areas for the variant configuration. You will find notes on the user exit in MV45AFZB.
    User-Exits for first data transfer:
    The following user exits can only be used for the first data transfer.
    Note
    Only use the user exits if the names/fields do NOT have the same name.
    USEREXIT_MOVE_FIELD_TO_VBAKKOM
    Option to include additional fields in structure VBAKKOM (communiction fields for maintaining the sales document header)
    USEREXIT_MOVE_FIELD_TO_VBAPKOM
    Option to include additional fields in structure VBAPKOM (communication fields for maintaining a sales item)
    USEREXIT_MOVE_FIELD_TO_VBEPKOM
    Option to include additional fields in structure VBEPKOM (communication fields for maintaining a sales document schedule line)
    USEREXIT_MOVE_FIELD_TO_VBSN
    You can use this user exit to include fields in structure VBSN (scheduling agreement-related change status).
    USEREXIT_MOVE_FIELD_TO_KOMKH
    You can use this user exit to include new fields for batch determination (document header).
    USEREXIT_MOVE_FIELD_TO_KOMPH
    You can use this user exit to include new fields for batch determination (document item).
    USEREXIT_CUST_MATERIAL_READ
    You can use this user exit to set another customer number in the customer material info record (e.g. with a customer hierarchy)
    USEREXIT_NEW_PRICING_VBAP
    Option for entry of preconditions for carrying out pricing again (e.g. changes made to a certain item field could be used as the precondition for pricing to be carried out again). Further information in MV45AFZB.
    USEREXIT_NEW_PRICING_VBKD
    Option for entry of preconditions for carrying out pricing again (e.g. changes to the customer group or price group could be set as the preconditions for the system to carry out pricing again). Further information in MV45AFZB.
    User-Exits in Program MV45AFZD
    USEREXIT_CONFIG_DATE_EXPLOSION
    The BOM is exploded in the order with the entry date. You can use this user exit to determine which data should be used to explode the BOM (explosion with required delivery date, for example).
    User exits in the program FV45EFZ1
    USEREXIT_CHANGE_SALES_ORDER
    In the standard SAP R/3 System, the quantity and confirmed date of the sales document schedule line is changed automatically if a purchase requisition is allocated, and it or the sales document is changed (for example, quantity, date).
    If you want to change this configuration in the standard system, you can define certain requirements in order to protect your sales orders from being changed automatically. Use this user exit for this purpose. Decide at this point whether the schedule lines are to be changed.
    User-Exits in Program RV45PFZA
    USEREXIT_SET_STATUS_VBUK
    In this user exit you can you can store a specification for the reserve fields in VBUK (header status). Reserve field UVK01 could, for example, be used for an additional order status (as for rejections status, etc.).
    The following workareas are available for this user exit:
    VBUK (header status)
    FXVBUP (item status)
    FXVBUV (Incompletion)
    USEREXIT_SET_STATUS_VBUP
    In this user exit you can you can store a specification for the reserve fields for VBUP (item status).
    The following workareas are available for this user exit:
    FXVBAP (Item data)
    FXVBAPF (Dynamic part of order item flow)
    FXVBUV (Incompletion)
    USEREXIT_STATUS_VBUK_INVOICE
    You can use this user exit to influence billing status at header level.
    User exits in the screens
    Additional header data is on screen SAPMV45A 0309, additional item data on screen SAPMV45A 0459. These screens contain the Include screens SAPMV45A 8309 or SAPMV45A 8459 as user exits.
    Fields which are also to be included in the sales document for a specific installation should be included on the Include screens for maintaining. If an application-specific check module is needed for the fields, this can be included in the Include MV45AIZZ. The module is called up in the processing logic of the Include screens.
    For field transports, you do not have to make changes or adjustments.
    Example
    A new field, VBAK-ZZKUN, should be included in table VBAK.
    If the check is defined via the Dictionary (fixed values or check table) the field must be included with the fullscreen editor in the Include screen SAPMV45A 8309. In this case, no change has to be made to the processing logic.
    User Exits in Program MV45AFZ4
    USEREXIT_MOVE_FIELD_TO_KOMK
    You can use this user exit to add or edit additional header fields in the communication structure - KOMK- for free goods determination. For more information, see the New Fields for Free Goods Determination IMG activity.
    USEREXIT_MOVE_FIELD_TO_KOMP
    You can use this user exit to add or edit additional item fields in the communication structure KOMP for free goods determination. For more information see the New Fields for Free Goods Determination IMG activity.
    User Exits in the SAPFV45PF0E and SAPFV45PF0C Programs
    EXIT_SAPFV45P_001
    You can use this user exit to decide whether intercompany billing data is used in the profitability segment for cross-company code sales, or whether the data comes from external billing (external customer, sales data from the selling company code.
    Regards
    Eswar

  • Automatic creation InternalOrder inECC after Service Order creation in CRM

    Hi,
    After Service Order creation in CRM,  the automatic creation of Internal Order in ECC not happening, needs to be do the related settings. Can anybody share the stepts for the same to do the settings.
    rgds,
    balu

    Hello balu,
    Have you released all items?
    Also,please make sure that against the item category "Assign BW/CO" is set to Service.
    Hope this helps!
    Thanks and Best Regards,
    Shanthala Kudva.

  • Inactivate the cash discount condition type during return order creation.

    Hi All,
    I have created a Pricing procedure its having a  condition type Cash Discount.
    The client requirment is during the return order creation system should inactivate the cash discount condition type.
    Please sugget me what to do to fulfill this requirment.
    Thanks in advance.
    Regards
    Vankat.

    Hi
    You can achieve through creating new pricing procedure for Return process
    Otherwise try with user exit
    MV45AFZZ  USEREXIT_SAVE_DOCUMENT_PREPARE
    Maintain access Sequence with Document type and maintain condition record , so at the time of return order system wont pick that material 
    Regards,
    Prasanna
    Edited by: prasanna_sap on Feb 9, 2012 3:31 PM

  • Blocking of deleted material in Return Order creation

    Hi everyone,
    Can somebody please teach me how to block a particular deleted material in Return Order creation.  I have already blocked it in Sales Order creation using OVSU.
    Thanks in advance.

    hi,
    same t.code - OVSU
    Block f.returns - sales order return
    Block for order - sales order
    regards
    senya

  • Exit for production order creation that update BOM explosion date

    Hi Guros
    does any one know a user exit for production order creation that update BOM explosion date = AUFLD.
    or a UE that run before the BOM explosion.
    thanks.

    Dear,
    I dont think user exist will work for you,
    You need to find BAdi for it, cl_exithandler=>get_class_name_by_interface .
    Or try with SE84,
    Enter the package name and check the " Enhancements"
    Regards,
    R.Brahmankar

  • Regarding bapis for sales order creation and modification

    Hi,
    I am trying to create a syncbo for sales order creation, modification and display. The bapis that I am using are
    1.BAPI_SALESORDER_GETLIST
    2.BAPISDORDER_GETDETAILEDLIST
    3.BAPI_SALESORDER_CREATEFROMDATA1
    4. BAPI_SALESORDER_CHANGE
    Am I using the correct bapis. When I tried to create a syncbo it gave the following errors
    BAPISDORDER_GETDETAILEDLIST does not have RETURN parameter in export or tables parameter
    RETURN parameter in Create BAPI Wrapper should refer to structure BAPIRET2
    RETURN parameter in GetList BAPI Wrapper should refer to structure BAPIRET2
    GetDetail BAPI Wrapper does not have RETURN parameter in export or tables parameter
    No Export parameter referring to header structure exists in GetDetail BAPI Wrapper
    No Import parameter referring to header structure exists in Create BAPI Wrapper
    No Import parameter referring to header structure exists in Modify BAPI Wrapper
    No Import parameter referring to a field of header structure exists in GetDetail BAPI Wrapper
    No Export parameter referring to a field of header structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Modify BAPI Wrapper
    I am informed that the above bapis are standard bapis.
    I am not sure as to why I am getting the errors.
    Does the syncbo require the  bapi's to be in a specific format.
    What would be the header and item structures for sales order bapis
    Regards
    Raja Sekhar

    Hi Raja,
      ya , for creating Sync BOs ,our BAPI wrappers must satisfy certain conditions..
    just go through this link.
    u can use the standard BAPIs of SALES Order in ur Custom BAPI Wrapper
      http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/what_is_a_bapi_wrapper.html
    the RETURN must be of type BAPIRET2..
                    Regards
                    Kishor Gopinathan

  • Pricing for return orders

    Hi,
    Can anyone help me on an user exit for return orders pricing.i have to do the pricing based on some logic .but im unable to find the table in which material/customer exists (except KNMT table) such that i can find entry for shipment and go head and find the avg price.
    can suggestion also is welcome

    Hi,
    following is the code that can be helpful.
    use the following code in the MV45AFZZ include program and trigger the following code in a include program USEREXIT_PRICING_PREPARE_TKOMP.
    hope it helps.
    CHECK vbak-auart EQ 'ZRE'.
    *CHECK vbak-vkorg EQ '1300'.
         T Y P E  D E C L A R A T I O N S                               *
    TYPES : BEGIN OF ty_s_retorders,
              kunag TYPE vbrk-kunag,    " Customer Number
              vbeln TYPE vbrp-vbeln,    " Billing Doucuement
              matnr TYPE vbrp-matnr,    " Material Number
              vgpos TYPE vbrp-vgpos,    " Item Number
              fkimg TYPE vbrp-fkimg,    " Item Quantity
              netwr TYPE vbrp-netwr,    " Net price of the Item
              erdat TYPE vbrk-erdat,    " Date of cretaion of the record
              value TYPE vbrp-netwr,    " Net value of the Item
            END OF ty_s_retorders,
           ty_t_retorders TYPE STANDARD TABLE OF ty_s_retorders.
                V A R I A B L E S                                       *
    DATA : lv_quant TYPE vbrp-fkimg,    " Total quantity
           lv_value TYPE vbrp-netwr,    " Total value of the materials
           lv_avgpr TYPE vbrp-netwr,    " Averge Price of the material
           lv_dat   TYPE i,             " variable to hold the year value
           lv_date  TYPE vbrk-erdat.    " Creation date of the docuement
         I N T E R N A L  T A B L E S                                   *
    DATA : gt_retorders TYPE ty_t_retorders.
    G L O B A L    D A T A   D E C L A R A T I O N S                    *
    DATA   : gs_output    TYPE ty_s_retorders.
    CONSTANTS : lc_zpr0(4) TYPE c VALUE 'ZPR0' .
    Get date value which is 12 months ago.
    lv_dat     = sy-datum+0(4) - 1.
    lv_date    = sy-datum.
    lv_date(4) = lv_dat.
    Select data
    SELECT   vbrk~kunag          " Customer Number
             vbrp~vbeln          " Billing Doucuement
             vbrp~matnr          " Material Number
             vbrp~vgpos          " Item Number
             vbrp~fkimg          " Item Quantity
             vbrp~netwr          " Net price of the Item
             vbrk~erdat          " Date of cretaion of the record
             INTO   TABLE gt_retorders
             FROM  vbrp  JOIN   vbrk
             ON   vbrkvbeln = vbrpvbeln
             WHERE   vbrk~erdat BETWEEN lv_date AND sy-datum
               AND   kunag EQ vbak-kunnr
               AND   matnr EQ vbap-matnr.
    CLEAR: lv_quant,
           lv_value.
    loop the internal table and get the total of quantity and value
    LOOP AT gt_retorders INTO gs_output.
      gs_output-value = gs_output-fkimg * gs_output-netwr.
      lv_quant        = lv_quant +  gs_output-fkimg.
      lv_value        = lv_value +  gs_output-value.
    ENDLOOP.
    calculate the average pricing value
    CLEAR lv_avgpr .
    lv_avgpr = lv_value / lv_quant.
    CLEAR xkomv.
    READ TABLE xkomv INTO xkomv WITH KEY kposn = vbap-posnr
                                         kschl = lc_zpr0 .
    IF sy-subrc EQ 0.
      xkomv-kbetr = lv_avgpr .
      MODIFY TABLE xkomv[] FROM xkomv TRANSPORTING kbetr .
    ENDIF.

  • IDOC/BAPI for Production order creation from Legacy system

    Hi all
    We are using an interface to create Production orders from legacy to SAP. Would you recommend an IDOC or a BAPI to create Production orders. If IDOC or BAPI then could you please mention which one?
    thanks a bunch

    Hi John,
    For your purposes, please use BAPI for production order creation from legacy system. There is no standard inbound IDoc available to use. SAP has an IDoc for outbound interface only (message type LOIPRO).
    If there is an inbound IDoc available, I would recommend to use an IDoc.
    IDoc technology has excellent error handling and will allow you to reprocess an error (if any).
    BAPI is also good approach to use and fast in term of  processing.
    For BAPI approach, you can use BAPI BAPI_PRODORD_CREATE.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Recalculation of quantity in free goods for return order wrf to invoice

    Hello everyone,
    I want to recalculate quantity of free goods category in a return order created with reference to an invoice, if the quantity in the High Level Item Category has changed.
    For example, a customer bought 100 boxes of product "A " and received 10 of these for free. Then he wants to return 60 boxes. When I create a return order with reference to the invoice and change these quantity from 100 to 60, free goods item category still shows 10 boxes instead of 6.
    Recalculation must be take place acording to the pricing date determination in order to apply free goods in a valid date.
    Customized features reviewing:
    1. There's not Item Category Proposal for Target Sales Doc type of the Return order, but item category of source bill type has one an is set to Pricing Type "D".
    2. High Level Item category of free goods category is relevant for billing and is set to M "Delivery - related invoices-no zero qtys (in main bath items)"
    3. Free goods category assigment has NORM as item Category Group, FREE ussage, High Level Item category is determinated for return order document type and Item category by default is the free goods category.
    I will appreciate your support to solve this issue.
    Best Regards,
    Andrea Figueroa

    Hello,
    Thank you for your response.
    My Discount Type of Free Goods determination is set to:
    Calculation Rule: "2 - Unit reference"
    Free Goods Category: "1 - Inclusive rebate (with item generation)"
    Free Goods delivery control: "C - Delivery of main item is part. delivered, only with main item"
    However, whatever the calculation rule is, if I change the quantity in the main item, subitem does not work. 
    I read about SAP Note 573598 that describes perfectly my problem, but is valid in 4.6 to 4.7 version and I have ERP version.
    Thank for your help,
    Andrea Figueroa

  • IDoc Configuration for Production Order Creation and Change

    Hi All,
    Please Help me out for IDoc Configuration for Production Order Creation and Change
    I have found the IDoc for Production Order
    Messgae Type : LOIPRO and IDoc type : LOIPRO01
    Actually my requirment is to send the (LOIPRO01 )IDoc from SAP R/3 to XI system ,when ever the Production Order Created and Changed,
    I have done following Configurations:
    1. RFC Destination created for XI system
    2. PORT was created for XI
    3. Partner profile created WE20 and LOIPRO01 IDoc is added in OutBound Perameter.
    I need to know how to do the followning.
    1. How do i configure the outbound Production order idocs when Production Order is created or changed.
    2. in NACE (Output control) which is the Application for Production Order.
    3. How can I set IDoc as output Type for Production Order Creation.
    Thanks in advance
    Dhanabal T

    Hi Michal,
    I know that it is the old thread but still want to get clarified from you out of curiosity.
    Unlike other IDOC, i actiavated change pointers for LOIPRO
    1.message and idoc type is linked
    2.function module , message type , idoc type is linked
    function module used is CLOI_MASTERIDOC_CREATE_LOIPRO
    3.BD64, distribution model is created and distributed
    4. port and partner profile is in place.
    5. IDOC is not getting generated after creating the process order.
    do we need to activate the change documents for the message type in BD52,
    if yes can you please provide the object types for the same.
    or i am missing something else. please guide me in this regards.
    Thanks in advance for your time.
    S.Janagar

Maybe you are looking for

  • How do I mount a partition at a specific mount point.

    How do I mount a partition at a specific mount point? For example I see a Vol01 disk image, which is a partition of one of my hard drives, sitting on my desktop. Under the disk utility it says that its mount point is /Volumes/Vol01. How do I mount th

  • Service tax issue

    Hi, My client is posting some vendor invoices through FB60. When they are posting in FB60, TDS is getting calculated automatically for that particular vendor. Entry is showing like this Itm PK Account Account short text Assignment Tx Amount 1 31 2010

  • Finder Column Resize Field is missing - whitespace instead

    Hi, I noticed that the little column resize field on the vertical dividers in Finder (the one with the two vertical lines on it) has gone missing. There's now a whitespace instead, which I can still use to resize the column. So the problem is more of

  • Best practice for creating DVD

    I am trying to create a DVD of the movie i just made. I am wondering about the exporting feature of iMovie, beucase i want to change the frame rate from 29 fps to 25 fps to give it a more movie like feel, rather then so life like.... is is possible?

  • N97 application problem on homescreeen

    Hi, First, i'm french, so it's possible that i've done mistakes in my mesages I've got a N97, and on the home screen, i put some applications like ACCUWEATHER... But on the screeen, there is only this message ( "loading content" ) I'm looking for any