Business Content or Information for GR/IR Account Report

Hi All,
I have an R3 report called GR/IR Account Report by PO Mismatch.
Is there any business content available for this in BI.
The below tables are using in the report.
         bsis,                         " Accounting docs by account
         bsas,                         " Cleared accounting docs by acc
         bseg,                         " Accounting doc line item
         ekko,                         " Purchase Order Header,
         ekpo,
         mkpf,                         " Material Document
         lfa1,                         " Vendor details
         ekbe,                         " PO History
         ekkn,                         " PO Acct.Assgnment
         usr21,
         addr3_val,
         ad3_flags,
         stxh.
Could you please provide me your inputs on this
Regards
Srini

The new additional fields need to be populated are
          ZZAUFNR         Order Number                                  *
          ZZBEDAT         Purchase Order Date                           *
          ZZCRE_FI         FI Doc Created By                             *
          ZZCRE_PO         PO Doc Created By                             *
          ZZEBELN         Purchasing Document Number                    *
          ZZEBELP         Item Number of Purchasing Document            *
          ZZKOSTL         Cost Center                                   *
          ZZMWSKZ         Tax on sales/purchases code                   *
          ZZPROJK      WBS element                                   *
          ZZTXZ01         Short text                                    *
          ZZUSNAM         User name                                     *
          ZZXBLNR         Reference document number                     *
          ZZHWSTE      Tax Amount in Local Currency                 *
          ZZSGTXT      Item Text                                    *
          ZZHKONT      Finance G/L Account                          *
  when '0FI_AP_4'.
Declare the local data fields to store data temporarily
    data : l_dtfiap_3 like DTFIAP_3,
           mwskz like bsik-mwskz,
           l_ernam like   bapibname-bapibname,
           l_address like bapiaddr3,
           l_bseg  like bseg,
           l_bedat like ekko-bedat,
           l_ps_psp_pnr like prps-pspnr.
    data : gt_return type bapiret2 occurs 0 with header line.
    loop at c_t_data into l_dtfiap_3.
      l_tabix = sy-tabix.
*Select the tax Code for the particular record from BSAK TABLE
      select single mwskz sgtxt into (l_dtfiap_3-zzmwskz,
                                      l_dtfiap_3-zzsgtxt)
            from bsak
            where bukrs = l_dtfiap_3-bukrs
              and buzei = l_dtfiap_3-buzei
              and belnr = l_dtfiap_3-belnr
              and lifnr = l_dtfiap_3-lifnr
              and gjahr = l_dtfiap_3-gjahr
              and zuonr = l_dtfiap_3-zuonr
              and augbl = l_dtfiap_3-augbl
            and augdt = l_dtfiap_3-augdt
            and bldat = l_dtfiap_3-bldat
            and blart = l_dtfiap_3-blart
            and bschl = l_dtfiap_3-bschl
            and budat = l_dtfiap_3-budat.
      if sy-subrc = 0.
        modify c_t_data from l_dtfiap_3 index l_tabix.
      else.
*If corresponding Document Number is not present in BSAK check BSIK
*TABLE
        select single mwskz sgtxt into (l_dtfiap_3-zzmwskz,
                                        l_dtfiap_3-zzsgtxt)
                from bsik
                where bukrs = l_dtfiap_3-bukrs
                  and buzei = l_dtfiap_3-buzei
                  and belnr = l_dtfiap_3-belnr
                  and lifnr = l_dtfiap_3-lifnr
                  and gjahr = l_dtfiap_3-gjahr
                  and zuonr = l_dtfiap_3-zuonr
                  and augbl = l_dtfiap_3-augbl
                and augdt = l_dtfiap_3-augdt
                and bldat = l_dtfiap_3-bldat
                and blart = l_dtfiap_3-blart
                and bschl = l_dtfiap_3-bschl
                and budat = l_dtfiap_3-budat.
        if sy-subrc = 0.
          modify c_t_data from l_dtfiap_3 index l_tabix.
        endif.
      endif.
      select single hwste into l_dtfiap_3-zzhwste
          from bset
          where bukrs eq l_dtfiap_3-bukrs
            and belnr eq l_dtfiap_3-belnr
            and gjahr eq l_dtfiap_3-gjahr
            and buzei eq l_dtfiap_3-buzei.
