Link BSAS & BSIS

Gurus,
I have a report which display Cost of sales(BSAS) and Sales order #. I need to display the amount from the revenue posting(BSEG).
I am not sure how to link these 2 tables. I have the sales doc # too. Please help me out to have these tables linked.
Thanks

Any help please...
I backtracked from Sales Doc # and got the Billing Doc # which is in VBRP.
What is the link between VBRP & BSEG...I need to get the PSWBT amt from BSEG by line item
Any help is appreciated..
Thanks

Similar Messages

  • 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

  • BSAK link to BSIS and BSAS...

    Hello Experts,
    I am doing 2 FOR ALL ENTRIES to get records from BSIS and BSAS based on the records
    that I got in BSAK. Currently, I only know of 3 fields to link which is BUKRS, BELNR, AND GJAHR
    but I is still any more fields that I can link to BSAK from BSIS and BSAS? Because we are
    experiencing performance issues in my program. I am using index for the 3 tables but still it gives us
    performance issues. Below is my code:
    *   Get previous year
        lv_year = p_gjahr - 1.
    *   Get records from PAYR
        SELECT zbukr vblnr gjahr lifnr zaldt
          FROM payr
          INTO TABLE gt_payr
         WHERE zbukr = p_bukrs
           AND gjahr IN (lv_year, p_gjahr).
        DELETE gt_payr WHERE zaldt+4(2) > p_monat.
        SORT gt_payr BY zbukr vblnr gjahr lifnr zaldt.
        DELETE ADJACENT DUPLICATES FROM gt_payr COMPARING zbukr vblnr gjahr lifnr zaldt.
        IF NOT gt_payr[] IS INITIAL.
    *     Get records from BSAK
          SELECT bukrs blart gjahr monat belnr lifnr dmbtr shkzg
            FROM bsak
            INTO TABLE gt_bsak
             FOR ALL ENTRIES IN gt_payr
            WHERE lifnr = gt_payr-lifnr
              AND bukrs = gt_payr-zbukr
              AND augdt = gt_payr-zaldt
              AND augbl = gt_payr-vblnr
              AND gjahr = gt_payr-gjahr.
        ENDIF.
        DELETE gt_bsak WHERE monat > p_monat.
        DELETE gt_bsak WHERE shkzg <> 'H'.
        gt_payments[] = gt_bsak[].
        IF NOT gt_payments[] IS INITIAL.
    *   Get records from BSIS(Open items)
        SELECT bukrs blart gjahr monat dmbtr hkont
          FROM bsis
          INTO TABLE gt_bsis
           FOR ALL ENTRIES IN gt_payments
         WHERE bukrs = gt_payments-bukrs
           AND belnr = gt_payments-belnr
           AND gjahr = gt_payments-gjahr
           AND blart IN (lc_su, lc_px).
    *   Get records from BSAS(Cleared items)
        SELECT bukrs blart gjahr monat dmbtr hkont
          FROM bsas
          INTO TABLE gt_bsas
           FOR ALL ENTRIES IN gt_payments
         WHERE bukrs = gt_payments-bukrs
           AND belnr = gt_payments-belnr
           AND gjahr = gt_payments-gjahr
           AND blart IN (lc_su, lc_px).
        ENDIF.
    Hope you can help me guys. Thank you and take care!

    In a statement with a SELECTstatement with FOR ALL ENTRIES, the addition ORDER BY can only be used with the addition PRIMARY KEY
    bsis
    select MANDT
    BUKRS
    HKONT
    AUGDT
    AUGBL
    ZUONR
    GJAHR
    BELNR
    BUZEI
    bsak
    select MANDT
    BUKRS
    LIFNR
    UMSKS
    UMSKZ
    AUGDT
    AUGBL
    ZUONR
    GJAHR
    BELNR
    BUZEI
    bsas
    select MANDT
    BUKRS
    HKONT
    AUGDT
    AUGBL
    ZUONR
    GJAHR
    BELNR
    BUZEI
    Message was edited by:
            Karthikeyan Pandurangan

  • Urgent: BSIS and MSEG link

    Hello,
    I cannot get the material number of the GR line in FI documents.
    I am using the tables BSIS and BSAS but cannot find any material number associated with them.
    BSEG is an option but it is giving time-out dump when data of more than 10 days are selected.
    Any suggestions will be appreciated.
    Regards,
    Sukriti

    Hi Sukriti,
    Never use BSEG or MSEG directly to fetch data as they always have huge data and it takes lot of time to fetch data.
    the link between BSIS and MSEG is as follows.
    BSIS-BELNR = MSEG-BELNR
    BSIS-GJAHR = MSEG-GJAHR
    BSIS-BUZEI   = MSEG-BUZEI
    BSIS-BUKRS = MSEG-BUKRS
    and filter in where condition based on MSEG-MATNR = materials from Select option or Parameters.
    May be you can create an index with the above 4 fields and also BSIS-HKONT in BSIS table.
    This would definitely give you the exact number of entries as in BSIS and MSEG.
    You can notice that in MSEG the Fields are not Key fields but they will give you unique entries.
    So you should be using join for BSIS and MSEG tables on the above 4 fields.
    hope this will solve your problem.
    If useful please dow reward
    Thanks
    Venugopal

  • Clearing details i could not getting at BSIS & BSAS table. after Payment

    Hi All,
    I posted one invoice document through MIRO like below
    Itm PK  BusA Acct no.   Description                    Tx         Amount in   INR
    001 31  1000 102961     DRUCK INDIA PVT. LTD.  SC            479,777.20-
    002 86  1000 350101     GR-IR-Account                 SC            427,000.00
    003 40          300816     Service Tax 1 Cess           SC             51,240.00
    004 40          300817     CESS 1                           SC              1,024.80
    005 40          300817     CESS 1                           SC                512.40
    payment to vendor also done through F110.
    Itm PK  BusA Acct no.   Description                    T x     Amount in   INR
    001 25  1000  102961     DRUCK INDIA PVT. LTD.                        479,777.20
    002 50           140904     ABN Amro Payments                             479,777.20-
    now problem is Clearing details i could not getting at BSIS & BSAS table.
    but iam getting clearing details at BSEG table. what is the problem . plse give help & solution. it is very urgant.if u have any doubts plse ask me.
    Advance Thanks
    Raj

    Dear sridhar/ all
    vendor side is all tables updated. it is ok. but i want detals about BSAS & BSIS.
    because iam working on service tax creidit configuration. in BSEG table it is showing cleared. but in BSAS & BSIS tables not showing as a cleared item. what is the reason . plse give solution/ help.
    Raj

  • How are BSIS and COEP linked?

    Is there a link between BSIS and COEP tables?
    Any reference doc number can be populated from COEP to BSIS automatically?
    My requirement is to find how the BSIS-XBLNR can be linked to COEP?
    pl advise.
    Ven

    To put my question in a better way,
    when I enter a document with FB50, it generates controlling docs and also populates the FI doc number in the reference field of COEP.
    When I post a document with KB21N, it does generate the FI docs but does not populate the reference doc field.
    I need to find how is FB50 behaving. I tried to do a debug but not of much help.
    - Ven

  • BSI TUBS Documentation

    Can anyone give me the link to BSI TUBS Documentation in the SAP Service Marketplace ?
    Thanks And Regards,
    Somdeb Banerjee.

    Okies..I got it. The link is : https://websmp209.sap-ag.de/hrusa
    The link requires SMP Userid n p/w validation.

  • Line item only display after run RFSEPA01

    Hi expert,
    I set up all gl account with line item display but i need to block GL and run program RFSEPA01 so that line item will posted to BSIS table.
    Is this need to run every after new posting done in?
    As i run for one GL before with RFSEPA01 after new posting to that GL, i not able to view line item in FS10N, therefore i go and run RFSEPA01 again.
    Is this everyday i need to run & re-run for all gl? Is there any configure i missing?
    Please advice on menu path to configure the link to BSIS table.
    Thanks.
    regards,
    chuan

    Dear,
    What is your requirement?
    Why you are running RFSEPA01 daily when there is option "Open Item managed" ticked in FS00?
    Program description: Switch On Line Item Display by Changing Master Record.
    TABLES: bsis,
           *bsis,              "#EC NEEDED
            bsas,
           *bsas,             "#EC NEEDED
            bseg,
            bkpf,
            skb1,
           *skb1,
            ska1,
            t001.
    RFSEPA01 is used when the GL Account is not there in open item status and need to change that to open item managed.
    Check once again

  • Urgent: Making of vendor  payment  report

    Hi,
    I am making report in which i have to display whether payment is done or not ? In this report i am taking XBLNR field as common field to make  relatioship among BKPF  so that further among BSAS,BSIS,BSAK,BSIK tables as these tables consist of the data about the status that their payment is done or not?

    Hi,
    Try in dis way....I think it may work
    select <fld1> <fld2>....from BKPF into corresponding fields of table t_bkpf
    where <condn>.
    if not t_bkpf[] is initial.
    select <fld1> <fld2>....from MKPF into corresponding fields of table t_mkpf
    for all entries in t_bkpf where xblnr = t_bkpf-xblnr.
    try in such a way n see.........
    Reward if helpful.
    Thanks.

  • Taking time to fetch records from BSEG

    Hi all,
    When iam fetching wrbtr,augdt,zterm fields  from BSEG table by passing VBELN and BUKRS it is taking lot of time to get.My query goes like this
      select vbeln wrbtr augdt zterm from bseg into table t_bsegtab for all
                entries in t_vtab where bukrs = p_bukrs and
                 vbeln = t_vtab-vbeln.
    Is there any wrong in statement.If not what is the possible solution for that.
    regards
    kiran

    Hi,
      As BSEG is a cluster table and has open/close item details of Vendor, Customer & GL account, as far as possible avoid quering BSEG instead use the relevant tables to get the data, BSEG has the combination of following tables,
    BSID & BSAD  --> Customer Accounting details
    BSIK & BSAK  --> Vendor Accounting details
    BSAS & BSIS  --> G/L Account details
    If your requirement is to get the open/close items for Vendor, access BSIK & BSAK tables by passing the key fields in the where condition.
    Hope this helps, get back for further clarifications,
    Rgds,

  • Data from Bseg taking too much time

    Hi ,
    I need to extract data from BSEG and it is goin in timeout.
    my query is  :
    1 :  on the basis of VBRK i need to fetch data from bseg.
    loop at it_vbrk.
          awkk = it_vbrk-vbeln.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
            EXPORTING
              input  = awkk
            IMPORTING
              output = awkk.
    it_awkey-vbeln = it_vbrk-vbeln.
    it_awkey-awkey = awkk.
    append it_awkey.
    endloop.
    2.
    if it_awkey[] is not initial.
    select bukrs BELNR gjahr BLART AWKEY from bkpf into table it_bkpf for all entries in it_awkey
    where
    bukrs = '5000'
    and blart EQ 'RV'
    and awkey = it_awkey-awkey.
    endif.
    Please guide me to get solution
    Ashish Gautam

    Ok, u can use the secondary index tables of BSEG...
    BSAS
    BSIS,
    BSAD,
    BSID,
    BSAK,
    BSIK,
    BSIM.
    whatever is in BSEG is also in these tables....
    and if u use BSEG, then try to match the key fields of BSEG, then only it will give the best performance....
    eg.
    BUKRS
    BELNR
    GJAHR
    BUZEI
    use the same order as given in the database...
    and do not use any other fields except the key fields in the where clause...
    and do not use 'NE' 'Not in' in the where clause....
    regards
    Sukriti....

  • Problem in updating bseg-zuonr and bseg-sgtxt fields.

    Hi guys,
    I have a requirement to update    ZUONR  and  SGTXT   fields in  BSEG , BSAS, BSIS, BSAK, BSIK, BSAD, and BSID tables .  Is there any FM or BAPI to achieve this functionality as i dont want to use UPDATE statement. anybody please help me out.
    Thanks in Advance
    Regards
    satish

    Perform some search at scn on transactions FB02 and FB09 (BDC solution) or FM FI_ITEMS_MASS_CHANGE (BDC generator actually)
    Regards,
    Raymond

  • Problem in SQVI

    I am using table BSAS, BSIS and J_IEPART2 Table in SQVI but while generating a view, system is giving me error that
    BSAS-PRODPER is not defined in the ABAP Dictionary
    BSAS-PROPMANO is not defined in the ABAP Dictionary
    Please provide me the solution
    Regards,
    Kapil.

    Dear,
    I think you are using the structures instead of tables.
    Please select the corresponding views - not structures.
    Check OSS note 90320 .
    Regards,
    Syed Hussain.
    Edited by: Syed Hussain on Oct 24, 2009 7:46 PM

  • ST05 Trace on a select query on BSEG table

    hi all,
    this is my select query on table BSEG table:
      SELECT bukrs
             belnr
             gjahr
             buzei
             KOART
             mwskz
             kostl
             lifnr
             aufnr
             werks
             ebeln
             txjcd
             projk FROM bseg
                   INTO TABLE i_bseg
                   FOR ALL ENTRIES IN i_ad_tab
                  WHERE bukrs EQ i_ad_tab-bukrs  AND
                        belnr EQ i_ad_tab-belnr  AND
                        gjahr EQ i_ad_tab-gjahr.
    when i m doing SQL trace ST05 on this query and in the detail statement showed the following query
    SELECT
      "MANDT" , "BUKRS" , "BELNR" , "GJAHR" , "PAGENO" , "TIMESTMP" ,
      "PAGELG" , "VARDATA"
    FROM
      "RFBLG"
    WHERE
      "MANDT" = ? AND  "BUKRS" = ? AND  "BELNR" = ? AND  "GJAHR" = ?
    ORDER BY
      "MANDT" , "BUKRS" , "BELNR" , "GJAHR" , "PAGENO"
    what is RFBLG table in SE11, but could not find it.
    what is RFBLG?also, the above select query giving me performance issues.. the "for all entries" clause is used as per norms...
    please suggest a solution..

    hi
    good
    The famous BSEG table is a cluster table.
    It is as was correctly stated part of the Accounting Document Segment. It is part of the Pool cluster RFBLG and lives in the package: FBAS (Financial accounting 'Basis').
    You can't read a cluster table exactly the way you read a database (old speak, transparent table).
    You can use a program to read called RFPPWF05
    Note 435694: Display BSEG item by calling FB09D (modified FB09)
    Other possiblity: Other possibility: CALL DIALOG 'RF_ZEILEN_ANZEIGE', but since this is a dialog I don't think this would work.
    In any event go to FBAS Package (development class) to see your business objects, class library and functions.
    you must use keyfields bukrs , belnr, gjahr
    (so 1st select table bkpf) to select bseg.
    or use secondary index tables:
    bsas, bsis, bsik, bsak, bsid, bsad
    Regards,
    Raj.

  • Pulling Profit Centers from AR

    Hi,
    We are currently using 0FI_AR_4 extractor to pull AR related information. One of our requirements requires us to analyze by Profit Centers. From what I understand profit centers are derived at material level hence the current extractors is not able to pick up this information if there are more than 1 material. How do I go about pulling this information ? I believe data needs to be pulled from table BSAS / BSIS ? Should i use 0FI_GL_4 instead ?

    You are right, 0FI_AR_4 and 0FI_AP_4 pulls from BSID/BSAD and BSIK/BSAK but I am also not able to find any standard extractor for BSIS and BSAS.
    One way around for this is to create your own extractor.
    For profit center accounting you have standard extractor, chk EC-PCA in RSA5.

Maybe you are looking for