Restrict Item Category Item Creation using Reference Only

Hi All
Here is the scenario, I want  "Restrict Item Category Item Creation using Reference Only"
a.Retrieve document number VBELN from sales order header table VBAK for the current order. Check if the sales order is of type ‘ZAB’ referencing field AUART in table VBAK.
note : Any changes to existing sales order "ZAB" will be performed in thesame sales order type(ZAB) in VA02 transaction.
b.If step a is passed, check internal table structure for sales order item level as XVBAP-PSTYV for possible item category values of 'ZDEF' for the entered line item and document number (XVBAP-VBELN).
c.If the cancel/change item category values are found on the line item, check internal table structure for document flow (XVBFA) if the cancel/change item category was created as reference:
i.Check if entry exists in XVBFA for the preceding document number field VBELV with value equal to value in the subsequent document number field VBELN. This value must equal the current sales document number VBELN in table VBAK.
ii.The above check must be done in conjunction with the following check:
            1.Check if entry exists in XVBFA for the preceding document type field VBTYP_V with value ‘C’ equals subsequent document type field VBTYP_N with value of ‘C’.
d.Once the above checks are passed, collect the item number from internal table XVBAP (Field: POSNR) for the change/cancel item category line item added to the sales order.
e.Check if the item number retrieved in the previous step exists in table VBAP (Field: POSNR) with an item category that is not part of the list of cancel/change item category defined in step b.
f. Check if the item number collected in the previous step exists in the subsequent item number (Field : POSNN) in internal table XVBFA for the row that passed checks in steps b and c.
g.If item number exists, check if this subsequent item number field equals the preceding item number field value (Field: POSNV) in table XVBFA.
h.If step g fails, generate an error message stating that the user needs to the create the cancel/change item category line item with reference to the original line item and do not allow the user to proceed with the transaction.
i.If step g succeeds, allow the user to proceed with the transaction.
can any one send me the logic for this scenario.
Rgds
Chinna

Hi Chinna,
  Please use BADI "BADI_SD_SALES_ITEM" to achieve your requirement..
  Let me know if you have further questions..
BR
Rakesh

