Substitute G/L Account when posting Accounting Document

Hello Everyone,
I am an ABAP consultant.
I want to know if there is any way to substitute a G/L account which is already determined by the system.
When we post MIRO, when there is a price variance with GR, then a material price variance account will be determined and the variance gets posted to the material price variance account. Something like below.
Credit  Vendor Account
Debit   GR/IR  Clearing Account
Debit   Material Price Variance Account
I want to replace the Material Price Variance Account for certain scenario.
I tried with
1. BADI AC_DOCUMENT - But G/L account cannot be replaced with this
2. BTE - Able to change the G/L account, but it gives error "Internal error: Entry in COKA-Buffer not found". I found a SAP note for this. It seems G/L account and Fiscal year data gets transferred to COKA buffer and if there are any changes it does not allow to proceed.
I also found enhancement spots where i can make changes, but i want to know if this can be achieved in a standard way (Either Exits, BADI or FI Substitutions)
Regards
Rajvansh

Hi:
   Why don't you change your MM config , it would be better to have this defaulted by MM account determination. but if you still want to do this, then you can try MM exit that instead of changing the account, reduce the amount to zero in the "wrong" account, and insert a line with the "right" account.
Substitution GBB1 might not work here which can also induce MM/FI consistency issues. Hence find an MM exit and refer to the BADI's in note 1156325.
I hope it will help you.
Regards

