Report for getting bp without activites

Hello experts,
I just want to select all bp of our system,
which do NOT have activites:
  TABLES: but000,
          but020,
          adrc,
          smovbka. " activites
  DATA: zbut000 TYPE TABLE OF but000.
  SELECT *
  FROM ( but020
         INNER JOIN but000
         ON  but000partner = but020partner
         INNER JOIN adrc
         ON  adrcaddrnumber = but020addrnumber )
         INNER JOIN smovbka
         ON but000partner_guid NE smovbkasfakna1          " I think here is the problem
   INTO CORRESPONDING FIELDS OF TABLE zbut000.
But I get timeout.
How can I search the bp which have NO activies ?
Has anybody an idea ?
BR Gerd

Hi,
You are rigth, the problem is exactly on a place You have marked. What are You doing is like joining all BPs with all activities which are not assigned to them and your requirement is completely different. Result of this join is a huge amount of data. Use a subquery instead (statement NOT EXISTS).
It will look like this:
SELECT *
FROM ( but020
INNER JOIN but000
ON but000~partner = but020~partner
INNER JOIN adrc
ON adrc~addrnumber = but020~addrnumber )
INTO CORRESPONDING FIELDS OF TABLE zbut000
WHERE NOT EXISTS (SELECT sfakna1 FROM smovbka WHERE sfakna1 EQ but000~partner_guid )
Check followink links:
[Selecting Lines|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3a1f358411d1829f0000e829fbfe/content.htm]
[How to write a subquery in ABAP|How to write a subquery in ABAP;
Regards,
Adrian

Similar Messages

  • How can i develope a report for getting purchase requisition details

    how can i develope a report for getting purchase requisition details like mrp controller release date unit of measure

    Hi,
      Go to Tcode ME53(Purchase requisition display). Give any preq number and click the item overview button..
    in the next page click select one item and press item details button(or F2 button)..In the next page all your requiresd fields will be there.. put cursor in reqd field and press f1.. in the pop up box press techical details(hammer button) to get the field name as well as the transparent table.. Use those fields and table in ur program..
    hope it helps
    Award points if it helps

  • Report for getting an oppotunity for current month

    Please tell what can be a filter or function for getting an oppotunity for current month , i have the field as "Opportunity created date" so what function or SQL expression can b eused to get created date = current month's date

    Thanks..i'll do taht
    Edited by: user1074008 on Sep 28, 2010 3:11 AM

  • Need ABAP table/Report for getting trace of error messages

    Hi experts,
    My requirement is to display Detailed Error trace text of the error message, on my screen.
    Now i need to know, which tables in XI it is stored or is there any abap report available that can provide thsi information.
    any function module ??
    thanks in advance for your help.
    Regards,
    Priyanka

    Hi,
    Check these out.
    http://wiki.sdn.sap.com/wiki/display/XI/XI+Tables
    Cheers,
    Earlence

  • Report Builder get shut down... without generating any Error Message

    Hi Every One,
    I am generating the reports in Report Builder 10.1.2.0.2. And the report is based on the view, when I want to generate the PDF, the report builder get shut down without generating any error message. But I can run the report to see live Preview (Paper Design ).
    What can be reason that its not generating PDF file format.
    Thanks in Advance for your time.

    Hi Saumen,
    I don't think so that .. I have memory problem or some other issue on the hardware side .. bcos I used the same report builder on same machine against the same instance.. to generate the 70K pages PDF file ... but nothing happened ...And this report is fetching only 10 records. during the execution of the report, Report Builder get close. without generating any message. without keeping any processor busy.
    I am feeling that report builder try to write in the PDF file format .. but unable to write.. may b some thing is wrong on the privileges side of the VIEW. But I have Select Priv on the view.
    When I try to trace the report, I got the message in the trace file that " Report Aborted on user request"
    Thanks,
    Mohsin

  • SCCM 2012 Query report for specific software installed.

    I have Reporting point installed and it seems to be working as I was able to run OS reports.
    Here's what I would like to do.
    1. I need a query/report to show us all the machines that do not have Microsoft Forefront Endpoint Protection installed.
    2. I also need a query/report showing what machines still have Sophos AV installed.
    Any help is greatly appreciated it.
    Thanks,
    Voev

    I was not able to use the Reporting to get computers without FEP installed. So I did a workaround.
    Create Device Collection for computers with FEP installed
    1. Device Collections => Create Device Collection =>name it "Computers with FEP installed=> Query Rule Properties => Edit Query Statement => Criteria tab => Add the following statements
    Criterion Type: Simple value
    Where: Installed Software - ARPDisplay Name
    Operator: is equal to
    Value: System Center 2012 Endpoint Protection          (as appeared in Add/remove program name)
    Create Device Collection for computers without FEP installed
    1. Device Collections => Create Device Collection => Name "Computers without FEP Installed" => Query Rule Properties => Add Rule => Include Collections => Tick "All Systems" => OK =>  then you need to add
    the Exclude by => Add Rule => Exclude Collections => Tick " Computers with FEP Installed => OK
    So in my "All Systems" Collection has 1000 members
    Computers with FEP Installed collection has 900 members
    Computers without FEP Installed collection has 100 members
    Add the with FEP installed & without FEP installed collections together is equal to 1000 members of the All Systems.

  • Function module for getting Vendor Address details

    Hi,
    Im new to this group,and new to ABAP
    plz hep me out by solving ABAP Query...
    i want to generate a report for getting Vendor Details
    like Vendor address,Ph num and Email
    input fields are Company code,country key and Account Group.
    im Using Smart Forms for this..
    but im not getting the Exact Function module to get All Required Details..
    regards
    Smitha

    thanks for ur quick reply...
    SELECT SINGLE LIFNR
      FROM LFB1
      INTO V_LIFNR
      WHERE BUKRS EQ V_BUKRS.
      CALL FUNCTION 'VENDOR_READ'
        EXPORTING
          i_bukrs         = V_BUKRS
          i_lifnr         = V_LIFNR
        EXCEPTIONS
         NOT_FOUND       = 1
         OTHERS          = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    this is the code i have written...
    but my problem is there no table in the Function module....
    for Example...
    CALL FUNCTION 'QPAX_PLMKB_READ_FROM_PLKO'
        EXPORTING
          i_plnty            = 'Q'
          i_plnnr            = V_PLNNR
          I_PLNAL            = V_PLNAL
          i_sttag            = V_DATUV
       TABLES
        T_PLMKB_TAB        = IT_TAB
    i want the function modules with tables and proper input...

  • Report for badi and useexits

    Hi All.
    Is there any program(report) for getting directly BADI's for t.ocdes.
    means if we select a T.code.. the report has to give the related BADI's.
    Thanks,
    srii..

    Hi ,
    This is the code to find BADI's and UserExits Actually i copied this code from SCN long back .
    * Global Declaration
    TABLES : tstc,         " SAP Transaction Codes
             tadir,        " Directory of Repository Objects
             modsapt,      " SAP Enhancements - Short Texts
             modact,       " Modifications
             trdir,        " System Table TRDIR
             tfdir,        " Function Module
             enlfdir,      " Additional Attributes for Function Modules
             sxs_attrt ,   " Exit: Definition side: Attributes, Text table
             tstct.        " Transaction Code Texts
    * Data Declaration
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    DATA wa_tadir TYPE tadir.
    * Selection screen
    PARAMETERS : p_tcode LIKE tstc-tcode,
    p_pgmna LIKE tstc-pgmna .
    * Event: start-of-selection
    START-OF-SELECTION.
      IF NOT p_tcode IS INITIAL.
        SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
      ELSEIF NOT p_pgmna IS INITIAL.
        tstc-pgmna = p_pgmna.
      ENDIF.
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
        WHERE pgmid = 'R3TR'
        AND object = 'PROG'
        AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
          WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
            WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
            WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
            WHERE pgmid = 'R3TR'
            AND object = 'FUGR'
            AND obj_name EQ enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
        SELECT * FROM tadir INTO TABLE jtab
        WHERE pgmid = 'R3TR'
        AND object IN ('SMOD', 'SXSD')
        AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
        WHERE sprsl EQ sy-langu
        AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(105) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
    *Sorting the internal Table
          SORT jtab BY object.
          DATA : wf_txt(60) TYPE c,
          wf_smod TYPE i ,
          wf_badi TYPE i ,
          wf_object2(30) TYPE c.
          CLEAR : wf_smod, wf_badi , wf_object2.
    *Get the total SMOD.
      LOOP AT jtab INTO wa_tadir.
        AT FIRST.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Enhancement/ Business Add-in',
          41 sy-vline ,
          42 'Description',
          105 sy-vline.
          WRITE:/(105) sy-uline.
        ENDAT.
        CLEAR wf_txt.
        AT NEW object.
          IF wa_tadir-object = 'SMOD'.
            wf_object2 = 'Enhancement' .
          ELSEIF wa_tadir-object = 'SXSD'.
            wf_object2 = ' Business Add-in'.
          ENDIF.
          FORMAT COLOR COL_GROUP INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 wf_object2,
          105 sy-vline.
        ENDAT.
        CASE wa_tadir-object.
          WHEN 'SMOD'.
            wf_smod = wf_smod + 1.
            SELECT SINGLE modtext INTO wf_txt
            FROM modsapt
            WHERE sprsl = sy-langu
            AND name = wa_tadir-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
          WHEN 'SXSD'.
    *For BADis
            wf_badi = wf_badi + 1 .
            SELECT SINGLE text INTO wf_txt
            FROM sxs_attrt
            WHERE sprsl = sy-langu
            AND exit_name = wa_tadir-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED ON.
        ENDCASE.
        WRITE:/1 sy-vline,
        2 wa_tadir-obj_name HOTSPOT ON,
        41 sy-vline ,
        42 wf_txt,
        105 sy-vline.
        AT END OF object.
          WRITE : /(105) sy-uline.
        ENDAT.
      ENDLOOP.
      WRITE:/(105) sy-uline.
      SKIP.
      FORMAT COLOR COL_TOTAL INTENSIFIED ON.
      WRITE:/ 'No.of Exits:' , wf_smod.
      WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
      FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
      WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
      DATA : wf_object TYPE tadir-object.
      CLEAR wf_object.
      GET CURSOR FIELD field1.
      CHECK field1(8) EQ 'WA_TADIR'.
      READ TABLE jtab WITH KEY obj_name = sy-lisel+1(20).
      MOVE jtab-object TO wf_object.
      CASE wf_object.
        WHEN 'SMOD'.
          SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
          CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
        WHEN 'SXSD'.
          SET PARAMETER ID 'EXN' FIELD sy-lisel+1(20).
          CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
      ENDCASE.
      DO 2 TIMES.
      ENDDO.
    Thanks & Regards

  • Period Balance Report for Actual/ Commitment only

    Hi,
    Do we have any report for getting Periodic balance for cost Centre Actual and commitment Balances.
    Regards,
    Venkat

    If there is not a specific YtD report, then it is easy to create one: Using the report painter, copy the existinf report, and amend the columns to reflect not the current month, but from the 1st period to the current month.

  • Report for PO Change History

    Hi All
    Is there any standard report for getting the change history of PO's?
    Regards.

    Hi U can use this FM.
    ME_CHANGES_READ
    and ME_READ_CHANGES_EINKBELEG
    example
    call function 'ME_CHANGES_READ'
      exporting
        document_category = it_ekko-bstyp
        document_number   = it_ekko-ebeln
        date_of_change    = it_nast-datvr
        time_of_change    = it_nast-uhrvr
      tables
        xcdhdr            = it_cdhdr.
    кu03B1ятu03B9к

  • Logic to build report to get the stock on a particular date

    Dear Guru's,
    We are trying to build a report for getting the stock on a particular date. It is not possible to copy MB5B that option is ruled out. We have also tried to get the data from MBEWH but that is also  not helping as the table is not updated for all the periods.
    Please advice
    Thanks,
    Sam

    Dear Sameer,
    You can copy MB5B report and can modify as per your reuirement.
    If you want get stock a paticular date.It is hard to get, why because you have to fetch all the Material documents
    and you have to use MBEW table to get the current date stock and you have to do add/subtract from calculated stock.
    Due to this there will performance issues also.
    So try to copy MB5B and change as per your requirement.
    regards
    Subhash

  • WCS Lobby Ambassador audit report for a specific period of time

    Hi all,
    I know there is an WCS audit report for each lobby ambassador activities. But the problem is that I see only activities from Nov 9 to the present. I don't know what the reason is, whether somebody erased that information before Nov 9 or something else happened.
    Is there any option to manually configure a specific period of time, for example obtain all activities for last 3 months?
    Thanks for any hint.
    Jozef

    Hi Koti,
    What error did you meet when you used audit report from Oct 16 to Oct 31?
    Please check the log file to find more information about this issue. The path of the log file is: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS. You can check the log file whose modified date is from Oct 16 to Oct 31.
    In addition, please deactivate and reactivate Reporting feature at site collection level.
    A similar post for your reference:
    http://sharepointknowledgebase.blogspot.com/2012/07/unexpected-error-when-trying-to-view.html#.VG2cFouUeog
    About audit log report, please take a look at:
    https://support.office.com/en-us/article/Configure-audit-settings-for-a-site-collection-a9920c97-38c0-44f2-8bcb-4cf1e2ae22d2?ui=en-US&rs=en-US&ad=US
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Report for Employee History

    Hi Friends,
      Is there any standard report for getting the Employee history PA data..
    Thanks and Regards,
    Vadivel

    Hi,
    Check Tcode PAR1 and PAR2.
    Hope this helps.
    Thanks,
    Sarika.

  • How to get a Report for a past date.

    Hi
    Is there a way to get a report for a past date in SAP B1. For example I want to take a print out of Customer Receivables Aging Report for 30.06.2008 (Not the current Report.) without rolling back to that date from a backup.
    Thank you very much
    Sanjaya

    Hi Sanjaya,
    You can get the past dated or the backdated aging report by taking the relevant dates in the Aging report selection criteria window.
    For backdated aging report you can refer to Note No. 800294
    Example:
    Today is the 12.12.2007, I need to see the ageing report for open customer receivables on 30.11.2007. Between the 30.11.2007 and 12.12.2007 some of the then open invoices have been paid.
    Reports => Financials -> Ageing -> Customer Receivables Ageing
    Set 'Ageing Date' last date of the period, here 30.11.2007.
    Set 'Posting Date' from '01.01.2007' (= Start of fiscal year) to
    '30.11.2007'.
    Bring tab 'By Journal Postings' into the foreground.
    Tick boxes 'Display Customers with Zero Balance' and 'Consider
    Reconciliation Date'.
    Click on 'OK'.
    This setting will generate an ageing report showing all AR invoices posted between 01.01.07 to 30.11.07 that are not reconciled on 30.11.2007.
    You can refer to the following thread as well :
    Re: Vendor Ageing & G/L account
    Hope it helps.
    Kind Regards,
    Jitin Chawla

  • Anyone get a huge "Problem Report for iDVD" with hundreds of lines of information?

    Anyone get a huge "Problem Report for iDVD" with hundreds of lines of information? This happens right before the DVD would be finished burning but instead crashes and leaves the long report your have to scroll down several times to read. I had to take several screen captures of the screen to get the WHOLE report. Here is two:
    (If there is another thread on this - just answer the question or refer me to it. I'm past due on a big project. Don't have time to read all 21,000 discussions in the iDVD thread. Be kind. Thanks )

    Some things to try first:
    1. Disconnect any and all 3rd party devices that didn't ship with your mac directly from apple (both FW and USB included). 
    2. Restart your mac without any 3rd party devices attached whatsoever. That includes ext. hard drives, blue tooth devices, and any third party memory product/s. Basically, anything that doesn't come directly from apple has to go (at least while troubleshooting).
    3. Need you to dispose of the plist for iDvd also. Go to you Home folder, the one that looks like a house > Library > Preferences > com.apple.iDvd.plist and drag and drop this file/s to the trash. Make sure to first quit iDvd prior to disposing of this pref. file/s.
    4. Run apple's disc utility and repair permissions. Applicantions > Utilities > Disc Utility > Repair Permissions.
    5. Restart your mac yet again, and try iDvd one more time.
    6. If it's still at issue then please open iDvd from a separate user account and try your project one more time. If you don't know how to create a separate user account then just come on back and one of will show you how.
    Good luck.
    Message was edited by: SDMacuser

Maybe you are looking for