How to swap between to sets of item categories in sales order

Hi,
We receive Idocs from a different system that creates sales order in the R/3 system. For some of these, we want to be able to use an alternative sourcing mode - basically switch between standard POs and 3rd Party POs. The orders has many items, and we find it impractical to manually update all items - also because the order might contain different materials with maybe 5-10 different item categories, that needs to be changed to 5-10 others. This will be very difficult for our business users, since we do not have a simple naming convention of item categories to ease this.
So we are looking for alternative ways, where we can change all items by changing on header level.
We have thought of these alternatives :
1. Change distribution channel. Requires all materials and customers to be set up in 2 DCs - not realistically.
2. Change sales order types using VOV8 alternatives. This seems not to be allowed for materials in BOMs and with E consumption. See other thread named "Can not change SO order type - disallowed by item settings" for more details.
3. What we we really need is changes on schedule line level, and I suppose we could have a logic in MV45AFZZ change this dependent on some user field. But I don't think this will work, as other settings controlled by requirement class etc. will be inconsistent.
Proposals for this are welcome - it should be a common issue.

Hi,
We ended up designing a solution where item category was swapped by shipping condition. For shipping condition 11, we simulated that a specific 'usage' was active. It required a few tricks to get the Source determination to run, and a further trick to avoid a re-pricing B to nuke the pricing conditions. This is still draft code, but it seems to work :
Enhancement points ES_SAPFV45P / VBAP_FUELLEN_10 : Ensure ‘usage’ is set according to shipping condition
data : ld_active type c.
data : ld_no_pricing_vwpos type c.
constants : lc_vwpos_no_pricing(20) type c value 'VWPOS_NO_PRICING'.
Fake change to ensure new item cat determination
( conditions when this is active, setting ld_active )
  if sy-subrc is initial
  and ld_active = 'X'            "Action enabled for company
  and t180-trtyp ca 'HV'.       " Create/change mode
case vbak-vsbed.
  when '11'. " Special logic
    t184_vwpos = 'Z001'. " Special T184 usage for direct
    clear *vbap-mandt. " simulate change of *vbap
    matnr_changed = 'X'." simulate change
    ld_no_pricing_vwpos = 'X'. " Flag for suppress B repricing
  when '12'. " standard logic
    clear t184_vwpos.  " Standard T184 usage for indirect
    clear *vbap-mandt. " simulate change of *vbap
    matnr_changed = 'X'." simulate change
    ld_no_pricing_vwpos = 'X'. " Flag for suppress B repricing
  when others.
    clear ld_no_pricing_vwpos.
  endcase.
Memory ID read in MV45AFZB, form USEREXIT_NEW_PRICING_VBAP
  export ld_no_pricing_vwpos to memory id lc_vwpos_no_pricing.
  endif.
MV45AFZB, form USEREXIT_SOURCE_DETERMINATION : Ensure item category determinations takes ‘usage’ into consideration
( conditions when this is active, setting ld_active )
  if sy-subrc is initial
  and w_active = 'X'            "Action enabled for company
  and t180-trtyp ca 'HV'.       " Create/change mode
Get higher-level item category
  clear lv_uepos. clear  gv_spp_pstyv.
  lv_uepos = vbap-uepos.
  do 10 times. " to eliminate phantom levels
  read table xvbap with key posnr = lv_uepos.
  if sy-subrc = 0 and xvbap-pstyv ne lv_zvco.
  gv_spp_pstyv = xvbap-pstyv.
  exit.
  elseif sy-subrc eq 0 and xvbap-pstyv eq lv_zvco.
  lv_uepos = xvbap-uepos.
  elseif sy-subrc ne 0.
  exit.
  endif.
  enddo.
t184_vwpos set in FV45PFAP_VBAP_FUELLEN
  call function 'RV_VBAP_PSTYV_DETERMINE'  "Determine using T184
         exporting
           t184_auart   = tvak-auart " Order type
           t184_mtpos   = maapv-mtpos "Item category group
           t184_uepst   = gv_spp_pstyv  "Higher level-SPP item category
           t184_vwpos   = t184_vwpos " Usage from FV45PFAP_VBAP_FUELLEN
           vbap_pstyv_i = ''
         importing
           vbap_pstyv   = vbap-pstyv.
endif.
MV45AFZB, form USEREXIT_NEW_PRICING_VBAP : Ensure dynamic change of item categories does not trigger repricing type B.
data : ld_no_pricing_vwpos type c.
constants : lc_vwpos_no_pricing(20) type c value 'VWPOS_NO_PRICING'.
Memory ID set in FV45PFAP_VBAP_FUELLENP, FORM VBAP_FUELLEN
import ld_no_pricing_vwpos from memory id lc_vwpos_no_pricing.
if sy-subrc is initial
and ld_no_pricing_vwpos = 'X'.
Skip repricing when mass change item cat
  clear new_pricing.
