Account Substitution in FB60

Hi All,
I have a requirement in which I need to substituted the intercompany GL accounts proposed by the system with vendor/customer accounts when a user enters an intercompany vendor invoice via FB60.
I have tried substitution at call point 2( line item level ) and 3( entire document ) but it has not worked. The problem I am facing is that substitution is called at a point where I no longer have the  visibility to header and different intercompany item level information as it is posted in FB60. what I have visibility to are several FI documents that would be posted in SAP <b>per company code</b> ( that too one document at a time) when the user hit the save button.
In order to meet my requirement I need visibility to item and header level of FB60 at the same time so that correct customer/vendor accounts can be substituted.
Has anyone faced such a situation before? Is substitution the right way to go in this situation or would any user exit/BAdI help ? Any help would be greatly appreciated.
Thanks,
Divya

Hi Divya ,
u can do anything either at header level modification or at item level modification using following code in Substitution User Exit either with call point 2 or call point 3.
hope this may be useful
field-symbols: <fs1> type any.
field-symbols: <fs2> type any.
data: begin of i_BSEG occurs 7.
        include structure BSEG.
data: end of i_BSEG.
data : begin of i_BKPF occurs 2.
        include structure BKPF.
data : end of i_BKPF.
        assign ('(SAPMF05A)XBSEG[]') to <fs1>.
        i_BSEG[] = <fs1>.
        assign ('(SAPMF05A)XBKPF[]') to <fs2>.     
        i_BKPF[] = <fs2>.     
***********Now Start your Read/Modification using Loop on i_BSEG and i_BKPF
loop at I_bkpf.
   header_comp = i_bkpf-bukrs
Endloop.
loop at i_BSEG
where bschl = '50'.
i_bseg-bschl = '31'.
concatenate 'ICV' header_comp into bseg-hkont .
modify i_BSEG
endloop.
****************End of you Logic
   <fs1> = i_BSEG[].
   assign <fs1> to  ('(SAPMF05A)XBSEG[]') .
  <fs2> = i_BKPF[].
  assign <fs2> to  ('(SAPMF05A)XBKPF[]') .
Regards
Ajay

