BADI-ME52N - Getting Account Assignment Data

Experts
    I'm Implementing BADI , ME_PROCESS_REQ_CUST~Process_Account
Method ME_PROCESS_REQ_CUST~Process_Account
CALL METHOD im_account_ref->get_persistent_data
    RECEIVING
      re_persistent_data = re_persistent_data1.
  CALL METHOD im_account_ref->get_data
    RECEIVING
      re_data = re_data1.
  CALL METHOD im_account_ref->get_previous_data
    RECEIVING
      re_previous_data = re_previous_data1.
EndMethod.
All These Data will Fetch Information About Account Assignment and some Header ITemFields.
But Oly After Trigeering The Account Assignment Tab only it's Fetching
I want the values to be fetched immdly after giving the transaction ME52N
After Giving Transaction Me52N , these data shows Values are as 0. Just giving any small changes or triggering the Account Assignment tab the values are fetching.
Any ways to solve this
Thanks.

METHOD if_ex_me_process_req_cust~open.
  GET PARAMETER ID 'PRO' FIELD lv_wbs."getting the WBS ELEMENT
ENDMETHOD.
getting the Parameter id in the
initialize method of the badi will solve the issue

Similar Messages

  • Ex_me_process_req_cust~process_header: How to Get Acct Assignment Data

    I've created a custom class to use this BADI interface. Inside this process_header method I get the Purchase Requisition's item data, I now need to read the Purchase Requisition's account data, particularly the GL Account Number, and then change it. See below. Any feedback will help.
      Thank-You.
    METHOD IF_EX_ME_PROCESS_REQ_CUST~PROCESS_HEADER.
      DATA: LT_ITEMS TYPE MMPUR_REQUISITION_ITEMS.
      DATA: LS_ITEM TYPE MEREQ_ITEM.
      FIELD-SYMBOLS: <FS_ITEM> TYPE LINE OF MMPUR_REQUISITION_ITEMS.
      CALL METHOD IM_HEADER->GET_ITEMS
        RECEIVING
          RE_ITEMS = LT_ITEMS.
      LOOP AT LT_ITEMS ASSIGNING <FS_ITEM>.
        LS_ITEM = <FS_ITEM>-ITEM->GET_DATA( ).
      ENDLOOP.
    *Get/Read the Purchase Requisition Line Item Account Assignment Data Here
    *Change the Purchase Requisition Line Item GL Account (SET?)
    ENDMETHOD.

    The line that is commented out gets a syntax error...expecting a field or function? Is it looking for an interface name to be called out subsequent to get_exkn? I guess I can then do set_exkn once this compiles  Thank-You.
    METHOD IF_EX_ME_PROCESS_REQ_CUST~PROCESS_HEADER.
      DATA: LT_ITEMS TYPE MMPUR_REQUISITION_ITEMS.
      DATA: LS_ITEM TYPE MEREQ_ITEM.
      DATA: LT_ACCT TYPE MMPUR_ACCOUNTING_LIST.
      DATA: LS_ACCT TYPE MMPUR_ACCOUNTING_LIST.
      FIELD-SYMBOLS: <FS_ITEM> TYPE LINE OF MMPUR_REQUISITION_ITEMS.
      FIELD-SYMBOLS: <FS_ACCT> TYPE LINE OF MMPUR_ACCOUNTING_LIST.
      CALL METHOD IM_HEADER->GET_ITEMS
        RECEIVING
          RE_ITEMS = LT_ITEMS.
      LOOP AT LT_ITEMS ASSIGNING <FS_ITEM>.
        LS_ITEM = <FS_ITEM>-ITEM->GET_DATA( ).
        LT_ACCT = <FS_ITEM>-ITEM->IF_ACCT_CONTAINER_MM~GET_ITEMS( ).
        LOOP AT LT_ACCT  ASSIGNING <FS_ACCT>.
    *      LS_ACT =  <FS_ACCT>->GET_exkn( ).
        ENDLOOP.
      ENDLOOP.
    ENDMETHOD.
    Edited by: Tom Matys on Dec 6, 2011 9:22 PM

  • Copy of Account Assignment Data from PR to PO in ECC 5.0

    Hi,
    In our ECC 5 instance, Account assignment data from PR to PO is not getting copied when we create a Purchase Order in ME21N transaction. Where as the same is being copied when PO is being created with ME21 transaction.
    Ex: PR created with Acc Assignment Q, when we create PO with reference to PR in ME21N transaction, this account assignment data is not getting copied to PO. Where as this is no so, when we create PO in ME21 transaction.
    Can you please specify any pointers for this copy control problem.
    Thank you,
    Regards,
    Ramakrishna Mangena

    hi,
    please check for the following points:
    1. check in ME21N, are referncing properly or not...
    You have to reference it via using the document overview ON or directly entering the PR as source document for the PO...
    2. check whether is getting properly saved in the table EBAN/EBKN...check it in SE16...you can check as per the document number...
    3. If nothing is helping you from the above two points check with the ABAP and BASIS consultant...
    Regards
    Priyanka.P

  • Reporting on Operation Level costing / Operational Account assignment data

    Hi folks,
    Please can anyone here with experience in dealing with extracting Operation Level costing (OLC) / Operational Account assignment (OAA) data for Maintenance Orders share their experience.
    We have done some basic checking around this and Account assignment at activity level has been enabled.  Been trying to use 0PM_OM_OPA_2 extractor to get this Operational Account assignment data but no luck.
    Perhaps PM Consultants familiar with OLC/OAA solution can help answer this. What are the tables to look at for getting to this Operational Account assignment data?
    Any clues will be appreciated.Thanks for your help!

    Ravi,
    transactions IW40N and IW49N.
    Adilson

  • System is not checking Account assignment data in shopping cart

    Dear Experts,
    We are implementing SRM7 with SP06. We are using extened classic scenario. Recently we have noticed that system is not validating account assignment data at shopping cart level and creating purchase order in SRM, however at the time of PO transmission to backend system it is failing.
    Does any one has faced this issue?If yes help me how to resolve this issue.
    Thanks in advance.
    Umakanth

    Hello Umakanth,
    Could you check if in your settings for Define backend system customizing ( BBP_BACKEND_DEST table), option "realtime backend validation of FI data" is set or not ?
    Regards.
    Laurent.

  • Purchase order : get Account assignment into BADI

    Hi,
    i'm using the BADI ME_PROCESS_REQ_CUST method POST ; in this method i need to access to items and it's work (i use im_header->get_items( ) ). But now i need to access to Account assignment, how can i do this ? the only object available is im_header.
    Be careful, i can't read database because when i create a new document, the data are not saved again.
    Thanks for help.
    Cheer

    IM_HEADER->get_items( ) returns the internal table RE_ITEMS type ref to MMPUR_REQUISITION_IITEMS (of line type MMPUR_REQUISITION_ITEM) which gives the list of  line items.
    Loop through the internal table RE_ITEMS, refer to the component RE_ITEMS-ITEM (type ref to IF_PURCHASE_REQUISITION_ITEM) & use the method RE_ITEMS-ITEM->IF_ACCT_CONTAINER_MM~GET_ITEMS( ) to get the account assignment details related to each item.  This method is to be called in the loop for each line item.
    Regards, Vinod
    P.S : Is it purchase order or Purchase requisition ? By going through the post it is PR, your subject line seems to be wrong.
    Edited by: Vinod Kumar on Jul 15, 2011 2:21 PM

  • 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

  • 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,

  • While doing service  in service po we get account assignment error pls help

    while doing services in service po we get error account assignment error (se181) pls help to resolve

    Hi,
    a service line can be never saved WITHOUT the account assignment details (except acc. ***. category U in in the PO item).
    In case the table ESLL will have entry but the accounting tables eskl  has got no entry or has entries with deletion flag, it would be an inconsistent situation.    
    You can set on the screen SAPLMLSK 0200 the deletion flag (ESKL-LOEKZ) for your service account assignment, but without entering a new account assignment information the system would not allow you to leave this screen. When you set the deletion flag for service line in the account assignment detail screen, you must enter right afterwards a new account assignment information in order to leave the screen without the error message 06 408.
    Regards,
    Edit

  • Access Account assignment data inside custom search help

    Hi Experts,
    I have faced with a challenge and I am stuck. Need some expert advise.  I am developing a custom search help for GL account. Inside the search help exit I have to know what is the account assignment category of the accounting line i am currently accessing in WEB UI. for example i have one item in SC and there is a cost distribution between cost center and WBS element. Now i want to access GL account search help from second line in the account assignment ( ie from line having WBS as Acc Assignment).
    one approach that i can think of is Enhance Accounting WD component and capture the details in a static attribute of a custom class and access them inside the search help exit. I know this will work. But i am looking for more clean approach.
    I saw below code in WD comp method GET_BO_INFO of component controller.
    lo_task_container = /sapsrm/cl_ch_wd_taskcont_fact=>get_task_container_instance( ).
       CHECK lo_task_container IS BOUND.
    * Get the BO type
       ev_bo_type = lo_task_container->get_bo_type( ).
    * Get the BO mapper, BO GUID, and item GUID of the lead selection
       CASE ev_bo_type.
         WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_shop.
           lo_bom_sc ?= lo_task_container->get_bom_sc( ).
           ev_hdr_guid = lo_bom_sc->/sapsrm/if_cll_bo_mapper~get_bo_guid( ).
           ev_item_guid = lo_bom_sc->/sapsrm/if_cll_bo_mapper~items_get_lead_selection( ).
    I am not sure if this works. But even if this works I can not get the exact accounting line that the user is currently processing. Any ideas????
    thanks
    sankar.

    Hi,
    Any Ideas?

  • How to get account expiry date for Oracle Directory Server?

    I need to get the account expiry date for Oracle Directory server. Which attribute stores this value? Please let me also know the attribute type and how to fetch it.
    Thanks,
    Subrat

    Hello,
    Yes you can use nsAccountLock directly (When nsAccountLock=true, the object is inactivated and the user cannot log in)
    This is documented in Modifying Directory Server’s NsAccountLockAttribute Directly (Sun Java System Directory Server Enterprise Edition 6.2 In…  (release number is old but it does not matter, Thats the first one Ive found)
    You can also use dsutil account-inactivate as described in dsutil - 11g Release 1 (11.1.1.7.0)
    Sylvain
    Please mark this response as correct or helpful when appropriate to make it easier for others to find it

  • Equipment with no location or account assignment data

    Hi experts,
    In our solution, we are using equipment records without functional locations or account assignments.  Yet I still see records for each equipment in ILOA with a new account assignment number (ILOAN).  Is this standard SAP or is there a way (in config maybe) to avoid the automatic creation of these records in ILOA. 
    EQUZ contains a record for each equipment with a difference ILOAN as well.
    Thanks,
    Paula

    Paula,
    A new ILOA record is created for the equipment each time you change the Location data. This then used as part of the equipment history (usage list, change logs, etc).
    Certain fields can be configured (via IMG) to create new records.
    If you don't change these fields, then it won't create new ILOA records. Therefore you will have one ILOA record for each EQUI/EQUZ record.
    There is nothing much you can do about this without modifying SAP standard code. And in any case it would be unwise since we do not know the knock-on effects. Nor do you know if you may need this functionality in the future...
    Many clients have millions of equipment records, each with multiple ILOA records. This should not affect the system if it is "sized" correctly...
    PeteA

  • Account Assignment data in Shopping Cart not visible after upgrade of  R/3

    Hello,
    We are currently working with SRM 5.0 and R/3 4.6 Backend system.
    We are now upgrading our R/3 system from version 4.6C to ECC 6.0.
    When we try to create a shopping cart, the account assignment Tab is not visible.
    We checked the RFC (SRM-R/3 and R/3-SRM) and they our working fine.
    Now we think the problem is caused by a configuration setting in which one defines the Backend System. In this configuration, the system category is still set to 4.6C (for the logical System of the Backend System)
    We want to change this but in our list of system categories, the ECC 6.0 option is not present!
    Questions:
    1. Is this configuration setting the cause for our account assignment tab problem?
    2. How can one add the System Category ECC 6.0 so it will appear in the configuration setting "Specify Backend System" ?
    Anyone had experience with this? Please give us a clue.
    Thanks in advance.
    Aart

    Hello Aart,
    You can choose the ERP_2.0 option. It contains the correct structures for the new ECC 6.0 system.                                             
    You can change it and retest.
    Kind regards,
    Ricardo

  • Multiple Account Assignment Data for PR not coming in LDB - PSJ

    Hi,
    I am using one report in which LDB is used. LDB name is PSJ. However when there is multiple account assignments for single line item of PR the report is giving wrong result. Is this LDB suitable for the given functionality.

    hi,
    please check for the following points:
    1. check in ME21N, are referncing properly or not...
    You have to reference it via using the document overview ON or directly entering the PR as source document for the PO...
    2. check whether is getting properly saved in the table EBAN/EBKN...check it in SE16...you can check as per the document number...
    3. If nothing is helping you from the above two points check with the ABAP and BASIS consultant...
    Regards
    Priyanka.P

  • Accessing Account assignment in P.Req BADI -PROCESS_REQ_CUST~PROCESS_HEADER

    I have implemented a BADI for Purchase requisition and in PROCESS_HEADER method of BADI Implementation for ME_PROCESS_REQ_CUST. I am trying to access account assignment lines on the purchase requisition (EKBN).
    IM_HEADER is the only parameter available for me. But I am able to access the items indirectly via get_items method in its interface.
    method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_HEADER.
    DATA: l_item_list TYPE mmpur_requisition_items,
           l_item_listx type mereq_itemx,
          l_item      TYPE mmpur_requisition_item,
          l_item_akt  TYPE mereq_item,
          l_item_account type MMPUR_ACCOUNTING_LIST,
          l_item_ref  TYPE REF TO if_purchase_requisition_item.
    data :  lt_preq_items type standard table of mereq_item .
      FIELD-SYMBOLS:
        <lo_lcl>        TYPE ANY,
        <ls_item>       TYPE mereq_item,
        <ls_itemx>      TYPE mereq_itemx,
        <item>          TYPE mmpur_requisition_item.
      " Get items of purchase requisition
       l_item_list = im_header->get_items( ).
      check IM_COUNT <= 1 .
    * Logic for approver determination goes here .
       LOOP AT l_item_list ASSIGNING <item>.
        l_item_akt = <item>-item->get_data( ).
        break-point.
    *   l_item_account = <item>-item->get_items( ).
        append l_item_akt to lt_preq_items[].
      ENDLOOP.
    I am able to collect all the items of the p.req (i.e EBAN entries) in lt_preq_items .
    Now, my challege is to use get_items() method inside
    IF_ACCT_CONTAINER_MM~GET_ITEMS   (  Return Account Assignment Objects ) which is inside IF_PURCHASE_REQUISITION_ITEM interface.
    A simple  l_item_account = <item>-item->get_items( ) resulted in syntax error. How can I get account assignment objects inside this process header BADI of purchase requisition ? Any useful tips is greatly appreciated.
    Regards,
    Shareen
    Edited by: Shareen Hegde on Jan 27, 2012 12:29 AM

    Hi,
    DATA: l_item_list TYPE mmpur_requisition_items,
           l_item_listx type mereq_itemx,
          l_item      TYPE mmpur_requisition_item,
          l_item_akt  TYPE mereq_item,
          l_item_account type MMPUR_ACCOUNTING_LIST,
          l_item_ref  TYPE REF TO if_purchase_requisition_item.
    data :  lt_preq_items type standard table of mereq_item .
      FIELD-SYMBOLS:
        <lo_lcl>        TYPE ANY,
        <ls_item>       TYPE mereq_item,
        <ls_itemx>      TYPE mereq_itemx,
        <item>          TYPE mmpur_requisition_item.
      " Get items of purchase requisition
       l_item_list = im_header->get_items( ).
      check IM_COUNT <= 1 .
    Logic for approver determination goes here .
       LOOP AT l_item_list ASSIGNING <item>.
        l_item_akt = <item>-item->get_data( ).
        break-point.
      *litem_account = <item>-item->IF_ACCT_CONTAINER_MM~GET_ITEMS( ).*_    
    append l_item_akt to lt_preq_items[].
      ENDLOOP.
    Check with the above code for l_item_account .
    Thanks,
    Shailaja Ainala.

Maybe you are looking for

  • Getting syntax error while running ODI project

    Greetings, First time here with ODI. I'm using ODI version 10.1.3.5 and get the following error below on execution. I'm reading from a flat file to a mssql table. Not sure if this matters, but ODI is installed on one server running sql2005, while the

  • Will HP cover the cost of replacing my battery?

    I have a HP Pavilion dv4-2145dx Entertainment Notebook PC  and recently, when I turn it on, a black screen opens and reads (something to the effect of): "We have detected your battery needs to be replaced. Please go to **this website** for more info.

  • Posted Excise duty not appearing in MIRO

    Hello folks, We are capturing Excise invoice in MIGO and then as per the vendors excise invoice we change the ED in the captured excise invoice and then post it. We have noticed that in some cases the exise duty posted in J1IEX is not the same which

  • My phone is stuck on the boot

    my phone is stuck on the boot droid restarting itself when i try to turn it off it just restarts and sticks back on spinning red thing getting hot cant shut it off kept doing this until battery died

  • HT1752 How do I upgrade from OS X 10.6.8 to mountain lion

    How do I upgrade from OS X 10.6.8 to mountain lion also need update for iphoto6