BSEG/BSIS

hi experts,
Still now i am using to get data of G/L accounts items i use BSEG cluster table.
As we know it takes more time for data extraction.
Can i use BSIS table instead of BSEG table?
Do both the tables contains the same data?
Points will be rewarded.

HI
BSEG is the table where all the accounting document get stored. If you use BSEG the report will take a bit time to execute. But coming to BSIS GL open item BSAS gl cleared item. These two are Tables pertains to GL Transactions. you can get only the report which data is stored as per the gl accounts
If you go for the Z development for GL accounts are concerned better to use BSIS and BSIK instead of BSEG.
bye

Similar Messages

  • JOIN for BSEG, BSIS, BSAS, MSEG, BKPF and MKPF

    I am developing a report related to G/L . i am using the Tables BSEG BSIS BSAS MSEG BKPF MKPF ............please give me the Joinings of these tables.......how exactly we can join and get the prefect Data....
    Thank U waiting for ur replies....
    Title edited by: Alvaro Tejada Galindo on Jun 3, 2008 3:41 PM

    I have given the tables, internal tables and the select queries which can give you the join conditions of your requirement.
    tables: bsis,
            bsas,
            bkpf,
            bseg,
            ekbe,
            mkpf,
            mseg.
    select-options: s_hkont  for bseg-hkont,
                    s_bldat  for bkpf-budat,
                    s_budat  for bkpf-bldat obligatory,
                    s_lifnr  for bseg-lifnr,
                    s_lfbnr  for ekbe-lfbnr no intervals no-extension.
    data: begin of i_bsis_bsas occurs 0,
            bukrs like bsis-bukrs,
            hkont like bsis-hkont,
            gjahr like bsis-gjahr,
            belnr like bsis-belnr,
            budat like bsis-budat,
            bldat like bsis-bldat,
            xblnr like bsis-xblnr,
            wrbtr like bsis-wrbtr,
            buzei like bsis-buzei,
          end   of i_bsis_bsas,
          begin of i_bkpf     occurs 0,
            bukrs like bsis-bukrs,
            belnr like bsis-belnr,
            gjahr like bsis-gjahr,
            xblnr like bkpf-xblnr,
            stblg like bkpf-stblg,
            awtyp like bkpf-awtyp,
            tcode like bkpf-tcode,
          end   of i_bkpf,
          begin of i_bseg     occurs 0,
            bukrs like bsis-bukrs,
            belnr like bsis-belnr,
            gjahr like bsis-gjahr,
            buzei like bseg-buzei,
            buzid like bseg-buzid,
            koart like bseg-koart,
            zuonr like bseg-zuonr,
            hkont like bseg-hkont,
            lifnr like bseg-lifnr,
            sgtxt like bseg-sgtxt,
            ebeln like bseg-ebeln,
            ebelp like bseg-ebelp,
            wrbtr like bseg-wrbtr,
          end   of i_bseg,
          begin of i_ekbe    occurs 0,
            ebeln like ekbe-ebeln,
            ebelp like ekbe-ebelp,
            gjahr like ekbe-gjahr,
            belnr like ekbe-belnr,
            buzei like ekbe-buzei,
            lfgja like ekbe-lfgja,
            lfbnr like ekbe-lfbnr,
            lfpos like ekbe-lfpos,
            matnr like ekbe-matnr,
          end   of i_ekbe,
          begin of i_mkpf_mseg occurs 0,
            mblnr like mkpf-mblnr,
            mjahr like mkpf-mjahr,
            bktxt like mkpf-bktxt,
            xblnr like mkpf-xblnr,
            frbnr like mkpf-frbnr,
            zeile like mseg-zeile,
            matnr like mseg-matnr,
            erfmg like mseg-erfmg,
          end   of i_mkpf_mseg.
    *data: wa_ekbe like i_ekbe.
    select  bukrs
              hkont
              gjahr
              belnr
              budat
              bldat
              xblnr
              wrbtr
              buzei appending corresponding fields of table i_bsis_bsas
                    from  bsis
                    where bukrs eq p_bukrs
                      and hkont in s_hkont
                      and gjahr eq p_gjahr
                      and budat in s_budat
                      and shkzg eq 'S'.
      select  bukrs
              hkont
              gjahr
              belnr
              budat
              bldat
              xblnr
              wrbtr appending corresponding fields of table i_bsis_bsas
                    from  bsas
                    where bukrs eq p_bukrs
                      and hkont in s_hkont
                      and gjahr eq p_gjahr
                      and budat in s_budat
                      and shkzg eq 'S'.
    endform.                    " f_get_bsis_bsas_data
    *&      Form  f_get_bkpf_bseg_data
          Subroutine to get BKPF and BSEG data
    form f_get_bkpf_bseg_data.
      check not i_bsis_bsas[] is initial.
      select  bukrs
              belnr
              gjahr
              xblnr
              stblg
              awtyp
              tcode into table i_bkpf
                    from bkpf
                     for all entries in i_bsis_bsas
                   where bukrs eq i_bsis_bsas-bukrs
                     and belnr eq i_bsis_bsas-belnr
                     and gjahr eq i_bsis_bsas-gjahr.
                    and awtyp = 'BKPFF'
                    and tcode = 'J1IE'.
      check not i_bkpf[] is initial.
      select  bukrs
              belnr
              gjahr
              buzei
              buzid
              koart
              zuonr
              hkont
              lifnr
              sgtxt
              ebeln
              ebelp
              wrbtr  into corresponding fields of table i_bseg
                     from bseg
                      for all entries in i_bsis_bsas
                    where bukrs eq i_bsis_bsas-bukrs
                      and belnr eq i_bsis_bsas-belnr
                      and gjahr eq i_bsis_bsas-gjahr.
                     and buzei eq i_bsis_bsas-buzei
                     and hkont eq i_bsis_bsas-hkont.
      delete i_bseg where not hkont in s_hkont.
    endform.                    " f_get_bkpf_bseg_data
    *&      Form  f_get_ekbe_data
          Subroutine to get EKBE data
    form f_get_ekbe_data.
      data: $i_bseg like i_bseg occurs 0 with header line.
      $i_bseg[]  =  i_bseg[].
      delete $i_bseg where ebeln is initial.
      check not $i_bseg[] is initial.
      select ebeln
             ebelp
             gjahr
             belnr
             buzei
             lfgja
             lfbnr
             lfpos
             matnr into table i_ekbe
                   from ekbe
                    for all entries in $i_bseg
                  where ebeln eq $i_bseg-ebeln
                    and ebelp eq $i_bseg-ebelp
                    and gjahr eq $i_bseg-gjahr
                    and bwart = '101'.
                   and belnr eq $i_bseg-belnr.
    check not i_ekbe[] is initial.
      select a~mblnr
             a~mjahr
             a~bktxt
             a~xblnr
             a~frbnr
             b~zeile
             b~matnr
             b~werks
             b~erfmg  into table i_mkpf_mseg
                      from mkpf as a inner join
                           mseg as b on amblnr eq bmblnr
                                    and amjahr eq bmjahr
                       for all entries in i_ekbe
                       where a~mblnr eq i_ekbe-lfbnr
                      and a~mjahr eq i_ekbe-gjahr
                      and b~zeile eq i_ekbe-lfpos
                        and b~werks eq p_werks.
    <REMOVED BY MODERATOR>
    Edited by: Srikanth Kadiyala on Jun 3, 2008 7:24 AM
    Edited by: Alvaro Tejada Galindo on Jun 3, 2008 3:40 PM

  • To add an additional field of text of 50 chrs in bseg & bsis

    In trxn FB01 or F-02, we have a line item text of 50 chrs (sgtxt). We want to have one more field of text, of 50 chrs. Can i append structure in BSEG & BSIS & mount on the screen ??
    Or is there any other way ??
    thanks
    amit

    Hi,
    I have similar error . I am gettting short dump .And it says
    "Screen "SAPLKACB" 9999 could not be generated.
    When I go look at that screen in ecc6 and try to do a syntax check, I get an error stating that field cobl-yystpi_ind is not in the data dictionary.  The code is looking for this field but it is not there."
    I checked COBL. cobl-yystpi_ind is there and it is active.
    In oxk3 i can see the field cobl-yystpi_ind.
    in oxk1 the subscreen 9999 is not there.
    Is the dump b'coz of not adding subcreen thru oxk1.
    Is that mandatory to maintain the subscreen in oxk1 which is using those fields which are added thru oxk3?
    Its urgent and any help is appreciated and points will be rewarded.
    Regards,
    Pria.

  • Inconsistency BSEG, BSIS, BSAS

    Hi, likeable consultants!
    In transactions reports: FBL3N and FS10N I have differents accounts balances
    display.
    analyzing BSEG Table, I have 15 line itens, and BSIS and BSAS have 18 line
    itens. I request a solution to adjust these 3 line itens to balance equal.
    I already had execute the RFSEPA01 and it don´t works.
    Somebody knows a program to equal these tables?
    Best kindly regards!

    After finishing the analysis I can confirm that the differences reported are due to the fact that you performed the ARCHIVING of documents in
    2001/2002 for BTSA company code. You can see transaction SARA for more
    details.
    I had a look at your system BTP, 300 on account 991110000,BTSA
    Account 991110000,BTSA is open item managed. From your customizing
    settings, the existing archive runs and the varaints existing for
    programm SAPF048I I assume you already did archiving and secondary
    index deletion on this account. So this explains why line items balance
    and GL summary balance differ ! There is no programm error.
    See consulting note 81489 which describes this issue:
    The balance of an account results from the balance of the open items. Inconnection with an archiving that has been carried out, the line item
    display - used with cleared items - must not therefore be interpreted asa balance display. For the balance display, there are separate
    correspond to the display balance of the open items from the line item
    display.
    Having archived and deleted secondary indexes ( with SAPF048I )
    for an account you can not use line item drill down as a balance
    display any more for a line item managed account.
    ( as not all line items are existing any more in table BSIS ! )
    The transactions meant to display the binding balances are FS10N,
    FK10N and FD10N.
    They also give you the line items details, but only of those line
    items not yet deleted ( by SAPF048I ).

  • BSEG - BSIS - BSIK

    Hi,
    Someone can say me the join between BSIS and BSIK / BSEG? Because I have an example in BSEG but i cant reproduce it in BSIS and BSIK.
    I dont have clear the relations.
    Thanks a lot!

    Hi,
    <b>BSEG and BSIS</b> (Accounting: <b>Secondary Index for G/L Accounts</b>)
    BSEG-BUKRS = BSIS-BUKRS
    BSEG-HKONT = BSIS-HKONT
    BSEG-GJAHR = BSIS-GHAJR
    BSEG-BELNR = BSIS-BELNR
    BSEG-BUZEI  = BSIS-BUZEI.
    You have to table, BUKRS, HKONT, GJAHR, BELNR, BUZEI from BSEG and read BSIS. You can also table BUKRS & HKONT from BSEG and read BSIS and then find the document by BELNR.
    <b>BSEG and BSIK</b> ( <b>Accounting: Secondary Index for Vendors</b> )
    BSEG-BUKRS = BSIK-BUKRS
    BSEG-LIFNR = BSIK-LIFNR
    BSEG-GJAHR = BSIK-GHAJR
    BSEG-BELNR = BSIK-BELNR
    BSEG-BUZEI  = BSIK-BUZEI.
    You have to table, BUKRS, LIFNR, GJAHR, BELNR, BUZEI from BSEG and read BSIK. You can also table BUKRS & LIFNR from BSEG and read BSIK and then find the document by BELNR.
    Let me know if you need any other information.
    Regards,
    RS

  • Update the correct profit center in tables BSEG / BSAS / BSIS / BSIK / BSAK

    Hi FI Gurus,
    I am looking after a Support Project in SAP IS-Retail. I am from the FI functional and possess very limited knowledge in FI.
    My client has done the sales posting in SAP using IDOC's. During the postings, it was found that wrong Profit Centers were assigned. Due to this, the sales reports based on Profit Center are coming wrong. It was suggested to the client to reverse the IDOCs, do necessary changes in Profit Centers and re-post the IDOCs. The client wanted a short method to get the reports right. A senior consultant (Non FI) in the Company and the Management are forcing me to write a ABAP program to update certain (not all) FI tables. According to me, it will have some negative impact on the system for which reason I am not ready to take the call as a Project Manager. The management wants me to do the following (I am quoting the same mail which I received from the consultant ) :
    We need to update the correct profit center in tables BSEG / BSAS / BSIS / BSIK / BSAK / BSID / BSAD, wherever the records exists against billing document numbers provided.
    BAPI for updating profit center in Accounting documents: BAPI_ACC_DOCUMENT_POST
    Function Module : 'BAPI_DOCUMENT_CHANGE'
    Also look at SAP Note: Note 966428 - FB02: Functional area (FKBER) can be changed on coding block
    Based on the above, the ABAPer has written the program, the program will update the tables BSEG, BSIS, BSIK, according to the selection criteria of document number, company code and line item number with the new profit centers.
    Please clarify me about the following :
    1. This program is updating profit center in just the FI tables (BSEG, BSIS, BSIK etc.), but the New GL tables (faglflexa and faglflext) which have approx. 65 lakh entries in PRD do not get updated with the correct profit center.
    2. The Controlling tables also do not get updated with this program yet. Also since the previoius updation of Profit centers did not happen correctly, most of the times the controlling document has not been generated at all. Since we will be updating the profit center in just the FI tables, the controlling document will not be created still. Though there are SAP notes suggesting re-creation of the Controlling documents, which is still an option you can choose. Please confirm.
    3. The Special GL also does not get updated because of this.
    This is a very critical and hot issue. My job is at Stake as the Management has threatened me of sacking if I do not follow their directives as they are only concerned with their money.
    Is the consultant who suggested this change RIGHT ?
    Your early replies will help me take the decision.
    Regards

    Hi,
    There is no standard program or BAPI that would update profit centre in a posted document. You should either develop your own process for it,which is not recommended, but sometimes is essential, or reverse the existing documents and post them with the correct profit centre.
    Regards,
    Eli

  • RFINDEX - Errors in section Reconciliation INDEX vs BSEG

    Hi Experts,
    After converting a normal GL account into OIM, we have executed the report RFINDEX for consistency check.
    We have found errors in the section Reconciliation INDEX vs BSEG.
    But I am not sure what exactly the system trying to make me understand and the list of documents that got affected.
    Analysis log says that error msg appears at XBLNR field in BSEG & BSIS table.
    However, we do not find the field in BSEG table.  Then why the system is showing it as "error msg "?
    May I request the forum to throw some light and route me towards solution for overcoming the issue?
    Regards,
    BSK..

    Hi Surya,
    Please note first of all that the repair option in RFINDEX is only available for use SAP Support. We never recommend that customers or general systems users use this report in repair mode themselves. It can lead to further inconsistencies if used incorrectly.
    The error you have seen on this account related to XBLNR is arising because there are differences in the values when comparing the contents of field BKPF-XBLNR and BSIS-XBLNR for a particular set of line items. The XBLNR field is in the header table BKPF and not BSEG.
    This error is usually a non critical error and can occur when customising settings such as user exits, substitutions update the XBLNR field in one table (eg BKPF) but not in another (eg BSIS). In these types of situations we usually advise customers to first take time in understanding why the values are updated for XBLNR in their system; the field is highly customizable and therefore errors like this can often appear in systems when running RFINDEX. There is no bug in the standard system which causes these types of differences.
    The good news is that this error has nothing to do with the open item management which you enabled. Otherwise you would see error messages like "XOPVW" etc. From your description it seems that the conversion to Open Item Management you did was successful.
    Kind regards,
    Declan

  • Timout dump when accessing BSIS

    Hello frnds,
    I m accessing bsis table with this query.
        select bukrs hkont augdt augbl zuonr gjahr  belnr buzei bschl
        dmbtr prctr
        from bsis into table i_temp2
        for all entries in i_belnr2
        where bukrs eq company
        and hkont in r_hkont
        and belnr = i_belnr2-belnr
        and budat in date.
    i_belnr2 contains some 3k records.
    I m getting a time out dump after 25 mins...
    Can anyone pls suggest me is there any way that
    i can make this query optimized ?
    or  any function modules for this specific i/p and o/p parameters?
    or any logical database ?
    Rgds,
    Santhosini K

    Hi,
    Check the sample code and proceed accordingly to optimize the Query on BSIS Table.
    REPORT ztest NO STANDARD PAGE HEADING LINE-SIZE 80 MESSAGE-ID 00.
    TABLES: bkpf, bseg, bsis.
    DATA: bkpf_int TYPE TABLE OF bkpf WITH HEADER LINE,
    bseg_int TYPE TABLE OF bseg WITH HEADER LINE,
    bsis_int TYPE TABLE OF bsis WITH HEADER LINE,
    BEGIN OF i_indata1 OCCURS 0,
    t_pdate TYPE bkpf-budat,
    t_kioid TYPE bseg-zuonr,
    END OF i_indata1.
    SELECT bukrs belnr gjahr budat
    FROM bkpf INTO CORRESPONDING FIELDS OF TABLE bkpf_int
    FOR ALL ENTRIES IN i_indata1
    WHERE bukrs = 'BP01' AND
    bstat IN (' ', 'A', 'B', 'D', 'M', 'S', 'V', 'W', 'Z') AND
    gjahr = sy-datum+0(4) AND
    budat = i_indata1-t_pdate.
    SELECT bukrs belnr gjahr buzei zuonr wrbtr shkzg
    FROM bseg INTO CORRESPONDING FIELDS OF TABLE bseg_int
    FOR ALL ENTRIES IN bkpf_int
    WHERE bukrs = bkpf_int-bukrs AND
    belnr = bkpf_int-belnr AND
    gjahr = bkpf_int-gjahr AND
    koart = 'S'. "GL Accounts
    SORT: bkpf_int BY bukrs belnr gjahr,
    bseg_int BY bukrs belnr gjahr buzei,
    i_indata1 BY t_kioid.
    LOOP AT bseg_int.
    READ TABLE i_indata1 WITH KEY
    t_kioid = bseg_int-zuonr
    BINARY SEARCH.
    CHECK sy-subrc = 0.
    READ TABLE bkpf_int WITH KEY
    bukrs = bseg_int-bukrs
    belnr = bseg_int-belnr
    gjahr = bseg_int-gjahr
    BINARY SEARCH.
    CHECK sy-subrc = 0.
    MOVE: bkpf_int-budat TO bsis_int-budat,
    bseg_int-zuonr TO bsis_int-zuonr,
    bseg_int-wrbtr TO bsis_int-wrbtr,
    bseg_int-shkzg TO bsis_int-shkzg.
    APPEND bsis_int.
    ENDLOOP.
    [/code]
    Regards,
    Raj

  • BSIS table Archiving

    Hi Experts,
    We are running TDMS in our landscape. And we have a very large table named BSIS on the system. Can you advise what this is and is there a best practice to purging this?
    Regards,
    Krishna.M

    Hi Krishna,
    You might want to check the link below:BSEG - BSIS - BSAS.
    Regards,
    Rod

  • Change GL account to open intem management

    Hi,
    We are going to change a GL account to open item management.
    We need a program that changes all prevously posted items ( non open item management ) to open item management. If anyone knows such a program ( standard or customer's ), I'll be glad to know it.
    Points are guaranteed.
    Regards,
    Svetlin

    It's not easy problem, because you have to change several dictionary tables.
    If your documents are created directly by Accounting Module, you should check only FI tables, but you make sure others Module (CO for example) aren't related, so if you are sure you need to update these tables:
    - BKPF, BSEG, BSIS (open Items, but check all table BS*):
    Perhaps, if GL accounts are the same characteristics, you need to change only the value HKONT in BSEG, but this field is a key field for BSIS, so you need to delete the record before updating it.
    I think it's not good idea, but you can try.
    Max

  • Can any one tell me how to create logical database

    i want to create logical database which contain tables BSEG,BSIS,BSAS,BKPF.
      tell me how this table will come under hierarchary and
    what should i do.please guide me step by step for this problem,i am new to logical datbase.

    Hi,
    Use transaction SE37 or SLDB for creation of LDB.
    Three main things in creation of LDB are
    1)Structure(Hierarchy in nodes)
    2)Selections
    3)Source code
    In structure part we have to define hierarchy as IN NODES
    BKPF          - Accounting Document Header
    BSEG         - Accounting Document Segment
      BSIS
      BSAS
    In selections part we have to define selection screens for the LDB
    In source code part we have to write the data decelerations and data retrieval.
    Regards
    Rajesh Yadla

  • GL account text with account document number

    Hi Experts,
    In my requirement i need to create report with following fields
    Company code,Account Document number,Doctype,Fiscal year,Entry date,posting date,currency,posted by,Document header text.-BKPF
    GL account,Amount-BSEG/BSIS??(which table is preferable)
    GL account Text-SKAT??
    I am trying to create Adhoc report with data base SDF and Added table SKAT
    but i am getting error in below code
    select single * from skat
    where spras = sy-langu
    and ktopl = ?
    and saknr = bseg-saknr
    In the above code what i should mention to ktopl field
    Please guide me table to fetch GL account text,or tell me Logical data base from where i can get even GL account text with out adding table SAKT to logical data base SDF.
    Which table is preferable to add document item amount with GL account-BSIS/BSEG(cluster table)
    Thanks&Regards,
    narasimha.

    Hi ,
    I didnot found GL Account Text in both BRF and BRM.
    Even in BSEG we can find only GL account number not its text. .
    I know That KTOPL is chart of accounts which we can see in SKAT but my question is there any field to match KTOPL of SKAT to any Account Document tables  field so we can retreive records as expected.
    Regards,
    narasimha

  • Report fi

    hai here i am sending one program but it is executing here i am not getting sum of debits and sum of credits........whr i have change this program
    i checked fs10n  tcode...itis not matching my program....based on gl acount,,
    company code 1000 fisc year 2005 period 1 to 16......
    psle send any modified,,,code,,,,,,,ths is uegenlty
    if u get points......
    *& Report  ZRAGHU13
    REPORT  ZRAGHU13.
    TYPE-POOLS : slis.
    TABLES: bkpf,bseg,bsis.
    TYPES:BEGIN OF ty_bkpf,
          bukrs TYPE bkpf-bukrs,
          belnr TYPE bkpf-belnr,
          gjahr  TYPE bkpf-gjahr,
          blart TYPE bkpf-blart,
          monat TYPE bkpf-monat,
          budat TYPE bkpf-budat,
          hkont TYPE bsis-hkont,
      END OF ty_bkpf.
    TYPES:BEGIN OF ty_output,
          bukrs TYPE bkpf-bukrs,
          gjahr  TYPE bkpf-gjahr,
          openbal TYPE bseg-dmbtr,
        dttrns TYPE bseg-dmbtr,
      dttrns TYPE bseg-SHKZG,
      crtrans TYPE bseg-dmbtr,
    crtrans type bseg-shkzg,
          clbal  TYPE  bseg-dmbtr,
      END OF ty_output.
    DATA : fcat TYPE slis_t_fieldcat_alv,
           lcat TYPE slis_fieldcat_alv,
           layout TYPE slis_layout_alv,
           fcath TYPE slis_t_add_fieldcat,
           lcath TYPE slis_add_fieldcat.
    DATA : lt_list_top_of_page TYPE slis_t_listheader.
    DATA : cpos TYPE i.
    DATA:it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
         wa_bkpf TYPE ty_bkpf.
    DATA:it_output TYPE STANDARD TABLE OF ty_output,
         wa_output TYPE ty_output.
    DATA:it_balnce LIKE STANDARD TABLE OF bapi1028_4,
          wa_balnce LIKE bapi1028_4.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:pr_bukrs TYPE bkpf-bukrs DEFAULT  '1000' OBLIGATORY ,
               pr_gjahr TYPE bkpf-gjahr OBLIGATORY .
    SELECT-OPTIONS:so_monat FOR bkpf-monat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      DEFINE field_cat.
        add 1 to cpos.
        clear lcat.
        lcat-col_pos   = cpos.
        lcat-tabname   = &1.
        lcat-fieldname = &2.
        lcat-seltext_m = &3.
        lcat-no_out    = &4.
        append lcat to fcat.
      END-OF-DEFINITION.
    *get data.
      PERFORM f001_get_data.
    END-OF-SELECTION.
    *display data.
      PERFORM f002_diplay_data.
    *&      Form  f001_get_data
          text
    -->  p1        text
    <--  p2        text
    FORM f001_get_data .
      DATA :tabix LIKE sy-tabix,
            w_bal type n.
    *GET BELNR.
      CLEAR:it_bkpf.
      SELECT bukrs belnr gjahr blart monat budat
             INTO TABLE it_bkpf
              FROM bkpf
              WHERE bukrs EQ pr_bukrs
               AND  gjahr EQ pr_gjahr
               AND  monat IN so_monat.
      LOOP AT  it_bkpf INTO wa_bkpf .
        CLEAR:it_balnce.
        CALL FUNCTION 'BAPI_GL_GETGLACCPERIODBALANCES'
          EXPORTING
            companycode                   = wa_bkpf-bukrs
            glacct                        = '0000113100'
            fiscalyear                    = wa_bkpf-gjahr
            currencytype                  = '10'
    IMPORTING
      BALANCE_CARRIED_FORWARD       =
      RETURN                        =
          TABLES
            account_balances              =  it_balnce .
    ENDLOOP.
            sort it_balnce[] by comp_code.
        LOOP AT it_balnce INTO wa_balnce  where FIS_PERIOD le so_monat-low.
            CLEAR:wa_output,w_bal.
            w_bal = wa_balnce-balance.
            wa_output-bukrs    = wa_balnce-comp_code.
            wa_output-gjahr    = wa_balnce-fisc_year.
            wa_output-openbal   = wa_balnce-balance + w_bal.
            wa_output-dttrns   = wa_balnce-debits_per.
            wa_output-crtrans   = wa_balnce-credit_per.
            wa_output-clbal     = ( wa_balnce-balance + wa_balnce-debits_per
    - wa_balnce-credit_per ).
            APPEND wa_output TO it_output.
        ENDLOOP.
    ENDFORM.                    " f001_get_data
    *&      Form  f002_diplay_data
          text
    -->  p1        text
    <--  p2        text
    FORM f002_diplay_data .
      DATA: cprog LIKE sy-repid VALUE sy-repid.
      REFRESH fcat.
      field_cat 'IT_OUTPUT' 'BUKRS' 'Company Code' ' '.
      field_cat 'IT_OUTPUT' 'GJAHR' 'Fiscal Year' ' '.
      field_cat 'IT_OUTPUT' 'OPENBAL' 'Open Balance' ' '.
      field_cat 'IT_OUTPUT' 'DTTRNS' 'Debit Transactions' ' '.
      field_cat 'IT_OUTPUT' 'CTTRANS' 'Credit Transactions' ' '.
      field_cat 'IT_OUTPUT' 'CLBAL'  'Closing Balnace' ' '.
      layout-zebra = 'X'.
      layout-colwidth_optimize = 'X'.
      layout-get_selinfos = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = cprog
          i_callback_top_of_page = 'TOP_OF_PAGE'
         i_grid_title       = 'Unrestricted Stock'
          is_layout          = layout
          it_fieldcat        = fcat
          i_default          = 'X'
          i_save             = 'A'
         is_variant         = w_variant
        TABLES
          t_outtab           = IT_OUTPUT
          EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    ENDFORM.                    " f002_diplay_data
    *&      Form  top_of_page
          text
    FORM top_of_page.
      DATA: l_line TYPE slis_listheader.
      DATA: lw_usr21 TYPE usr21.
      DATA: lw_name TYPE v_addr_usr-name_text.
      l_line-typ  = 'H'.
      l_line-info = text-001.
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = text-005.
      l_line-info = sy-title.
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = 'Company Code              :'.
      l_line-info = pr_bukrs.
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = text-006.
      l_line-info = 'Fiscal Year' .
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = text-007.
      WRITE sy-datum TO l_line-info.
      l_line-info+11(1) = '/'.
      WRITE sy-uzeit TO l_line-info+13.
      APPEND l_line TO lt_list_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = lt_list_top_of_page.
    ENDFORM.                    "top_of_page

    LOOP AT it_balnce INTO wa_balnce where FIS_PERIOD le so_monat-low.
    w_bal = wa_balnce-balance.
    wa_output-bukrs = wa_balnce-comp_code.
    wa_output-gjahr = wa_balnce-fisc_year.
    wa_output-openbal = wa_balnce-balance + w_bal.
    wa_output-dttrns = wa_balnce-debits_per.
    wa_output-crtrans = wa_balnce-credit_per.
    wa_output-clbal = ( wa_balnce-balance + wa_balnce-debits_per
    - wa_balnce-credit_per ).
    APPEND wa_output TO it_output.
    <b>CLEAR:wa_output,w_bal.</b>
    ENDLOOP.
    now check this .
    Regards
    Prabhu

  • Fi report uegently

    here i am seding related my program not getting sumof debits and sum of credits
    plse check and reply me.........if u get points
    and aslo this is urgently..................i checked fs10n t code.......but not coming debits and credits..................i enter comapnu code 1000 fiscal year 2006 period 1 to 16,,,,,,,,,,,,plse check and modify send to me
    *& Report  ZRAGHU13
    REPORT  ZRAGHU13.
    TYPE-POOLS : slis.
    TABLES: bkpf,bseg,bsis.
    TYPES:BEGIN OF ty_bkpf,
          bukrs TYPE bkpf-bukrs,
          belnr TYPE bkpf-belnr,
          gjahr  TYPE bkpf-gjahr,
          blart TYPE bkpf-blart,
          monat TYPE bkpf-monat,
          budat TYPE bkpf-budat,
          hkont TYPE bsis-hkont,
      END OF ty_bkpf.
    TYPES:BEGIN OF ty_output,
          bukrs TYPE bkpf-bukrs,
          gjahr  TYPE bkpf-gjahr,
          openbal TYPE bseg-dmbtr,
        dttrns TYPE bseg-dmbtr,
      dttrns TYPE bseg-SHKZG,
      crtrans TYPE bseg-dmbtr,
    crtrans type bseg-shkzg,
          clbal  TYPE  bseg-dmbtr,
      END OF ty_output.
    DATA : fcat TYPE slis_t_fieldcat_alv,
           lcat TYPE slis_fieldcat_alv,
           layout TYPE slis_layout_alv,
           fcath TYPE slis_t_add_fieldcat,
           lcath TYPE slis_add_fieldcat.
    DATA : lt_list_top_of_page TYPE slis_t_listheader.
    DATA : cpos TYPE i.
    DATA:it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
         wa_bkpf TYPE ty_bkpf.
    DATA:it_output TYPE STANDARD TABLE OF ty_output,
         wa_output TYPE ty_output.
    DATA:it_balnce LIKE STANDARD TABLE OF bapi1028_4,
          wa_balnce LIKE bapi1028_4.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:pr_bukrs TYPE bkpf-bukrs DEFAULT  '1000' OBLIGATORY ,
               pr_gjahr TYPE bkpf-gjahr OBLIGATORY .
    SELECT-OPTIONS:so_monat FOR bkpf-monat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      DEFINE field_cat.
        add 1 to cpos.
        clear lcat.
        lcat-col_pos   = cpos.
        lcat-tabname   = &1.
        lcat-fieldname = &2.
        lcat-seltext_m = &3.
        lcat-no_out    = &4.
        append lcat to fcat.
      END-OF-DEFINITION.
    *get data.
      PERFORM f001_get_data.
    END-OF-SELECTION.
    *display data.
      PERFORM f002_diplay_data.
    *&      Form  f001_get_data
          text
    -->  p1        text
    <--  p2        text
    FORM f001_get_data .
      DATA :tabix LIKE sy-tabix,
            w_bal type n.
    *GET BELNR.
      CLEAR:it_bkpf.
      SELECT bukrs belnr gjahr blart monat budat
             INTO TABLE it_bkpf
              FROM bkpf
              WHERE bukrs EQ pr_bukrs
               AND  gjahr EQ pr_gjahr
               AND  monat IN so_monat.
      LOOP AT  it_bkpf INTO wa_bkpf .
        CLEAR:it_balnce.
        CALL FUNCTION 'BAPI_GL_GETGLACCPERIODBALANCES'
          EXPORTING
            companycode                   = wa_bkpf-bukrs
            glacct                        = '0000113100'
            fiscalyear                    = wa_bkpf-gjahr
            currencytype                  = '10'
    IMPORTING
      BALANCE_CARRIED_FORWARD       =
      RETURN                        =
          TABLES
            account_balances              =  it_balnce .
    ENDLOOP.
            sort it_balnce[] by comp_code.
        LOOP AT it_balnce INTO wa_balnce  where FIS_PERIOD le so_monat-low.
            CLEAR:wa_output,w_bal.
            w_bal = wa_balnce-balance.
            wa_output-bukrs    = wa_balnce-comp_code.
            wa_output-gjahr    = wa_balnce-fisc_year.
            wa_output-openbal   = wa_balnce-balance + w_bal.
            wa_output-dttrns   = wa_balnce-debits_per.
            wa_output-crtrans   = wa_balnce-credit_per.
            wa_output-clbal     = ( wa_balnce-balance + wa_balnce-debits_per
    - wa_balnce-credit_per ).
            APPEND wa_output TO it_output.
           CLEAR:wa_output,w_bal.
        ENDLOOP.
    ENDFORM.                    " f001_get_data
    *&      Form  f002_diplay_data
          text
    -->  p1        text
    <--  p2        text
    FORM f002_diplay_data .
      DATA: cprog LIKE sy-repid VALUE sy-repid.
      REFRESH fcat.
      field_cat 'IT_OUTPUT' 'BUKRS' 'Company Code' ' '.
      field_cat 'IT_OUTPUT' 'GJAHR' 'Fiscal Year' ' '.
      field_cat 'IT_OUTPUT' 'OPENBAL' 'Open Balance' ' '.
      field_cat 'IT_OUTPUT' 'DTTRNS' 'Debit Transactions' ' '.
      field_cat 'IT_OUTPUT' 'CTTRANS' 'Credit Transactions' ' '.
      field_cat 'IT_OUTPUT' 'CLBAL'  'Closing Balnace' ' '.
      layout-zebra = 'X'.
      layout-colwidth_optimize = 'X'.
      layout-get_selinfos = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = cprog
          i_callback_top_of_page = 'TOP_OF_PAGE'
         i_grid_title       = 'Unrestricted Stock'
          is_layout          = layout
          it_fieldcat        = fcat
          i_default          = 'X'
          i_save             = 'A'
         is_variant         = w_variant
        TABLES
          t_outtab           = IT_OUTPUT
          EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    ENDFORM.                    " f002_diplay_data
    *&      Form  top_of_page
          text
    FORM top_of_page.
      DATA: l_line TYPE slis_listheader.
      DATA: lw_usr21 TYPE usr21.
      DATA: lw_name TYPE v_addr_usr-name_text.
      l_line-typ  = 'H'.
      l_line-info = text-001.
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = text-005.
      l_line-info = sy-title.
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = 'Company Code              :'.
      l_line-info = pr_bukrs.
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = text-006.
      l_line-info = 'Fiscal Year' .
      APPEND l_line TO lt_list_top_of_page.
      l_line-typ  = 'S'.
      l_line-key = text-007.
      WRITE sy-datum TO l_line-info.
      l_line-info+11(1) = '/'.
      WRITE sy-uzeit TO l_line-info+13.
      APPEND l_line TO lt_list_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = lt_list_top_of_page.
    ENDFORM.                    "top_of_page

    Dear Gaurav,
    Thanks for the quick response.
    What you replied is my Query.How to get the Net value (Total of S - Total of H) automatically while running the report.
    what are the code i need to put in the ABAP query.
    Man...

  • Reference field (BKPF-XBLNR) not auto populate during simulation

    Hi all,
    During GL posting using t-code FB50 or FB01, I already entered value in Reference field.
    After all fields keyed-in, I choose Document - Simulate to check the entries.
    In this simulation screen, value which I entered in Reference field previously is gone.
    Anyone knows what happened? As far as i know, the value should just carry from the initial screen I entered.
    Thank you.

    Hi Dev,
    Apart from SAP note, I am thinking of using BKPF-BKTXT for storing UTR number & later on use for clearing BRS. Am not getting Int. algorithm for this field. Am doing Manual Reco by FF67.
    Am planning to use manual Int Alg. 901. I need steps to use the same. Any idea please ?
    PS: SAP note suggests us to add new field specifically for this in mother table BSEG & BSIS, which I want to avoid.
    Regards
    Message was edited by: raju M