Similar Messages

  • Seperate Document Row with same account  when post GL

    Hello everyone
    How I can seperate Document Row with same account  when post GL
    because If I post dcoument that  have many rows but same account and difference detail. It will sum amount for same account in JE
    and I found that will seperate if it has diference project code but it's not enough for me.
    How I can config SAP B1 to seperate Doc row when post to JE if it has difference detail (as userfield or standard filed)
    Sorry for my poor english
    Thank,Seang

    Hello Suthee,
    Sorry to tell you, it is not possible to do so in current B1 without addon development.
    There are 2 alternative.
    1.Consulting Workaround:
    Seperate the Item into 2 items, the account into 2 sub accounts.e.g.
    Item A => Item A01 and A02
    G/L Account 1001 => Sub Account 100101 and 100102
    2.AddOn development to seperate the JE just after it is created document
    You can update to JE to seperate just after JE are created by docuemnts.
    Just Listen FormDataAdd Event.
    Sample Code:
    Private Sub FormDataEventHandler( _
        ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
        ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
            'I just listen 133 - AR invoice here,
            'You may add the target documents
            'Before action = true, start the transation
            If BusinessObjectInfo.FormTypeEx = "133" _
                    And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
                    Or BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) _
                    And BusinessObjectInfo.BeforeAction = True Then
                oCompany.StartTransaction()
            End If
            'Before Action = false,
            'Update the JE in document
            'Succeed, commit, otherwise rollback
            If BusinessObjectInfo.FormTypeEx = "133" _
            And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
            Or BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) Then
                If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
                    Dim xmlDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument
                    xmlDoc.LoadXml(BusinessObjectInfo.ObjectKey)
                    Dim objectKey As String
                    objectKey = xmlDoc.SelectSingleNode("//DocEntry").InnerText
                    Dim oDocument As SAPbobsCOM.Documents = Nothing
                    oDocument = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
                    If oDocument.GetByKey(CInt(objectKey)) Then
                        Dim oJE As SAPbobsCOM.JournalEntries
                        oJE = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
                        If oJE.GetByKey(oDocument.TransNum) Then
                            '*Add you code to Update oJE lines here*
                            lRetCode = oJE.Update
                            If 0 <> lRetCode Then
                                oApp.MessageBox("Failed to update JE")
                                'roll back the whole transaction, including the document
                                oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
                                Exit Sub
                            Else
                                'Commit the transaction
                                oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
                            End If
                        End If
                    End If
                End If
            End If
        End Sub
    Hope it helps. Thanks.
    Kind Regards
    -Yatsea

  • C#: Sending email from a specific account when multiple accounts exist in Outlook?

    Somehow I accidentally deleted this message trying to edit it... sorry.
    Microsoft.Office.Interop.Outlook.Application outApp = null;
    outApp = Marshal.GetActiveObject("Outlook.Application") as Microsoft.Office.Interop.Outlook.Application;
    MailItem mailItem = (MailItem)outApp.CreateItem(OlItemType.olMailItem);
    mailItem.Subject = "Director Script Confirmation Request";
    mailItem.To = person;
    mailItem.Body = message;
    //mailItem.Display(false);
    mailItem.Send();
    How do I send email from a specific account when multiple accounts exist in Outlook?
    Below is the code that I have. I think I'm supposed to use the AddressEntry or AddressEntries to designate where emails are sent from. However, at the moment, I haven't found an example.
    SV

    Hello SV,
    The MailItem class provides the
    SendUsingAccount property which allows to set an Account object
    that represents the account under which the MailItem is
    to be sent. Here is what MSDN states:
    The SendUsingAccount property can be used to specify the account
    that should be used to send the MailItem when the Send method
    is called.
    Sub SendUsingAccount()
    Dim oAccount As Outlook.account
    For Each oAccount In Application.Session.Accounts
    If oAccount.AccountType = olPop3 Then
    Dim oMail As Outlook.MailItem
    Set oMail = Application.CreateItem(olMailItem)
    oMail.Subject = "Sent using POP3 Account"
    oMail.Recipients.Add ("[email protected]")
    oMail.Recipients.ResolveAll
    oMail.SendUsingAccount = oAccount
    oMail.Send
    End If
    Next
    End Sub

  • Exit or substitution GL account when posting goods issue

    Hi out there,
    does anyone know how to change BSEG-HKONT via a subsitution ? It seems to be blocked for that purpose. Although if I unblock it in table GB01 this does not work.
    If there is no possibility does anyone know a customer exit to change the account determination for GBB VBR when posting a goods issue ? It is needed for special postings and I want to program it either in a substituiton or exit.
    Thanks a lot for your help.
    Sebastian

    Dear Sebastian,
    It is possiable to change G/L through subsitution. But you will have to take help from abaper who will write code for the subsitution.
    Any subsitution which is realted to G/L can be written though the following path
    Financial Accounting (New)->>Financial Accounting Global Settings (New)->>Tools->>Validation/Substitution->>Substitution in Accounting Documents
    after that enter new line and double clik to write ABAP code based on your requirement.
    Hope you got the way.
    Rupesh

  • System ask GL Account when saving SO Document

    Hello,
    Am creating Sales Order (va01) with all the complete data..
    But when am saving the trnsaction..its prompting incomplete  ..GL Account need to be maintain...
    Did i missed out some configuration that trigger this error message when saving the SO?
    Edited by: she on Oct 8, 2009 12:05 PM

    Hi,
    Check the Transaction VKOA in which we will assign the  GL Accounts to the Accounting keys.
    I believe some GL account is missing for your accounting keys.
    thanks,
    santosh

  • Issue when posting parked document

    Hi Expert,
    when i want to post parked document, the system displayed: "Field COBL-PRODPER. does not exist in the screen SAPLKACB 0002".
    Field COBL-PRODPER. does not exist in the screen SAPLKACB 0002
    Message no. 00349
    Diagnosis
    The specified field does not exist on the screen.
    Procedure
    Check your batch input data.
    I am not sure what is this field, i thought i did not input this data in the parked document. The parked document was input using F-02. While using FB50, the same accounts, the same document, without this issue, the parked document can be posted succeed.
    what is the problem? thanks!

    Hi,
    Substitution is used. The document was parked using transaction FB01.
    If you park a document using transaction FB01, all substitutions run- in contrast to transaction FBV1, which is simply a parking transaction.  It is possible in this case to use substitution to fill fields that are not ready for input in the line item or that are not available.
    When you post the parked document, the posting is made using CALL TRANSACTION. The system collects all data from the parked document and reprocesses the data for CALL TRANSACTION. A batch input runs in the background. This transfers all field contents from the parked document to the relevant screen fields. If a field that does not exist on the screen is to be filled, the system issues error message 00349.  You cannot post the document.
    Check your substitutions. Make sure that you never substitute fields in the parking that are not ready for input.
    Rgds.

  • User exits when posting purchase document and goods movement (GR)

    I want to update some custom tables when posting PO and goods movement (GR) .
    Please suggest user exits for both posting.

    Check the below exists
    FOR PO
    LMEDR001            Enhancements to print program
    LMELA002            Adopt batch no. from shipping notification when posting a GR
    LMELA010            Inbound shipping notification: Transfer item data from IDOC
    LMEQR001            User exit for source determination
    LMEXF001            Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001            Customer-Specific Source Determination in Retail
    M06B0001            Role determination for purchase requisition release
    M06B0002            Changes to comm. structure for purchase requisition release
    M06B0003            Number range and document number
    M06B0004            Number range and document number
    M06B0005            Changes to comm. structure for overall release of requisn.
    M06E0004            Changes to communication structure for release purch. doc.
    M06E0005            Role determination for release of purchasing documents
    ME590001            Grouping of requsitions for PO split in ME59
    MEETA001            Define schedule line type (backlog, immed. req., preview)
    MEFLD004            Determine earliest delivery date f. check w. GR (only PO)
    MELAB001            Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1            Enhancement to Document Overview ME21N/ME51N
    MEVME001            WE default quantity calc. and over/ underdelivery tolerance
    MM06E001            User exits for EDI inbound and outbound purchasing documents
    MM06E003            Number range and document number
    MM06E004            Control import data screens in purchase order
    MM06E005            Customer fields in purchasing document
    MM06E007            Change document for requisitions upon conversion into PO
    MM06E008            Monitoring of contr. target value in case of release orders
    MM06E009            Relevant texts for "Texts exist" indicator
    MM06E010            Field selection for vendor address
    MMAL0001            ALE source list distribution: Outbound processing
    MMAL0002            ALE source list distribution: Inbound processing
    MMAL0003            ALE purcasing info record distribution: Outbound processing
    MMAL0004            ALE purchasing info record distribution: Inbound processing
    MMDA0001            Default delivery addresses
    MMFAB001            User exit for generation of release order
    MRFLB001            Control Items for Contract Release Order
    AMPL0001            User subscreen for additional data on AMPL
    For Goods Movement
    LMR1M001            User exits in Logistics Invoice Verification
    LMR1M002            Account grouping for GR/IR account maintenance
    LMR1M003            Number assignment in Logistics Invoice Verification
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting
    LMR1M006            Logistics Invoice Verification: Process XML Invoice
    MRMH0001            Logistics Invoice Verification: ERS procedure
    MRMH0002            Logistics Invoice Verification: EDI inbound
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP
    MRMN0001            Message output and creation: Logistics Invoice Verification

  • Validation when posting a document using T. Code FB50 or F-02

    Dear Experts
    Please let me know on how to validate when posting a Cross Company Transaction using T. Codes FB50 or F-02.  The requirement is to restrict Branches (each Branch is a Company Code in SAP) to post any Cross Company documents by selecting HO Company Code in Line Item, system has to stop the User by giving Error Message.
    We can't control this using User level Authorizations because, here the Authorization is provided to the Users to post the Transactions using T. Codes FB50 and F-02.
    To restrict this, I created a Validation as below:
    Prerequisite:
    BKPF-TCODE = 'FB50' OR BKPF-TCODE = 'F-02' AND
    BKPF-BUKRS = 'Br. Company Code' AND
    BSEG-BUKRS = 'HO Company Code'
    Check:
    FALSE
    Message:
    You Can't post Cross Company Transactions using T.Code FB50 or F-02
    And I activated the above Validation in OB28 for HO and Branch Company Codes.  But the Validation is not working properly.  Can anybody help me on how to proceed further in this regard please.

    Hi,
    I haven't tried to use a transaction code for Validation purpose. Instead, I have used document type as prerequisite and then check:
    BKPF-BUKRS = 'Br. Company Code' AND
    BSEG-BUKRS = 'HO Company Code'
    If the condition is met, it displays an error (per the message in validation) while completing the line item details on posting a document.
    Please let me know if that helps. If not, I can try to replicate your scenario and let you know if there is anything missing.
    Thanks,
    Ashish

  • If a device is removed from the Find my Iphone app on Icloud, does this mean that it is unlinked from that Icloud account when the account is removed from icloud in the settings of the iphone?

    Hi there!
    I have a question regarding Icloud and unlinking an Icloud account from a device such as an iphone. If the iphone device is removed from the Find my Iphone app in Icloud, does this mean that it is unlinked/removed from the account after the account is removed manually in the icloud settings of the phone? Or in the case of resetting the phone will it become icloud locked still? I hope this makes sense and thank you to anyone who answers!

    The following indicates that if you use iCloud to erase the device and then remove it from your account it would then be usable: The quote below is from If your iPhone, iPad, or iPod touch is lost or stolen
    If you remove the device from your account after you erase it, Activation Lock will be turned off. This allows another person to activate and use your device.

  • Validation of a reference field when posting accounting document using FB50

    Hi all,
    We hada requirement to restrict the users from entering japanese caharaceters in the reference field of a accounting document. The validation for this was done using the transaction OB28. when the user posts the accounting document using transaction FB01 or changes the accounting document using transaction FB02, the validation provided in OB28 does work(it throws an error restricting the user from entering japanese characters if he has done so). But whenthe user pots the accounting document using the transaction FB50, the same error message comes as information message although the coding is for giving an error message.
    This however does not happen when the user logs on in English. In English logon the error mesage does appear.
    When the user logs on in Japanese the message comes as an information message but at the same time does not allow posting of the document.
    Debugging this revealed that the OSS note 197329 has been applied to the standard SAP program SAPMF05A.
    Any pointers to how this can be rectifiied would be appreciated.
    Thanks in advance.

    I think it would be best if you opened an OSS message on this.
    Rob

  • Change GL account when posting using MIRO

    Hi all,
    Can i change the display only field for GL account to input field.
    I'm using ECC6 version.
    Please help.
    Thank you in advance
    regards

    Go to
    SPRO -> Materials Management -> Logistics Invoice Verification -> Activate Direct posting to GL accounts & Material accounts.
    Execute, select "New Entries" and put a tick mark if you want only the FI field editable. If you want FI and Mat. accounts editable then tick both.
    Thanks,
    Ashish

  • Unable to update XBLNR field on BKPF when posting a document using BAPI_ACC_GL_POSTING_POST

    Hi,
    I'm trying to post a clearing document using BAPI_ACC_GL_POSTING_POST, but after posting i'm unable to see the data in the reference field on header (BKPF-XBLNR). I'm passing the data in the header structure of the BAPI  (DOCUMENTHEADER-REF_DOC_NO).
    Thanks in advance.
    Regards,
    Sandeep

    We restricted our entry to five decimals and solved the issue.

  • Creation of transfer requirement when posting material document

    Hi
       I've copied standard movement 311 into 911 but i need another behaviour on this new mov. I use this mov in trx MB21 in order to create a reservation. When I post it in MIGO, I need to create a transfer requirement instead a Posting Change Notice. I think I could modify this on SPRO: Logistics Execution -> Warehouse Management -> Intefaces -> Stocks management -> Movement Classes
    but i don't know exactly what to do.
    Can anyone help me?
    Thanks and regards

    Hi,
    You can create TR for your mov.type 911 in the below mentioned settings.
    SPRO - LE - WM - Interfaces - Inven. Mgmt - Define Mov.types - LE-WM Interface to Inventory Management
    Set the indicator as X in the TR column & remove the tick in the posting change option.
    Hope its clear,
    Regards,

  • Incorrect SLED when posting Material Document using BAPI_GOODSMVT_CREATE

    Hi,
    I have an upload program that performs goods movement and creates material document for a given PO using BAPI_GOODSMVT_CREATE.
    the program passes the data from input file (through the parameter GOODSMVT_ITEM) including SLED, however, once the material document is posted, the SLED is still derived from batch input master and the BAPI does not use the one passed to it via GOODSMVT_ITEM.
    The requirement is that, the SLED provided in the input file should be the SLED of the Matdoc created, and not the SLED maintained in the Batch input master.
    Please advise.
    thanks,
    NC

    sorry to say that, but you should learn about the application, you cannot make the field empty, it is SAP design that the valuation type goes to the batch field in case of split valuation active wihtout having batch managment active.
    your wish is not possible with enhancements, and if , you would create inconsistencies and bigger problems in subsecuent processes.

  • Automatic Batch creation when posting 103 document

    hi all,
    i want a modification in the system. currently in our system, when 101 document is created in MIGO, system automatically creates a batch. But when 103 is done, batch has to be created manually in the system and in qa32 while doing quality usage decision, user has to assign batch to inspection lot. what i want that in 103 as well, batch autmatically creates like 101 and inspection lot is assigned to batch automatically. Is this possible? If yes then what configurations i have to do?
    Best Regards,
    AI.

    hi,
    There are two ways of creating a batch no. in MIGO
    1) Internal Number --Automatic
    2) External Number -Manual entry.
    Go to SPROLogistics General->Batch Management-> Batch Number Assignment>Activate Internal Batch Assignment
    Click the Internal Batch Number Assignment for Assigned Goods Receipt --Select the plant ,tick it and save it.
    Do the MIGO automatically Batch number will be created.
    G.Ganesh Kumar

Maybe you are looking for

  • How to pass argument to the Java Plugin JVM w/o using the Control Panel?

    I want to deploy an applet to be loaded by the Java Plug In and fix some settings of its Java Virtual Machine. The JPI Control Panel offers two ways to pass arguments to the JVM, none satisfactory. 1. while interactive via the Control Panel Window. T

  • Special characters in where clause

    HI, how can i suppress the meaning of special characters in a where clause? for example consider the following query select * from roster_data where landmark like 'Bhavani Mini Market (General Store ) Teacher's ' When i execute the above query i am g

  • How to make a crystal report in labwindows?

    i want to make a crystal report in labwindows ,do you know where i can get some example of crystal report? 

  • Where does the buck stop

    Instead of hearing "I am sorry you are experiencing problems" , why doesn't someone of authority talk up and say that they are having alot of trouble with the x1 system. Their own people do not know what is going on most of the time, such as a outage

  • How to Deinstall And Install OEM again

    hi Experts, Can somebody pls explain me how to deinstall and install OEM. ???? I can not view any options in OEM. it referes a incorret machine name.