Alternative to BSEG

HI Experts,
                I am making customer ledger report for FI module. I have used BSEG table to customer account details. As BSEG is big table so it takes lots of time to execute. Is there any alternative to BSEG table where I get the same data with fast processing.
urgent
Thanks
Khan

The  query is as Follow   if you don't want to use  BSEG.
REPORT  Zcustomer.
table :  BSID,BSAD
Parameter : ls_bukrs for  BSID-BUKRS .
Parameter : ls_keydt FOR  BSID-augdt.
  DATA  : lt_bsid      TYPE  TABLE OF _bsid ,
          ls_bsid      LIKE  LINE OF  lt_bsid,
SELECT * FROM bsid INTO CORRESPONDING FIELDS OF TABLE lt_bsid
        WHERE budat  LE ls_keydt
        AND   bukrs  =  ls_bukrs.
SELECT * FROM bsad INTO CORRESPONDING FIELDS OF TABLE lt_bsid
        WHERE budat LE ls_keydt
        AND   augdt GT ls_keydt
        AND   bukrs  =  ls_bukrs.
so now your  internal table "lt_bsid" consist of  both open & Closed  line item
if you want the same for Vendor   do the  same replace the table's  with BSIK,BSAK
if  for G/L
Then   BSIS,BSAS.
Reward points if it is  usefull ....
Girish

