How to do this report

the report should display the number of users logged in to the system with there system name
and the transaction they are doing..
and these data should be updated for every 5 min in any of the ztable
that table should hold the data for atleast 15 days
how to do this report

hi kalyani,
you can find the transactions by a particular user from the transaction SM04.
SM04 gives you the details of the users logged in,terminals,transactions the user is working on, the time he has logged in,no of sessions user has opened, and the memory used by the user's programs... all of that w.r.t to the client we login. but we can't get info like date and number of times the user has logged in.
U can see tables:
USR01 User master record (runtime data)
USR02 Logon data
USR03 User address data
USR05 User Master Parameter ID
USR12 User master authorization values
You can also use transaction code ST03N.
1. Go to tx code - ST03N
2. Under "Workload" you can select your "Instance or Total" so that it expands and shows you Days, Week, Month.
3. If you want to look at the transactions executed for a particular day, lets say, then double click on any day.
4. At the bottom left you get "Analysis Views"
5. Select & expand "User and Settlement Statistics"
6. Double click on "User Profile"
7. On the right side of the window you get a list of all the users
8. Double click on a particular user you want to view the details of.
9. The new screen will display the "Transactions/Reports Utilized by User XXX"
If you wanna track which users executed a particular transacation then follow this:
10. In "Analysis Views" expand "Transaction Profile"
11. Double click on "Standard"
You can view the list of Transactions and Reports.
12. Double click on the Tx Code or Report you wanna check and it will show the Use of it.
This will help you.
regards,
sravanthi