Select Created By and invoice Reference Number from BKPF table
      select single usnam xblnr from bkpf
          into (l_dtfiap_3-zzusnam,l_dtfiap_3-zzxblnr)
            where bukrs = l_dtfiap_3-bukrs
              and belnr = l_dtfiap_3-belnr
              and gjahr = l_dtfiap_3-gjahr.
      if sy-subrc = 0.
        modify c_t_data from l_dtfiap_3 index l_tabix.
      endif.
      move l_dtfiap_3-zzusnam to l_ernam.
      refresh : gt_return.
Get the Fi doc Created By doing the function Module call
      call function 'BAPI_USER_GET_DETAIL'
        EXPORTING
          username = l_ernam
        IMPORTING
          address  = l_address
        TABLES
          return   = gt_return.
      move l_address-fullname to l_dtfiap_3-zzcre_fi.
      if l_dtfiap_3-zzcre_fi is initial.
        move l_ernam to l_dtfiap_3-zzcre_fi.
      endif.
      if not l_dtfiap_3-zzcre_fi is initial.
        modify c_t_data from l_dtfiap_3 index l_tabix.
      endif.
      if l_dtfiap_3-blart eq 'RE'.
.....Get New Fields from PO linked to FI Document.....................
Select PO Number from PO Line item from BSEG TABLE
        select buzei buzid ebeln ebelp
          into corresponding fields of l_bseg
          from bseg
         where bukrs eq l_dtfiap_3-bukrs
           and belnr eq l_dtfiap_3-belnr
           and gjahr eq l_dtfiap_3-gjahr.
          if l_bseg-buzei eq l_dtfiap_3-buzei.
.....Already read this line, therefore ignore it......................
            continue.
          endif.
          if l_bseg-buzid eq 'T'.
.....Don't read automatically created lines - Tax Line................
            continue.
          endif.
          if not ( l_bseg-ebeln is initial ).
            move l_bseg-ebeln to l_dtfiap_3-zzebeln.   " PO Number
          endif.
          if not ( l_bseg-ebelp is initial ).
            move l_bseg-ebelp to l_dtfiap_3-zzebelp.   " PO Line Item No
          endif.
          if not l_dtfiap_3-zzebelp is initial.
            modify c_t_data from l_dtfiap_3 index l_tabix.
          endif.
        endselect.
.....Got PO Number from FI Document, Now get PO Details...............
.....Get Short Text...................................................
GET PO Line Item text
        select single txz01 into l_dtfiap_3-zztxz01
          from ekpo
           where ebeln eq l_dtfiap_3-zzebeln
             and ebelp eq l_dtfiap_3-zzebelp.
        if sy-subrc = 0.
          modify c_t_data from l_dtfiap_3 index l_tabix.
        endif.
.....Get Account Assignment...........................................
        select ps_psp_pnr aufnr kostl sakto
          into (l_ps_psp_pnr,l_dtfiap_3-zzaufnr,
                  l_dtfiap_3-zzkostl,l_dtfiap_3-zzhkont)
              from ekkn
               where ebeln eq l_dtfiap_3-zzebeln
                 and ebelp eq l_dtfiap_3-zzebelp.
          if sy-subrc = 0.
            modify c_t_data from l_dtfiap_3 index l_tabix.
          endif.
          select single posid into l_dtfiap_3-zzprojk
               from prps
                 where pspnr = l_ps_psp_pnr.
          if sy-subrc = 0.
            modify c_t_data from l_dtfiap_3 index l_tabix.
          endif.
        endselect.
.....Get Name of Person who created PO................................
        clear : l_ernam,l_bedat.
        select ernam bedat into (l_ernam, l_bedat)
            up to 1 rows
            from ekko
             where ebeln eq l_dtfiap_3-zzebeln.
        endselect.
        move l_bedat to l_dtfiap_3-zzbedat.
        if not l_dtfiap_3-zzbedat is initial.
          modify c_t_data from l_dtfiap_3 index l_tabix.
        endif.
        refresh : gt_return.
        call function 'BAPI_USER_GET_DETAIL'
          EXPORTING
            username = l_ernam
          IMPORTING
            address  = l_address
          TABLES
            return   = gt_return.
        move l_address-fullname to l_dtfiap_3-zzcre_po.
        if l_dtfiap_3-zzcre_po is initial.
          move l_ernam to l_dtfiap_3-zzcre_po.
        endif.
        if not l_dtfiap_3-zzcre_po is initial.
          modify c_t_data from l_dtfiap_3 index l_tabix.
        endif.
      else.
