Get Account Assignment Category in Process_Account Method

Hi All,
Can i know how can i get the account assignment category value in method Process_Account for Badi ME_PROCESS_REQ_CUST I need this to Copy my cost centers and Orders for specific Account assignment category.
Regards,
KB

Hi Fabio,
As far as I know that´s the standard behaviour. There are some checks in the system at the time of creating a PO, so when you fill any field the EKPO-KNTTP remains unchangeable.
You can check  that this is hard-coded this way in program
SAPLMECO, in include LMECOU04 :
   IF I_PSTYP EQ PSTYP-DIEN OR
      I_PSTYP EQ PSTYP-BLNK.
  Dienstleistungspositionen nicht ändern
     MESSAGE E456(ME) WITH I_KNTTP RAISING CHANGE_NOT_ALLOWED.
   ENDIF.
Review note 570767 as well.
This is hard coded so you can not change the account assignment. Please
see the below code. You can set a breakpoint and test this.
SE80
FUNCTION Group MEPO
Classes (Implementation)
LCLFS_MMMFD_ACCTASSCAT
      CLASS LCLFS_MMMFD_ACCTASSCAT IMPLEMENTATION
CLASS lclfs_mmmfd_acctasscat IMPLEMENTATION.
  METHOD lif_field_sel~execute.
    DATA:   l_t134m   TYPE t134.                            "n_932533
    IF NOT ls_local-ekpo-ebelp IS INITIAL.
IF ( NOT ls_local-ekpo-packno IS INITIAL AND          "360632
      NOT ls_local-ekpo-kzvbr EQ kzvbr-unbe ) OR       "570767
       ls_local-ekbes-wemng NE 0 OR                    "603064
        ls_local-ekbes-wesbs NE 0 OR                   "717799
        ls_local-ekbes-glmng NE 0 OR                   "785587
     ( ls_local-ekko-bsakz  EQ 'T' AND                 "785587
       ls_local-ekbes-wamng NE 0 ) OR
       ls_local-ekbes-remng NE 0   OR
       ls_local-ekbes-anzal NE 0   OR
       ls_local-ekbnk-ebelp NE 0.  -> Breakpoint
   switch_field_to ''.            ->('' means display)
ENDIF.
Regards
David

