Retrive document types from BKPF / BSEG

Hi guys,
I need to extract records with the following document types from BKPF
- RE (Invoice Gross with PO)           
- RA (Sub.cred.memo stlmt with PO)
- KR (Vendor Invoice without PO)          
- KG (Vendor credit memo without PO)      
- ER (E-Payment)                    
- TE (Travel & expense)               
- KD (Down payment)               
and then for these records the BSEG entries with these posting keys
- 31 (link to Payment via clearing document)
- 40 (debit entry, for non-PO voucher)                    
- 50 (credit entry, for non-PO voucher)                    
- 86 (GR/IR Debit, link to PO Line, positive)                
- 96 (GR/IR Credit, link to PO Line, negative)                
Extractor 0fi_gl_4 does not provide me wtih all these doc types, only a subset.
0fi_ap_4 is not an option for me, because in the data warehouse I need to link the bkpf/bseg records to the PO (ekko/ekpo), while we have no po reference in bsik/bsik that are read by 0fi_ap_4.
Is there a way to extend the fi_gl_4 so it contains the doc types I need?
Or do you know another way of retrieving bseg records of specific types?
Regards,
Arjen

ok,
I have checked again and if you didn't change the business content, both fields BLART (doctype) and BSCHL (key) are extracted; how was your delta init done? with selections? Did you apply some specific TRules or URules? Check you PSA for a record you are missing and simulate the update in order to see what's going on.
As I said, I got everything in my ODS.
you can also check this in R/3; Tx RSA3 with a comp_code and a fiscal period selection...
hope this helps
Olivier.
Message was edited by:
        Olivier Cora

