ME51N change account assignement in limit for services (4.6C)

Hello ,
it seems that in  a purchasing requisition for services (postype = P) if the user changes
the material group at item(line level) the system does not determine again the right account
ESKN-SAKTO derived from T030, so the user should change it manually.
Is it possible to make a replacement with the right account direct from abap,
(for example using EXIT_SAPLMEREQ_005/06) or there is a better solution with BADI  or else ?
In EXIT_SAPLMEREQ_005/06 we was only able to generate a warning message.
Regards,
Riccardo.

Hi,
Please check this code..It worked for me..Instead of 00001 try giving 00010
PARAMETERS: p_ebeln TYPE ebeln OBLIGATORY.
PARAMETERS: p_text(50) OBLIGATORY.
PARAMETERS: p_textid TYPE bapimepotext-text_id OBLIGATORY.
DATA:
        lt_poitem         LIKE bapimepoitem OCCURS 0 WITH HEADER LINE,
        lt_poitemx        LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE,
        lt_return         LIKE bapiret2      OCCURS 0 WITH HEADER LINE,
        lt_bapi_itemtext  LIKE bapimepotext OCCURS 0 WITH HEADER LINE.
<b>lt_poitem-po_item = '00010'.</b>
APPEND lt_poitem.
<b>lt_poitem-po_item = '00010'.</b>
APPEND lt_poitem.
lt_bapi_itemtext-po_number = p_ebeln.
<b>lt_bapi_itemtext-po_item   = '00010'.</b>
lt_bapi_itemtext-text_id   = p_textid.
lt_bapi_itemtext-text_line = p_text.
APPEND lt_bapi_itemtext.
call the BAPI.
CALL FUNCTION 'BAPI_PO_CHANGE'
     EXPORTING
          purchaseorder = p_ebeln
     TABLES
          return        = lt_return
          poitem        = lt_poitem
          poitemx       = lt_poitemx
          potextitem    = lt_bapi_itemtext.
LOOP AT lt_return WHERE type = 'A' OR type  = 'E'.
  EXIT.
ENDLOOP.
IF sy-subrc = 0.
  WRITE: / 'Error'.
ELSE.
  COMMIT WORK.
  WRITE: / 'Success'.
ENDIF.
Thanks,
Naren