.....Get new Fields from FI Document..................................
        select buzei buzid ebeln ebelp projk aufnr kostl hkont
          into corresponding fields of l_bseg
          from bseg
         where bukrs eq l_dtfiap_3-bukrs
           and belnr eq l_dtfiap_3-belnr
           and gjahr eq l_dtfiap_3-gjahr.
          if l_bseg-buzei eq l_dtfiap_3-buzei.
.....Already read this line, therefore ignore it......................
            continue.
          endif.
          if l_bseg-buzid eq 'T'.
.....Don't read automatically created lines - Tax Line................
            continue.
          endif.
          if not ( l_bseg-ebeln is initial ).
            move l_bseg-ebeln to l_dtfiap_3-zzebeln. " PO Number
          endif.
          if not ( l_bseg-ebelp is initial ).
            move l_bseg-ebelp to l_dtfiap_3-zzebelp. " PO Line Item
          endif.
          move l_bseg-aufnr to l_dtfiap_3-zzaufnr.   " Order Number
          move l_bseg-kostl to l_dtfiap_3-zzkostl.   " Cost Centre
          move l_bseg-hkont to l_dtfiap_3-zzhkont.   " GL Account
          select single posid into l_dtfiap_3-zzprojk
              from prps
                where pspnr = l_bseg-projk.
          if not l_dtfiap_3-zzprojk is initial
            or not l_dtfiap_3-zzaufnr is initial
            or not l_dtfiap_3-zzkostl is initial
            or not l_dtfiap_3-zzhkont is initial.
            modify c_t_data from l_dtfiap_3 index l_tabix.
          endif.
        endselect.
.....Get PO Short Text................................................
        select single txz01 into l_dtfiap_3-zztxz01
          from ekpo
           where ebeln eq l_dtfiap_3-zzebeln
           and ebelp eq l_dtfiap_3-zzebelp.
        if sy-subrc = 0.
          modify c_t_data from l_dtfiap_3 index l_tabix.
        endif.
.....Get Name of Person who created PO................................
        clear : l_ernam,l_bedat.
        select ernam bedat into (l_ernam, l_bedat)
               up to 1 rows
               from ekko
               where ebeln eq l_dtfiap_3-zzebeln.
        endselect.
        move l_bedat to l_dtfiap_3-zzbedat.
        if not l_dtfiap_3-zzbedat is initial.
          modify c_t_data from l_dtfiap_3 index l_tabix.
        endif.
        refresh : gt_return.
Get PO Doc Created By
        call function 'BAPI_USER_GET_DETAIL'
          EXPORTING
            username = l_ernam
          IMPORTING
            address  = l_address
          TABLES
            return   = gt_return.
        move l_address-fullname to l_dtfiap_3-zzcre_po.
        if l_dtfiap_3-zzcre_po is initial.
          move l_ernam to l_dtfiap_3-zzcre_po.
        endif.
        if not l_dtfiap_3-zzcre_po is initial.
          modify c_t_data from l_dtfiap_3 index l_tabix.
        endif.
      endif.
    endloop.
Edited by: Srinivas Gogineni on Apr 19, 2009 11:10 AM