Similar Messages

  • How to achive this report.

    Hi,
    Scenario : Some raw materials qty are moving to a series of various machines in work in poress .Here some of materials are rejected Qty by machines and let say xyz reason.
    In OBI,If i pull all required columns into report all columns are pulling correct information expect machines.
    Machine column diplaying all used machines name.. but my requirement is only rejected machines and rejected qty for particular machine should be display in report.
    How to achive this.Kindly let me . Thank you.

    867932 wrote:
    Hi,
    Scenario : Some raw materials qty are moving to a series of various machines in work in poress .Here some of materials are rejected Qty by machines and let say xyz reason.
    In OBI,If i pull all required columns into report all columns are pulling correct information expect machines.
    Machine column diplaying all used machines name.. but my requirement is only rejected machines and rejected qty for particular machine should be display in report.
    How to achive this.Kindly let me . Thank you.Please take the time to explain in more detail - your post is not very precise and you dont describe your data model.
    As a guess, I would start with a filter : rejected Qty > 0 so you only get machines which have had a rejection, compared to "Machine column diplaying all used machines name".
    Hope this helps!
    Alastair

  • How to develop this report/Query that selects records with MAX Value

    Hi,
    My requirment is to develop a report to show all emp whose policy is going to expire ith in the user selected date intreval...
    Emp_ID--App_Date-Policy_Strt_Date--Policy_End_Date--App_Status
    101.01.2007---BlankBlank--
    NEW   (New application for a Medical Insurance policy raised for employee)
    101.01.2007---01.02.200730.05.2007--
    COMPLETE (policy issued for emp with strt & end dates)
    115.05.2007---01.02.200730.05.2007--
    RENEWAL  (a application is raised to renew emp policy)
    115.05.2007---01.06.200731.12.2007--
    COMPLETE  (policy issued for emp with strt & end dates)
    115.12.2007---01.06.200731.12.2007--
    RENEWAL  (a application is raised to renew emp policy)
    115.12.2007---01.01.200831.05.2008--
    COMPLETE  (policy issued for emp with strt & end dates)
    115.05.2008---01.01.200831.05.2008--
    RENEWAL  (a application is raised to renew emp policy)
    115.05.2008---01.06.200831.05.2009--
    COMPLETE  (a application is raised to renew emp policy)
    So EMP 1 got valid policy untill 31.05.2009.
    When a user executes a query to show all employees whose policy expiry date intreval (01.05.2008 to 31.05.2008)
    it shouldn't show Emp 1 as he got  valid policy untill 31.05.2009  but currently it is showing Emp 1....
    How can i achieve this
    Thanks

    Hi
    Thanks for the update
    I created variable on Plc End end
    If user enter show all emps whose policy is expiring in MAY (01.05.2008---31.05.2008) it is displaying EMp 1 as well but emp 1 has a policy which expires in 2009
    Thanks

  • How to design this report ?

    Hi experts,
    How to design the customer total outstanding report as on a particular date ?
    We also want Debit amount and Credit amount in the query output..
    Regards,
    Nishuv V.

    HI,
    if u want the current date u go for the customer exit (that means daily)if he wants aparticular date then u go for the user entry variable in 0calday,in variable screen he sould mention the date for that date only the out standing report will come .0calday and customer u keep in rows and those debit and credit u keep in the columns.
    if daily as on date they want outstanding u go for the customer exit just u create the variable on 0calday with customer exit if variable name is 'zcedate' go to the tcode CMOD and write the below mention code.
    when 'zcedate'.
    clear l_s_range.
    l_s_range-sign = 'i'.
    l_s_range-opt = 'eq'.
    l_s_range-low = sy-datum.
    append l_s_range to e_t_range.
    Thanks  for giving this opportunity.
    Thanks & Regards
    k.sathish

  • How to get this report format out ?

    Hello all experts,
    Sample table creations like the following. Note checkno under xcheck table is not unique. Have tried pivotting the xcheck table then link pivoted xcechk with xcert using certno and invno but this willl end up getting duplicate records. Can u please help ? Basically I am stuck at how to get that vendor name out on the report
    create table xcert(
    certseq number primary key,
    certno varchar2(5) not null,
    vendor varchar2(25));
    create table xcheck(
    checkseq number primary key,
    checkno varchar2(8) not null,
    invno varchar2(100);
    Xcert Data
    certseq certno     vendor
    1     C1001     BP GAS
    2     C1002     BUG PEST CONTROL
    3     C1003     BP GAS
    4     C1004     BP GAS
    5     C1005     WILLIES BESTxcheck Data
    checkseq     checkno          invno
    1          EF500001     C1001,C1003,C1004
    2          EF500002     C1002
    3          EF500002     C1005Looking for a following report format
    checkno          invno               vendor
    EF500001     C1001,C1003,C1004     BP GAS
    EF500002     C1002               BUG PEST CONTROL
    EF500002     C1005               WILLIES BEST      Thank you
    Munshar

    Hi, Munshar,
    MunSharmi wrote:
    Frank,
    "I don't see why you would need another column. What would you need to store, or retrieve, that a table like this wouldn't allow?
    Notice my orignal xcheck table data plus a check date column
    {code}
    checkseq     checkno          invno               checkdate
    1          EF500001     C1001,C1003,C1004     11/01/2010
    2          EF500002     C1002               12/10/2010          
    3          EF500002     C1005               01/01/2011
    {code}Sure, if you have other data that you haven't mentioned yet, then you need other columns, and maybe even other tables, to store that data.
    Talking about this would be a lot easier if you described what you were trying to model in these tables, and what the different entities are.
    after nomalization
    {code}
    seq(PK)     checkseq     checkno          invno               checkdate
    1     1          EF500001     C1001               11/01/2010
    2     1          EF500001     C1003               11/01/2010
    3     1          EF500001     C1004               11/01/2010
    4     2          EF500002     C1002               12/10/2010          
    5     3          EF500002     C1005               01/01/2011
    {code}What do checkseq and checkdate represent? What is the realtionship between them? If there is another row with checkseq=3, will it necessarily have checkdate=01/01/2011? If there is another row with checkdate=01/01/2011, will it necessarily have checkseq=3?
    Shouldn't I need to have the extra seq(PK), then use check seq to group the data report to meet users' target format ? Please adviseIt depends on what your entities are. If you explain that, then perhaps I can give some advice about how to model them.
    In general, every type of entity requires a separate table. It looks like xcert represents one kind of entity, uniquely identified by certno. I assume there is some other kind of entity, uniquely identified by checkno, and that you have a table for that which you haven't needed to show in this thread.
    Are you saying that there's some other entity, that is uniquely identified by checkseq? If so, it probably needs a table of it's own.
    Every table should have a primary key. I had assumed that checkseq only served as the primary key of the xcheck table. If it serves some other purpose, then yes, you would need another column.
    Many-to-many relationships usually require a separate table. I was guessing that xcheck was intended to record a many-to-many realtionship between xcert and some other table. Guessing is not always the best way to solve problems. I think it would be better if you explained what you want to do, rather than have me guess at it.
    So far, what you've shown is analagous to an order entry system. One kind of entity is customer, another is supplier. Say you're running a company that sells products from many suppliers to many customers. There is a many-to-many relationship between customers and suppliers. Any customer may buy from many suppliers; any supllier may sell to many cutomers. You may have an orders table that keeps track of that many-to-many relationship. You may also have another entity, salesman, that also has many-to-many relationships with customers and suppliers. Depending on what exactly you consider an "order", there are lots of different ways to model this. Can a single order involve many customers? Can a single order involve many suppliers? Can a single order involve many salesmen? If an order always involves one customer buying from one supplier using one salesman, then you may only need four tables. If the situation is more complicated, then you may need more tables.

  • Ideas on how to populate this report

    Sample Report Looks like this..
    __AC_No      AC_Nm      Bal__         
       123                 www           $40
       __Desc    Val     ValDesc__
            ww         re           nono
            xx         ps           greg
            vu          hg          rpts
    AC_No,AC_Nm,Bal,Desc,Val,ValDesc are all my fields in the report which i have to make use of.
    For that particular AC_Nm, I have to get the Desc,Val and ValDesc as shown above.
    I am creating one more detail tab and and adding Desc,Val and ValDesc and when I am running the report my output is like this
    __AC_No      AC_Nm      * Bal*__   
       123                 www           $40
        __Desc    Val     ValDesc__
            ww         re           nono
    __AC_No      AC_Nm      * Bal*__         
       123                 www           $40
          __Desc    Val     ValDesc__
             xx         ps           greg
    __AC_No      AC_Nm      * Bal*__         
      123                 www           $40
        __Desc    Val     ValDesc__
             vu          hg          rpts
    Instead of as shown in the sample report.
    Can some one help me to get on track and get the report as shown In the sample report above .

    Hi Sai,
    You can create a sub report, link AC_Nm to sub report to retrieve description fields Desc, Val, ValDesc and display it in the detail section below AC_Nm fields.
    Let us know whether this will fulfill your requirement.

  • How to get this report

    write a program to generate a report of the customers in kna1 table who belongs to the range of cust number i.e, kunnr, name, city country given by the user in the selection-screen
    Thanks,

    hi,
    tables : kna1.
    select-options : p_kunnr like kna1-kunnr.
    parametre :p_land1 like kna1-land1.
    parametre :p_name1 like kna1-name1.
    data :t_kna1 like kna1 occurs 0 with header line.
    select * from kna1 into table t_kna1 where kunnr in p_kunnr
                                          and land1 = p_land1
                                          and name1 = p_name1.
    loop at t_kna1.
    write:(display fields wat ever u want)
    end loop.

  • How to design this complex report

    I'm getting crazy======
    my mdb file is like this.
    For example, "PointName" has many pointname, like C1, C2, C3..........,[they are vertical tunnels].
    For every point/tunnel, like C1,
    we mearsure it every few days, and get the displacement with the depth.
    Point C1 ---- 2014/2/19 ---- depth: -1 ---- it's displacement is 0.4
    And for the report, I want every point have a crosstab and graph.
    How to do this report, many thanks!!!

    Hi, Jamie
    I think I haven't say it clear. The final report is all C1 in one crosstab, all C2 in one crosstab.......this is the key.
    I followed as you say, it shows, there are many c1 and c2, and the crosstab is wrong.
    Then I tried to use subreport
    it shows
    I want one C1 and one C2 and so on, and all C1's data in one crosstab and all C2's data in one crosstab.
    That's it.
    A'm I clear? If not, please tell me. Thanks.

  • How to read device report for HP Deskjet 1510

    Hi HP,
    I can see from the software provided with this printer there is this option to print the device reports.
    Please assist on how to read this report because it consist of unknown coding and stuff. 
    I would appreciate if your side can help me on this coz I assume that we can track our usage through this report.
    If this is not the purpose, perhaps you may suggest any other way to get an understandable usage reports? 
    Regards,
    Nadiya
    This question was solved.
    View Solution.

    Hello Nadiya,
    Welcome to the forums
    I understand you are looking for a usage report. The printer will print a test page and you can see the page count on that page, along with the printer information, such as your serial number, etc. If there is anything else you may mean by "usage" please let me know and I will do my best to help.
    Click this link: Fixing Ink Streaks, Faded Prints, and Other Common Print Quality Problems
    In the guide, look under "Solution six: Print and evaluate a test page and troubleshoot defects" and print a test page.
    Take care,
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • How to get these reports in SAP

    How to retrieve this report in SAP. Are these available as standard or need custom development.
    1. Vendor Delivery Performance Report- Showing Goods Receipt Qty (from Inbound Delivery or Direct GR through MIGO) Vs. Po Qty
    2. Vendor Delivery Performance Report- Showing Goods Receipt Delivery Date (from Inbound Delivery or Direct GR through MIGO) Vs. P) Delivery Date
    Both these above report should display vendor #, PO #, Line Item #, Material, Panned Delivery Date and Qty, Actual Delivery Date and Qty
    3. For Outbound STO Process- Displaying the incomplete pick qty. Display only the Open Qty for Open STOs with Partial Deliveries

    Hi,
    1. Vendor Delivery Performance Report- Showing Goods Receipt Qty (from Inbound Delivery or Direct GR through MIGO) Vs. Po Qty
    2. Vendor Delivery Performance Report- Showing Goods Receipt Delivery Date (from Inbound Delivery or Direct GR through MIGO) Vs. P) Delivery Date
    Ans: - Use ME80FN - General Analysis (Here in Output Screen, select option "PO History" by clicking on the button at extreme right)
    3. For Outbound STO Process- Displaying the incomplete pick qty. Display only the Open Qty for Open STOs with Partial Deliveries
    Ans: - Refer VL06O - Outbound Delivery Monitor
    here click on "List of Outbound Deliveries" button
    here on selection screen, enter Total gds mvt stat. as "B" i.e. Partially processed and Delivery Type "N" and execute the report.

  • How to publish crystal report designed using SAP Add-on toolbar

    we have installed the crystal report designer V10 and the SAP add-on on the desktop.
    we have designed a formatted report in crystal report designer using an existing BW report that was created using Bex query designer. After this we saved the crystal report back in BW to a role.
    We have not published the report to crystal enterprise server, since the connection to same is not in place.
    We would like to know how to publish this report in Enterprise portal ?
    Can we bypass publishing the report to crystal enterprise server and publish the report on browser or through EP ?

    hi
    Check on this help page if it can help you
    http://help.sap.com/saphelp_erp2004/helpdata/en/f1/0a569ae09411d2acb90000e829fbfe/frameset.htm
    REgards
    Alain

  • How to design a report with "merged" cells?

    Post Author: Yuri
    CA Forum: General
    Hello,I need to get rid of empty space in details section of my report.The width of the first column is less than the width of the next one and one row of the first column matches to a number of rows of the next column. All data are stored in one SQL table. I need to reach the following result without using of subreports because this report will be used as a subreport in another report:
    WRONG:                          
    CORRECT:
    +----
    +----
    Columbia  |Lady for a Day         Columbia   |Lady for a Day 
    Pictures  |                       Picturies  +----
    Industries|                     
    Industries |Here Comes Mr.Jordan
    +----
    +----
              |Here Comes
    Mr.Jordan              |Spider-Man 3
    +----
    +----
              |Spider-Man 3           Walt       |Mickey Mouse
    +----
    Disney     +----
    Walt      |Mickey Mouse                      |Winnie the Pooh and
    Disney    |                                  |the Blustery
    Day
    +----
    +----
              |Winnie the Pooh and
              |the Blustery Day  
    +----
    In other words I want to suppress the same values in the first column and I don't want the heights of the rows of the second column follow the heights of the rows of the first column. I tried to create two details section and to use underlay the following section in the first details section, but without success.Thanks. 

    Post Author: Yuri
    CA Forum: General
    So could you group by issue datetime (at the appropriate resolution, e.g. per day) and then by studio? I've done it and the report looks great!  Thank you! Now I use underlay of group headers under details instead of suppress of  duplicated   group values in detail section and I'm happy!And  I have another question... Suppose, there are two contractors that work on three Customer's sites. The first contractor makes Pumping operations.  The second contractor makes Slickline operations.One day the first  contractor  made   Pumping operations on site#1,
    then this contractor moved to site#2 and made   Pumping operations here.
    In the meantime another contractor made Slickline operations on site#2,
    then it moved to site#1 and made   Slickline operations here, tonight the second  contractor moved to site#3 and made   Slickline operations here.Details of operations are stored in the one Table with the following columns:Operation_id, Site_id, time_from, time_to,  Code_of_Type_of_Operation, Operation_memo, Contractor_name, ...     The customer wants to have a daily operations report where all operations for each Site are placed together, but in the meantime each Site must
    be placed wholly into proper Operation Type section accordantly with the first
    operation which has place on the Site. So I need to create the following Structure of the report:Pumping operations
       Site#1   Details  of  Pumping operations on Site#1
                    Details  of Slickline operations on Site#1Slickline operations    Site#2   Details  of Slickline operations on Site#2                   Details  of  Pumping operations on Site#2
       Site#3   Details  of Slickline operations on Site#3// Each "Details  of operations" section is a number of rows from Details of operations Table
    In other words the rule is the following:to seek for the first operation for each Site and to place each Site to a suitable section, for example: the first operation for Site#1
    is  PUMPING, so Site#1 must be placed into u201Cpumping operationsu201D section, the first operation
    for Site#2 is SLICKLINE, so Site#2 must be placed into u201Cslickline operationsu201D  section.
    I think that If I'll use grouping:
    Group 1 Type of Operation   Group 2 Site
    then I'll have the following wrong report:
    Pumping operations    Site#1   Details  of  Pumping operations on Site#1   Site#2   Details  of  Pumping operations on Site#2Slickline operations
       Site#1   Details  of Slickline operations on Site#1
       Site#2   Details  of Slickline operations on Site#2
       Site#3   Details  of Slickline operations on Site#3But the customer doesn't want to break Sites! :(I have a number of ideas how to realize this report, but I would like to listen to masters.Thanks in advance!

  • How to send ALV report by Email

    Hi.
    we have developed a block ALV report which has 3 reports i.e Detail report , summary report and Error report. Currently user run the report in background.However there is need to send this report by Email . I can use FM:SO_OBJECT_SEND . I want how to pass this report to FM and how to handle if there are multiple email ids. I think we can create a group of the user with email id in business workplace and pass the group to FM.
    I need help in how to assign the report and user group to this FM

    Hi,
    You may use the code given by Amit in this link -
    MAil Attachment.
    It is perfect to handle any type of email requirement.
    Regards,
    Amit
    Reward all helpful replies.

  • How to Implement MD47 report in BI

    Dear Experts,
        We have a requirement from users to bring the report "Evaluation of Product Group Planning" (tcode: MD47) to BI. However, we are not sure whether there is standard BI Content supporting this report or not. If not, how to implement this report in BI.
    Chould anyone provide information about this report please?

    Hi
    MD47 SAPMM61M Product Group Planning Evaluation -- We have a Report 0CP_SLSM1_Q0014
    This query is based on the MultiProvider Plan/Actual Evaluation: Customer (0CP_SLSM1).
    http://help.sap.com/saphelp_nw70/helpdata/EN/cd/823b3f1b82e07fe10000000a114084/frameset.htm
    Re: how to find standard reports for Modules like MM,SD,FI
    Hope it helps

  • In this report i have marked one line..if this width 30,i need to multiply by a number 0.3 and if the width =30,it multiplies by 0.37...how to use this logic here..??? anyone can help??

    In this report i have marked one line..if this width < 30,i need to multiply by a number 0.3 and if the width >=30,it multiplies by 0.37...how to use this logic here..??? anyone can help??
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    Declare @SCCode nvarchar(30)
    select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
    select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
    --Rcpt from PRDN (Condition checked for Return component exclusion also)
    SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
    T2.DocNum AS 'WorkOrderNo',
    b.DocNum as 'Issue Doc No',
    ISNULL(d.DocNum,'') as 'Receipt Doc No',
    b.U_IssPSCName as 'SubContractor Name',
    T2.ItemCode as 'FG Item Code',
    T3.ItemName as 'FG Item Name',
    T2.PlannedQty as 'FG Planned Qty',
    T2.U_OD as 'OD',
    T2.U_ID as 'ID',
    T2.U_OD/25.4 as 'Inches',
    (T2.U_OD-T2.U_ID)/2 as 'Width',
    0 as 'FG Pending Qty',
    0 as 'FG Receipt Qty',
    '' as 'Issue Item Code',
    '' as 'Issue Item Name',
    Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
    0 as 'Issue Item - Return Quantity',
    '' as 'Return Doc No',
    SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
    SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
    from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
    INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
    LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode not in (a.ItemCode)
    LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode INNER JOIN OIGN d on c.DocEntry = d.DocEntry
    WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
    GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID, T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2
    UNION ALL
    SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
    T2.DocNum AS 'WorkOrderNo',
    b.DocNum as 'Issue Doc No',
    ISNULL(d.DocNum,'') as 'Receipt Doc No',
    b.U_IssPSCName as 'SubContractor Name',
    T2.ItemCode as 'Item Code',
    T3.ItemName as 'Item Name',
    T2.PlannedQty as 'Planned Qty',
    T2.U_OD as 'OD',
    T2.U_ID as 'ID',
    T2.U_OD/25.4 as 'Inches',
    (T2.U_OD-T2.U_ID)/2 as 'Width',
    (Select (T2.PlannedQty - (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum))) as 'Pending Qty',
    (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum) as 'Receipt Qty',
    a.ItemCode as 'Issued Item Code',
    a.Dscription as 'Issued Item Name',
    Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
    (Select (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode))) as 'Issue Item - Return Quantity',
    (ISNULL((Select (Select a2.DocNum from OIGN a2 where a2.DocEntry = a1.DocEntry) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode)),'')) as 'Return Doc No',
    SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
    SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
    from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
    INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
    LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode in (a.ItemCode)
    LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode LEFT JOIN OIGN d on c.DocEntry = d.DocEntry 
    WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
    GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID,T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2,a.ItemCode,a.Dscription    order by T2.DocNum desc

    Hi,
    Try this:
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    Declare @SCCode nvarchar(30)
    select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
    select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
    --Rcpt from PRDN (Condition checked for Return component exclusion also)
    SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
    T2.DocNum AS 'WorkOrderNo',
    b.DocNum as 'Issue Doc No',
    ISNULL(d.DocNum,'') as 'Receipt Doc No',
    b.U_IssPSCName as 'SubContractor Name',
    T2.ItemCode as 'FG Item Code',T3.ItemName as 'FG Item Name',T2.PlannedQty as 'FG Planned Qty',T2.U_OD as 'OD',T2.U_ID as 'ID',T2.U_OD/25.4 as 'Inches',(T2.U_OD-T2.U_ID)/2 as 'Width',case when ((T2.U_OD-T2.U_ID)/2) <30 then ((T2.U_OD-T2.U_ID)/2) *0.3 end, 0 as 'FG Pending Qty',0 as 'FG Receipt Qty','' as 'Issue Item Code','' as 'Issue Item Name',Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',0 as 'Issue Item - Return Quantity','' as 'Return Doc No',SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntryINNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCodeLEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode not in (a.ItemCode)LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode INNER JOIN OIGN d on c.DocEntry = d.DocEntryWHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID, T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2UNION ALL SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,T2.DocNum AS 'WorkOrderNo',
    b.DocNum as 'Issue Doc No',
    ISNULL(d.DocNum,'') as 'Receipt Doc No',
    b.U_IssPSCName as 'SubContractor Name',
    T2.ItemCode as 'Item Code',T3.ItemName as 'Item Name',T2.PlannedQty as 'Planned Qty',T2.U_OD as 'OD',T2.U_ID as 'ID',T2.U_OD/25.4 as 'Inches',(T2.U_OD-T2.U_ID)/2 as 'Width',case when ((T2.U_OD-T2.U_ID)/2) >=30 then ((T2.U_OD-T2.U_ID)/2) *0.37 end, (Select (T2.PlannedQty - (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum))) as 'Pending Qty',(Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum) as 'Receipt Qty',
    a.ItemCode as 'Issued Item Code',
    a.Dscription as 'Issued Item Name',
    Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
    (Select (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry
    where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode))) as 'Issue Item - Return Quantity',
    (ISNULL((Select (Select a2.DocNum from OIGN a2 where a2.DocEntry = a1.DocEntry) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode)),'')) as 'Return Doc No',
    SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
    SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
    from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
    INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
    LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode in (a.ItemCode)
    LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode LEFT JOIN OIGN d on c.DocEntry = d.DocEntry
    WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
    GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,
    T2.PlannedQty,T2.U_OD,
    T2.U_ID,T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2,a.ItemCode,a.Dscription  
    order by T2.DocNum desc
    Thanks & Regards,
    Nagarajan