Similar Messages

  • Problem with Unknown account assignment with limit order...reply soon...

    Hello All,
    i am facing problem in <b>confirming the limit order with unknown account</b> <b>assinment</b>.We are using Extended classic scenario with SRM version 5.00 and ECC 6.00. When creating shopping cart with unknown account assignments,  shopping carts is getting created fine but when processing goods receipt the system only prompts for distribution by cost center and we do not have the option to selected processing against other account assignment e.g. internal order or network. the Cost center is coming as gray.What i am expecting that as in known account assignment it asks for a drop down and user can select cost center or order the same should happened with unknown account assignment. we have not implemented any badi for the same.
    please help me out. <b><u>Is this a standard behavior of shop with limit order for unknown account assignment where it prompts for cost center only or do i need to implement any badi.</u></b>

    Hi
    <b>Related links/ SAP OSS Notes to check out -></b>
    Note 861889 - Limitations on limit and service PO's in case of ECS
    Note 1046593 - Limit PO - Unable to delete and create new item
    Note 966323 - Service Item: Not able to create PO in ERP backend
    Note 969077 - LIMIT:SC with Account Assignment Unknown and IR_IND checked
    Note 1000184 - Account assignment error when document transfer to back end
    Note 1052892 - Account Assignment not visible for Limit Shopping Cart
    Note 933618 - Multiple account assignments for limit item are lost
    Re: Limit PO(Item category D instead of B)
    SE 518 No account assignment exists for service li ne 0000000000
    Creating SC with Dummy Account Assignment
    Re: Account assignment on SRM
    Re: Problem on account assignment
    Re: Account details not coming while creating a Shopping Cart with Limit Item
    LIMIT SC
    <u>Other related details -></u>
    Use Screen variants (Transaction - SHD0) to change item overview and search result screens.
    BADI - There is one BADI to hide/show some SC item creation links, there is one BADI to control screen details of PO, CTR... but not SC (and not external screens).
    So, as usual, identify the template and change the HTML code in SE80.
    To implement a more complex logic, like the default check box, change the ABAP code (usually in the PBO), if required.
    Do let me know.
    Regards
    - Atul

  • Unloading point is not copied from PR -PO,when i change account assignment

    Hi All,
    unloading point is not copied from PR -PO,when i change account assignment from 'K' to 'F' in PO. unloading point field should be in display for both 'K' & 'F' Account assignment category in SPRO because we r using this field to acknowledge my thirty party planning system.
    Thanks in advance
    Vengal Rao

    Have a look at SAP note <a href="https://service.sap.com/sap/support/notes/734273">734273</a>

  • Unknown Account Assignment Not Defined for Use Here

    SAP Guruu2019s
    I am trying to convert a purchase requisition to a purchase order via MD03 and am getting a u201CUnknown Account Assignment Not Defined for Use Hereu201D.  I have checked and rechecked the MM and I do not see anything missing or unusual as far as I can see.  This shipment is for a new plant and distribution channel.
    Does anyone know what configuration step I have missed or need to change/update?
    Thank you.

    Thank you for responding VR.
    Where do I check the account assignment.  What TC?
    What am I looking for?
    My other plant ships fine buy having problems with this newly created one.
    Thank you.

  • SCE 8000 i can not assign unique counter for service

    Hi!
    1. Create new service http://clip2net.com/s/1jg2x
    2. Try to assign unique counter for service, but a field inactively http://clip2net.com/s/1jg45
    how it to fixed?

    Hi!
    I think you're running out of counter index for the subscriber usage counter, it's 0-31.
    Please uncheck the check box from other existing service and try that again?
    Thanks!
    Tomo

  • Change account assignment category for services with ME22N

    Dear guru ,
    i have created a purchase order for a position with item category D(service) and account assignment category K(cost centre). I have inserted for the accounting view the cost center.
    After the saving If I a try to change the purchase order position with ME22N the system donu2019t allow to change the account assignment category (F order instead of K).
    I have verified that for other positions with account assignment category K(cost centre) but for Item category blank(standard) the system allow to change the account assignment category if not exist goods receipt or invoice.
    Whatu2019s the problem about services ?
    Thanks

    Hi,
    Usually the Account assigned PO's are fixed with Account assignment, you cann't modify the account assignment once it is saved.
    It depends on the IMG settings for Account assignment category.
    Check the following IMG Settings
    SPROMMPurchasingAccount assignment-Maintain account assignment categories
    Here check for "K" --Costcentre in the detailed information if the checkbox at Acct assignment changable then only you can modify the Account assignment category modification in PO, otherwise not possible.
    rgds
    gsc

  • Change account assignment for posting key-urgent

    Dear expert,
    please advice, when running mb30, in accounting doc for material xxx we want to change account for posting key 91 with other account since the old one is blocked.How to change this account assignment then?
    Thank you

    Hi
    I am not sure whether MB30 Tcode exist. anyways, if you are sure of the Movement type with which your document is getting posted, then you can get the details of the Transaction in the OMWN. In OMWN please select the Movement type and you will see all the Tr Keys.
    Or you can get into OMWB and select Simulation. Give the material, plant and movemnet type and then select the account assignments you will have all the information.
    Regards
    Nambi

  • Unable to change account assignment field in PO

    Hi Experts!
    We are using SRM 7.0 with extended classic scenario.
    We are facing an issue with account assignment category field in a PO.Here is our scenario.
    User created a PO with costcenter account assignment field and this PO transffered to backend system i.e R/3.
    When the user again tried to edit the PO in SRM and change the account assignment field from costcenter to Internal order that is not possible because the
    account assignment field is grayed out .Then the user has to create a new PO with Internal order as the old PO didn't allowed him to change.
    Can any one help me in this regard with  some OSS note or any other possible solution and what might be the reason for the same?
    Thanks in advance!
    Regards,
    Kalyani.

    Hello Kalyani,
    Just to understand, Is your PO has Good Receipt or Invoice receipt processed? If so then PO do not allow to change the account assignment as charges are booked already.
    If not i would recommend to check if your BBP_GETSTATUS_2 job is running with proper interval? Sometime old PO's do not get refresh status if BBP_GETSTATUS_2 variant is set based on SAP recommendation (i.e. 7 days or so). In that case please execute manually BBP_GETSTATUS_2 and validate.
    Thank you
    Ritesh

  • Changing account assignment at invoice receipt (MIRO/MIR7)

    Hello gurus,
    I have got two questions concerning changing the account assignment of a PO item at invoice receipt.
    Example: We have a PO item with account assignment category K and non-valuated goods receipt. Now, after GR, we receive the invoice and want to post it using MIRO.
    During this process we notice that the correct account assignment category would have been A. In MIRO we can change all accounting information (apart from the account assignment category). So we delete the assigned G/L account and cost center and enter the correct asset master number in the asset column. Then we post the invoice.
    Result is that the invoice is posted to the asset, the vendor and the tax account. So, everything seems to be ok, except that the account assignment category in the invoice document is still K.
    Now, my questions:
    1. Is it allowed to change the accounting information as described, even if that means that the account assignment category is u201Cwrongu201D afterwards? I.e. is this a standard process?
    2. This works fine using MIRO, but when we try it to use MIR7, when posting the invoice there is a cryptic workflow error message (Message no. 00398) stating something like u201CPlaceholder for batch input error text, this message is not output. Please notify system administration u2013 Problem with S.u201C [sic!]
    Any ideas on this?
    Thanks in advance
    Alicia

    Hi Praveen,
    no, there is no error in MIR7. But the invoice is not posted and the workflow shows the error message given in my original posting.
    And the point is that I cannot change the K to A in MIRO or MIR7, but I can change G/L account, cost center, asset etc. So after I change it, I still have account assignment category K, but no G/L account and cost center given. Instead, there is only the asset number.
    This looks a bit funny to me and I wondered, if this could lead to any problems, because something like that would not be allowed in the PO.
    Cheers
    Alicia

  • Record assigned entry different for service requests and incidents

    Hi
    I've noticed something recently when using/implementing service manager that the record assignment formats are different depending on if you are assigning an incident or service request.
    For example when assigning an incident the record assignment shows the display names of the user being assigned (eg the incident is assigned to Joe Bloggs) however for a service request it shows as assigned to domain\jbloggs.
    Is there any reason for the difference between the 2 and can it be standardised as we use the work item action log to send assignment notifications to the affected users and while it's great for incidents it doesn't look good for service requests

    Unfortunately, this is just a text property and this different behaviour is hard-coded into SCSM and cannot be changed. Different people worked on the IR and SR forms and there are many inconsistencies. You could try raising a support case for it I suppose
    but I would not think it likely to be changed.
    Rob Ford scsmnz.net
    Cireson www.cireson.com
    For a free SCSM 2012 Notify Analyst app click
    here

  • Changing Account assignment reference after posting flows to accounting

    Hi All,
    Is there a way for me to change the account assignment reference after I posted some flows in the past for a interest rate financial instrument? 
    I need this because accounting wants to change the GL account posting for legal fees from one GL to another when a long term debt changes to a short term debt (less than a year away from maturity).  I was assuming that changing the account assignment reference in TPM28 would work.  Is this true?  I do not want to transfer any of the old postings but anything moving forward.
    Thanks
    Regards
    Morgan

    Hi Ravi/Mahesh/Lorenz
    The issue is I can do valuation class transfer for securities or loans (TPM15).  But I have my long term debt in the money market area (Interest rate instrument with product category 550).  I have assigned company code, transaction type, product type to determine the account assignment reference.  So I am not able to do a valuation class transfer I think.  Is there any other way?
    I tried to access TPM82 & TPM15M & it says 'Function not allowed'. We are on Ehp5.0.
    Am I missing something?
    Thanks
    Regards
    Morgan

  • Change account assignment and G/L account field

    Dear Experts,
    user creating purchase requisition with wrong account assignment and G/L account ,user requirement to change the account assignment and G/L account in the change mode,but system not allowing,user creation the line item again,so its consuming more time so please suggest me.
    Thanks in advance.
    Varun

    Hi,
    System has been designed for your business, so you have separate document type for account assigned PO where document type of PO link to Field Selection Key where you have control on  how the screen ,filed has to be appear in PO.
    Once PO has been created wrongly and to correct it, you need to follow my 1st answer , no need to go for any enhancement and if you do so by any mean, business will not allow you do so.
    Regards,
    Biju K

  • Adding new field in SC Account Assignment Screen (only for information)

    Hi guys,
    we have a requirement, to <b>show</b> additional fields within the account assignment screen. The contents should only be displayed as information for the user. It is not necessary, respectively not wanted to save this data within SRM or the Backend-System.
    2 questions:
    a) Is it necessary to expand the item-structure of the SC (INCL_EEW_PD_ITEM_CSF_SC) AND to expand the accounting structure (INCL_EEW_PD_ACC_CSF) for this fields?
    b) Is it sufficient, that the INCL_EEW*-structures of the PO-/billing-document etc. are <b>NOT</b> expanded with the additional fields to avoid the saving? In OSS-Note 458591 it is mentioned, that it is necessary to expand the CI-COBL-structure within the Backend-System.
    Thanks in advance with best regards.
    Bernd
    ps. We are using SRM 4.0.

    Hi
    <b>We have done this several times, in our past previous SRM implemenatations.</b>
    a) Yes. You need to expand the item structure at the Shopping cart level to display your Custom fields in the We bapage. As Per OSS Note - 672960, you can see the details. For display purpose, at least these custom fields must be created in the standard include structures [e.g., INCL_EEW_PD_ACC_CSF, etc ].
    b) Yes, no need to expand any other SAP Include structure, incase you don't want the field contents to be saved in backend system (incase of Purchase Order / Purchase Req).
    <u>Please see the follwoing links, which deal with the similar requirements, you have asked for in detail with code and other relevant details -></u>
    Re: Item Field Appearing In Account Assignment Field
    Re: Control Busniess Area Field in Account Assignment..
    Re: Add new account assignment field
    Re: Account assignment category not passed into Target Objects Badi
    Re: Add customer fields in Shopping cart and purchase order
    Re: Hiding CUF fields in SC Basic data
    displaying custom fields on shopping cart
    Custom Fields in Cost Assignment Tab
    How to add the custom field in SRM EBP shopping cart?
    Add customer fields in Shopping cart and purchase order
    Hope this will definitely help. Do let me know, incase you face any issues.
    Regards
    - Atul

  • Account Assignment Category empty for stock...

    Hi all,
    We are doing an upgrade to ecc 6.0 from 4.7, and in 4.7 we have the account assignment called stock that the id is the field empty (without any value).
    I've created the same field (empty for stock) in 6.0 and the problem is that I'm not hable to use it because it says that I have to fill the account assignment.
    Is this normal? Am I hable to use empty? How?

    Hi,
    For stock material keep account assignment catagory TAB empty.
    For more check the links for creating PO:
    http://ecdltrainingireland.com/olas/Files/erp-transaction-simulation/erp.htm
    http://e-mory.blogspot.com/2008/01/sap-me21n-create-purchase-order_30.html
    Regards,
    Biju K

  • Account Assignment Category MAT for refurbishment order

    Hi friends,
    At tcode OKO6 (customizing of Settlement cost elements), Allocation structures, Assignments, Settlement cost elements, Receiver cat. - Input help (F1)
    I need to find the object type 'MAT' for account assignment category that will be used by the refurbishment orders settlement profile (order type 30).
    The problem: the object type 'MAT' is not available at the input help list.
    The object type 'MAT' is in the table TBO01 and it is assigned to TBO01-OBART but it does not appear in the OKO6 input help list.
    Your suggestions will be welcome.
    Regards,
    Roberto

    Yes, you are right. It is necessary to create or modify a settlement profile and to do the assignments like Allocation structure and the Default object type (in my case it has to be 'MAT' for material) in tcode OKO7. It was customized without problem.
    But before to run tcode OKO7 we have to run tcode OKO6 and create the Allocation structure. It was done but we could not do the assignment to the object type MAT because the input help (F4) does not show this option. The help shows many options like ORD (order), CTR (cost center), FXA (asset), G/L (G/L account), etc., but the MAT option does not appear.
    How to make the object type MAT available in the Receiver cat. in Settlement cost elements in tcode OKO6???
    Regards,
    Roberto

Maybe you are looking for