Similar Messages

  • I registered the wrong information for my iCloud account--I misspelled and now want to change it.  Help is needed to delete the account and start anew.

    I registered the the wrong information for my iCloud account--I misspelled the account name.  I accidentally spelled blackberry instead of blackbird.  How can I change this?

    If you don't want to use an alias you'll have to create a new account as you cannot change the @icloud.com address once created.  You'll have to create a new ID, verify the ID, then use the ID to create the new account, and migrate your iCloud data to the new account.
    If you are currently syncing data with iCloud, begin by saving any photo stream photos to your camera roll as mentioned above.  If you are syncing Notes with iCloud, you'll also need to open each of them and email them to yourself so they can be recreated in the new account.  Finally, if you are syncing any iWork documents with iCloud, turn off iCloud syncing in your iWork app settings.
    Then go to Settings>iCloud, tap Delete Account, and choose Keep on My iPhone when prompted.  Then in Settings>iCloud tap Get a Free Apple ID at the bottom, set up your new ID, verify the email address you use to create it by responding to Apple's verification email, then sign in with the new ID to create your new account.  Turn on your iCloud sync settings and choose Merge when prompted to upload your data to the new account.  When you turn Mail to On you will be prompted to create your new @icloud.com email address.  Be carefull to type it correctly as it cannot later be changed.

  • HT2731 I need to update my billing/payment information for my appleid account?

    I need to set update my billing/payment information for my appleId account?

    We are just user here and can't do anything with your account
    Try http://www.apple.com/support/itunes/contact/
    Allan

  • I have lost my login information for cellular data account. How do I retrieve it?

    I have lost my login information for cellular data account. How do I retrieve it?

    I called AT&T at 1-800-331-0500 and asked for IPad support. They are going to send me a new SIM card. This will solve the problem. Thanks for  your help.

  • BW-CRM - Business Content Data Source for Service Ticket

    We are setting up BW for CRM. We want to analyze data related to Service Ticket. I am trying to find Business Content Data Sources for Service Ticket. I could not find any thing under Interaction Center Delivered analytics. I appreciate if any of you BW Experts can guide me in the right direction. Thanks for your help in advance. I am using RSA6 to look into delivered Data Sources

    Hi Nilesh,
    Thanks for the update.
      I can enhance  0HRPOSITION_ATTR to include  Number of hours per month & Number of Hours per Week (WKAVG & MOVAG).
    My last question is which object (Employee,Position,Job) do i need to enhance
    for  PA0007: WOSTD( Hours per week) - It will be used to calculate STAFF FTE
    Thanks for the help

  • Business content data source for  BP Product (De)Authorisations & Terminate

    Hi Experts......
    Good evening!!!..
    I do have one requirement for which im not getting any business content ds. Could you pl help me out in that ?
    My requirement is like below.
    Report is extracting SAP CRM contracts data:
    u2022     This report lists the number (as a numerical count) and the Type of BP Contractual Relationships and the Product Groups (PPRs) they are able to sell under those BP Contractual Relationship Agreements (BPAs).
    u2022     This report should also include (at the usersu2019 discretion) all Terminated BPAs and any de-authorised (Terminated) Product Groups. 
    u2022     The user should be able to decide whether the report includes Terminated BPAs and de-authorised Products ONLY.
    Pre-Requisite     BPA Contract has been accepted (Registered)
    Pre-Requisite     Include only changes to BPA contract (including Terminations and Product Group de-authorisations) which have been accepted (Registered) in CLM/Upside.
    Pre-Requisite     Do Not include changes (including Terminations and Product Group de-authorisations) to BPA which are u2018pendingu2019
    ADDITIONAL DESCRIPTION
    u2022     Channel Partners are called  Business Partners by contract.
    u2022     Some T2 Business Partners have contractual relationships with the company, while some may not; referred to as non-contracted T2u2019s.
    u2022     These Contractual Relationships are regulated in Business Partner Agreements
    u2022     BP Agreements outline the BPu2019s Relationship Type with IBM (e.g. Distributor/Reseller/Solution Provider) as well as the Product Groups (PPRs) that the BP has been authorised to sell under the BP Agreement Terms & Conditions with IBM.
    u2022     The subject of this report is to report on the number (as a numerical count) and the Type of BP Contractual Relationships and the Product Groups (PPRs) the BP is authorised to sell under those BP Contractual Relationship Agreements (BPAs).
    u2022     This report should also include (at the usersu2019 discretion) all Terminated BPAs and any de-authorised (Terminated) Product Groups (PPRs) previously associated with the BPA. 
    u2022     The user should be able to decide whether the report includes Terminated BPAs and de-authorised Products ONLY.
    u2022     A BP can have multiple relationships with Company (e.g. Distributor and Solution Provider).
    u2022     For each of these relationships the BP may have a separate BP Agreement (BPA) with company.
    u2022     Both T1 and T2 BP Agreements are also stored as a system contract in CRM outlining:
    o     The Discounts a BP will get under the corresponding agreement
    u2022     The BP Relationships are also reflected as a SAP Distribution Channel in SAP.
    Waiting for your quick response....
       Thanks in advance.

    Hi,
    I think you need to recheck RFC created for QA system , i guess it contains IP Address of the Dev system . Which is why it leads to Dev system whenever you try to goto source system.
    In case if dev, quality server are in the same server with different client then
    Goto  Transaction SM59,
    Select RFC (Dialog ) and tabpage "Logon security" tick on logon screen
    Hope that helps.
    Regards
    Mr Kapadia
    Assigning points is the way to say thanks in SDN.

  • Standard Business Content infocubes, dso for QM-Module

    hi
    Can anyone give me the "What Are the Standard Business Content InfoCubes and DSO" for QM -module.
    My client wants some standard business content objects for QM-Module.
    So please help me
    kumar

    hi,
    check out the following link. hope this help you. all infocubes in QM
    http://help.sap.com/saphelp_nw70/helpdata/en/b1/91823b6a86975fe10000000a11402f/frameset.htm
    regards
    harikrishna N

  • Standard Business Content & Data Targets for Case Management & CRM Survey

    Dear Friends,
    We are implementing CRM2007 with BW3.5 for reports for CRM Analytics. We require to Identify the Standard Data Targets & Standard Business Content (Reports) available for the following:
    1. Case Management
    2. CRM Survey (We have already been able to identify Data targets in BW3.5 for Web Survey & in CRM 2007 we have been able to identify Data targets for CRM Survey, as well as Web Survey. Our requirement is identifying Data Target for CRM Survey)
    Please guide.
    Regards,
    Rajesh Banka

    hi,
    You can find the planning scenarios related to planning ifor CRM at this link http://help.sap.com/SAPHELP_SEM350BW/helpdata/EN/05/242537cedf2056e10000009b38f936/frameset.htm
    You can also find the details on demo content for the same at http://help.sap.com/SAPHELP_SEM350BW/helpdata/EN/05/242537cedf2056e10000009b38f936/frameset.htm
    Regards,
    Deepti

  • Business content not found for  CRM5.0 Datasources

    Hello,
    I cannot find the business content for the following datasources of CRM 5.0.
    We are on BW 3.5 version and i am unable to find the business content for the below.Did anyone face this problem and is there any solution or we need to build custom info objects and ODS.
    Master data:
    0CRM_LI_CAT_TEXT
    0CRM_LI_ID_ATTR
    0CRM_LI_ID_TEXT
    NOTE: relevant info objects not found.
    Transaction data:
    0CRM_MLI
    Thanks in advance,
    Rao

    HI
    I have checked in my system also. 0CRM_C08 This InfoCube contains date about the CRM activity items. It is based on the Activity Items ODS object (technical name: 0CRM_ACTI).
    As you mentioned  like that The cube is not based on the another cube(0PH_C01). And it is not available in Metadata Repository also.
    May be you are looking in wrong way. Please check it once again.
    Any furhter questions are there please let me know.
    Thanks & Regards,
    Nagaraju.V

  • Business Content -is needed for QA and Production System

    I am working in BW3.5 system.
    BI content 3.5.3 is installed in BW Development system.
    Is it necessary BI content needs to be installed all the system like BW QA and BW production system.
    I am going to activate necessary objects only in BW Development environment. I am not going to activate anything in( Business content )QA /Production.
    I am going to move all the objects through Transports.
    Now our basis team saying that we have to install BI content in QA and Production.
    Please advise on this.

    Hi SAPBW D  ,
      Its customary to install the bussiness content first & start working wwith it . As far as qa,prod & Dev are concerned ,remember that though you transport from prod to qa & dev if they have to be available for use then they have to be activated . So activation of  at least the necessary objects is a must in qa & dev as well .
    -cheers !

  • Business content / extractor query for PM/PS Dates

    Gurus,
    in my bw implementation for PM module, working with "Network Order Activities" i have the need for these 4 objects:
    early start date
    early finish date
    late start date
    late finish date
    can anyoen tell me how can i know if there is a business content with these info objects? what is the procedure to find it? how can we fidn it if we can in sdn.sap?
    need it urgently, thanks,
    JP

    Here are some:
    [Inventory Management|http://help.sap.com/saphelp_nw70/helpdata/en/fb/64073c52619459e10000000a114084/frameset.htm]
    [Extended Warehouse Management|http://help.sap.com/saphelp_nw70/helpdata/en/50/ef665c9d454de88e4ef96452819979/frameset.htm]
    [Sales amd Distribution|http://help.sap.com/saphelp_nw70/helpdata/en/17/cd5e407aa4c44ce10000000a1550b0/frameset.htm]
    [Plant Maintenance|http://help.sap.com/saphelp_nw70/helpdata/en/f6/7a0c3c40787431e10000000a114084/frameset.htm]
    [Project Systems|http://help.sap.com/saphelp_nw70/helpdata/en/b9/60073c0057f057e10000000a114084/frameset.htm]
    Edited by: Dennis Scoville on Jul 22, 2009 9:03 PM

  • Filed Business Area is required for G/L account, for posting key 21

    Dear All
    when i did Miro , i didnt assign business area, now i am doing reversal for the same document.
    G/l account is Reconciliation A/C for vendor.i have check field status which is set for optional.
    Regard
    Nabil

    Hi,
    Check SAP Note :-186013
    [Mandatory field 'Business Area" in MIRO transaction;
    Regards
    Kailas Ugale
    Edited by: kailasugale on Feb 8, 2012 8:32 PM

  • Business area Not coming for CST /VAT account

    Hi,
    I am using Business area wise financial statements.System fetches business area for gl accounts  except  CST /VAT accounts  as per the configuration.
    Can this be solved through by running the program SAPF180?
    i do not know how to do this .
    GURU

    Before using substitution, refer Note 199886. Think about all possibilities and then you decide.
    BSEG-GSBER field for call point 9 (Line item) is not available for substitution. However substitution is possible but tricky.
    Good luck.
    PP

  • Where is my purchase information for my personal account, even though I have been added to family share? I don't want all purchases I make to go through the family share account.

    I made a recent app purchase, but the payment was declined because the purchase was attached to the family share plan. I made the purchase on my own account, and didn't know that purchases I make would now be associated with the purchase information provided for the family share. I like being on the family share, but is there a way I can purchase apps and other things through itunes using my own personal purchase methods?

    is there a way I can purchase apps and other things through itunes using my own personal purchase methods?
    Theaternerd,
    If you keep a credit balance on your own account, any purchase will be deducted from your credit balance instead of being charged to the Family Organizer's credit card.
    To keep a credit balance, just buy and redeem iTunes gift cards to your account.

  • HT5622 How do I change my credit card information for my itunes account as I have a new card?

    How do I change my credit card details attached to my itunes account as I have a new card?

    In iTunes, click on iTunes Store, then your Apple ID. Log in to your account and click "Edit" next to your payment information.

Maybe you are looking for

  • Domestic Sales Order with reference to Export Inquiry

    Hi All, I have a different type of requirement. Document Types: IN10-Export Inquiry IN20-Domestic inquiry OR10-Export Order OR20-Domestic Order The Inquiry(IN10) is created for Export Customer, Later they have some problems with export Customer then

  • I had to restore IPAD to original settings and lost all magazine subscriptions. Do you know how to get them back? iTunes is asking me to pay for them again...

    I have an iPAD2 and an iPAD mini and tried to upgrade to IOS 7.0.6 but both froze and I had to restore to factory setting (backup also did not work!). I was able to get most of my purchased books and apps from iTUNES (through my computer) but lost al

  • Zen V Plus, no belt cli

    Hello, I have just bought a Zen V Plus 8GB and I love it, I have one gripe and that is that there is no clip on the player to fasten to a belt or shirt. I have searched around but cannot find any Creative or 3rd party cover or something that includes

  • Built in Isight for the macbook

    I use yahoo messenger to communicate to my family when im away. when i do video chat i cannot get a clear voice from my family. they are garbled and i am clear to them when i talk. is there a setting in the speaker where i can hear my family a lot cl

  • DSO & Associated Process Chains

    Hello Expetrs, I need to anyze some DSO's for any data load performance issues and associated Process chains. Is there any tables or direct way to figured out which process chains are associated with perticular DSO/InfoCube ? One more questions, is t