Maybe you are looking for

  • Two file windows disappear if I use extend screen to compare 2 lessons

    I use a laptop and an extra screen in "Extended" mode. I drag out one file window from Captivate and maximise it to the full screen size. I drag out the other file window, and make it as large as possible on the laptop. When I move to another app (e.

  • Slow broadband since 3 days

    Hi, I got BT fot 1 year and everything was all right. But for 3 days now it's very slow.  Normaly I got 5m, now it's 300ko ! Stange thing : It was working at 3am this morning (5mega), but not anymore.  I tried to reset/restart the box, it still the s

  • Why can't you make the bookmark toolbar visible by default?????

    I went to organize my bookmarks and there is no toolbar. Now, you say it is hidden by default. That's crazy. Anyway, I can't follow the instructions. There is no Firefox button to click. There is no "options" option anywhere. I can't even set my defa

  • Classpath inside a JAR file...

    Hi there, I have recently learned that I cannot use my JDBC driver JAR file from within another JAR file. So now I have two JAR files........my application and associated files in one and the JDBC driver in the other. This gives me...... gatekeeper.j

  • G5 Firmware update necessary? Random problems since Tiger upgrade.

    I have a PowerMac G5 (7,2) with a 1.8 GHz PowerPC 970 (2.2) CPU running under boot version 5.1.4f0. I have added memory. I apparently upgraded from OS 9 to 10.2.8 without running any firmware updates. I quite frankly don't remember. I have since upgr