Similar Messages

  • Getting Account Assignment Category D error

    Dear All,
    While creating a debit note with internal order, with item category ZTPS (Standard item category for project) i am getting error message" item category "D" is not defined ". This is rollout prject and i have checked in the sytem i found some documents with same item cateogry .
    Please advice.
    Regards
    Sunil

    Hi,
    Create network parameters in sales document (SD)
    You can make the default settings required to create a network from a sales order in the menu options Basic data -> Standard structures -> Parm. SalesOrd->Ntwk (Parameters for sales order -> network).
    If you do not enter data here, you can also enter the necessary data online directly in the sales order.
    The data in the material master actually controls whether a network can be created from a sales order item. To set this up, you should enter the core information like (assembly type, order type (i.e. network or order type) configuration, account assignment category) in the requirements class for the material. The requirements class is determined by the strategy group (see above) which was maintained in the material master.
    Therefore, if you want to be able to create a network while working in a sales order, you must have maintained the corresponding MRP data or strategy group for the material being sold.
    Standard settings
    SAP has predefined the following strategy groups:
    83: Assembly processing with network, account assignment category E (assignment to sales document. A network with network type PS05 (header assignment) is created.
    85: Assembly processing with network/project, account assignment category D (assignment to project). A network with network type PS04 (activity assignment) is created.
    In both cases, the system automatically creates a network with network type PS04.
    Recommendation
    Do not change the default settings that SAP provides in Customizing. You can use these defaults to set up your own strategy groups, requirement types etc. and specify other network types or other settings for the availability check.
    Note
    When values are missing from the sales order item, such as the plant, the system cannot determine the requirements type which means that it also cannot create a network from the sales order.
    In order to have the scheduled dates in the network be copied into the sales document as confirmed dates, you must have maintained scheduling parameters for network type PS04 and PS05 in Customizing.
    Keep this in mind when you define your own network types.
    Among the scheduling parameters to be maintained, you should set the indicator reconcile basic dates .
    You must set this indicator if you want the system to copy the scheduled dates into the basic dates and then pass them on to the sales order as confirmed dates.
    Hope this will resolve your problem.
    Regards,

  • Account assignment category in third party sales

    Hi,
    Can any body pls tell me from where we can get account assignment category as 1 in third party sales in PO.
    here i am getting X instead of 1. i need to get 1 by defalt.
    Please help me.
    Regards
    DVSK

    Hi
    As per understanding
    if you talking about SD Item category it ill come from from the schedule lines (CS) T Code : VOV6
    if you talking about the PO .,you can enter in purchase order (ME21N).
    Hope it helps you

  • Badi For Account Assignment Category in me21n

    Hi All,
    I am trying to implemnt badi for me21n for assigning default account assignment category as  E.
    i got the badi for  ME_PROCESS_PO_CUST .
    But the the problem is i dont find account assignment category field(KNTTP) in trhe metyhods tab.
    No othe badi is getting triggered.
    Please help me out in  this regard.
    Thanks and regards
    Ibrahim

    hi,
    i hope this will help you.
    DATA:
             ls_acc TYPE REF TO if_purchase_order_account_mm,
             ls_item     TYPE REF TO if_purchase_order_item_mm   ,
             ls_hdata    TYPE mepoheader                            ,
             ls_header   TYPE REF TO if_purchase_order_mm           ,
             ls_idata    TYPE mepoaccounting,
             ls_data     TYPE mepoitem_data    .
      DATA : lv_werks TYPE wrf1-locnr .
      DATA : vlfkz  TYPE wrf1-vlfkz.
      DATA : matkl  TYPE mara-matkl.
      DATA : ls_ana   TYPE zmm_ana_hesap.
      DATA : lv_okset TYPE c.
      ls_acc = im_account .
    *get item from account
      CALL METHOD ls_acc->get_item
        RECEIVING
          re_item = ls_item.
    *get item header
      CALL METHOD ls_item->get_header
        RECEIVING
          re_header = ls_header.
    *- Get item header data
      CALL METHOD ls_header->get_data
        RECEIVING
          re_data = ls_hdata.
    *- Get item data
      CALL METHOD ls_item->get_data
        RECEIVING
          re_data = ls_data.
    *- Get account data
      CALL METHOD ls_acc->get_data
        RECEIVING
          re_data = ls_idata.
      lv_werks = ls_data-werks.
    ***Conversion Exitler
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_werks
        IMPORTING
          output = lv_werks.
      SELECT SINGLE vlfkz FROM wrf1 INTO
         vlfkz
        WHERE locnr EQ lv_werks.
      SELECT SINGLE matkl FROM mara INTO
         matkl
        WHERE matnr = ls_data-matnr.
      SELECT SINGLE sakto INTO ls_ana-sakto FROM zmm_ana_hesap
        WHERE matkl = matkl
        AND vlfkz = vlfkz
        AND bsart = ls_hdata-bsart
    AND knttp = ls_data-knttp
      IF sy-subrc EQ 0 .
        ls_idata-sakto = ls_ana-sakto.
        lv_okset = 'X' .
      ENDIF .
    * buraya lv_check ya da sakto bou015F ise için kosul gelecek
    IF lv_okset IS NOT INITIAL .
    *- Set item
        MOVE-CORRESPONDING ls_data TO ls_idata .
        CALL METHOD ls_item->set_data
          EXPORTING
            im_data = ls_idata.
      ENDIF.
    ENDMETHOD.

  • Default account assignment category in ME51N/ME21N

    Hi,
    I want to default account assignment category ( KNTTP) based on document type while creating PR and PO, there are 4 different document types, Can this be achieved through config settings?, I am writing code in method PROCESS_HEADER of BADI ME_PROCESS_REQ_CUST, I am able to get header data using method GET_DATA but not able to use method in item interface SET_DATA. If anyone has achieved this please let me know.
    Thanks

    one of wayout is to set defaul value in user screen. set required account assignment otherwise use customisation
    regards
    points if helpful

  • How to make default account assignment category in planned order?

    Scneario Description:
    1. Sales order for a configurable parent item is created in ERP & order BOM is changed & transferred to APO. In APO MRP run takes place for that parent item, which creates a planned order with account assignment category "M" (M:Individual Customer w/o KD-CO.
    2. Now based on the dependant requirement generated for parent item, MRP takes place for one of the child item in ERP & purchase requisition gets created for child item.
    Question:
    1. Can anybody help me how i can make default account assignment as "F" (F:Order) in the planned order of parent item?
    2. PR created for child item also has default account assignment category as "M". we wish to change that to "F".
    Thanks & best regards
    Hemchandra & Sandeep Mandhana

    Hi V. Suresh,
    The account assignment category maintained in the requirement class for parent item is 'M'.
    No account assignment category maintained has been maintained in the requirement class Semi-finished component (this component is sent for subcontracting).
    The business process is as follows:
    1. Create Sales Order for Parent say ME_PARENT.
    2. Order BOM for ME_PARENT is created and subsequently cifed to APO.
    3. PP/DS heuristic is run for ME_PARENT.
    4. MRP for component ME_COMP is run in ERP.
    It can be seen that purchase requistion for ME_COMP has a/c assgn category as 'M'. It seems that the ME_COMP has inherited 'M' from ME_PARENT.
    We would like to have no a/c assgn category for ME_COMP.
    Any pointers?
    Regards,
    Sandeep

  • PO with account assignment category F

    Hi Gurus,
    For PO with account assignment category F, the system is creating aaccounting documents during GRN for some POs & for some pOs it is not . What could be the reason.
    Regards,
    Kumar

    Hi SAPMM6,
    Check details of account category refernce 'F' whether tick is there for GR Valuated.
    Also when you are creating PO with multi-account assignment then also GR is non-valuated as per SAP standerds.
    Also check the both POs for material code and there valuation classes.
    Hope your problem gets resoled.
    Regards,
    Gitesh

  • PO with account assignment category K and use two cost center

    Dear Experts
    When I create a PO with account assignment category K and use two cost center in the account assigment tab of PO with the same GL or with different GL in the both line item, The FI document does not get posted.
    Any input on this please.
    Regards
    Paul

    Hi,
    Check in the PO document - Item level - Delivery tab
    There are two indicators
    1. Good receipt
    2. GR non-valuated.
    If you are giving only one cost centre, only GR check box active and  GR non-valuated check box is in-active. That's why System creating FI document during GR.
    If you are giving two cost centres, Both GR check box and  GR non-valuated check box are active. That's why System is not creating any FI documents during GR.
    Regards
    Ravi

  • Account assignment category not flowing to PR and PO in MTS

    Dear All,
    I am facing a problem in MIGO. When I enter the PO number, it says, PO has no selectable items.
    When I consulted with MM consultant here he says the Account assignment category is not there in PO. And this has to flow in PR and PO when it is created.
    The PR is cretaed by MRP run and the strategy used is 40.
    Is this is the reason for error in MIGO? If yes where I do need to set this so that account assignment category will come in PR and hence in PO.
    Please suggest.
    Sumeet Vaidya

    Hi,
    Since the PO is not released , it is not allowing you to do MIGO.
    Hope , there might be a Release Procedure / Release Strategy defined for the Purchase Order. So pls consult with your MM Consultant and get the PO released.
    Then you will able to post the Goods Movements.
    Regards,
    Sheik
    Edited by: sheik abdulla on Apr 17, 2008 6:00 PM

  • Error in MIGO posting against PO with account assignment category K

    Hi folks,
    I have craeted a P.O. Account assignment category K, while creating GR, I am getting following error message
    Account determination for entry SABB (chart of account) Z44 (Tra/event key) TE (act. grouping code) not possible
    Message no. M8147
    What could be the possibel cause.
    I have already did the G.R with same account assignment in the past.
    Regards

    Dear
    The system did not find an account for this transaction. This means that the account determination is not maintained in MM Customizing (Valuation). The key is made up of:
    Chart of account
    Transaction key (= Posting transaction)
    Valuation grouping code
    Account grouping code
    Valuation class
    System Response
    The system cannot update a G/L account for this transaction. You cannot post the transaction.
    Procedure
    Contact your system administrator.
    If you have the authorization, check the Account determination in Customizing forValuation.
    Regards

  • Error message when trying to post GR for account assignment category A

    Hello gurus,
    when I create a PO item with account assignment category A, PO creation works fine. But when I try to post the GR for that item, I get an error message similar to
    "Account determination for entry <our chart of accounts> ANL <our company code> not possible".
    Any idea what the problem might be?
    I have had similar error messages in the past, when the automatic postings where not configured completely. So "ANL" should be some transaction like BSX or something. But I cannot find a transaction ANL.
    Thanks in advance
    Alicia

    Thanks for your help, everything seems to be ok as described.
    This seems to be a SAP error, see SAP note 1249431.
    Greetz
    Alicia

  • Account assignment category Q and G/L account mapping during purchase order

    Hi,
    When we procure stock for account assignment category Q,then it will trigger G/L Account
    Please can any one tell me where it will maintained

    Hi,
    If you select Account Assignment Category as "Q" then the time of GR, it will post the Materials received value to stock account and will update stock of material against the Project.
    In OME9, here for Account Assignment Category "Q", check field Consumption posting has value as "P" (Accounting via project), that means stock account will get determined from OBYC for Account Key BSX

  • BAPI_PO_CREATE1 for blocked item and account assignment category Q

    Hi,
    I am facing an issue while creating PO with items which are blocked ie LOEKZ = 'S', and account assignment category 'Q'.
    Though I fill wbs element in POACCOUNT and POACCOUNTX structures, after execution it is being erased and am getting an error: "Enter WBS Element" with an information message "Change G/L Account could not be effected".
    Please help.
    Thanks in advance.
    Regards
    Kalyani

    Hi Ravi,
    Below is the code:
    POITEM-PO_ITEM = '00010'
    POITEM-DELETE_IND = 'S'
    POITEM-ACCTASSCAT = 'Q'
    POACCOUNT-PO_ITEM = '00010'
    POACCOUNT-SERIAL_NO = '01'
    POACCOUNT-CO_AREA = '1000'
    POACCOUNT-WBS_ELEMENT = 'XXXX'
    I filled POITEMX, POACCOUNTX structures too.
    When I dont pass POITEM-DELETE_IND = 'S', the PO is being created.
    But my requirement is to make the item blocked.
    Thanks in advance.
    Regards
    Kalyani

  • Multiple account assignment category for one line item in PO

    Dear Experts,
    We are on SRM 5.0 ECS
    One line item of a PO has multiple account assignment category with the cost distribution for
    1. Cost Center - 50%
    2. Order          - 50%
    Is it possible?
    As per my understanding one line item in a PO can have only one account assignment category
    Regards
    Mick

    Hi,
    Yes it is possible by Po line item.
    Just go to transaction bbp_poc through the web interface.
    Select your PO
    Select your line item PO.
    goto the account assignment tab (item overview)
    you get a cost distribution field in percentage
    then you get a cost distribution button : click it and you get several lines where now you can split your 100% in as many lines as you want.
    BR,
    Disha.
    Pls reward points for useful answers.

  • Error with Account Assignment Category

    Hi,
    While Creating the PO I am getting this error. I just copied the Material type of ROH into Consumables..
    In OMS2 alos I ticked Qty and Value based Updating..
    The Error Msg is...
    Account assignment mandatory for material RH1001 (enter acc. ***. cat.) Message no. ME062
    Diagnosis
         There is no provision for value-based inventory management for this  material type in this plant. Account assignment is thus necessary.
    Procedure
         Please enter an account assignment category.
    Rgs,
    Priya.

    Sorry for my earlier Post.....
    Actually for Consumable Material Quantity and Value Updations Should not be Active since they consume Once it is Goods Receipted.
    Regarding your Issue Purchase Order for Consumable Material will be always Created with an Account assignment Category Such as Cost center Etc.
    So Please go to OMS2 Trxn Code and Select your Consumable Material type and in Quantity / Value Update Field Put tick mark against In No Valuation areas and save.
    Now Create a Purchase Order in ME21N with Account assignment Category and Proceed.

Maybe you are looking for