Substitution:: BSEG-HKONT

Hi Norman,
Based on your posting i have checked the Table GB01 and identified that for BSEG and field HKONT the BEXCLUDE='X'. So
I have written a small ABAP program to remove the 'X'.
Code:
Tables: GB01.
GB01-BOOLCLASS = '009'.
GB01-CLASSTYPE = 'S'.
GB01-BCLTAB = 'BSEG'.
GB01-BCLFIELD = 'HKONT'.
GB01-BEXCLUDE = ' '.
Modify GB01.
Later when checked the record in GB01 the BEXCLUDE field was ' '.
I then went into Object ZGGBS000 and under the "GET_EXIT_TITLES" created the entry
EXITS-NAME = 'U9012'.
EXITS-PARAM = C_EXIT_PARAM_CLASS.
EXITS-TITLE = 'Replace GL Account (5th & 6th Char to 01)'.
APPEND EXITS.
In the FORM
FORM U9012 USING BOOL_DATA type gb002_009 changing b_result.
(At this point i receive the error "gb002_009 is unknown").
I looked in the declaration
type-pools: GB002. and i could not see any Type definitons for Boolean classes '009' init.
As this is an Standard SAP Object how does the gb002_009 entry be made into this.
Would be great if you could let me know the steps on this.
Code:
DATA: I_BSEG like BSEG.
CLEAR I_BSEG.
I_BSEG = BOOL_DATA-BSEG.
I_BSEG-HKONT+4(2) = '01'.
Please correct me if i am wrong.
Thank you,
- Sravan

Could not find the code, but these seems to work...
FORM U999 USING BOOL_DATA TYPE GB002_015.
  DATA: LS_BSEG   LIKE BSEG.
  LOOP AT BOOL_DATA-BSEG INTO LS_BSEG.
  LS_BSEG-HKONT+4(2) = '01'.
  ENDLOOP.
ENDFORM.
However, I agree with Rob.  Changing GL numbers seems very dangerous.  Can't this be accomplished with configuration?  Why do you need to re-map GL numbers during a financial transaction?