endif.
I hope someone will find it useful. Please notice that Enhancement points was required, so it will not work in older R/3 versions.

Similar Messages

  • Swap between two different item categories in sales orders for sub-contracting

    Dear gurus,
    my requirement is to have the ability to swap between two different item categories for sales orders for sub-contracting.
    This should be controlled by a combination of the material and a value maintained the Usage field in the Customer Material Info Record (for example by entering a ‘V’).  A combination of Sales Doc Type, Item Cat Group and Usage should result in the creation of a purchase requisition.
    In the event that a process order is required instead of a purchase requisition (i.e. the product is to be manufactured in-house instead of sub-contracted) the user must have the ability to change the Item Category within the sales order to produce a process order.
    The user would just change the item category within the sales order, and the system would automatically remove the purchase requisition assigned to the SO, and create a process order and assign it to the SO.
    Can you suggest any possible solution?
    Thank you in advance.

    Hi Majlo,
    In my system, I checked.  First created sales order with third party line item and then changed item category to normal item category.
    Till Purchase order not created, I can change Item category of my sales order line item.
    In this case SAP inform by log and once save delete purchase requisition of that line item .
    For this you need to assign another item category as an manual item category in SPRO Item category assignment.
    After this user can manually change item category to other one manually, if PO do not exist.
    Please let me know if your query is different.
    Regards

  • How to auto reset delivery block in item level in sales order

    hi i have one scenario. After creation of sales order it needs to be approved through work flow at item level so that without approval no delivery can be made. We have blocked the items in sales order now we want after approval the blocked status should be auto reset from block to free. how to do it.

    Hi,
    How is the approval taking place? Is it through work flow? If yes, You can write code for BDC or BAPI for removing the block after the approval step.
    If it is manual approval, then you can write a program with BDC/BAPI for removing the block with input as sales order number.
    Ask the approver to run this program after the approval.
    Thanks,
    Vinod.

  • How are GL Accounts assigned with item categories in Sales Order

    Please advise;
    - how and where GL accounts are assigned with item categories appearing in the sales order?
    Points confirmed.
    regardss

    We have number of sales document types and item categories. The sales order numbers are also different for hardware and software categories, so is the sales organization, plant and company code.
    Usually, the hardware orders contain line items for software but the item category used is for hardware and therefore, it gets posted to the incorrect (hardware) GL account. Is this happening due to MATERIAL TYPE/CODES.
    We are using separate GL accounts for both.
    Where and what controls could be developed to prevent this?
    Please let me know if you need further information.

  • How to limit the rows in the item level in sales order

    hi
    i have created a sales order here my requirement is in item level there are so many line items i want to limit the line items to 5 num is it possible

    Dear chandra
    In billing it is possible.  But if you want in sale order, apply user exit in program MV45AFZB - USEREXIT_CHECK_VBAP. 
    This user exit can be used to carry out additional checks (e.g. for completion) at item level.
    thanks
    G. Lakshmipathi

  • Changing the  item categories of Sales order in web IC

    Hi experts,
    We are working on CRM 5.0 with Web IC
    We have a scenario where we need to change the item categories of some of the items in sales order.
    But in a standard sales order I cant see the item categories of line items in WebIC.
    Now the issue are
    1. How to make the item categories available in web ic?
    2. Is there any standard config to do this or we have to go for development ?
    3.Is it possible to change the itemcategories in Web IC?
    Can any body suggest me with suitable solution
    Points shall be rewarded for sure
    Regards,
    Madhu

    Hi,
    you dont change the item category at the header level. The item category will be changed at the item level and the code to do this is
    lv_entity_items->set_property( EXPORTING iv_attr_name = 'ITM_TYPE' iv_value = lv_itemcat ).
    here lv_entity_items is one of the entity in the collection for AdminI . lv_itemcat is the value you want your item category to be set to.
    hope this helps.
    Reward useful answers.
    Regards,
    S Sarma.

  • Difference B/W Delivery plant  and item plant in Sales Order

    HI,
          May i know Difference between  Delivery plant and item plant in Sales order and what is the use of those fields.What is the process of raising sales order for different plants.
    Thnks&Rgds
    NAG
    Edited by: NAGA SUDHIR on Apr 3, 2009 6:10 AM

    HI G. Lakshmipathi,
                                   Thnks for the reply.Yes i am comparing (DWERK (at header level) and WERKS (at item level)) these two fields.
      Any how we can give only one plant in Customer Master, we are not maintaining Customer/mtrl regard (Not required in our company scenario) and we have extended MMR to different plants.
    So as per ur answer u went me to change only WERKS (at item level) while raising sales order for different plants.Is it enough?
    Thnks&Rgds
    NAG
    Edited by: NAGA SUDHIR on Apr 3, 2009 6:46 AM

  • Send all line items of a sales order to IPC along with condition lines data

    We wrote some pricing routines in R/3, where while doing he calculations for condition line item, we needed to pull in the material information for previous line items. So we exported vbap and imported it inside the routine to be able to have access to all the line items in the sales order. Now, we need to put in the same kind of logic in CRM/IPC. My question is what would be the equivalent of SAP's(import/export) commands for internal tables in case of IPC. I looked at the BADI CRM_COND_COM_BADI but still do not see how I can send all the line items  data to IPC. So I guess, the question comes down to, how do I send all the line items of the sales order (whole VBAP in R/3 terms) to IPC along with the condition line data? Can someone please help?
    Thanks

    Hi Vaibhav,
    If you can get the list of Sales orders which has deleted line items and force completion status. You can manage them in BI via lookup  or navigation attribute.
    Just my views I am sharing .
    Thanks,
    KDJ

  • Quality inspection for the items issued for Sales order

    Hi, How to map the qc for the items issued for sales order?

    Dear Yadav,
    -Activate insp type 10 in the Material Master-QM view insp setup (MM01)
    -Create Inspection plan (QP01) with usage as Goods issue & assign Insp characteristics
    -Create Sales order (VA01)
    -Delivery against the Sales order (VL01N) or through sales order menu. Delivery Insp lot gets created after Delivery is made.
    -Do results recording and take usage decision (QA32)
    Note:
    -This inspection is non stock relevant inspection. There will be no stock posting through Quality Management.
    -Post Goods issue in the delivery can be made only after taking the usage decision.
    Regards,
    Keerthi.

  • How to set "Configuration Variant" for a sales order item using function

    Hello All,
    I use function module 'SD_SALES_DOCU_MAINTAIN'  to create Customer Indep. Requirements but how to set "Configuration Variant" for a sales order item.
    Is their any idea or sample code?

    Hi Zhijun zhang,
    <u>http://help.sap.com/saphelp_nw2004s/helpdata/en/c0/98038ce58611d194cc00a0c94260a5/content.htm</u>
    <u>http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/content.htm</u>
    A variant is simply an SAP report where the parameters for running the report have been set by the user and then saved with unique name. This allows future retrieval and execution of the report faster without reentering the parameters. As a convention the variant name should start with with the digits 50 so searchs for LHU variants is easier and quicker.
    The first link will guide you by screen shot wise.
    Award points if it adds information.
    Thanks
    Mohan

  • How to control Changing of item category in sales order Manually

    Hello Gurus,
    How to restrict manual changing of item category in sales order?
    Reason for it:
    When ever they want to give some free goods to customer , they are changing Item category in  Standard Sales order at item level  then deliverying free goods to  customer
    looking for your inputs
    Thanks in advance
    Regards
    Venkat

    Hello,
    There are two possible ways:
    1. In Item Caterogy Determination remove the Manual Item Categories so that system will determine the Item Category only from defined options.
    2. Use T-SHDO - create Screen Variant & make the item Category Feild as Display only.
    Hope this helps..
    Thanks,
    Jignesh Mehta

  • How to restrict the user from making any changes in Sales order- item level

    Hi to all
    How to restrict the users from making any changes in sales order at item level if the same sales order is released by senior user through status profile.
    Regards
    Anish Parikh
    Edited by: anish parikh on Jan 24, 2008 5:16 AM

    Hi Anish,
    This can be achieved through the roles and authorization.
    This can be done through the basis team. they can create user profiles and roles.
    For the roles they assign some transaction codes so that they can view the only assigned tr. codes.
    Like that ur requirement can be done.
    Also u can prevent the user to change any fields in the sales order screen (VA02). for that please modify the authorisations.
    Hope i answers.
    Reward points if useful.
    Edited by: kaleeswaran bhoopathy on Jan 24, 2008 9:57 AM

  • How to Change Item catgegory in sales Order

    Hi all,
    I am creating sales order with reference to sales contract but at the time of sales order we don't have en off stock to deliver to customer , so we have deiced to go for Third party sales process
    But the problem is while creating a sales order with reference to Sales contract the line item of the sales order line item in grad Mode ( Not changeable mode )
    Finally i find out why sales order line item in gray mode Due to Structure Scope Using in item category TAS as D to Explore the BOM In Contract and Sales order  that a reason system gray out sales order line item
    Can any one guide me how sales order line item should be in active mode so i can change the Item category as a TAS third party item category
    Help me regards this
    Thanks
    Rajesh

    Hi all,
    Thanks for replay
    all ready i maintain manual item category in VOV4 the movement i am creating sales order with reference to contract the sales order line item showing in GRAY  mode i cant choose manual item category while i choosing F4 its showing TAS but i cant select that item category because sales order line in gray mode
    and Find out the reason why sales order line item coming in Gray Mode because i am Using Structure Scope D  In Item Category
    to Explore Variant config 
    can any one suggest me how to change the item category
    Thanks
    Ram

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

Maybe you are looking for