5 Replies Latest reply: Dec 14, 2010 11:34 AM by Nazym Orazgaliyeva RSS

0FI_GL_4 filtering by hkont

Nazym Orazgaliyeva
Currently Being Moderated

Hi, all!

 

I have a question regarding a standard extractor 0FI_GL_4. Will appreciate any help.

 

I need to extract only certain data by filtering them according to HKONT field.

I want to implement it on the R3 side to improve performance and send to BW only necessary data.

Does it mean that I need to change functional module?

Can you share your solutions?

 

Thanks in advance!

  • Re: 0FI_GL_4 filtering by hkont
    Balajee Sivakumar
    Currently Being Moderated

    Hi,

      Did you go through the data dource funciton module?

    I think it would be better if you do the necessary filter related coding in the function module itself so that as per your requirement, only the filtered records are transfered to the BW system.

     

    Regards,

    Balajee

  • Re: 0FI_GL_4 filtering by hkont
    Raymond M. Pereira
    Currently Being Moderated

    Hi,

     

    Two things here.

     

    1. If you want to do this for performance reason, then it makes sense to make the field "HKONT" as selection relevant.

       Which I believe is currently not available. But there's a way around it.

     

    Solution : Please implement it in your sandbox system first to see if it works. It worked for me for another SAP delivered datasource. it may or may not work for you. I have my doubts since HKONT is not in BKPF but only in BSEG.

     

    You will have to create a simple ABAP program and execute it. In each system.

     

    REPORT  ZXXXXX.

     

    tables ROOSFIELD.

    Update ROOSFIELD set SELECTION = 'X' where

    OLTPSOURCE = '0FI_GL_4' and

    FIELD = 'HKONT''.

     

     

    2. If it's not performance critical, then you can simply delete the unwanted accounts in your CMOD enhancements with a simple one line code.

     

     

    Which of the above suits you?

     

    -RMP

    • Re: 0FI_GL_4 filtering by hkont
      ruben melendez
      Currently Being Moderated

      Hi,

       

      Just adding the HKONT in ROOSFIELD doesn't work by itself. The FM first selects documents from BKPF based on the restrictions (therefore HKONT is not taken into account) and then it gets the rest of the info from BSEG, based on the document numbers it got first.

       

      I guess you could follow the second advice, deleting the accounts into CMOD but I'm not sure about it.

       

      I faced this same problem few time ago (it seems very common as there are lot of people asking for this on the forums). I don't have skills to code in CMOD so I had to take another approach that is working fine for me:

       

      The line items I wanted to collect were all in BSIS table so I created a generic datasource in source system, query extraction option, as you only need a Infoset to do it. The infoset is built as a simple join of tables BKPF and BSIS. In the generic datasource I use CPUDT as delta pointer and I take posting month / year, doc type, company code and account as selection criteria. You could try something like that.

       

      Regards.

      Ruben

      • Re: 0FI_GL_4 filtering by hkont
        Raymond M. Pereira
        Currently Being Moderated

        Hi,

         

        Ruben is right. I just checked and the first option doesn't work because it's not in BKPF as I mentioned in my previous post.

        You have to delete them in CMOD. Which will reduce your data volume but won't reduce the extraction time.

        About changing the FM, I haven't done it before and won't advise changing SAP's FM if you don't know what you are doing.

         

        -RMP

  • Re: 0FI_GL_4 filtering by hkont
    Nazym Orazgaliyeva
    Currently Being Moderated

    Thanks for your replies!

     

    Creation of info-query by joining the tables was my first solution. I ve created timestamp field and the generic delta refers to it. So, it is possible to control addition of the new records.

    But the updates to the data(document deletion) already sent to BW gave me a headache.

     

    Therefore I wanted to use standard extractor. I ve decided to not filter by hkont, because new accounts can be added in the future. It is better I think to load all accounts.

     

    I ve used note Note 991429 - Minute Based extraction enhancement for 0FI_*_4 extractors to improve performance.

    But cannot understand the purpose of BWFINSAF field. Does it mean that new document will be extracted to BW only after one hour?

    Also usually data is gathered into ODS in bw(0FIGL_O02), but then it should be loaded to cube? How often it should be done and cube must be created by myself?

Actions