Similar Messages

  • IDOC Error:Two accounts were transferred but not BSEG-HKONT

    Hi experts
    I got a porblem while posting IDOCs using FB01.
    Error: <b>Two accounts were transferred but not BSEG-HKONT</b>
    On diagnosis i found the reason stated for that error msg is :<i>This error also occurs if more than 1000 line items are transferred. In this case, the transferred data must be distributed across several documents.
    </i>
    But i m unable to understand that, in my idoc it has only 20-50 line items(Segments).
    Moreover if i try to process this idoc from SAP Inbox, it doesnt process and all the idocs that i try to process after this leads to the same error .
    Sometimes i get the error:<i>More than two accounts were transferred</i> which also means the more lineitems transfered.
    Can anyone plz explain me this.
    Whats the solution for the same.
    Each answers will be rewarded for sure.
    Regards
    DhanyaR Nair

    check the accounts parameters of idoc. may be the particular account type fucnctional configuration is mismatch with posting data

  • Substitution BSEG Filed

    Hi,
    I am working on 4.6C system.
    We have an issue with substitution created for FI document. We are trying to substitute the field 'Insurance Indicator' (BSEG-VRSKZ) via some logic.
    The issue is that the substitution works well when we create a customer invoice via FB70 or FB01 (Direct Posting), however it does not work when we are creating the FI document indirectly- via SD while creating billing document.
    We put the breakpoint in both the cases and found that BSEG-VRSKZ is populated correctly when the program leaves the substitution rule. So just want to know if there are any other places where BSEG fields could have been changed in case of indirect posting ? Any other clues ?
    Regards,
    Vin

    There are sevral user exits for the billing document creation. Take a look at SDVFX004. It may do the trick.
    I have also included all the other exits below;
    pls assign points if helpful as a way to say thanks.
    SDVFX001
    SDVFX002
    SDVFX003
    SDVFX004
    SDVFX005
    SDVFX006
    SDVFX007
    SDVFX008
    SDVFX009
    SDVFX010
    SDVFX011
    V05I0001
    V05N0001
    V60A0001
    V60P0001
    V61A0001

  • Substitution BSEG-ZBD1T

    Hi Experts!,
    I need to change te field BSEG-ZBD1T with a FI substitution or a user-exit. I change the value BEXCLUDE of the table GB01 but I can`t change the field in my substitution yet.
    Any idea??
    Thanks

    Hi,
    Did you already run program RGUGBR00 to regenerate the substitution?  If not, refer to [Note 842318|https://service.sap.com/sap/support/notes/842318] which includes the following instructions: "...make sure that the generated source code is up to date. You can use the report RGUGBR00 to do this.  Call this report in transaction SE38... enter the application area, for example FI, and the application callup point... and set all indicators except for 'Generate substitution routine in all clients' and 'Generate trace program calls'. Then execute the report."  The callup points can be found in table GB31 (for VALUSER = 'FI').
    If you have already generated with RGUGBR00 and still have a problem, then further research (and possibly a customer message to SAP) might be needed.
    Cheers,
    Jamie

  • Substitution of account(HKONT) when posting in MIGO/MIRO

    Issue: Need to change account(HKONT) when posting in MIGO/MIRO
    example:       HKONT(GL Account)       KTOSL(Transaction type)
                   1000000001              XX1
                   1000000002              XX2
                   1000000003              XX3
    If XX3 exist then replace hkont of XX1 to hkont of XX2
    expected result is:
                   1000000002              XX1
                   1000000002              XX2
                   1000000003              XX3
    Solution with problems:
    1. Used substitution GGB1>Financial Account>line item for field HKONT. My problem with this is, since the data is in line item. How can I get the replacement of my account(shown above sample). if BSEG structure only shows 1 line item. I tried using bool_data-bseg. but its empty. Im assuming bool_data is used when callup 003(complete document) is triggered.
    I used subtitution field G/L - Exit <UXXX>
    Any Ideas or solutions would be great!!

    if your Substituion exit is called then you can directly change the value of
    BSEG-HKONT there according to your requirement.

  • 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

  • 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

  • Substitution for MIRO Business Area for tax line items

    Hi All,
    Our business requirement is updation of BA in tax line items during MIRO transaction. To fulfill this requirement i have written a substitution with user exit. Business user enters BA in bktxt . In user exit iam passing bktxt field to bseg-gsber. But BA is not updating in tax line items. Here iam giving the code which i have written in my user exit. Pls guide me what to do aprt from this.
      IF bkpf-bktxt IS NOT INITIAL.
        t_gsber = bkpf-bktxt.
      ENDIF.
      IF bseg-hkont EQ '0000098511' OR bseg-hkont EQ '0000098521' OR bseg-hkont EQ '0000098583'.
        cobl-gsber = t_gsber.
      ENDIF.
      IF bseg-hkont EQ '0000098511' OR bseg-hkont EQ '0000098521' OR bseg-hkont EQ '0000098583'.
        bseg-gsber = t_gsber.
      ENDIF.

    update like below:-
    UPDATE dbtab FROM TABLE itab. or
    UPDATE (dbtabname) FROM TABLE itab.

  • 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

  • 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

  • OBBH - Substitution Routine

    Hi All,
    We have taken a substitution routine RGGBS000 access key and included one routine for BSEG-HKONT (house bank value change) it was working in the production since 1 yr.
    Now i got a requirement to change the values for withholding tax base amount and withholding tax exempted amount both these are from BSEG only.
    What is your suggestion in the above case.
    Should i modify the same routine which was done for housebank or should i go for another routine. i already tried to put code in the existed routine for housebank....but surprisingly, what ever the values i have put in the code was getting refreshed when it comes to screen.
    I was wondering... the same routine(place) is working for housebank but not my withhold tax base/exempted amounts.
    Now the Problem is i never gone through the total process for creating/modifying substitution routines.
    Please suggest me a solution regarding my problem and if posible give me the posible steps that i have to proceed with the system. I dont any thing about this substitution routines Funda, the routine for housebank was done by somebody who has quit the Org.
    Please... suggest me.
    Thanks,
    Bye

    Dear Deva,
    I have taken RGGBS000 acceskey and there is no probs to coding in this RGGBS000(its my client preferance).
    BSEG Structure is avalible and one routine is changing one of its field(housebank) also. i had put my code in the same routine but.... my values is getting refreshing, i mean it was not comming to the screen.
    I guess there might be some procedure after changing the existed substitution routine prg..
    Thanks,
    Diwakar

  • Business Area Substitution in OBBH

    Hi Experts,
    I am trying to substitute business area in accounting document generated during post goods issue in VL01N or VL02N.
    Our business requirement is as follows:
    Profit center (eg. PRCTR1)is assigned in material master. But while creating sales order another profit center (eg. PRCTR2)has to get picked up through 0KEM (Profit center substitution). System is taking correctly the second profit center (eg. PRCTR2) which we have given in susbtitution.
    System is identifying the cost center which is assigned to PRCTR2 through OKB9. Accordingly system is picking business area say 01 from the cost center master record during PGI for accounting document.
    But our requirement is to change this business area 01 to 02 through FI substitution.
    we have written logic in OBBH as follows:
    BKPF-BUKRS = '100' AND BKPF-BLART = 'WL' AND
    BSEG-HKONT = '1954' OR BSEG-HKONT = '5751' AND
    BSEG-WERKS = '100'
    Please adivse the logic anything further to add  to replace the business area and also suggest if the substitution does not work in FI area for other application area tcodes like VL01N / VL02N.
    Thanks in advance.
    Venkat

    Substitution to business area is one of taboos SAP clearly dissuades from in OSS notes.
    Business area is controlled by below customizings, and any more requirement should not be addressed.
    IMG: Enterprise Structure > Assignment > Logistics - General > Assign Business Area to Plant/Valuation Area and Division (OMJ7)
    IMG: Enterprise Structure > Assignment > Sales and Distribution > Business Area Account Assignment > Assign Business Area by Sales Area (OVF1, OVF2)
    The relationship between cost center and business area is 1 by 1. I guess you need to have separate profit center/cost center for the different business area.
    I know it can be done. GB01 right? We did that in the past. To be precise, one guy did that. That guy later realized he messed up the standard functionality F.5E.
    Edited by: Masahiko Kouso on Jun 17, 2010 11:18 PM

  • To include BSEG-MATNR in FI substituiton field.

    Dear Expert,
    I need to substitute BSEG-MATNR with a constant value from prerequisite (BKPF-TCODE and BSEG-HKONT) but there is no BSEG-MATNR in substitution field (Class 009). Help required. TQ

    Hi
    1. Go to SE16N
    2. Enter Table name = GB01
    3. In the space where you enter T code, enter "&SAP_EDIT" and press enter
    4. Enter BCL TAB (Table) = BSEG and BCLFIELD (Field) = MATNR and execute
    5. Remove X that you see in the next screen
    6. Save
    7. Select the entry and click on menu Table Entry > Transport
    8. Run Program RGUGBR00, select all check boxes
    Now you can use this field BSEG-MATNR in substitution...
    Regards
    Ajay M

  • Business place and section code substitution

    Hi,
    We have defined each product line as division and this is defined  SAP  as business area. 
    example 
    Business area
    1010 -  A Karnataka ,
    1020  - A  Delhi,
    1030  - A  Chennai 
    1040  - B Karnataka
    1050 -  B Delhi
    1060  - B Chennai
    Also defined Business Place and section codes as (both are same)
    KA01 - Karnataka
    DE01  - Delhi
    CH01 - Chennai
    So we have multiple business place.
    Can I substitute business place/section code based on the business area.
    example for Co code XXXX, and accont type = K, and business area = 1010,  then substitute business place / section code as KA01 and so. 
    I have heard that we can subsitute only when there is a single bus. place to be defaulted... let me know if we can do it with the multiple business place as well.
    i guess we can maintain a custom table   having business area and business place/section code... and default the relvant business place/ section code based on business area through an EXIT.
    pls advice
    rgds, GS

    Hi Takashi-san,
    I would like to ask for your reference in regards to the issue I got from my current project.
    I activate the business place function for country Vietnam
    Then, create 2 business places (XX01 and XX02).
    Then, do the mapping for sales office and plant
    XX02 = XXP2 (sales office - we define 1 sales office only)
    XX02 = XXF2 (plant - we define 1 plant only)
    Then, for sales/billing posting, the business place XX02 is updated accordingly following the sales office
    But at the MIRO transaction, the business place XX02 doesn't populate/derive from the mapping table above.
    I was trying to use the substitution function to update with below information but unluckily that BUPLA(Business Place) filed is not substituted
    Substitution: Local susbtitution for business place
    Prerequisites:
    If BKPF-BLART = 'RE' AND BSEG-HKONT = 'XXXXXXXXXX' AND BSEG-BUPLA = ' '
    THEN FILL BSEG-BUPLA = 'XX02' AT LINE ITEM WHERE BSEG-HKONT = 'XXXXXXXXXX'
    Can it be possible to use the user exit here?
    Thanks,
    Hai

  • Create Substitution Profit Center when MIRO (invoice)

    Dear all
    How to create substitution profit center and this the requiredment:
    When i create invoice MIRO there is tax account 11701105 and i want to substitute profit center in that account,
    i have create substitution like this, in GGB1 ,>financial accounting> line item >step 1>SYST-TCODE = 'MIRO' AND BSEG-HKONT = '11701105' AND BSEG-WERKS = '1000
    why this not worked, did i miss other config?
    please help
    Best Regards
    adit

    Hi Aditya
    thats true.. MIRO line items do not always have PLANT... You can refer the following notes for this
    0000032654 High level automatic account assignment
    0000105024 Automatic a/c assignment (OKB9) does not work
    0000409520 Goods/invoice receipt: Default account assignment ignored
    If your idea is to populate a Profit center based on Plant, then you would need to use a FI Substitution with user exit RGGBS000 and write your code to fetch the WERKS from preceeding MM document and populate WERKS as well as PRCTR based on it...
    But, before you do this, let me ask you a question.. Are you not using Document splitting in New GL? If you use it, PRCTR gets populated always in all the line items..
    Regards
    Ajay M

Maybe you are looking for

  • N91 WLAN Connection Issue

    Sorry if this has already been answered but I can't find the answer. I've got an N91 and I'm trying to connect to my private Wireless Router. I've got a 128 bit WEP key but when I try to type it into the phone, I'm only allowed to enter 13 characters

  • Best compression for broadcast video

    Hi I need to compress a very short piece for broadcast (5 sec, no audio). What is the best compression to keep it around 25Mb?

  • Safari for windows dll problems

    I have been using Safari for Windows 7 and it has worked very well up until today.  When I tried to open Safari, I get an error message that reads 'The prcedure entry point sqlite_wal_checkpoint could not be located in the dynamic link library SQLite

  • How do I share screen in Mavericks

    Screen sharing does not seem to work the same way in Mavericks.  When I go to Preferences -> Sharing, and try to tick "Screen Sharing", I get the message "Screen Sharing is currentlyu being controlled by the Remote Management service".  I cannot find

  • Updating to iOS 5 and getting iCloud

    I have an iPod touch 2nd generation. How do I update to iOS 5? ICloud doesn't even show up in settings.