Similar Messages

  • TANN item category item not picking for return sales order

    Hi all,
    I have a question regarding TANN item category. This TANN item category item is not picking for return sales order type. As far as i know RENN is the free goods for return sales order. Can you please clarify the above question further

    Hi
    If you are making return order by copying sales order then please see this procedure also.
    Try to check in the copy control also.
    Go to the following path IMG u2013 Sales and Distribution u2013 Sales u2013 Maintain Copy control for sales documents. (Tcode VTAA)
    Select copying control : sales document to sales document.
    Search your return delivery order from the reference sales document type.
    Then select the item from the left side Colum.
    Go and find out TANN item category and click on detail.
    Check out Item Cat proposal. If it is empty then type your RENN condition type over here.
    Now try to create the return sales order it might work.
    Raj.

  • Utilizing item category ALEN - Creation of PO is not auto generated

    All,
    I am utilizing item category ALEN during my sales order creation process.  ALEN is set up with "create purchase order automatically" flag.  I am utilzing schedule line CB and I have maintained the order type NB, item category is 0 and acct. assign category is M.  When I save the sales order, the purchase requisition is being created, but no purchase order.  In fact, it doesn't seem to be even pulling against the data maintained in OVX5 (See below).  I have read OSS note 332475 and I have followed those instructions, but my PO is not being generated.
    One other question - when the ALE data is input for the sales organization (t-code OVX5), what have others input when the vendor, purchasing org and plant can vary (meaning, at times we transfer from plant A to plant B; then for the same sales organization, we transfer from plant B to plant A.  Maintaining just one vendor against the same sales organization does not make sense to me as it will change depending upon the sourcing and receiving plants for the same sales org.
    I have performed a search in OSS on Third Party Order Processing when it relates to individual purchase orders and how to properly configure when using ALEN and TAB - very little information to be found.  I can find a great deal of information on third party processing when it relates to the utilization of TAS and ALES item category.
    Any insights or areas to check would be very greatful. 
    Regards,
    Sandy

    All,
    This issue has been resolved internally.  I had to set the CB schedule line to using "7" stock transfer item category .. then apply a note to address an error message (note 883133).
    Regards,
    Sandy

  • Purchase requisition with Item Category – L creation via Maintenance orders (Plant Maintenance)

    Hi Guru’s,
    I have a scenario where purchase requisition with Item Category – L (subcontract External) for Repair items (Storeroom Process) need to get generated with Item category-L.This requirement is to MAP in my system.
    I am aware that purchase requisition can be created with reference to maintenance orders.
    Can anybody through some light on the integration between PM and MM.
    If creation of purchase requisition is possible via maintenance orders then please explain me with detailed steps both configurations and master data so that I can able to replicate the same as per business requirement.
    I look forward to the expert’s response.
    Regards,
    Kumar

    Hi Kumar.S
    You have to installed DIMP 6.0, and activated the business function Refurbishment and Subcontracting (LOG_EAM_ROTSUB) and Serial Numbers in Purchasing (LOG_MM_SERNO) .
    Please check the below link:
    http://scn.sap.com/thread/1956895
    Hope it will help you to resolve your issue.
    Regards,
    Ritesh

  • Item category & item category group

    Hi
    What is the Function of item category and item category group?
    thanx in adv

    hi,
    read this help file.
    Using the item category group, you group together different material
    types for item category determination from the SD view. For every
    material type, you can define a default item category group which is
    proposed by the SAP System when you create a material master record. For
    more information on setting default values please refer to the section
    "Define material type defaults.
    In the sales document, the system determines the item category from the
    item category group of the material and from the sales document type and
    proposes this item category in the document. You assign item categories
    to sales order types and item category groups elsewhere. You can find
    further information on this in the section "Assign item categories".
    Actions
    If you define your own item category groups, the keys should start with
    the letter Z, since this name convention is kept free in the standard
    SAP System for this purpose.
    1.  Check whether you can use the item category groups in the standard
        version.
    2.  If you want to create new item category groups, you must enter an
        alphanumeric key with a maximum of 4 characters as well as a textual
        description.
    Item Catgeory:
    In this menu option, you define item categories for sales documents. The
    item categories that are contained in the standard SAP R/3 System
    together with the sales document types represent the usual business
    transactions.
    You have the following options for defining your own item categories:
    o   Copy an existing item category and change it according to your
        requirements.
    o   Create a new item category.
    Recommendation
    If you define your own item categories, the keys should begin with the
    letter Z since SAP keeps this range free in the standard system and
    protects it from being overwritten during release upgrades.
    If you define your own item categories, you should copy similar item
    categories that are defined by SAP and make the required changes there.
    In this case, all the specifications of the existing item category are
    copied - even the assignment to the sales document types. In particular,
    the data for example concerning partner determination, pricing or
    document flow which you do not edit on the detail screen of the item
    category is also copied.  Consequently, you can test the new item
    category for the settings made without having to edit the other menu
    options.
    When copying sales document types, item categories and schedule line
    categories, the SAP system automatically creates a log with the copied
    data. Using the log, you can check whether all of the copied data
    applies to your item category or whether you must make changes.
    Note
    If you create or copy a new item category that is to be used for a
    delivery, you must also define a delivery item category with the same
    name. The SAP system automatically transfers the item category that was
    found for the sales document item into the delivery item.
    Activities
    If you only need to make minor changes to the existing item categories
    (e.g. changed description), then you change this as appropriate. Minor
    changes refer to parameters that have no controlling character.
    If you need to make further changes, define a new item category by
    copying a similar item category supplied in the standard system and then
    change this according to your requirements.  In this way, you can for
    example define an item category for which a certain type of pricing is
    carried out, or for which the data must not differ at header and item
    level but which otherwise matches an existing item category.
    If you want to create an item category, proceed as follows:
    1.  Enter an alphanumeric key with a maximum of four characters.
    2.  Maintain the respective specifications of the detail screen.
    3.  Also consider the additional functions on item category level and
         the item-specific settings in the general sales and distribution
         functions.
    Regards,
    Murali

  • Disable input (Grey color) for the Amount field for TANN item category item

    Hi All,
    I want to disable the input of pricing field in Sales tab in VA01/VA02 for the TANN item category line.
    Now I can ZERO the pricing field, but cannot disable the input.
    Please help.
    Thank you very much.
    Terry

    I've done by User Exit MV45AFZZ
    form userexit_field_modification.
    Thanks.

  • Prod.Order Creation- Using Reference Operation set.

    Hi
    While creating a production order of particular order type,after entering the quantity and order finish date as today's date(05.06.2007),backward scehduling,it's showing no routing found for the material (as we are using REM-Repetitive manufacturing,we are having rate routing) ,and in the same mesaage box itself I choosed the Reference operation set(that I have created today) and entered the  group no,and after entering its showing me an error as <b>Ref. operation set 50000008 is not valid according to the selection conditions</b>,
    So I created a routing for the same material nd in MRP4 view of the same material under for selection method i kept blank(Selection by order qunatity) and tried to create Prod.order,and there was no problem,but if the same i'm trying to create using Reference operation set I'm not able to create the Production order.
    Kindly give me a solution for this,Is there anything to do with order type dependent parameters of the particular order type?
    Thanks & Regards
    Raj

    Hi,
    Is your problem solved ?
    One more solution to create a order with reference operation set,is to use a trigger point.
    Once you create a reference operation set.
    Use T.code co31 to create a trigger point, chosoe create order with reference & choose a system status eg: PCNF. & click the user parameter tab.
    The system will aks for the reference operation set no & group counter.
    Then assign this reference operation set to the routing operation.
    When you do partial confirmation of this operation, this will trigger the generation of a order.
    Regards,
    Senthilkumar SD

  • Equipment creation using Reference

    Hi,
           I have to create a new equipment using the existing one, to acheive this task we have one BAPI
    BAPI_EQUI_CREATE_BY_REFERENCE
    but by tusing the above BAPI some of the fields in General tab like inventory no, year/date psoting, start up date, Manufacturer serial no are not getting copied.
    second isuue is cannot i copy one equipment category data to another equipment category.
    the issues we are replacing the existing M equipment category with F equipment category and the number also differs so ihave to replace all the existing equipment numbers with the newer one's.
    in this process when i am trying to use the above BAPI some of the fields are not gettiing copied.
    can any one please help me..............
    Regards,
    Ravi G

    If you're talking about serial numbers, you can use any material type for that. Just maintain a serial number profile in the sales view.

  • Item category D can only be used with account assignment category

    Dear Guru's,
    While creating service PO, i am getting d above error
    wat it is ? Is it mandatory to maintain Ac assignment cat along with item cat for service PO ?
    regds,
    CB

    hi
    Item category D is used for services .services can not be stocked like stock item... these are for direct consumption hence account assignment is mandatory for Item category D
    u can enter K or U as account assignment and proceed with PO creation
    Vishal...

  • Item category group used for scrap materials

    hello gurus
    Can u pls tell me what is the item category group used for scrap materials in the material master?
    Thanks in advance
    Warm Regards
    Prashant.

    Prashanth,
    Item Category
    Item Category used is IRVE or you can create your own Item caegory by clicking "New entries"
    a. Schedule line is activated
    b.  Incompletion Procedure = 43 repair item
    c. Screen  Seq Group is mentione.
    Item Category Group
    There is no item category group existing. You can create your own item category group "SCRAP". you basically use "Tem category Group" along with Sales Document to determine item category
    You need to create a ZSCR scrap material type and assign "SCRAP" item category group to material type
    Assign Item categories
    Carry out the Item category determination for Item Category Group.
    Regards
    Sathya

  • What is the use of usage in item category determination?

    Hi Gurus,
    What is the use of usage in item category determination? pls give examples.
    Thanks,
    Paul

    Hi John,
    Assign Item Categories
    In this menu option, you can specify which item categories the system proposes during document processing for each sales document type and item category group. At the same time, you can specify additional item categories with which the system default can be overwritten. There is a maximum of three possible alternative item categories.
    If, for example, you enter a material with the item category group NORM in a standard order, the SAP System determines the allowed item category via the assignment of item categories to sales document types and item category groups.
    The system default and the allowed alternatives are always determined from the sales document type and one or two further criteria. The system default depends on the following criteria:
    sales document type
    item category group
    item category of the higher-level item
    item category usage
    Note
    The SAP System automatically copies the item category determined for a sales document item to the delivery.
    Recommendation
    Depending on the initial situation you can start the assignment differently:
    When you define a new sales document type, you should specify the proposed and the allowed item categories for the materials that are represented by the item category group.
    When you define a new item category, you should specify for which sales document types an item category is proposed or which item category is possible for the materials represented by the item category group.
    When you define a new item category group, you are to enhance the assignment of item categories to sales document types by this new item category group.
    Actions
    To define item category determination, proceed, for example, as follows:
    1. Choose the sales document type to which you want to assign item categories.
    2. Then choose one of the item category groups.
    3. Specify all the allowed item categories for the combination of sales document type and item category group.
    If you are dealing with a non-material item, you must specify the corresponding item usage.
    If it is a subitem, specify the item category of the higher-level item.
    If it is an item category that is to be proposed in the sales document, you must indicate the combination of item category, item category group and sales document type as a default value.
    4. If necessary, specify between one and a maximum of three item categories, with which the system default can be manually overwritten during document processing.
    Thanks & Regards
    Sasikanth.Ch

  • Why item category re-determined at delivery level

    Hi Gurus
    I want to know what is the purpose of redetermining item category at delivery level?

    First thing to know is that Item Category determination is used only on newly added items and other specific usages like batches, product substitution, etc. It is meant for Deliveries that are not created with reference to a sales order. If you are copying an item from the order and the item category is configured as a Delivery Item category in 0lvp, SAP copies the order item category and does not redetermine it from configuration.
    If you are using Product Substitution in the delivery, SAP first copies the higher level item from the Sales Order, then executes Material Determination to bring in the substitution (lower level) items. In this case the higher level item category would be from the order. Redetermined BOMs would follow the same logic as Product substitution.
    In short you can redetermine items in delivery when you are using product substitution or add new Items in delivery or using Sales BOMs.
    Hope its clear to you now.

  • Item Category M

    Hello experts,
    Can anyone help me with a issue.
    I'm doing the MM process bellow:
    - Creating a PR using acc assign. U, without material code and without Item category
    - Creating a Quotation using acc assign U, without code and without item category (using the PR as reference)
    When I try to create a Contract using the Quotation as reference, I'm not able to include the item category M (the field is Display only). I need this item category so I can create POs using different materials for the same contract item.
    How can I solve this problem?
    Thanks!
    BR
    Luciana

    Hello Raja,
    Thanks for your response.
    - I've already put the entry at OMG0 for Item Category M
    - In the screen layout, the field Item Category is selected as "Opt.entry"
    Look that I don't have problems when I create a Contract using PR as reference. I can create a PR without item category and, when I create the contract, I put the item category M.
    The field is only as Display when I create a Contract using a Quotation as reference.
    I try to create the Quotation using the item category M, but I got the message: ME641 (Item category M is only supported for contracts)
    Do you have any other idea??
    Thanks a lot!
    BR
    Luciana

  • Item category TAS

    Hello Gurus,
            Item category TAS  is used for Third-Party Processing, but The indicator for the automatic creation of purchase orders has not been set for item category TAS. how  can we  this item category for Third-Party Processing ?
    Many Thanks!

    Hi
    The control in TAS Item category is for automatic creation of Purchase Order only(after automatic creation of PR)  and not for creating Purchase Requisition. The PR is crated automatically based on the settings in Schedule lines.
    Please go thro the F1 help for the field Automatic PO creation in TAS....
    Create purchase order automatically:
    If you activate this field, the system automatically generates both a purchase order requisition for third-party schedule lines as well as a purchase order in the background when you save the sales order. This function has been designed for Application Link Enabling (ALE) but you can also use it when working with distributed systems.
    Thanks,
    Ravi

  • Link b/w item category and material group

    Hi All,
       Is there any link between item category and material group.
    Regards
    Pavan

    Hi Pavan,
    Item Category
    Item Category is a control field that allows the PR to follow the correct path for the correct path for that category of PR. The SAP system is delivered with a set of item categories
    Blank -Standard
    K- Consignment
    L- Sub Contracting
    S- Third Party
    D- Service
    U- Stock Transfer
    Selecting an item category allow the display of certain fields and not others
    For Ex: If PR item has an item category K for conignment then invoice receipts will not be allowed
    Material Group
    Material group is a method of grouping of similar materials.It is defined either by using classification or by configuration. It is important not only for seracing the materials but also in other areas of purchasing
    A purchace inforecord can be created with out a material number but must require materail group and vendor
    Material group is configured through Tcode WG21 
    And i do not find any link between them
    I hope this gave you the clarity
    In case of any more information required do get back
    If found helpful reward accordingly
    Thanks & Regards
    Pavan

Maybe you are looking for

  • View All Background Jobs with Class A

    Hi All, We have around 500 Background jobs scheduled on PRD system (CI and on the  rest DI's), Our requirement is how to generate  a list with All the backround jobs w.r.t their Job class (Any method /T-code navigation, function etc) so that I can ge

  • How do you cut music on Garageband?

    I have a song and I want to cut it at a certain point!

  • Disappointed in LR 4 Beta

    I am very disappointed in LR 4 Beta. LR3 was (is) great, but the lag of manual controls for Highlight Recovery and Fill Light renders the new version almost useless. The Auto settings do a lousy job, darks are much to dark and the lights get burned o

  • Start up issue... A flashing ? PLEASE HELP

    :-/ Can anyone help?? I have a g4 power mac that runs on os9 & osX. Whilst running a scanner in os9 the mac crashed and i have not been able to restart since.... all I get is a FLASHING ?. I have; *rest the PRAM, *started the mac up with a CD holding

  • IPod mini won't restore!

    Right, another problem, and it doesn't sound like I'm alone on this one. I can get my iPod recognised by the PC, but when I try to restore it takes 25 minutes to tell me "can't mount iPod". I've tried disk mode, changing the USB port, changing the dr