Maybe you are looking for

  • ORA-00060: deadlock detected - false error in WLE

    Hi, We are experiencing intermittent ORA-00060 errors at commit phase of XA global transactions in WLE 5.1 (patch 63). Essentially, we tracked this to an Oracle issue which was supposed to be fixed in Oracle 8.1.7. However, it appears to still happen

  • I am having kernal panic problems.

    I have had Kernal Panic problems over time. It happened when I was running Second Life in my 4GB MacBook Pro. Yesterday I had 8 GB installed (Kensington) and it has Panicked twice. Here are my Panic Notes.  Can anyone tell me what the problem might b

  • Image Field - Runtime href Setting issue

    I am trying this simple code to set a href of an Image/ImageField object which is not working. Image1.value.image.href = "http://www.adobe.com/ubi/globalnav/include/adobe-lq.png"; Am I missing something?? Nith

  • Camera Reset Frame Count

    Hi All, new here. Been using LR 4 on MBP 09 for about a year now, Love it! I'm shooting with a Fuji X100 exclusively (my only camera =). I recently updated firmware on it, and its reset frame count (up to 9500 frames). This means that the same frame

  • Why is my iphone 5 not using default ring tone even though it is set for my personal tone in defaults!!

    Why is my iphone 5 not using default ring tone even though it is set for my personal tone in defaults!!