Pricing unit in the sales order

Hi Expert,
User wants for condition type without access seq per 100 ite should come.
As we know if this item condtion has got access seq while creating condition record we can specify per 100 and same will carry to sales order. However how we can do the same for the item conftion without acess seq (Manual)?
Please guide somebody
Thanks for for all support.
Edited by: sappratap on Apr 12, 2010 10:19 AM

Hi Pratap,
If you want to make your condition type manual then no need to touch access sequence because access sequence is a search strategy which is searching for condition record if exist.
If you want to make it manually then go to V/06 --> Select your condition type --> Click at details --> in the column "Changes which can be made" --> choose the option "Manual entries has priority"
After that this is in your hand to put this condition record manually.
Hope it helps,
Regards,
MT

Similar Messages

  • User based block the pricing field in the sale order

    HI FRIEND
    We have requirement user based block the pricing field in the sale order
    pls suggest me the configuration steps
    with regards
    dinesh

    hi friend
    when create a sale orde,r price and exchange rate is triigger from the master record.
    head department want not require to End user to change the price in the sale order .
    so head department only have authorisation to change price.
    selected user is not allow the change the price.
    so i need the configuration
    with regards
    dinesh

  • Create and Pack Handling Units in the Sales Order Using HU_CREATE_ONE_HU

    Hello Experts,
    I am trying to use HU_CREATE_ONE_HU function module to create a handling unit and pack it with specific line items in the sales order program in the background.  I am able to create the handling unit and pack it but it does not get associated to the sales order / line item.  If you look at the sale order's packing proposal, it does not show it packed.  If I look at VEKP / VEPO, I see where it was created but there is no value for vbeln or the posnr I proposed.  Below is the code, I am using.  Does anyone know what I am doing wrong or is there another function module I can use?
    LOOP AT t_vbap.
        CLEAR:   is_header_proposal, it_items, es_header, et_items, et_messages, t_vbap2.
        REFRESH: et_items, et_messages, t_vbap2.
        is_header_proposal-exidv          = '$1'.
        is_header_proposal-exida          = 'A'.
        is_header_proposal-vhilm          = 'UNIBOX'.
        is_header_proposal-hu_status_init = 'A'.     "planned
        is_header_proposal-status         = '0001'.  "planned
        "get the components that make up this subassembly including the parent.
        SELECT * FROM vbap
          INTO TABLE t_vbap2
         WHERE vbeln = t_vbap-vbeln
           AND posnr = t_vbap-posnr. "parent
        SELECT * FROM vbap
          APPENDING TABLE t_vbap2
         WHERE vbeln = t_vbap-vbeln
           AND uepos = t_vbap-posnr.  "children
        "now load the items to be packaged in the proposal
        LOOP AT t_vbap2.
          CLEAR: it_item.
          it_item-velin    = '1'. "material item
          it_item-belnr    = t_vbap2-vbeln.
          it_item-posnr    = t_vbap2-posnr.
          it_item-quantity = t_vbap2-kwmeng.
          it_item-meins    = t_vbap2-meins.
          it_item-matnr    = t_vbap2-matnr.
          it_item-werks    = t_vbap2-werks.
          it_item-lgort    = t_vbap2-lgort.
          APPEND it_item TO it_items.
        ENDLOOP.
        CALL FUNCTION 'HU_INITIALIZE_PACKING'.
        CALL FUNCTION 'HU_CREATE_ONE_HU'
          EXPORTING
            if_create_hu       = 'X'
            is_header_proposal = is_header_proposal
            it_items           = it_items
          IMPORTING
            es_header          = es_header
            et_items           = et_items
            et_messages        = et_messages
          EXCEPTIONS
            input_missing      = 1    " Data that is Necessary for Creation is Missing
            not_possible       = 2    " HU Creation not Possible
            header_error       = 3    " HU Header Data Contains Incorrect Data
            item_error         = 4    " Items Cannot be Created
            serial_nr_error    = 5    " Serial Number Error
            fatal_error        = 6    " Internal Error
            OTHERS             = 7.
        CALL FUNCTION 'HU_POST'
          EXPORTING
            if_synchron = space
            if_commit   = 'X'.
      ENDLOOP.
    Thanks for the help.
    Laura

    The abap statement does not make sense.
    xlips_high_posnr = ( lips-posnr / tvlk-incpo ) * tvlk-incpo
    posnr & incpo are both type numc length 6.
    Here is my recommendation to catch the divide by zero error.
      data: l_oref    type REF to cx_root.
      data: l_text    type string.
      TRY.
            clear l_text.
             xlips_high_posnr  = lips-posnr / tvlk-incpo.
            CATCH cx_sy_zerodivide INTO v_oref.
              l_text = l_oref->get_text( ).
            CLEANUP.
    *      Put your code to do further processing if it is divide by zero
      ENDTRY.

  • Want to change Pricing Procedure in the sales order

    Hello
    I have created a sales order. It has RVVVV9 as pricing procedure. Now I recognise that the pricing procedure in the order is wrong due to incorrect CUSTOMER PRICING PROCEDURE in Customer Master data. Now I changed the CUSTOMER PRICING PROCEDURE in Customer Master data to correct one which will give me the correct pricing procedure(RVVVV8) in the sales order. But I can see that the sales order still has old Pricing Procedure even after updating the cust master data with the correct CUST PRICING PROCEDURE.
    I have maintained the pricing procedure determination correctly.
    would appreciate your quick response.
    //Venkat

    Have you checked "Assign document pricing procedures to order types"?
    check also ovkk, there is a combination of sales org, distrubtion chanel, division, document pricing procedure and customer  pricing procedure. Make sure you have make the right combination.
    Regards,
    Gunadi

  • Pricing redetermination at the sales order

    Hi ,
    We have mass order inquiry tool which will bring in the sales orders in the system and also updates certain fields defined in the tool. For example if we want to change the pricing date we just enter it & the tool will change it.
    Now we have a new requirement where in we want to mass re-determine the pricing option C in certain sales orders for certain lines…...Could we re-determine the pricing Option C from this mass change tool for sales orders?
    The final objective is to mass-redetermine the pricing for certain sales orders
    Any body implemented this scenario in before?
    Thanks,
    vinay

    it looks like you MOI Tool will query the sales orders based on some parameters and once you get a list of SO's you can update them.
    so this is nothing but a program built around BAPI_SALESORDER_CHANGE...which should definitely allow you to re-price the orders...we have created a custom program with this BAPI...where we have parameters for pricing date, pricing update, etc.,

  • Coupon specific discounts are not coming in the sales order

    Hello Experts,
    I have created a internal coupon campaign and assigned discounts to the campaign. We used condition type 1202 to assign the discount values in the campaign.
    In the sales order when i enter the coupon id system fetching the corresponding campaign ID. But , sales order is not fetching the discount condition types mentioned in the campaign.
    Below are the configurations i made.
    1) Copied the condition type 1202 to ZCUI.
    2) Assign this condition type to the condition maintenance group (1200) and keep the condition table as SAP12000
    3) Maintain this condition type to the pricing procedure and assign pricing procedure to the Sales order transaction type.
    4) In the campaign i have maintained the values for the condition type . -- Sales org, distri channel. divison, Product , discount value
    5) I even verified that CNDCRMPRSAP12000 has the records for this campaign.
    Now the question is do i need to do any customization in Campaign determination. I am not using TPM and it is a simple coupon campaign.
    Please suggest me , your help is highly appreciated.
    Regards,
    Deeps.

    Not sure if it works, may be you can check this
    - is your condition type 1202's calculation type field has been defined as "percentage"?
    - the pricing procedure that you are using, does it contain the corresponding condition type 1202 for discount amount?
    - Has the pricing procedure been maintained for your org data in "Determine Pricing Procedure" in spro-> CRM-> Basic Functions -> Pricing -> Determing Pricing Procedure
    Please check this.
    Edited by: Harsh Singal on May 4, 2011 5:53 AM

  • Handling Unit assignation to sales order

    Hi you all,
    I am facing with a problem when trying to create a handling unit assigned to a sales order. I want to have the functionality of transaction HUP32. The problem with this transaction is that it is possible to include only one batch in the handling unit. I want to do this process but creating handling units with more than one batch.
    The other option I've tried is to create the handling unit with transaction HU02. This handling unit is created with the batches and material that I want but then I can't assign the handling unit to the sales order item.
    When I create the deliveries of this sales orders with handling units assigned, the handling unit is automatically assigned to the delivery. That's the functionality I want to keep.
    If anybody could help me I would thank it very much
    Regards,
    Javier Romano

    Multi-level Packaging in Delivery
    Before creating the packaging material you have to go to:
    IMG-Logistics Execution-Shipping -Packing.
    1. Define packaging material types- it can be anything like boxes crates, etc. in this you have to maintain the output determination procedure, output type, plant determination, packaging material category, generate delivery items, number assignment. you can copy from standard also.
    2. Then go to _define material group for packaging materials_ - here you maintain the four digit code and the description. Actually, this group is nothing but similar products which require similar packing products. For Ex. Nokia Phones all types they are basically packed first into a polythene bag. So here nokia phones can become a material group for packaging materials and polythene bag can become the packaging material type which can include different sizes and types of polythene bags.
    3. _Define Allowed Packaging Materials_ - Here you assign the shipping group for packaging materials to the packaging material type. This is related to your material master data of the packaging material which you create.
    Now go to MM01 to create a packaging material. use material type as Packaging material then inside the system will take the item category group as VERP.
    Then in the Basic Data1 screen you have the material group for packaging material (MGPM). Select the proper one. Now in the Sales:General/ Plant screen you have to maintain data regarding the packaging. you select the MGPM same as the basic data 1 screen, then select the packaging material type, the allowed pkh weight, allowed pkg volume.
    This is important because if the weight of your finished item is 2 KG and in the allowed pkg weight you enter only 1.5 KG, then while you carry out the packing process in delivery, the system will give you error," packaging weight exceeded."
    The assignment in the IMG creen for Define allowed packaging materials should be same as u mention in the material master. Then save your material master for packaging material.
    VA01 create the order, save it.
    VL01N enter shipping point, go to edit - pack- you will face a screen with 2 parts. In the top part you select your packaging material in which you want to pack your finished item, enter the system will assign a number to that material. Now select the Material in the top part and the finished one in the lower part and click on the Icon Pack. Here one thing has to be taken care of.
    Suppose if you want to pack only one finished item in one packaging material, then in the lower part of the screen you have a field for partial quantity here you change it to 1. system will prompt quantity changed. now you select the material in the top part and the one in the lower part and click on the PER PART. QTY ICON. In this way the system will pack only one finished item in a single packaging material. Packing is done go back, select the picking and do the PGI. save the delivery and create the invoice.
    HANDLING UNITS. (Used for Multi level packing)
    Basically handling units come into picture when you want to carry out multi level packing. suppose you want to pack Nokia phone first into a polythene bag, then this polythene bag is again packed in to box. like that. then this box will become a handling unit. For this go to :
    IMG - Logistics General - Handling Unit Management - Basics.
    First create all your packing materials using MM01 and type as packaging material. Maintain all the assignments in IMG in Logistics General.
    In basics you do the same thing as you did in the packing in logistics execution. like you create the packaging material type, then MGPM and their assignment.
    Then go to External Identification - and maintain the number ranges for the handling units that you want and assign the same to your packaging material type.
    Now that you have done everything, create the order, save it, in VL01N, enter shipping point, go to edit - pack - do the same thing as i have told you in the step no. 6 (above). now after doing select the PACK HUs TAB . NOW IN THIS SCREEN IN THE TOP PART YOU WILL SEE THE ALREADY PACKED MATERIAL. In that same part again select your next packaging material that is BOX. enter the system will assign the number to the BOX.
    Now select the material which you have just entered and the materials which were already packed in the lower part of the screen and click on the ICON PACK.
    In the same way again in the top part of the screen you select your next level packaging material and press enter. the system will assign a number to it. now select the material you have just entered and the previously packed material in the lower part of the screen and click on the icon PACK.
    In this way you can carry out multilevel packing. just take care of the allowed packing weight and the number of units you have to pack in the next packaging material.
    Regards,
    Anbu

  • Inserting Pricing condition in Sales order when saving the sales order

    Dear ABAPers,
           My customers requirement is when saving the sales order new pricing condition has to be updated in the line item.for this i am using the User Exit 'USEREXIT_SAVE_DOCUMENT_PREPARE' ( MV45AFZZ).While saving the Sales order i am calculating the Price and updating in the Pricing conditions.
    In XKOMV internal table i am appending the pricing condition.But the problem is ,it is not calculating the taxes and it is Updating in VBAK and VBAP.
    How to do this.
    Thanks & Regards,
    Ashok.

    Dear ABAPers,
    I have Solved this Problem.
    Thanks & Regards,
    Ashok.

  • Unit conversion in the sales order

    Hi All,
    We have got a typical requirement from the user where they need unit conversion at sales order creation level.
    The scenario goes as below.
    Initially the order quantity will be enetered in terms of pieces and the price will be determined accordingly. Now user wants to have option in the sales order screen, by pressing which the order quantity (unit of measurement) should convert in to number of boxes. Also price they want to redetermine based on the number of boxes.
    example: Assume a each box can accomodate 12 pieces.
    So initially in the order 24 units of the material are entered and price per piece is 10 USD so the total price will become 240USD.
    Now when they press the conversion button in the screen then the number of unit should become 2 and price per quantity should become at box level. i.e 120 per box. 
    Please let me know whether through available std config is it possible to achieve this or please let me how we can achieve this.
    Regards,
    Anand

    Hi,
    In material master sales : sales orgz. 1 >>> maintain sales unit & enter system will popup new window speciefy
    e.g
    1 box <===> 100 ea.
    Now create order and system will determining sales unit, if u want to change it change.
    Also see in iteam deteail tab conversion factor is appearing.
    Regards,
    kapil

  • Packing items to display in the Sales Order & Delivery

    Hi Experts,
    My client does not have HUM in SAP. They manufacture equipments & sell it to their customers.
    So in the Sales Order only the Top level machine number is entered & not the components that
    was used to built it.
    For example, let me say that to build a machine it requires 1000 components & out of which 50 are the
    1st level components as sub-assembly.
    Now there is a requirement from the Shipping dept, to list down only the first level components (in this case only these 50 parts) in the Sales Order as F.O.C so that the delivery will also show those individual items followed by the Packing List.
    But the billing document has to show only the top level equipment & not these 1st level components.
    Please tell me the steps to meet this requirement.  Is Handling Unit required in delivery to meet this?
    Regards,
    Pri

    Hi,
    If I have not misunderstood, u have a component(comprising of several sub assemblies) and you want to bill only the main item and for the sub items the billing should not be displayed.
    Well in that case you have to create a BOM of materials with usage 5 (Sales & Distribution)
    Then in the material master maintain the item category as ERLA ie Header level pricing. Do not explode the BOM if you do not want to see the sub items (ie do not maintain the structure scope in the item category ie TAQ)
    Regards
    Mahesh
    Edited by: Mahesh V Sandbhor on Mar 24, 2010 6:13 AM

  • How has the Sales Order Changed Prices ????

    I created a Sales Order, manually entered the prices  and Open - Printed.
    All saved and updated.
    However, customer  has received wrong prices.
    How do I check if another user has made changes?
    Or have the prices defaulted to another price list  called the (catalogue price list )
    Edited by: Philip Eller on Jun 13, 2008 9:57 AM
    Edited by: Philip Eller on Jun 27, 2008 9:53 AM*

    Darpal,
    Which Price field on the row of the Sales Order are you viewing?  There is both Unit Price and Price After Discount.  Unit Price editable, while Price After Discount is not.  If you are only viewing Unit Price on the document, B1 may be changing the price in the Price After Discount field without you being able to see it.
    B1 uses Price After Discount to calculate the final row total.
    If the Print Layout points to Price After Discount, you'd see a different price than what is in the Unit Price field on the document inside B1.
    The enhancement pack print layouts all point to the Price After Discount field, not Unit Price, out of the box.  This quite possibly be your issue if you are using the layouts directly from SAP without alterations.**
    Price After Discount will differ from Unit Price if there is any special pricing (i.e. Period and Volume Discounts or BP Special Pricing) or if a discount has been applied to the row n the Discount % column.
    Are there any types of special pricing being used?
    Confirm which database field the Price field is linked to on the print layout?
    Regards,
    Brad Windecker
    Edited by: Rui Pereira on Jul 8, 2008 5:28 PM

  • Not able to get the Quantity and partner details in the sales order created

    Hi Experts,
    I am creating a followup order using the FM "BAPI_BUSPROCESSND_CREATEMULTI" . The parameters iam passing are process type, quantity , sold to party (partner) and product ID. I am able to create a sales order but the Quantity and sold to party (partner) are not getting updated in the the sales order when i check in the transaction CRMD_ORDER. When i check in the crm_orderadm_h table and give the Headerguid , i am able to see the process type and when i check in the crm_order_index table, if i give the header i am not getting the partner no and there are two lines created for one header guid. I am providing the code which i have written. Can anyone please help me in this issue??
    *& Report  ZCREATEORDER_LUCKY_TEST
    REPORT  ZCREATEORDER_LUCKY_TEST.
    DATA : LV_HEADER_GUID  TYPE  GUID_32,
    WA_HEADER             TYPE                   BAPIBUS20001_HEADER_INS,
    ITAB_HEADER           TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
    ITAB_CREATED_PROCESS  TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
    ITAB_OBJECTS_TO_SAVE  TYPE STANDARD TABLE OF BAPIBUS20001_GUID_DIS,
    ITAB_PARTNER          TYPE STANDARD TABLE OF BAPIBUS20001_PARTNER_INS,
    LT_PRODUCT_I          TYPE STANDARD TABLE OF BAPIBUS20001_ITEM,
    WA_PRODUCT_I          TYPE                   BAPIBUS20001_ITEM,
    LT_SCHEDLIN_I         TYPE STANDARD TABLE OF BAPIBUS20001_SCHEDLIN,
    WA_SCHEDLIN_I         TYPE                   BAPIBUS20001_SCHEDLIN,
    ITAB_INPUT_FIELDS     TYPE TABLE OF          bapibus20001_input_fields,
    ls_inputfields        TYPE                   bapibus20001_input_fields,
    WA_PARTNER            TYPE                   BAPIBUS20001_PARTNER_INS,
    ITAB_RETURN           TYPE                   STANDARD TABLE OF BAPIRET2,
    WA_OBJECTS_TO_SAVE    LIKE                   LINE OF ITAB_OBJECTS_TO_SAVE,
    ITAB_PRICING          TYPE STANDARD TABLE OF BAPIBUS20001_PRICING,
    WA_PRICING            TYPE                   BAPIBUS20001_PRICING,
    *To store the Objects to be saved.
    WA_CREATED_PROCESS    LIKE LINE OF ITAB_CREATED_PROCESS,
    ITAB_SAVED_OBJECTS    TYPE STANDARD TABLE OF BAPIBUS20001_OBJECT_ID,
    WA_SAVED_OBJECTS      LIKE LINE OF ITAB_SAVED_OBJECTS,
    GC_X type c.
    gc_x = 'x'.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        ev_guid_32 = lv_header_guid.
      CLEAR : WA_HEADER.
    * Passing the respective values from the Header table to internal table.
    WA_HEADER-GUID          =  LV_HEADER_GUID.
    WA_HEADER-PROCESS_TYPE  =  'ZTA'.
    APPEND WA_HEADER TO ITAB_HEADER.
    *Appending the values to the ITAB_HEADER.
    *appending orderadm_i to input fields
    * ls_inputfields-ref_guid =  LV_HEADER_GUID.
    * ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'ORDERADM_I'.
    ls_inputfields-ref_handle = '0000000001'.
    * ls_inputfields-logical_key = ' '.
    ls_inputfields-fieldname = 'ORDERED_PROD'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
    * ls_inputfields-ref_guid =  LV_HEADER_GUID.
    * ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'ORDERADM_I'.
    * ls_inputfields-logical_key = ' '.
    ls_inputfields-fieldname = 'MODE'.
    ls_inputfields-ref_handle = '0000000001'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
    ****** CHANGES MADE
    * ls_inputfields-ref_guid =  LV_HEADER_GUID.
    * ls_inputfields-REF_KIND = 'B'.
    ls_inputfields-objectname = 'SCHEDLIN'.
    ls_inputfields-ref_handle = '0000000001'.
    ls_inputfields-fieldname = 'LOGICAL_KEY'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
    CLEAR ls_inputfields.
    * ls_inputfields-ref_guid =  LV_HEADER_GUID.
    * ls_inputfields-REF_KIND = 'B'.
    ls_inputfields-objectname = 'SCHEDLIN'.
    ls_inputfields-ref_handle = '0000000001'.
    * ls_inputfields-logical_key = ' '.
    ls_inputfields-fieldname = 'QUANTITY'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
    CLEAR ls_inputfields.
    * ls_inputfields-ref_guid =  LV_HEADER_GUID.
    ls_inputfields-REF_KIND = 'B'.
    ls_inputfields-objectname = 'SCHEDLIN_I'.
    ls_inputfields-ref_handle = '0000000001'.
    * ls_inputfields-logical_key = ' '.
    * ls_inputfields-fieldname = 'MODE'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
    CLEAR ls_inputfields.
    ****** CHANGES MADE
    WA_PARTNER-REF_GUID =  LV_HEADER_GUID.
    WA_PARTNER-REF_KIND = 'A'.
    WA_PARTNER-REF_PARTNER_HANDLE = '0001'.
    WA_PARTNER-PARTNER_FCT = '00000001'.
    WA_PARTNER-PARTNER_NO =  '10017'.
    WA_PARTNER-KIND_OF_ENTRY =  'C'.
    WA_PARTNER-NO_TYPE = 'BP'.
    WA_PARTNER-DISPLAY_TYPE  =  'BP'.
    APPEND WA_PARTNER TO ITAB_PARTNER.
    *"ADDING VALUES TO CT_ORDERADM_I
      wa_product_i-header        = lv_header_guid.
      wa_product_i-handle        = '0000000001'.
      wa_product_i-ordered_prod  = '12000014'.
      wa_product_i-mode          = 'A'.
      APPEND wa_product_i TO lt_product_i.
    *"ADDING VALUES TO IT_SCHEDLIN_I
      wa_schedlin_i-GUID    =  LV_HEADER_GUID.
      wa_schedlin_i-quantity   = '30'.
      wa_schedlin_i-handle = '0000000001'.
      wa_schedlin_i-mode  =  'A'.
      APPEND wa_schedlin_i TO lt_schedlin_i.
    *  wa_schedlin_i-schedlines = lt_schedlines.
    *"ADDING VALUES TO WA_PRICING
    wa_PRICING-REF_GUID    =  LV_HEADER_GUID.
      wa_PRICING-REF_KIND   = 'A'.
    *  wa_schedlin_i-handle = '0000000001'.
      APPEND wa_PRICING TO ITAB_PRICING.
    *  wa_PRICING-REF_GUID    =  LV_HEADER_GUID.
      wa_PRICING-REF_KIND   = 'B'.
      wa_schedlin_i-handle = '0000000001'.
      APPEND wa_PRICING TO ITAB_PRICING.
    ls_inputfields-ref_guid =  LV_HEADER_GUID.
    ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'PARTNER'.
    ls_inputfields-logical_key = '0001'.
    ls_inputfields-fieldname = 'REF_PARTNER_HANDLE'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
    ls_inputfields-ref_guid =  LV_HEADER_GUID.
    ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'PARTNER'.
    ls_inputfields-logical_key = '0001'.
    ls_inputfields-fieldname = 'PARTNER_FCT'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
    ls_inputfields-ref_guid =  LV_HEADER_GUID.
    ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'PARTNER'.
    ls_inputfields-logical_key = '0001'.
    ls_inputfields-fieldname = 'PARTNER_NO'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
      ls_inputfields-ref_guid =  LV_HEADER_GUID.
    ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'PARTNER'.
    ls_inputfields-logical_key = '0001'.
    ls_inputfields-fieldname = 'NO_TYPE'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
      ls_inputfields-ref_guid =  LV_HEADER_GUID.
    ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'PARTNER'.
    ls_inputfields-logical_key = '0001'.
    ls_inputfields-fieldname = 'DISPLAY_TYPE'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
        ls_inputfields-ref_guid =  LV_HEADER_GUID.
    ls_inputfields-REF_KIND = 'A'.
    ls_inputfields-objectname = 'PARTNER'.
    ls_inputfields-logical_key = '0001'.
    ls_inputfields-fieldname = 'KIND_OF_ENTRY'.
    APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
      CLEAR ls_inputfields.
    CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
      TABLES
        HEADER          = ITAB_HEADER
        ITEM            = lt_product_i
        RETURN          = ITAB_RETURN
        PARTNER         = ITAB_PARTNER
        INPUT_FIELDS    = ITAB_INPUT_FIELDS
        CREATED_PROCESS = itab_created_process
        SCHEDULELINE    = lt_schedlin_i
        PRICING         = ITAB_PRICING.
    READ TABLE ITAB_CREATED_PROCESS INTO WA_CREATED_PROCESS WITH KEY GUID = LV_HEADER_GUID BINARY SEARCH.
    WA_OBJECTS_TO_SAVE-GUID = WA_CREATED_PROCESS-GUID.
    * Appending the Guid of the contract to be saved to the internal table
    APPEND WA_OBJECTS_TO_SAVE TO ITAB_OBJECTS_TO_SAVE.
    CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
      EXPORTING
        update_task_local = space
        save_frame_log    = GC_X
      TABLES
        objects_to_save   = itab_objects_to_save
        saved_objects     = itab_saved_objects
        return            = itab_return.
    * Calling the Standard BAPI to Commit the transcation.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    WRITE: / 'HEADER GUID: ',lv_header_guid.
    Any inputs will be highly appreciated!!
    Thanks a lot in Advance.
    Lakshman.

    solved

  • Production Order and Internal Order for each item of the sales order

    Hi
       I am developing Make To Order Report where I have to display the MTO Line Items and non MTO Line Items. For non MTO Line Items I have to display Internal order with Planned and Actual Costs and also Production Order with Planned and Actual Costs. Could anybody tell how to get the Internal order no and production order with Planned and Actual costs for each line item for a sales order.
    Thanks
    Naga

    Hi,
    You can get the Production orders, Planned orders, Internal orders generated for Sales order item from AFPO table (use fields KDAUF-Sales order number & KDPOS-Sales order item). Then to identify the order type use order category (AUTYP) from table AUFK.
    Once you have the Production/internal order, you can ge the cost from COSS and COSP table. Use the object number from AUFK to get the cost entries from COSS & COSP.
    You can use the following sample code as reference.
    Hope this is helps.. (Don't forget to mark it... )
    Form GET_COSTS                                                       *
    Get the material cost, labour hours and the labour cost for the      *
    sales order material.                                                *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_COSTS.
      DATA V_OBJNR LIKE AUFK-OBJNR.
    DATA v_menge LIKE vbap-kwmeng.
      SELECT SINGLE OBJNR
        INTO V_OBJNR
        FROM AUFK
       WHERE AUFNR EQ AFPO-AUFNR.
      SELECT * FROM COSS
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04'). " p_wrttp. "Labour Cost ( Plan, Actual)
        PERFORM GET_VALUES_FROM_COSS.
      ENDSELECT.
      SELECT * FROM COSP
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04')         " p_wrttp
         AND KSTAR NE '0000510033'. " EQ p_kstar2.      "Material Cost
        PERFORM GET_VALUE_FROM_COSP.
      ENDSELECT.
    Get the unit cost of the production order by dividing the production
    cost by the order quantity. The result will be multiplied by the
    GL posting qunatity (Delivery quantity) to get the production cost
    for the quantity being deluivered.
      IF NOT AFPO-PSMNG IS INITIAL.
        OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_ACT =
                          OUT_REC-ADDNL_LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_PLN =
                         OUT_REC-ADDNL_LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_ACT = OUT_REC-LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_ACT =
                         OUT_REC-ADDNL_LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_PLN = OUT_REC-LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_PLN =
                         OUT_REC-ADDNL_LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_ACT =
                         OUT_REC-ADDNL_MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_PLN =
                         OUT_REC-ADDNL_MATERIAL_COST_PLN / AFPO-PSMNG.
      ENDIF.
    Multiply the calculated Unit Production costs with the GL quantity to
    get the actual production cost of the quantity delivered.
    Calculation for Labour Hours
      OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_ACT = OUT_REC-ADDNL_LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_PLN = OUT_REC-ADDNL_LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
    Calculation for Material Cost
      OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_ACT =
          OUT_REC-ADDNL_MATERIAL_COST_ACT * OUT_REC-QUANTITY.
      OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_PLN =
          OUT_REC-ADDNL_MATERIAL_COST_PLN * OUT_REC-QUANTITY.
    Calculation for Labour cost
      OUT_REC-LABOUR_COST_ACT   = OUT_REC-LABOUR_COST_ACT *
                                   OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_ACT = OUT_REC-ADDNL_LABOUR_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-LABOUR_COST_PLN   = OUT_REC-LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_PLN = OUT_REC-ADDNL_LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
    Get the planned material cost from the total of the planned cost of
    the component materials in the production order confirmations.
      SELECT BWART MENGE MATNR SHKZG FROM AUFM
        INTO (AUFM-BWART, AUFM-MENGE, AUFM-MATNR, AUFM-SHKZG)
       WHERE AUFNR EQ AFPO-AUFNR.
        CHECK AUFM-BWART NE '101'.
        READ TABLE I_MBEW WITH KEY MATNR = AUFM-MATNR
                                   BWKEY = AFPO-DWERK.
        IF SY-SUBRC NE 0.
          SELECT MATNR BWKEY ZPLPR LPLPR PEINH
            FROM MBEW
            INTO I_MBEW
           WHERE MATNR EQ AUFM-MATNR
             AND BWKEY EQ AFPO-DWERK.
            APPEND I_MBEW.
          ENDSELECT.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IF I_MBEW-ZPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST +
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST -
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ELSEIF I_MBEW-LPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST +
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST -
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDSELECT.
    Get the Future material cost per Unit by deviding the calculated
    Future material cost above with the goods reciept quantity to, then
    multiply the unit cost with the GL quantity to get the Future material
    Cost for the Quantity delivered. (Quantity in the entery from GLPCA
    Table).
      IF NOT AFPO-WEMNG IS INITIAL.
        OUT_REC-PLANNED_MATERIAL_COST =
           OUT_REC-PLANNED_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
        OUT_REC-CURRENT_MATERIAL_COST =
           OUT_REC-CURRENT_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
      ENDIF.
    ENDFORM.                               " GET_COSTS
    Form GET_VALUE_FROM_COSP                                             *
    Get the Material cost from COSP table.                               *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUE_FROM_COSP.
      FIELD-SYMBOLS: <FS> TYPE ANY.
      DATA: V_COMPONENT TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT = 15.
      DO 16 TIMES.
        ADD 1 TO V_COMPONENT.
        ASSIGN COMPONENT V_COMPONENT OF STRUCTURE COSP TO <FS>.
        IF COSP-WRTTP EQ '04' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '04'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '01' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_PLN.
        ELSEIF COSP-WRTTP EQ '01'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUE_FROM_COSP
    Form GET_VALUES_FROM_COSS                                            *
    Get the Labour cost and Labour hours from the COSS table.            *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUES_FROM_COSS.
      FIELD-SYMBOLS: <FS1> TYPE ANY,
                     <FS2> TYPE ANY.
      DATA: V_COMPONENT1 TYPE I,
            V_COMPONENT2 TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT1 = 15.
      V_COMPONENT2 = 111.
      DO 16 TIMES.
        ADD 1 TO: V_COMPONENT1, V_COMPONENT2.
        ASSIGN COMPONENT V_COMPONENT1 OF STRUCTURE COSS TO <FS1>.
        ASSIGN COMPONENT V_COMPONENT2 OF STRUCTURE COSS TO <FS2>.
        IF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '04'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '01' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_PLN.
        ELSEIF COSS-WRTTP EQ '01'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUES_FROM_COSS

  • How to block the sales order for not creating requirement

    Dear All,
    My client want that whenever a sales order is raise, that should not go create requirement for production unless until account department check whether the prices etc are correctly put or not
    how can i do this
    thanks

    I suggest you can try to use the functionality of Status Profile.
    Create one Status Profile  with 2 line items-
    1: First line : Pricing Approval or PR and check what all you want to block if this status is assigned to the order type.
    2: Second line : Released and check what all you want to be released once the Approval is done.
    So by default the status profile - Pricing Approval will be assigned to the Sales Order during order creation. Then after your accounts department check the pricing and approves , they can change the status to Released and the order can be processed further.
    Regards
    Sai

  • Material Listing Error while creating the sales order

    Hi Guru's
    I have mantained a material in the lisitng for A002 combiantion for SO/DC/Pric. ref. material
    While creating the sales order is throwing an error as material is not listed so the transaction is not possible.
    I have done the basic invetingation on the folowing aspects
    1)checking the material in the listing
    2)Validity periods
    3)Material not blcoked
    4)Mateial is extened for the respective sales org
    Kindly help ASAP.
    Thanks & Regards
    Tarakaram

    Dear SAP SD 007
    I can confidently tell that an enhancement or an user exit has been applied in your scenario
    You have to check that
    Normally when creating a sales order with respect or referring billing documents the qty will be in editable mode and it is standard problem
    Your people has solved the standard problem by enhancement
    Usually OR--LF-PGI----F2 (SAY THE QTY IS 25 UNITS)
    Now you are creating returns order with reference to F2 in the return order type Re there is a standard issue that user can edit the qty to 30 from the original 25
    To solve this only your people have used userexit
    Line items and qty greyed out means definately there is some enhancement or user exit applied
    You have to check that
    Regards
    Raja

Maybe you are looking for

  • Initial time machine backup larger than actual computer harddrive

    I've got an iMac with a 1TB harddrive and am trying to use a time machine set up to back up my harddrive. The external harddrive I'm using for my back up is also 1TB. I currently have about 135GB of free space on my iMac's harddrive and my external d

  • Workflow not starting in QA

    Hi, I have created and tested WF in DEV but after transporting to QA, WF in not starting in QA. I ran SWU_OBUF and WF_BATCH is also available in QA. I checked SWETYPV and link is active there. I have used SAP_WAPI_CREATE_EVENT for the WF. This FM is

  • Windows explorer and Administrative rights

    Hello, I'm looking for a way to make windows start on an other program than desktop. Is there a way to customize the windows explorer so my program would replace the desktop without affecting the explorer functionalities. I also want to know if there

  • Transaction Lock

    hello is any body have any example scenario How to make transaction lock on a table ???

  • An example of what you can do with Garageband for iPad

    Hey, this is an example of 5 hours of work on Garageband for iPad and Final cut pro X, hope you enjoy! http://www.youtube.com/watch?v=MSASlCyUp-Y