Reg: Sales document creation

Hi Abapers,
As i am new to SD Module, would like to get some ideas from your end. My requirement is to create a sales order using Programming. After creation of sales order it should post to finance. Could anyone help me how this can be done.

REPORT  ZSALESORDER.
* Parameters
* Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
* Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
* Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d .
SELECTION-SCREEN END OF LINE.
* Complete Deliver
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
* Data declarations.
DATA: v_vbeln            LIKE vbak-vbeln.
DATA: header             LIKE bapisdhead1.
DATA: headerx            LIKE bapisdhead1x.
DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                         WITH HEADER LINE.
DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                         WITH HEADER LINE.
DATA: lt_schedules_ink    TYPE STANDARD TABLE OF bapisdhead1
                         WITH HEADER LINE.
* Initialization.
INITIALIZATION.
v_text   = 'Order type'.
v_text1  = 'Sales Org'.
v_text2  = 'Distribution channel'.
v_text3  = 'Division'.
v_text4  = 'Sold-to'.
v_text5  = 'Ship-to'.
v_text6  = 'Material'.
v_text7  = 'Quantity'.
v_text9  = 'Plant'.
v_text10 = 'Complete delivery'.
* Start-of-selection.
START-OF-SELECTION.
* Header data
* Sales document type
  header-doc_type = p_auart.
  headerx-doc_type = 'X'.
* Sales organization
  header-sales_org = p_vkorg.
  headerx-sales_org = 'X'.
* Distribution channel
  header-distr_chan  = p_vtweg.
  headerx-distr_chan = 'X'.
* Division
  header-division = p_spart.
  headerx-division = 'X'.
  headerx-updateflag = 'I'.
*Complete delivery
    header-COMPL_DLV = p_autlf.
    header-COMPL_DLV = 'X'.
* Partner data
* Sold to
  partner-partn_role = 'AG'.
  partner-partn_numb = p_sold.
  APPEND partner.
* Ship to
  partner-partn_role = 'WE'.
  partner-partn_numb = p_ship.
  APPEND partner.
* ITEM DATA
  itemx-updateflag = 'I'.
* Line item number.
  item-itm_number = '000010'.
  itemx-itm_number = 'X'.
* Material
  item-material = p_matnr.
  itemx-material = 'X'.
* Plant
  item-plant    = p_plant.
  itemx-plant   = 'X'.
* Quantity
  item-target_qty = p_menge.
  itemx-target_qty = 'X'.
* item category
  itemx-ITEM_CATEG = 'X'.
  APPEND item.
  APPEND itemx.
*   ITEM DATA
  itemx-updateflag = 'I'.
* Line item number.
  item-itm_number = '000020'.
  itemx-itm_number = 'X'.
* Material
  item-material = p_matnr.
  itemx-material = 'X'.
* Plant
  item-plant    = p_plant.
  itemx-plant   = 'X'.
* Quantity
  item-target_qty = p_menge.
  itemx-target_qty = 'X'.
  APPEND item.
  APPEND itemx.
*   Fill schedule lines
  lt_schedules_in-itm_number = '000010'.
  lt_schedules_in-sched_line = '0001'.
  lt_schedules_in-req_qty    = p_menge.
  APPEND lt_schedules_in.
*   Fill schedule line flags
  lt_schedules_inx-itm_number  = '000010'.
  lt_schedules_inx-sched_line  = '0001'.
  lt_schedules_inx-updateflag  = 'X'.
  lt_schedules_inx-req_qty     = 'X'.
  APPEND lt_schedules_inx.
*   Fill schedule lines
  lt_schedules_in-itm_number = '000020'.
  lt_schedules_in-sched_line = '0001'.
  lt_schedules_in-req_qty    = p_menge.
  APPEND lt_schedules_in.
*   Fill schedule line flags
  lt_schedules_inx-itm_number  = '000020'.
  lt_schedules_inx-sched_line  = '0001'.
  lt_schedules_inx-updateflag  = 'X'.
  lt_schedules_inx-req_qty     = 'X'.
  APPEND lt_schedules_inx.