Similar Messages

  • MRP-Exclude STO document type from MRP Run

    Hi,
    I want to exclude STO document type from MRP run, so that STO Open qty will not be considered as open qty while  doing MRP.
    I have checked below settings but didn't worked.
    1. In OMI8 - I have unchecked "Stock in Transfer"
    2. SPRO->Materials Management->Consumption-based Planning->Planning->Define torage Location MRP per plant
         Here I have excluded ONE storage location from MRP and same storage location has been used in the STO.
    Can anyone know how to resolve this ?
    Regards,
    Rakesh

    Rakesh,
    Yes, they will not be relevant for MRP.  Neither will anything else in that storage location.  However, the setting is not in configuration, but in the material master (MRP4 tab).
    The configuration setting you mentioned has no impact on existing material masters, it is only used to determine the default settings for newly created storage location entries for a material/plant..
    You can set a particular material/plant/stlocn to be irrelevant for MRP.  This relevancy is irrespective of document type, it can be a STO, a purchase req, a sales order,  a production order, or it could be stock (inventory)  - all supply and demand in this material/plant/stlocn are excluded from MRP processing.
    MRP relevancy of storage location is set at the material/plant/storage location level in the material master.
    If you do not wish to exclude a storage location from MRP, then you will have to find another way to make your STOs Irrelevant for MRP.  As I said earlier, STOs (like any other Purchase orders that are configured to process stock ), are generally considered to be relevant for MRP.    
    If you were a client, I would suggest that you rethink your business model that drives this requirement.   
    If the business model cannot be altered, and the storage location solution is unacceptable, then you will be stuck with a customized solution.
    Best Regards,
    DB49

  • Substituion of the FI Document type from MM posting

    Dears,
    we are actually in the need of posting movement type 562 and would like to assign a specific document type when certain conditions are met.
    In transaction OMBA document type WA is associated to the goods receipt (which is the task that is being carried out with movement 562) and we would like to substitute it with a custom document type when posting the document that meet particular criteria such as Plant and G/L account.
    I have tried to create a substitution from standard transaction OBBH but, if I create it at line item level, I am not able of selecting the BLART field (since it is part of the header data) while if I create it at header level I do not have the necessary information (such as plant and G/L account) and it's not possible to select the document type as a field to be substituted.
    Do you think that it would be possible to achieve my objective by creating a substituion at line item level that has, as prerequisite, the plant and G/L account, and a UEXIT as substitution?
    Do you have any other suggestion to solve this issue?
    Thanks and best regards
    Davide

    Hello Davide,
    You can try to change the attribute to the BLART and make it subsitutable (by maintaining VWTYGB01 view via SM30) and build your subsitution on complete document, but I doubt if SAP will allow to substitute such sensitive field.
    Regards,
    Eli

  • Requisition Document type from PM Order

    Hi:
    WE implemented SAP PM for our Canadian company. In configuration of external procurement through PM order, we specified to have requisition document type u201CZSERu201D to be created.
    So for the plants in Canadian company code when PM orders are created (IW31) and if there is an external service is required, System creates ZSER requisition type.
    WE are implementing PM for our US Company where we want to have a different requisition document to be created PM order. The requisition document type ZNB should be created for the 3 plants in US Company. How can we control this??
    Is this possible??

    Hi,
      You should be able to accomplish this through the user exit
         COZF0001 Maintenance order: Change purchase requisition for external operation
         COZF0002 Maintenance order: Change purchase requisition for external component
      Based on the order header information you can assign a Different PR type(BSART) from what has been specified in config. However be-aware that if collective purchase requisition is active all the PR for the Order should be of same PR type.
    Regards
    Narasimhan

  • Create different billing document types from same sales order type

    Hello,
    Please take a common document flow, just  like this one:
    - Sales Order (type ZE01 )
    - Outbound Delivery
    - Billing Document ( ZA or ZB )
    The billing document is based on the outbound delivery. Here is the requirement that we need to implement:
    - We need to determine different billing document types ( ZA or ZB ) according to a custom determination, based on a Z table. In some cases the billing document will be type ZA, in other cases it will be type ZB. I've been told that I can achieve this  via copy control , but some extra help would be welcome.
    Any clues?
    Regards,
    Joã

    Hi João G Neves ,
    Were you able to achieve this requirement using a  user exit? if so could you let me know the name of the user exit? Basically in our current project a sales order can be billied using 6 different billing document types. The copy controls between the sales  document and billing document is been set up for all the 6different billing doc types and currently the users are manually selecting the billing document type in VF01 .The buisness insists on making this automated.They want the billing document type to be determined based on some custom condtions.
    Any inputs regarding this is highly appreciated.
    Thanks & Regards,
    Srini

  • Disable sales document type from COPA? Is it possible?

    Hello gurus
    We have a situation where we dont wish system to create Profitability Analysis segments for items belonging to the quotes that we are creating?
    Is is possible to disable PA assignments by a sales document type and or item categories?
    Many thanks
    Jai

    The best person to guide for this would be your FICO consultant.
    Anyhow, check following thread for some understanding:
    How to deactivate COPA
    Note: Check all possible result before deactivating it on your system.
    Check Following link for understanding
    [Business Area Vs. Profit Center Vs. Profitability Segment|http://sapdocs.info/sap/fico/business-area-vs-profit-center-vs-profitability-segment/]
    [Profit Center Default In Sales Order|http://www.sap-img.com/sap-sd/profit-center-default-in-sales-order.htm]
    Thanks & Regards
    JP

  • Retrive document path from R/3 system

    I'm trying to retrive the document path (FILEP) from DRAW table in r/3 system to be displayed in my report
    i'm using remote cube and all other column are displayed perfectlt but when i choose this (FILEP) I'm getting the following error.
    <b>Error value "(hex.") of characteristic contain invalid characters</b>
    Hope someone give me a hand on this
    thank you in advance

    many BW systems have 'ALL_CAPITAL' written in the RSKC tcode.I believe it allows capital letters of all languages.
    goto tcode RSKC..
    u might already see a list of characters there.
    Just add '\' at the end of the string.Dont put comma or a blank.
    Then click on save.then click on execute.
    now try to reload data.I think it will go GREEN.
    cheers,
    Vishvesh

  • DMS Connector for KM : I see only one document type from the document area

    Hi,
    The DMS connector is installed successfully on KM.
    I can display folder tree and documents but I see only one type of document.
    I mean, when I use transaction OAC0, I see different content repository defined in DMS.
    I wonder where is the setting that specified which content is link to the DMS connector for KM.
    Thanks in advance.

    Hello Zbynek,
    I installed the DMS once, but my experience how to use it is poor.
    In the Backend ( Transaction CV01N i think,) you can store search variants using the prefix you have defined for the DMSRM (default is KM_<theName>). This variants can be used to filter out several documents. There must be a way to give authorizations on them. Maybe you will have to use a security manager, i don't know.. in our case the user persistence (authScheme) was SAP-System an no TREX involved.
    It is not much, but maybe it helps...
    best regards
    Guido

  • Get FI Documet number from BKPF table using CO document number in COVP tabl

    Hi,
    In  datasource 0CO_OM_CCA_9 , we have written a code in CMOD to get the FI Document Number from CO document Number.
    The flow of code is:
    1) From the CO document number, get reference document number  (REFBNfield) from, COVP table
    2) Pass this REFBN in AWKEY(10) field of BKPF table.
    3) We have created new field in datasource named 'ZBELRE' which gets populated with BELNR field obtained from BKPF table.
    This ZBELNR is the FI Document number.
    But somehow wrong FI Document number is getting populated.
    After analyzing code, we found that the AWKEY which we passed in BKPF table is incomplete and the full AWKEY is
    COVP-REFBN+COVP-AWORG
    Is this condition always remains true in all the cases? Also, is the selection criterion which we have used to find the FI document number from BKPF table is sufficient?
    Our CO Consultant says that we should also pass AWTYP along with AWKEY in BKPF table.
    Please suggest a solution.
    Following is the code :
    ***********Datasource Modification for0CO_OM_CCA_9*******************
      WHEN '0CO_OM_CCA_9'." Data Source
        TYPES:BEGIN OF ty_bkpf,
        belnr TYPE bkpf-belnr,
        xblnr TYPE bkpf-xblnr,
        bktxt TYPE bkpf-bktxt,
        awkey TYPE bkpf-awkey,
        bukrs TYPE bkpf-bukrs,
        gjahr TYPE bkpf-gjahr,
        END OF ty_bkpf.
        TYPES : BEGIN OF ty_bseg1,
        lifnr TYPE bseg-lifnr,
        belnr TYPE bseg-belnr,
        bukrs TYPE bseg-bukrs,
        gjahr TYPE bseg-gjahr,
        END OF ty_bseg1.
        DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
        wa_bkpf TYPE ty_bkpf,
        it_bseg1 TYPE STANDARD TABLE OF ty_bseg1,
        wa_bseg1 TYPE ty_bseg1,
        l_s_icctrcsta1 TYPE icctrcsta1.
        "Extract structure for Datasoure 0co_om_cca_9.
        DATA: l_awkey TYPE bkpf-awkey.
        DATA: l_gjahr1 TYPE gjahr.
        DATA: len TYPE i,
        l_cnt TYPE i.
        l_cnt = 10.
        SELECT lifnr
        belnr
        bukrs
        gjahr
        FROM bseg
        INTO TABLE it_bseg1.
        DELETE ADJACENT DUPLICATES FROM it_bseg1 COMPARING belnr gjahr .
        SELECT belnr
        xblnr
        bktxt
        awkey
        bukrs
        gjahr
        FROM bkpf
        INTO TABLE it_bkpf.
        IF sy-subrc EQ 0.
          CLEAR: l_s_icctrcsta1,
          wa_bkpf,
          l_awkey,
          wa_bseg1.
          LOOP AT c_t_data INTO l_s_icctrcsta1.
            MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
            READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
            l_s_icctrcsta1-refbn
            gjahr = l_gjahr1.
            IF sy-subrc EQ 0.
              MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
              MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
              MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
              MODIFY c_t_data FROM l_s_icctrcsta1.
              READ TABLE it_bseg1 INTO wa_bseg1
              WITH KEY
              belnr = wa_bkpf-belnr
              bukrs = wa_bkpf-bukrs
              gjahr = wa_bkpf-gjahr.
              IF sy-subrc EQ 0.
                MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
                MODIFY c_t_data FROM l_s_icctrcsta1.
                CLEAR: l_s_icctrcsta1,
                wa_bseg1,
                l_gjahr1.
              ENDIF.
            ENDIF.
            CLEAR: l_s_icctrcsta1.
          ENDLOOP.
        ENDIF.
    ***End of Datasource Modification for 0CO_OM_CCA_9*******************

    Hi,
    this forum is for the SAP BusinessObjects BI Solution Architecture. Please post your question into the corresponding product forum for SPA BW
    regards
    Ingo Hilgefort

  • Document Types - BSEG

    Hi,
    I have a quick question regarding the BSEG table.
    When you pull every entry for every document type in the BSEG table, will that provide you with all the entries in the general ledger?
    Thanks.

    Hi,
    Document type is stored on the header level, i.e. in BKPF table. Answering to your question: yes, BSEG contains all postings in G/L.
    Regards,
    Eli

  • Copying Certain document types only from project to Solution Directory

    Hello,
       We are in the process of setting up Solution Directory in Solution Manager 4.0 sp12. After creating a solution we'd like to add scenarios from multiple implementation as well as template projects based on the document type.
    We have several document types that we use in various tabs (config, testcase etc) and would like to get only a subset of document types from the soruce projects.
    When trying to use the copy options in the pop-up window the copy filter works only on the documentation tab and does not filter the documents in other tab's based on the copy option filter.
    Is there anyway we can filter the document types upon copy from project to directory. Please let me know if there is any Badi or User-exit for this functionality as well.
    Any Help is much appreciated.
    Thanks
    Rajesh Sundar

    Hi Rajesh,
    I just came across this article and I reckon it will answer your question. Please read the section Documents copied when copying a project.
    http://wiki.sdn.sap.com/wiki/display/SM/Documents+in+Solar01+and+Solar02
    Cheers
    Ganesh

  • Cutover from manual document type to automatic document type

    Hi, has anyone ever cut over from manual to automatic document type?
    (I have seen the opposite, where an automatic document type becomes manual. It was successful)
    Eg in a data migration, to populate some interunit elimination history data (but avoiding runnnig tasks on history), we could post intrerunit via PL20 flexible upload to a 'manual' document type.
    Then before first use of BCS tasks in the system, change the document type from manual to automatic.
    i can't see any reason why it would not work, will need to be tested of course.
    Any experience or comments out there?

    Thanks guys, I've been too busy to test this but I'm very sure it does work and I also checked with SAP and they agreed.
    So closing the message - I'll only update this message if it does NOT work as expected.

  • How to fetch accounting document number from known material document number

    Hi,
    Using MIGO transaction, by giving mblnr(material document number) as input, I get accounting document number by clicking FI document.I have to add this accounting document number in my report for corresponding known mblnr(material document number) values.
    My question is how to fetch the accounting document number present in MIGO to add in my report program.
    I used the xblnr(Reference Document Number) which is present both in mkpf and bkpf tables to fetch values.
    I extracted xblnr values with known mblnr values from mkpf (Header: Material Document table).
    and then extracted belnr(accounting document number) from bkpf (Accounting Document Header table) by using xblnr values.
    But the query is running for a long time.
    Is there any other method  to extract the values in a simpler way.
    Kindly advise.
    Thanks and Regards,
    Sanjeev

    I had the values of xblnr and some other fields such as mblnr, budat etc in wi_item table.
    I created a new internal table i_xblnr and got down those values.
    And then created a new internal table i_belnr and tried to get values of belnr in it.
    The code I wrote is given below:
    IF not wi_item[] is initial.
    loop at wi_item.
       at new xblnr.
        ws_xblnr-xblnr = wi_item-xblnr.
         append ws_xblnr to i_xblnr.
       endat.
    endloop.
      select belnr xblnr from bkpf into table i_belnr for all entries in i_xblnr where xblnr = i_xblnr-xblnr.
    ENDIF.
    Kindly look after it.Thank you.
    Regards,
    Sanjeev

  • Change the backend doc type from PR to PO in BADI BBP_TARGET_OBJECTS.

    Hi,
    We have followed below approach for backend document type determination.
    1. A custom function module contains the logic to determine the backend document type of a Shopping cart line item. THis function module, performs many checks and hence cannot be called in any BADI that is executed in Foreground.
    2. I am using BADI BBP_TARGET_OBJECTS to change the follow document type by calling the custom function module.
    Issue here is, if the backend document type of a line item is Purchase requisition (2) by SAP standard, and if I try to change it to Purchase order, it gives run time error and ends up in creation of Purchase order.
    After further investigation I found that this line item (with default backend doc type as 2) has a desired vendor. If we change the desired vendor of this line item to fixed(To Partner function 19 from partner function 39), it allows us to change the doc type from Purchase requisition to purcahse order in BADI BBP_TARGET_OBJECTS.
    But changing the partner function is possible only in BBP_DOC_CHANGE BADI, and I cannot call the custom function module there, as it may impact the performance.
    Is there any other way, I can change the partner function in any of the BADIs called in background?
    Or Is there any way by which I can change the backend document type from PR to PO in BBP_TARGET_OBJECTS?

    Hi Parab
    if you swaping 39 to 19 viadoc change badi
    REQUESTER has a control on Purchase ORDER Vendor and BUYER lost a control so your business has to decide.In this case procurement department lost their control.
    Fixed vendors are like inforecord and contract negotiated for best price ..
    Muthu

  • Sales document type restriction to create sales order

    Hi Frinds,
    My client has one requirement ...they have different sales document type. For sales document type  free of charge delivery they want only some authorised person should be able to create sales order. Is it possible to set the authorisation to create sales order according to sales document type.
    Regards
    SV

    Yes, 
           As already suggested, it is very well possible to restrict the user for the use of certain sales document type from basis.
    & to add to the above,
    Create Z* table with Sales Org + Doc type = UserID.
    call this table in VA01 transaction & write piece of coding , if current USerID have entry in this table with the said combination - should not allow to proceed further.
    without any basis involvement also you can ahieve your requirement.
    Note: Sales Org is used for validation purpose only.
    Regards,
    Reazuddin MD

Maybe you are looking for

  • How do i email a video clip from my iphone

    How do i email a 6 minute video clip from my iphone

  • Installing and deploying a .webpart file in SharePoint 2013

    I have a webpart that took from a SharePoint 2010 web site from its webparts library. This webpart has the .webpart extension. I downloaded it as a copy. Now I want to install it to a SharePoint 2013 site ti its webpart gallery. I tried using Visual

  • Is Logical Database used in ABAP?????

    Hi All, I m very confused whether LDB's are used in ABAP or not. i have undergone a small training in ABAP-HR (HCM). In that training i was told that there is an advantage in HCM that LDB's are used here which were not used in ABAP. And i have read s

  • Getting data into internal table wa_final

    Hi Guys I have change the logic for this program , I have created 2 workareas and internal table now I need help to place the data into      wa_final-max_date = wa_data-idate.          wa_final-min_date  = wa_data-idate.          wa_final-max_km  = w

  • Domain server upgrade issue

    Hi I have recently introduced the first Server 2012R2 Domain Controller into our environment. We currently have Server 2008 DC, and my plan was to upgrade a DC on a remote site to Server 2012 R2. The upgrade appears to be successful, but only a few d