Similar Messages

  • Substitution for FB60

    Hi.
    I want to put the Substitution for FB60.
    We have fi,co and hr modules.
    our requirement is 'automatic picking of the COST CENTER when EMPLOYEE CODE is input while booking the vocher in fi through FB60.
    I know that it shouls do through OBBH t.code. Can anybody please let me know how i can do that?
    It's really very urgent and i would be really thankful to you.
    Your help will be really appreciate.
    Thanks,
    Eswar

    Have you checked note 842318?
    also check this thread, which i've posted some time back
    Re: Exit in f-26 or f-28

  • GL account substitution

    Can GL account be substituted at line item level, using T-code GGB1.
    I mean the boolean statement doesnt gives the option to select GL account for substitution at 'Line item level', and even if we have added a user exit it is not working for us.
    Any pointers would be helpful.
    Best regards,

    Hi,
    The field BSEG-HKONT is a critical field and therefore is not released
    for substituting in GB01 as it could cause serious inconsistencies
    because other applications use it and you will produce database differences with
    this substitution.
    Please refer to the note 42615 which explains this.
    If you must change the flag for BEXCLUDE in table GB01 for BSEG-HKONT
    then this would be considered a modification to the SAP standard
    and is not supported, any problems resulting in this would require
    remote consulting assistance which is a chargeable service.
    Regards
    Ravinagh Boni
    Rewards me if it useful

  • G/L account substitution with invoice reverse

    Hello Gurus,
    We have posted an invoice which is replacing G/L account value with the help of substitution ( substitution name = 'FPD_FNL') in MR8M tcode in which we have used the user exit 'U408' with some fixed value say 'X' but when we are doing the reverse invoice in that case its not showing sustituted G/L account value.
    Can anyone help are we need to use the different user exit for reversing the invoice apart from 'U408'?
    In the code, user exit is triggering for invoice reverse but for that particular document type EBELN is coming blank and hence it wont enter in our code.
    BR
    Sumeet

    Hi,
    I doubt if above note can be used.
    Please see below description from the note i.e the fields which can be used for the substitutio.
    You can carry out a substitution for some fields. If invalid values are
    substituted in this case, you may receive the wrong function o
    r error messages in standard programs. However, these errors are not
    particularly critical. You can currently release the following fi
    elds for substitution:
    BSEG-FIPOS, BSEG-HBKID, BSEG-MSCHL, BSEG-MANSP, BSEG-MADAT, BSEG-MANST,
    BSEG-MABER, BSEG-RSTGR, BSEG-ZLSPR
    But we want to substitute HKONT ( G/L account ) for the same.
    BR
    Sumeet

  • Accounting substitution during MIRO

    Hello Experts,
    I need to define substitution during MIRO
    Process is :
    When material is received from foreign vendor, exchange rate used is as on the date of mat receipt. But the requirement is to valuate the inventory
    with exchange rate prevailing on invoice date (ex rate declaration date)
    Currently, system takes difference between invoice date's ex rate and mat receipt date's ex rate to exchange gain/loss.
    During MIRO such exchange gain/ loss is posted to, say, account 611400 account
    I need to define substitution rule wherein system posts such gain/loss to different GL account,say, 520430. So that exchange gain/loss on only such transaction is readily available for reporting requirement.
    How such substitution rule can be defined.
    Thanks in advance.
    Regards      

    Hi
    Please, see these notes
    SAP Note 116250 - MR08/MR8M:Cancellation+exchange rate diffrnces(KDM)
    SAP Note 165635 - Documentation: Enhancement LMR1M001 (MM-IV)
    SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment
    I hope this helps you
    Regards
    Eduardo

  • Need Urgent help in Substitution in FB60.

    I have a peculiar recuirement. In the Vendor Invoide Creation transaction (FB60), if you try to create a Invoice/Credit memo for a "One Time Vendor", a pop up window comes asking Bank and Address data.
    The user need to enter the bank key and acc no and need to substitute the name, address fields in this pop up window screen, with some data fetched from custom DB tables according to the bank keys.
    Since the pop up screen fields are from structure BSEC, I cant really do the substitution them from OBBH (Since it only allows BSEG & BKPF fields to be substituted !! ).
    Also since the Only user exit (ZXCPDU01) avaliable in FB60 does not have any Export table, I can send the values back to the screen.
    After getting help from one SDN member , I tried to add some fields in the GB01 table, but that approach is also giving runtime exceptions.
    <b>
    Can any one of you by any luck have a feasible solution for this ?</b>

    Hi Gert,
    The requirement is "Fetching the Address (if exists) from the BankKey and Bank A/c, and replacing the wrong/different address (if any user enters).
    Any views ?

  • Order settlement - Account substitution

    Hi SAP community,
    We need to create an substitution rule for the account number at the moment of the order settlement.
    We have some maintenance orders and service orders that we need to do the account reclassification when we do the settlement to cost centers. Is it possible? How can I do it?
    Thanks,
    Daniel.

    dear friend,
    please look here:
    http://help.sap.com/saphelp_47x200/helpdata/EN/66/bc7ff843c211d182b30000e829fbfe/frameset.htm
    regards,

  • Account assignment template (FB60) Line item Value date

    Hi Gurus,
    I have an issue regarding the value date on line item level on Account assignment template on FB60. When user activates an Account Assignment template, on each line item system populates the value date equal to the date of the template creation date and not the current date. I created the template with several GL accounts and before saving it I deleted the value date from the line items. Now I want to reuse the same template after a week, it shows the correct GL accounts but with the value date equl to the template creation date (last week date). Any suggestion please, how can I fix this.
    Regards,
    Ahmad

    In the IMG "Enter Global parameters" for your Company code change the status of the switch "Define Default value date" and then test.
    Thanks
    Ron

  • Financial accounting substitution

    Dear all:
    I have a requirement to replace assignment field / item text for all items in the FI document from the item line 1, which like:
    Before Save:
    Item 1 Assignment = "11"
    Item 2 Assignment = "22"
    Item 3 Assignment = "33"
    After Save:
    Item 1 Assignment = "11"
    Item 2 Assignmnet = "11"
    Item 3 Assignmnet = "11"
    I create an exit for the subsitution exit:
    Callup point 3, Complete document
    Field: Only exit
    During debug, I confirmed the data is replace correctly.
    But at the end the changes is not save.
    Item 2 = "22" and Item 3 = "33".

    I am using Substitution and it seem not working.
    Is there any other user exit I can use to modify the data before save?
    We are using FB01 and FB02 to enter and change the document.  The major problem is when user change the assignment and/or item text in line 1, they want the changes apply to all other items in the FI document.
    Also, if user manually change the assignment / item text in line 2 or so, they want the system replace them by line 1 as well.
    Thanks.

  • Vendor Account in FB60

    Hi,
    My client is asking when they are watching GL line items display the vendor account field is blank for document type KR.
    And these KR invoices are posted in TCode FB60. But I saw that there is no field to put vendor account while entering the transaction.
    I checked field status group of GL, but did not find anything.
    Please tell me how to add vendor account field in FB60, so that user can put it and it will display in GL line item display.
    Best Regards,
    Tapan Patro

    Hi
    Check this
    Display Vendor Code in FBL3N GL Line Items
    Thank You,

  • Upload data from excel file to "Fast Data Entry" in FB60

    Hi,
    I have a requirement from users, they want to load data of G/L accounts items in FB60 using "Fast Data Entry" from an excel file.
    I did some research and found out that the framework to transfer clipboard data into an SAP table(http://www.synactive.com/examples/example0016.html) seems to be the suitable solution.
    However, I still cannot make it work.
    Do you have any suggestion for my case ? How can I load data from an excel file to the transaction FB60?
    Thanks in advance,
    Hung

    Dear Hung,
    You can upload data through LSMW (Batch Input).
    But you need to convert your excel sheet into CSV format or txt format.
    Please take help of your ABAP team if required.
    This will accommodate your requirement.
    Regards
    Saurabh

  • Screen BADI for MIRO/FB60 item level field addition

    Hi,
    I need to add 'Material Group" (MATKL) field in item level similar GL Account. Material group will appear like GL account column in FB60/ MIRO screen ( GL posting).
    I want to do without modification with help screen BADI.
    Anyone, can suggest which BADI's method / User Exit can allow to add 'MATKL' field screen?
    regards,
    Rahul Mandale

    Dear Rahul,
    Please check IMG path :
    Material management>Logistic Invoice verification>incoming invoice-->Maintain item list variant.
    Or use Tcode SHD0, enter transaction Code MIRO and create  a screen variant.
    You can create your own screen variant , Untick the invisible check box for material group.
    Regards,
    w1n

  • Add line item to FB60 at SAVE

    Hi All,
               I have a very unique requirement where i have to create accounting document through FB60. Now when we create line items we will click click check box to calculate tax. We have maintained ztable for tax calculation. Lets say i have 100 USD at header and created line item 10 and 20 with amount as 60 and 40. But after tax calculation it becomes 65 and 40. Here i cannot post the document. So when i hit enter it should create n new line item to balance by -10 so that i can save the document.
       Can you please let me know how to proceed if anyone has worked on such scenario ever. I tried lloking for exits and BADIs but they does not seems helping me.

    Hi,
    have a look at badi AC_DOCUMENT.
    Best regards.

  • Material ledger activity rate revaluation account determination modification

    Scenario:
    SAP ECC 617
    Material ledger activated with activity rate revaluation (i.e. cost center over/under absorption posts to ML and not to production orders)
    Standard SAP setup has PRV transaction key used to post both multi-level price differences to inventory and to capture the offset to the cost center clearing entries (GBB-AUI) causing the values to get comingled in the same account
    Question:
    For reporting purposes I would like to determine a unique account for the activity rate revaluation entries.  There is no relevant general modifier available for transaction key PRV. Is it possible and practical to modify table T169A for a specific value string / field name combination that represents this material ledger transaction?  If so, what is the combination?  Or will this cause major issues with ML processing?
    I'm trying to find a creative way to fill this gap without account substitution.

    Hi Eric,
    This is an interesting one.
    Modifying value string might be an option but in my opinion is quite a serious "brain surgery" on the system :-).
    You may want to try another option.
    In SPRO -> Controlling -> General Controlling -> Organization -> Maintain Versions
    for version 0, Controlling Area Settings, Settings for Each Fiscal Year in tab Price Calculation there is field Revaluation.
    One of the options there is 'Own business transaction'. With this option posting to sending Cost Centre resulting from actual activity price revaluation will be posted with different Business Transaction (although same secondary cost element as original activity allocation).
    In reports you can separate postings based on Business transaction.
    It definitely works for Activity Update 1 (revaluation of production orders).
    I'm not sure if it works for Activity Udate 2 (no revaluation of production orders).
    Please let us know the results of your investigation.
    Regards,
    Szymon

  • Screen BADI at Item Level in FB60

    Hi,
    I need to add 'Material Group" (MATKL) field in item level similar GL Account. Material group will appear like GL account column in FB60 screen.
    I want to do without modification  with help screen BADI.
    Anyone, can suggest which BADI's method can allow to add 'MATKL' field screen?
    regards,
    Rahul Mandale

    Martin,
    We have following requirement,
    Material group should be visible for Non PO invocie screen where  MM user can select/input "material group". Once materila group is selected, with user exit GL account filed will be filled based on relationship maintained in custom table.
    Is it possible any way to add "MATKL' field in item level screen without modification?
    Your suggestion is highly appreciated.
    Regards,
    Rahul Mandale

Maybe you are looking for

  • Loading Data

    I am storing data from JTables in a two dimensional Object array. In order to load the data from a file into the table I have to clear/delete all data from what was previously in the Object array. Is there any better of way of deleting the data in th

  • How do I delete songs from my iCloud account when they don't exist in iTunes?

    I have several songs that showup on my iPhone 4s with the cloud icon and downward pointing arrow. 1. I've just deleted all songs on my iPhone4s 2. Only songs with the iCloud icon showup 3. The songs on my iPhone4S that showup with the iCloud icon don

  • Problem getting list of filenames

    Hi all, I have a problem with a servlet: I am trying to get a String array of all the filenames in a directory using list(). Is this possible in a servlet? I am using tomcat 5.0. this is my code so far: ServletContext context = getServletContext(); U

  • Is there a way to make the letter i change to a capital letter

    Is it possible to automatically change the letter i to a capitol when followed by a spce. At least the option to do it would be nice!

  • I accidentally deleted launch pad icon, how can I reinstall it?

    I accidentally deleted the launch pad icon from the bottom menu bar when I downloaded a game. How can I put it back in?