* Call the BAPI to create the sales order.
  CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
       EXPORTING
            sales_header_in     = header
            sales_header_inx    = headerx
       IMPORTING
            salesdocument_ex    = v_vbeln
       TABLES
            return              = return
            sales_items_in      = item
            sales_items_inx     = itemx
            sales_schedules_in  = lt_schedules_in
            sales_schedules_inx = lt_schedules_inx
            sales_partners      = partner.
* Check the return table.
  LOOP AT return WHERE type = 'E' OR type = 'A'.
    EXIT.
  ENDLOOP.
  IF sy-subrc = 0.
    WRITE: / 'Error in creating document'.
  ELSE.
* Commit the work.
    COMMIT WORK AND WAIT.
    WRITE: / 'Document ', v_vbeln, ' created'.
  ENDIF.
Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 10:58 AM

Similar Messages

  • Sales Document creation

    I am creating the sales document using the FM SD_SALESDOCUMENT_CREATE But if we pass net value 120 it creates as 1200. it is same for tax values also if tax is 10 it takes as 100. How can we solve this problem?

    I am creating the sales document using the FM SD_SALESDOCUMENT_CREATE But if we pass net value 120 it creates as 1200. it is same for tax values also if tax is 10 it takes as 100. How can we solve this problem?
    Hi,
    The condition values ( kbetr -  % ) are stored in the database tables in a different format ( Multiplied by 10 ).
    So, before sending the value to bapi divide it by 10.
    wa_condition-cond_value = wa_condition-cond_value / 10.
    The same issue happens when reading the details from KONV.
    Regards,
    Satish.

  • Sales document creation using bapi

    Hi Experts ,
    When i try create sales order using bapi " BAPI_SALESDOCU_CREATEFROMDATA'" , it says error like this , Please enter sold to party and ship to party, even though we are sending partner number it shows same error , if we pass values directly in se37 we get the correct result , but when we are calling it in program it says error.
    Error on this field : partner Number
    Thanks & Regards
    Siva Krishna

    Hi shiva,
               Please go through the documentation,
    Sales document type is checked with sales and distribtion document type.
    You must at least enter order header data (using the structure ORDER_HEADER_IN) and partner data (using the table ORDER_PARTNERS).
    Furthermore, you must enter the business object for which the sales document is to be created:
                   - BUS2030 for inquiries
                   - BUS2031 for quotations
                   - BUS2032 for sales orders
    I think ur program,
    does not pass business object , kindly check

  • Sales Document Creation in CRM System

    Dear all,
    We are implementing CRM 5.0 and ECC 6.0 (IS-Retail) for our client. As per the Business Process Customer creation take's place in CRM, which uploads Customer Records into ECC system.
    Material Master (Article), Pricing Procedure and Condition Types are being maintained in ECC system only.
    Now the new requirement is to create Quotations in CRM system, in turn it has to upload into ECC system. We have to enable or maintain all article data, Pricing Data and Discounts in CRM system also.
    I don't know how could we exchange the Article Master Records (Material), Pricing Procedures and condition types between ECC system.
    I have expertise in CRM Marketing. by getting basic understanding of CRM and ECC data flow landscape, Middleware Settings and Object downloads, I have confidence to map the requirement into SAP successfully.
    I request you to educate me on this scenario, your help and suggestions will be highly appreciated.
    Thank you
    Raghu ram.

    Hi,
    i'm not quite sure about ECC retail, but for sure, as per CRM 5.0 and ECC 6, depending on your scenario, you may not need whole complete set of pricing, nor the condition tables to be maintained in CRM.
    you can use minimum pricing which is basic condition type PR00. once the quotation is saved in CRM, during the replication process, the pricing will be determined in the ERP and passed back to CRM. so when you look into CRM quotation document, you will be able to find all the condition types maintained in CRM.
    however, this scenario is not suitable if you require customer to review the pricing before saving the quotation, let say internet sales / e-commerce. then in that case you'll probably need to have complete set of pricing in CRM.
    hope this helps.

  • Output determination does not happen during Sales Document creation

    Hello All,
    I am facing an issue where the automatic output determination does not happen when the Sales Order is created. Let me explain a bit on the background.
    Output type ZDL2 has been defined as a special function (TNAPR-NACHA = 8) attached to a custom program and Form routine to create Outbound delivery after successful posting of the sales order.
    Condition records are maintained to trigger this output for the Key Combination of Sales Org/Distrib Channel/Division/Route. Access sequence has also been correctly maintained for the above fields.
    When the Sales order is saved, the output is supposed to be triggered but out of several sales orders created, it triggered for just one document. We have no clues on what could be the issue.
    One question here is, can we have the access sequence maintained for the fields from both header and item level (ie KOMKBV1 and KOMPBV1). Please be reminded that, in our case, the field ROUTE comes from the field catalog KOMPBV1.
    Another point which we noticed is that, the Function Module COMMUNICATION_AREA_KOMPBV1 which is supposed to fill the Item data Communication structure for output determination was never called.
    Has anyone came across such situations. Comments or suggestions are really appreciated.
    Kind Regards
    Sabu Kuriakose

    Sabu Kuriakose,
    Since you are using ROUTE as one parameter for the condition table, and it is at the item level.
    the output is triggered at the header level.
    So a sales order can contain multiple items with different routes. so at header level how will u identify the route ?
    the fields might be available for creatign the condition table but the problem is the fields should get the value during order processing.
    in the analsysis screen you will know that the field is getting the value of the ROUTE  or not ?
    also for creating a delivery you need a shipping point. same as above you can hae multiple items with different shipping points. how will u consider that scenario.
    If you can explain that, then that will be helpful to answer your problem.

  • Sales document creation error.

    Hi Guru's,
    I am using a function module to create a sales order. But i'm getting an error which says: For object RV_BELEG , number range interval  does not exist.
    How to rectify this?
    Below is the code :
    CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
             EXPORTING
                  SYNCHRON                   = SPACE
                  STATUS_BUFFER_REFRESH      = SPACE
                  REQUISITION_BUFFER_REFRESH = SPACE
                  REFERENCED_PM_ORDER        = CAUFVD_IMP-AUFNR
             IMPORTING
                  EVBAK                      = VBAK_LOC.
    Please help.
    Thanks,
    Das

    Number range objects are maintained in transaction SNUM, but before you rush off to that transaction you should check what happens in the standard Sales Order create - i.e. do you get the same message in VA01?  It could be you have wrong values in your SD_SALES_DOCUMENT_SAVE setup.
    Jonathan

  • Sales Document Creation with SD_SALESDOCUMENT_CREATE

    Hi All,
    I am trying to create a Sales Order using FM SD_SALESDOCUMENT_CREATE. I have the following questions:
    1). Do I need to specify the Line Item Numbers? If I don't need to then how does SAP know which line items in SALES_ITEMS_INX and SALES_SCHEDULES_IN tables are referring to the items in SALES_ITEMS_IN?
    2). How do I add the pricing conditions? I see the table SALES_CONDITIONS_IN but what fields do I need to fill in?
    Do I need to fill in the Step number, Condition Count, Condition Type, and Condition Value fields?
    Any suggestions will be greatly appreciated.
    Regards.

    Hi Aurag,
    Why dont you use the BAPI "BAPI_SALESORDER_CREATEFROMDAT2" - the line item numbers can be assigned by you or system will assign them as per configuration setup. Look at the documentation for this BAPI and you will understand what needs to be populated.
    Cheers

  • Reg:sales order creation

    Hi,
       Can anyone please tell me how to solve this issue.When i am creating a sales order then in the ship-to-party and sold-to-party fields
    when i enter a value it is displaying as no master record is existing.What should i do to overcome this?

    Hi,
    While creating Customer master you have to assign it to one account group. again to one sales area.
    Check whjther the sales area for which you are creating order, the customer is defined or not. if the customer is not deifned on that sales area u can extend the customer in that sales area.
    For extending the Customer
    Go to XD01 , Give customer number, give Account group, and give sales area. this will extebd customer into that sales area.
    Recreate the order. Are you maintained the common division and distribution channel?? if not then maintain it in VOR1 and VOR2.
    Hope this will help.
    Reward Point if helpful.
    Thanks,
    Raja

  • Reg: Posting Document creation issue

    Dear experts,
    we have hired 20 employees in a month from start date 01.01.2011, with updating all the personal and payroll records. We have run the payroll for all employees, which has updated all payroll results. When we came across the posting part, among 20 employees only 19 employees gets executed and for 1 single employee the posting documtne didnt get created.
    Please help us in the solving following issue.
    With Regrads
    Chandan Maity

    Hi Chandan,
    Please go to PPMOD and make sure that this employee is linked to a group via this feature (cost center vs fields are maintained)
    Please also make sure that employees payroll results reside in PC_PAYRESULT t-code without errors.
    Regards,
    Dilek

  • 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

  • Handling Business Area for sales documents

    Hi Experts,
                   My requirement is that , I have to change the default Business area  , determined by the system , at the time of sales document creation . For Eg: I have two business areas 0001 and 0002.
    When i create a sales document , by default system determined business area 0001. But  if certain conditions are met , i have to change the business area to 0002. and finally when we post the document to the Accounting after billing , the document must hit the business area 0002.I could able to change the business area in the sales documents through the user-exits available for Delivery document and Billing document .But when i post the document into accounting , the entries are going into wrong business area . How to handle this situation.
    Thanx in advance.
    Durga.

    You mean there is a different business area in sales and account document after creation? Are you sure?
    Or your user exits might not be updating properly? else system might be re-defining business area in accounting thru configuration.
    Regds
    Manohar

  • Change of tabs in sales document layout

    Hello experts,
    I'm working with CRM 4.0 SP08
    I want to change the order of tabs in the screen of sales document creation.
    Do you know how to do it ?
    Regards,
    Juan

    Hi Juan,
    I am not sure if I have understood your requirement clearly. But based on what I have understood....
    You should be able to achive this via the screen sequence control mentioned yesterday. Orgnization tab is a SAP standard screen which you need to assign to tabstrip 1.
    By default SAP has assigned 'General header'  (function code SALES_HDR_GENR) as the first tabstrip and if you assign function code SALES_ORGD  then the org data would be displayed as first tab.
    Regards,
    Surendar

  • Controling Sales Document

    Hai Experts,
                       Can u plz let me know in wat ways Sales document type, schedule line category and item category controls the sales documents. Its given tat these 3 wil control sales document but in wat way its helpful to control these documents? Plz give me some examples. Thanking you.
    Regards,
    J. SriramChakravarthy.
    Edited by: sri ram on Mar 12, 2009 6:40 AM

    Hi sri ram,
    Sales document type, item type and item category
    The sales document type, item type and item category define the way in which advertising sales are replicated and controlled in the system.
    The sales document type is specified during sales document creation.
    The item type and category are specified during document item creation. Active item types for sales document processing are defined in Customizing.
    Document items of various item types or categories can be created in a sales document.
    The item types are defined in the system.
    Admissible item categories for each sales document type have been defined in Customizing.
    Activity
    Menu path
    Assign item categories to sales document types
    SAP Media --->Advertising Management --->Sales -
    >Order --->Sales Document -
    >Sales Document Item -
    >Assign Item Category to Sales Document Type
    If you assign the standard item and full and partial credit memo item categories to a sales document type, you can replicate associated business transactions in a single sales document by creating order and credit memo items in this document.
    See also: Item Category
    Create document flows
    The sales document type, item category and copying variant control document flow.
    To define document flow, specify the copying variants to be used to create follow-on documents and/or follow-on items for each sales document type and item category. Copying variants define the sales document type and item category in follow-on documents and/or follow-on items, such as those for credit memos or those used to convert offers to orders.
    Create credit memo items
    This function copies selected data from a template item within a sales document. You want to copy all schedule line data for a complaint into a new document item. The copying variant indicates that the item category for the new item is a credit memo.
    Unlike a document item copy with reference to a document item, the system retains manual changes to the schedule line, such as manual surcharges or discounts, ad spec assignments or quantity changes for a document item copy with reference to a schedule line if you have defined the schedule line copying variant accordingly.
    Thanks,
    Swamy H P

  • Immediate Transfer Order Creation not occuring for Sales Document Type

    Hello gurus,
    I have a situation where a transfer order is not being created immediately for a specific sales document type.
    Here is an example document flow of a desired scenario where the system is working:
    Sales document type:  ZOR
    >  Delivery type:  LF
    >  WMS transfer order
    The Item Category in this scenario is TAN.
    Here is an example of the document flow in the current scenario where the system is not working:
    Sales document type:  ZPRD
    > Delivery type:  LF
    The Item Category is also TAN in this scenario.  The only identifiable difference in these scenarios is the sales document type.  For the ZOR SaTY, a Transfer Order prints immediately once the delivery is created.  For the ZPRD SaTY, a Transfer Order needs to be manually created after delivery creation.
    Is there a configuration setting that is controlling this?  Any help would be greatly appreciated.

    Thank you very much for the link.  When I insert the WMTA output type in the delivery output header, the Transfer Order is automatically created.
    The problem I'm running into now is the configuration setting that controls this.  I thought I figured it out when going to this IMG path:
    SAP Customizing Implementation Guide  -->  Logistics Execution -->  Shipping -->  Basic Shipping Functions  -->  Output Control -->  Define Print Parameters Shipping
    When selecting the Delivery Note, the shipping point I was using was not configured in this location.  I added the shipping point into this transaction, saved, and created a new order & delivery.  However, the WMTA output type still was not automatically inserted into the delivery when saving.  Is there another location I should be looking to fix this so that when I enter an order with a particular Shipping Point, the WMTA output type automatically appears in the delivery?

  • Unable to block creation of sales document from Quotation thru user status

    Dear Experts,
    I have maintained a status profile in my Quotation document through the use of user status. I have defined a status to forbid creation of sales document if the status has not yet been set to "Approved".
    However, even when the status is not yet "Approved", it still allows me to create subsequent sales document from this Quotation.
    Anything that I have missed here?

    Hi,
    It should not happen.
    Please check the Object types for which the status profile is created. It should be for either Sales Order header or Sales order Item.
    Make sure that the "create sales document" is "forbiddden" for the initial status only.
    Also please check Low- High numbers for each status.
    Hope this helps.
    Regards,
    Sharan

Maybe you are looking for

  • WLST script for changing password for userid in Weblogic 9.2

    Hello Everyone, We want to change password for userid in weblogic 9.2. Is there a way we can do this by using WLST script? If so please provide me with steps for doing that using WLST. Thanks in advance. - - Weblogic Consultant

  • Need Next Previous Button on List view webpart

    Hi All, 5 items are displaying from the announcement list on the homepage. The client is asking to give next and previous button on the webpart so more than 5 announcements can be seen by the user. What are the various options to implement? Does 2013

  • Outbound delivery not taking storage location

    Hello, I am facing below mentioned issues while update OBD in VL02N. Material 858 is not defined for sales from India (warning) Material 858 does not exist in plant IP01 (error) I have checked all the plan assignments and it is correct in MM03. Still

  • Songs from my library play in a random order

    Hi guys, I've recently been having this weird problem where when I play a song in my library, after that song finishes, the next song will not be the one right below it, but just some super random other song in my library. I've tried to gauge whether

  • Can't install PowerShell v4

    Good day My OS is Win7 sp1. i had powershell v1. i intended to upgrade to powershell v4, so i downloaded and installed (no errors) x86: Windows6.1-KB2819745-x86.msu (Windows Management Framework 4.0) But still when i start Powershell ise from the men