Similar Messages

  • Alternative of BSEG table(Vendors related)

    Hi gurus,
    Please provide alternative tables of BSEG.
    As per my Knowledge table are BSIK , BSAK.
    is it right?
    I need extact line item number(BUZEI) of document number(BELNR).
    Please send code how can i get the line number based on
    BSIK , BSAK.
    Thanks & Regards,
    Padmaja.

    Hi
    BSIK and BSAK are rights, so if you have the doc. number and item the code is
    DATA: WA_ITEM TYPE BSIK.
    Get open items
    SELECT * FROM BSIK INTO WA_ITEM
                                      WHERE BELNR = <BELNR>
                                            AND BUZEI  = <BUZEI>
    ENDSELECT.
    IF SY-SUBRC <> 0.
    It means the item is cleared
      SELECT * FROM BSAK INTO WA_ITEM
                                          WHERE BELNR = <BELNR>
                                                AND BUZEI  = <BUZEI>.
       ENDSELECT.
    But you should consider the performance will be very bad if you don't use the company code and vendor code, it's very strange you have only the doc. number and item number without knowing the company code.
    Max

  • Standard BAPI or Function Module for FB01posting

    Hi Experts,
    My requirement is as follows.
    Invoice details would be sent across from Middleware to SAP and for which I have developed a Custom Remote Enabled Function Module. The Function Module needs to post the data using FB01 Transaction.
    I had planned for recording a BDC for FB01 and post the data, however, we are on the verge of getting upgraded from 4.7 to ECC 6.0. To avoid problems that we might face for change of screens in ECC 6.0, I would prefer using a BAPI or Function Module for FB01 posting, if available, instead of BDC.
    Data coming from Middleware are as follows.
    HEADER:
    BKPF-BLDAT :  Document Date
    BKPF-BUDAT : Posting Date
    BKPF-XBLNR: Reference (Invoice#)
    BKPF-BLART : Document Type
    BKPF-BUKRS : Company Code
    BKPF-BKTXT : DocHeader Text
    BKPF-WAERS : Currency
    LINE ITEM:
    BSEG-LIFNR : Vendor no
    BSEG-WRBTR - Total amt -Debit/Credit -Vendor
    BSEG-ZUONR : Assignment field
    BSEG-EMPFB : Alternative Payee
    BSEG-UZAWE : Payment Method Supplement
    BSEG-ZTERM : Pmt terms
    BSEG-KOSTL : Costcenter
    BSEG-HKONT : GL AccountNumber
    BSEG-WRBTR : Amount for GL
    BSEG-SGTXT : Line item text
    The Vendor Line Item would be one where as GL line items could me more than one.
    Can any of you suggest me a standard BAPI or Func Mod?
    Points will be awarded for valuable inputs.
    Thanks to all!!!!

    You can use RFBIBL00 program for FB01 postings. Go through the program help on how to use this program.
    This program requires a file to be on application server in a certain format.
    You may also refer the program RFBIBLT0 on how the file format should be.
    Hope this helps.
    Thanks,
    SKJ

  • Alternate Chart of accounts

    Hi SAP Gurus,
    In  a productions environment, we have a requirement as follows:
    For the company code in Spain as per the new legal requirement, we need to change the alternate chart of accounts.
    The client has many company codes and use Group chart of accounts also.
    Is there any specific SAP patch available for this ?

    Hi Suresh,
    you mean the country chart of accounts assigned to the company code in field T001-KTOP2 (not to mix up with the operational CoA T001-KTOPL).
    If you are using a country CoA, field SKB1-ALKT alternative account number in the GL account master record is checked against that CoA. If you want to change it, you may have a current country CoA with plenty of GL accounts, assigned to your operational accounts.
    To change the country CoA is an easy task in transaction OBY6. (first you have to create the new CoA, specify at least 1 account group and a retained earnings account for the start).
    Then you have to create new accounts in your new CoA (FSP0 only, no FS00 or FSS0).
    Finally, and this is the main point, you have to change the current assignments. The issue is that if your have a country CoA assigned to the company code, a change of the alternative account is only possible if the account has no balance. To remove the current balance to another GL and reverse this afterwards is not so easy for some type of accounts (post automatically only, reconciliation accounts, etc.) So you have 2 options for this change:
    1. Write a custom ABAP which will update your SKB1 records without checking the balance.
    2. Create the country CoA but do NOT assign it to your company code yet. (Remove any existing assignment). Now you can do a mass change using transaction MASS or manually account by account, regardless of the balance. Make sure you enter alternative accounts only that are created in the country CoA.
    3. Finally, assign the country CoA to the company code.
    After this, the line items posted before the change are not in sync with the master record's alternative accounts (BSEG-LOKKT <> SKB1-ALTKT), but as most standard reports are reading the CURRENT alternative accounts from the master records anyway, that should not be a problem.
    Hope that helps, points welcome
    Csaba

  • Update BSEG with alternative G/L account after assigning it at company code

    Hello,
    I'm facing an issue concerning the update of BSEG and other tables.
    We have started to work in Production from January 2010 without alternative chart of accounts. So many posting till now.
    Now the company wants to set up the local chart of account for some legal requirement. I know that once we have put an alternative chart of account, we can not change the local G/L account before balance at 0.
    But in my case, the local chart of account was not assigned to the company code. So I can put what I want in the group G/L account as alternative account.
    The idea is to create a local chart of account, after all local G/L accounts related to the local chart of account and after assign the local chart of account to the company code.
    The problem is that for all historical items (january 2010 to June 2010) I don't have the local G/L account in BSEG and other tables (FI)...and I need it for reporting.
    Thanks for your help
    Edited by: Oneforh on Jun 18, 2010 10:15 AM

    Dear,
    Check: http://sap.ittoolbox.com/groups/technical-functional/sap-acct/copy-chart-of-accountsgl-accounts-1530253
    Re: change alternative chart of account
    Change of Chart of Accounts
    changing chart of accounts
    I prefer to create new GL with new chart of accounts and copy the old GL balances.. but practically I didnt come across these situation.
    Check.
    Regards,
    Syed Hussain.

  • FI-GL: Question regarding "alternative account no." - Why in BSEG?

    Hi all,
    I have another question. I think this is really a little bit tricky this time (I spend a lot of time investigating this question but couldn't find an answer).
    It's regarding the field "alternative account no." in FS00 (table SKB1-ALTKT) and it's about the design of the SAP system regarding this feature (alternative chart of account).
    We've one company code (Belgium) in the system which uses alternative account numbers for a country specific local chart of accounts. The country specific chart of accounts BE01 is assigned to this company code in OBY6 besides the operative chart of accounts. The company code is in production for some years so there are many postings up to now. So far so good. Now, they have found an error in the assignment from alternative account to operative account. As a result, they want us to evaluate the option to change the alternative account number for this account in the transaction FS00.
    For sure, it's not possible to change the alternative account no. in FS00 as long as there is a balance on this account. But if you post this balance to a temporary / technical account, it's possible to change the alternative account no. If you do this, SAP will give you the message FH 165 which is a warning and not a error message (so you can save the changes). After that, it's possible to create an inverse posting in order to get the balance back to this account.
    Now to the strange part (for me): Why does SAP record this alternative account no. for each document line item in the BSEG table in the field BSEG-LOKKT? This is also what the message FH 165 is about. For me, this does not really make sense, but I'm sure that I miss a detail somewhere.
    I mean, you know for example that the alternative account A belongs to the operative account B (via FS00 / SKB1-ALTKT). Therefore, why do you need to write this account to every single line item in BSEG? Why doesn't SAP just substitute the operative account no. with the alternative account no. in all relevant reports (RFBILA00, balance display S_ALR_87012277...).
    The background of my question is now: If I zero out the balance and change the alternative account number in FS00, then all postings up to now won't be changed automatically. So for all postings up to now, the old alternative account no. remains in the BSEG table. For all new postings, the new alternative account no will be in the BSEG table. So from my understanding, there will be an inconsistency in the database if I change the alternative account no.
    In order to evaluate whether I can change the alternative account no. without risking inconsistencies, I would now need to know how this field (BSEG-LOKKT) is used in the SAP system. Is it used in any special reports or for what purpose is it in the BSEG table? What about the balance table GLT0? Is there also a special balance table for the alternative account no. in the system or how are the balances (e.g. for RFBILA00) calculated for the alternative chart of accounts?
    I would be very glad for any help as I am really at the end with my SAP knowledge on this point.
    Thank you in advance and sorry for the long (and maybe confusing?) posting.
    Regards,
    Peter

    hi Peter,
    I believe the system is perfectly designed in this case
    Let's say you have G/L account A in Operative CoA, which is linked to account 1 in Alternative CoA. Than the local law changes and you have to link account A to account 2 from 01.01.2008. The system works perfectly: All the items which were posted earlier are still shown on Alternative account 1 (according to local law for last year), while the new items will be shown on account 2 (according to local law for the new year).
    BSEG-LOKKT is only used for reporting, does not control anything. On the other hand there won't be any inconsistency in your system, if you change the alternative account number acc. to business needs.
    hope this helps
    ec

  • Performance Problem in using the BSEG table - Required alternative

    Hi All,
    Pl go thru the below program.
    I am unable to change this code
    It is having 46 performance errors
    Pls check the code and suggest.
    *To get Pmt Doc No & Posting Date
      SELECT SINGLE
             BELNR
             ZFBDT
             FROM BSEG
             INTO (WA_ZFT011_FIFO-PAY_DOC_NO, WA_ZFT011_FIFO-POST_DATE)
             WHERE AUGBL = W_CLR_DOC
               AND AUGDT = WA_ZFT011_FIFO-CLR_DATE
               AND BSCHL = '15'.
      IF SY-SUBRC <> 0.
        SELECT SINGLE
               BELNR
               ZFBDT
               FROM BSEG
               INTO (WA_ZFT011_FIFO-PAY_DOC_NO, WA_ZFT011_FIFO-POST_DATE)
               WHERE AUGBL = W_CLR_DOC
                 AND AUGDT = WA_ZFT011_FIFO-CLR_DATE
                 AND BSCHL = '11'.
    The above code is having performance error "NO field of a table Index in WHERE"
    The same error repeated for 45 select statements and for all statements the "BSEG" table is used for selecting data.
    But creating a secondary index on BSEG table columns will not be possible
    So pls suggest me accordingly
    Awaits for the Reply.
    P Kamal

    Hi,
    Perhaps my post here: Re: BSEG table performance issues might help you.
    Regards, Gerd Rother

  • BSEG.CREATED event not triggering when a document is posted in FB60

    Hi All,
    I have a requirement in which i need to post documents in FB60/FB65/FB01 tcode. But when i post the document in FB60 the event BSEG.CREATED is not triggering. I could not see any trace in SWEL. But when i park the document in FB60, FIPP.CREATED event is getting triggerd.
    Can anyone tell me why this BSEG.CREATED event is not triggering.
    Thanking you in advance,
    satheesh.

    Hi Viji,
    Thanks for your quick reply.
    We have maintained the required configurations in the system related to this. But still the event BSEG.CREATED is not triggering.
    for this the alternative solution is to implement the BTE '1030'. But our functional team is asking us to check whey standard business object BSEG.CREATED is not triggering when we post a document. So that particular reason we are not able to find out.
    Configuration maintained.
    1) Created a workflow variant and assigned it to particular company code(OBWA and OBWJ).
    2) Checked the 'Posting' release' and 'Release payments' checkboxes in the OBWA transaction.
    3) Event linkage for BSEG is active.(SWETYPV)
    Thanks,
    satheesh

  • Update BSEG table for PERNR

    Hi,
    How to update PERNR Field BSEG Table?
    My scenario is to update the (Personnel Number ) PERNR Field in FB50 Transaction.
    I get the following fields details from a third party system
    Document Information 
    o     I_BUKRS (Company Code) u2013 example: 0010
    o     I_BELNR (Document Number) u2013 example: 1700006041
    o     I_GJAHR (Fiscal Year) u2013 example: 2008
    u2022     Final Approver ID
    o     I_PERNR (Personnel No.) u2013 example U0050049
    For all line items of the document (represented by the key  (I_BUKRS, I_BELNR, I_GJAHR)) need to update the BSEG-PERNR field in FB50.
    Please let me know if you have any ideas like BAPI's or any alternative.
    Thanks & Regards,
    Satya

    Hi
    Try to use below the FM's
    FMUDBSEGH_UPDATE
    FMUDBSEG_UPDATE
    G_BKPF_BSEG_UPDATE
    before to that you need to read data from FM READ_BSEG. then update.
    hope it helps you
    Thanks!
    Edited by: Prasanth Maddela on Apr 21, 2009 6:26 PM

  • Down load from BSEG Table

    Hi
    Friends
    we have around 50 millions records in the Bseg table.
    i need to down load only 5 fields .
    one our friend suggested using ABAP code we can down load.
    But i would like to know from you is there any Transcation code to down load only 4 or 5 fields from bseg fro all the company codes since we have around 50 million Records inthe table.
    Thanks in advance.

    Hi Ravindra,
    Good afternoon and greetings,
    In SE16 itself you can down only the selected field by choosing the User Parameters...Alternatively, you can create a query using SQVI and select only those fields for displaying and downloading.
    If you require any assistance on SQVI, please let me know.
    Points awarded is highly appreciated, if the above mentioned solution meets your requirement.
    Thanking you
    With kindest regards
    Ramesh Padmanabhan
    Consultant

  • Display Alternative Account in Additional Data screen of FB03

    Dear SAP experts,
    Transaction code FB03's screen does have an alternative account column. But I want to display
    Alternative account when I click on each account (in line item of FB03 screen) or display
    alternative account in Additional Data screen of FB03. I don't know how to do it.
    Does anyone here know about configuring this, please help me.
    Thank you so much.
    Maxielight.

    Hi,
    To display the "Alternative Account Number" field in report of the new General Ledger, please proceed as follows:
    1) Implement Note 895609 and 939649.
    2) To display "Alternative Account Number" in the line layout variant, proceed as follows:
    - Call transaction O7R3 and add BSEG-LOKKT as special field.
    - Then change the line layout variant. The system now displays the "Alternative Account Number" field.
    3) In the line item display in the classic General Ledger (transaction FBL3N), you could enhance the custom selections in transaction SE36 as described in Note 310886. However, in the new General Ledger, the custom selection in transaction FAGLL03 has different sub-areas. Each of these areas corresponds to a structure:
    G/L account master record SKA1_FS
    G/L account company code SKB1_FS
    G/L account line item BSIS_FS
    Since the "Alternative Account Number" is not included in the structure SKB1_FS in the standard delivery, please implement the enhancement as described in Note 945932.  To include more fields in the custom selections of transaction FAGLL03, you can enhance the structures using an APPEND.
    Regards,
    Gaurav

  • Alternative for SE16

    Is there any alternative for SE16 to check number of entries in tables.
    Scenario is,
    Based on filter company code, find number of records in BKPF and then in BSEG. Is they any other way?
    thanks,

    Hello Mark,
    thanks for reply.
    I am checking if there is any alternative for SE16.
    Since the BSEG table is big and in most of the cases in foreground with SE16 it will give time out error.
    i know we can check by running SE16 in background job.
    This is the reason I am wondering if there is any another option.
    regards,
    Sant

  • No Business Area on Tax segment of BSEG-GSBER since upgrade to 4.7

    Hello everyone-
    We upgraded our system in 2005 to 4.7 Since that time accounting
    documents, BSEG entries that represent sales tax charged to the
    customer does not have the Business Area filled in, ie. BSEG-GSBER is
    blank for Tax lines. This causes a problem for us for reporting. We
    need to tie the corresponding BSEG items for the tax line it pertains
    to. Our reporting program has logic to tie together, but when the
    pattern of the accounting documents is off, it causes discrepancies in
    our reporting. Can anyone provide an alternative solution?
    Thanks
    Melody

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
    Select "system.log" from the file list. Enter "backupd" (without the quotes) in the String Matching text field. Post the messages from the last backup, beginning with "Starting standard backup."
    Post the log text, please, not a screenshot. If there are runs of repeated messages, post only one example of each. Do not post many repetitions of the same message.
    Some personal information, such as the names of your files, may be included — edit that out, too, but don’t remove the context.

  • Performance tuning on BKPF and BSEG for my code.

    Please provide alternative code for the following code so that processing is fast.
    my select queries are as follows. It take a lot of time and system gets loaded when it is scheduled.
    select BUKRS
               BELNR
               GJAHR
               BLART
               BLDAT
               BUDAT
               TCODE
               XBLNR
               STBLG
               WAERS
               KURSF
               AWKEY
               STGRD
        into CORRESPONDING FIELDS OF TABLE
    IT_BKP   from bkpf where bukrs =   p_bukrs
                                              and   gjahr in s_gjahr
                                              AND BLART NE 'SA'
                              and   budat in s_date.
    select BELNR
             KOART
             SHKZG
             MWSKZ
             DMBTR
             KTOSL
             SGTXT
             VBELN
             HKONT
             KUNNR
             MATNR
             MENGE
      FROM BSEG INTO  CORRESPONDING FIELDS OF TABLE it_bseg
                                        for all entries in it_bkpf
                                         where bukrs = it_bkpf-bukrs
                                         and   belnr = it_bkpf-belnr
                                         and   gjahr = it_bkpf-gjahr
                                         and   MWSKZ in s_MWSKZ .  
    Please help.

    Hi,
       Declare internal table same fields as the you are selecting from table and
      remove corresponding fields of and also check ur t_bkpf table is not initial
      before using for all enteries.
      foe e.g.
    select BUKRS
    BELNR
    GJAHR
    BLART
    BLDAT
    BUDAT
    TCODE
    XBLNR
    STBLG
    WAERS
    KURSF
    AWKEY
    STGRD
    into TABLE
    IT_BKP from bkpf where bukrs = p_bukrs
    and gjahr in s_gjahr
    AND BLART NE 'SA'
    and budat in s_date.
    IF IT_BKPF[] IN NOT INITIAL.
    select BELNR
    KOART
    SHKZG
    MWSKZ
    DMBTR
    KTOSL
    SGTXT
    VBELN
    HKONT
    KUNNR
    MATNR
    MENGE
    FROM BSEG INTO TABLE it_bseg
    for all entries in it_bkpf
    where bukrs = it_bkpf-bukrs
    and belnr = it_bkpf-belnr
    and gjahr = it_bkpf-gjahr
    and MWSKZ in s_MWSKZ .
    ENDIF.
      reward if useful.

  • Trading partner - BSEG

    Hello all,
    We have build a program based on BSEG table in order to extract gl account information into a Z report.
    This report was running properly until two changes have been installed in SAP:
    -New general ledger
    -Trading partner
    The program is not taking the information from the gl accounts containing Trading partner informed anymore.
    As the new general ledger is not using BSEG table, at report FBL3N is not showing trading partner informed.
    Please can you assist? Which report can I check to get this information?
    Thanks
    RG
    M

    Hi,
    In case of Z report, you need to look for an alternative way, where you can fetch the required data to your Zreport.
    Sit with your ABAPer and modify the prog accordingly.
    Regards,
    Srinu

Maybe you are looking for

  • Disable particular row in a grid

    I displayed the table in a grid, and I want to disable the row if the field "Status" is equal to 1, how to do it? Ken

  • All my photos in my library are not showing up

    All my photos in my library are just showing gray.. here's a screenshot

  • Possible malware in Safari

    I am locked out of Safari because of this constant message. I ran a virus protection program and it found 6 contaminated files. I quarantined them, then deleted them. In the meantime, I re-booted my Mac and launched Safari again, but the message is b

  • ChaRM: Several maintenance cycles in one maintenance project?

    Hi! We are working with urgent correction within ChaRM and thinking about to implement the normal corrections as well. Our ChaRM workflow for normal corrections is characterized by: a)corrections with different Life cycle (those who will be processed

  • WRVS4400n v2 How to even out upload &download in same LAN

    I have wrvs4400n v2  and I noticed in the same wireless network WLAN, upload speed or download speed way exceeds the other stream speed. I'm talking 10Mbps and 329kbs everytime!! so in Win XP pro file sharing, pc1 copies file to pc2's shared folder w