Report from 2 cmdlet on 1 line

Hi, i would like to know how i could execute a script that reports all the information on 1 line (to a csv file)
Basicly i need info from get-mailbox (ProhibitSendReceiveQuota, CustomAttribute1)
from get-casmailbox (activesyncenabled, Owaenabled)
and get-aduser (userprincipalname)
i would like to put all those results on 1 line, not really sure how to handle this one. thank you.

Hi, i tryed to understand and search how to add another property in this script (from another cmdlet), i searched alot and i cant figure out to make it work with the new-object to create my own custom names that i love!
Here is what i found to be working the best with what i need, i changed lots of things and added things from other commands too
But if i could make it work by what you started i would be much happier :)
Here is where im at
Get-Mailbox -server mail1 |
where-object { $_.displayname -ne "administrator" } |
where-object { $_.displayname -ne "Discovery Search Mailbox" } |
sort-object CustomAttribute1 |
Select-Object name,@{n="Company";e = {$_.CustomAttribute1}}, alias, DisplayName, UserPrincipalName, PrimarySmtpAddress, IssueWarningQuota, ProhibitSendQuota, ProhibitSendReceiveQuota, @{n="Size(KB)";e = {$MBXstat = Get-MailboxStatistics
$_.identity; $MBXstat.totalItemsize}}, @{n="OwaEnabled";e = {$Casmb = Get-CasMailbox $_.identity; $CasMb.OwaEnabled}}, @{n="ActiveSyncEnabled";e = {$Casmb = Get-CasMailbox $_.identity; $CasMb.ActiveSyncEnabled}} |
Export-Csv d:\scripts\output.csv -notypeinformation
Thanks! ;)

Similar Messages

  • Error while running the Discoverer report from the command line.

    Hi All,
    I've to run a discoverer report from command line and export the results in xls/html on to my local machine. This report I've to run it as batch and scheduled it.
    I have a parameterized worksheet and this has to be run from command line specifying the parameter value I wanted to run the report for. I do not get any results. Here is the command line I am using.
    dis51usr /connect user/password@database /opendb "TIMS-PCJ status Report" /sheet "TIMS observation status report (based on performed date)" /parameter "Test Number" '40351' /parameter "From Date" '05-MAY-2008' /parameter "To Date" '06-MAY-2008' /export HTML "C:\DISCOVERER_REPORT_SCHEDULING\DIS_OUTPUT\PCJStOutputinHTML123"
    I even added the TO_DATE conversion for the parameters and also gave the format of the date as 'DD_MON_YYYY'.
    Discoverer Desktop opened up, logged in and gets terminated saying 'Oracle Discoverer Desktop has encountered a problem and need to close. We are sorry for the inconvenience.'
    Please anyone reply me.
    Regards & Thanks,
    P. Gayathri Devi

    Hi Gayathri,
    Try changing your parameter names to be a single word. (Change "Test Number" to Test_Number).
    Does the report run fine when run through Desktop for the same parameter values? Which version of Discoverer are you using?
    Thanks.

  • How to get data in a line in reporting from 2 data sources

    Hi
    my infocube gets data from 2 datasources and once the data is loaded into infocube , its show the data from 1st datasource in one line and shows data from 2nd datasource in second line
    my requirement is to show the data in reporting in a single line
    EX: my first datasource has----
    personnel no,name,age,position count
         my second datasource has----
    personnel no and salary
    now i want all these fields in a single line in my Report
    Regards,
    Swamy.

    Hi Narayana,
      U can't achive the output in a single line  by directly loading two datasources into the infocube.
    If two datasources have same characteristics and if u show same key figure then they will come in single row ...when characteristics differ they will come in seperate lines
    u can load the sec datasource to another dso and make a look with personnel no in the first dso to cube transformation then u can achieve it ....
    Regards
    vamsi

  • How to run a 10g report from command line ?

    Good Afternoon,
    Please advise if there is a way to run a 10g report from command line.
    We use 6i right now and our job scheduler runs reports using "D:\ORADEV6I\BIN\RWRUN60.EXE ..." executable in batch mode on a separate server. We plan to migrate to 10g Database, Forms, Reports. Is there a way to keep this functionality and create a "command" to address an report server and run a report?
    Thank you,
    Dmitri

    Steps to take.
    (1.) In command prompt type RWSERVER SERVER=repserver1 to star the rep server.
    (2.) If you get "Javaw.exe The procedure entry point psoasyn could not be located in the dynamic link library orapls10.dll." error do one of the following
            (a.) Type the full name for the server. D:\OracleDevR2\bin\rwserver SERVER=repserver1
                   or, if it does not work
            (b.) Add D:\OracleDevR2\bin to the system env. variable PATH
    (3.) Start OC4j
    (4.) Now you can access the jobs using URL like:
        http://192.161.11.143:8890/reports/rwservlet/showjobs?server=repserver1
          where 192.161.11.143 is your machine's IP address.

  • To run a report from command line, when using jdbc-odbc bridge

    Hi,
    How to run a report from command line, when using jdbc-odbc bridge?
    Usually with tns, we do by "rwrun module=<> userid=<user>/<passwd>@tns".
    with odbc, we do by "rwrun module=<> userid=<user>/<passwd>@odbc:DSN"
    Please specify, what is command line arguments for jdbc-odbc bridge driver?
    Environment : Oracle 9i Report Builder on WinNT
    Database : Sybase
    Regards,
    Ramanan

    Hello Ramanan,
    Report Builder : connect JDBC Query in Report Builder is to through Connection Dialog in JDBC Query Editor. User can use a Sign on parameter (can use, default : P_JDBCPDS or can create new) to connect to JDBC Data Source. Connection once made will be mentioned and will be reused through out Reports Builder.
    JDBC PDS allows user to connect one or more same or different kind of databases.
    While running report through runtime or Server, user can pass the sign on parameter(connection string) value, like any other user parameter.
    Syntax for connection string : <username>/<password>@databaseURL . The syntax of database part of connection string depend on the type of JDBC Driver used to connect to Data Source while designing the JDBC Query. databaseURL refer to the location of the database and its format depend on the JDBCPDS river selected in design time while creating the JDBC Query.
    rwrun eg :
    rwrun report=jdbc_odbc.rdf destype=file desname=output.html desformat=html P_JDBCPDS=scott/tiger@database
    Server eg :
    http://server.com:8888/servlet/RWServlet?server=MyReportServer+report=jdbc_odbc.rdf+destype=cache+desformat=html+P_JDBCPDS=scott/tiger@database
    http :
    Please see ORACLE_HOME/reports/conf/jdbcpds.conf for more information.
    With Regards
    Reports Team

  • Running report from command line with multiple value for same parameter

    Hey,
    I know how to run a report from the command line specifying parameters values each time but I was wondering if someone could tell me how I would go about running the same report multiple times in a batch program but specifying a list of values to pass to a parameter each time.
    So for example if a parameter was 'School Number', how could I run a report in a batch program that would pass a school number to the report as a parameter using a list of school numbers generated for a sql statement or something. So if I had 300 school numbers in my list then I would get 300 different reports when the batch program finished.
    This leads me to another question. How can I dynamically change the name of the report generated by the batch to use the school number value passed in, so for example if the value 3 was passed in the name would be something like School 3.pdf, if 4 was passed in the name would be School 4.pdf....etc
    Any help on this?
    Thanks

    Hello,
    Bursting and Distribution may help you ....
    37 Bursting and Distributing a Report
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_dist.htm
    Regards

  • Invoice line items report from DSO compared to Infocube (in HANA)

    Hi Folks,
    As you know Invoice line items are very granular level information. We are facing performance issues on reports based on the Infocubes to display this information. We are migrating to HANA and looking for options to improve the performance. One of the option we are looking at is instead of Infocube can we we report directly on the DSO. I would like to know whether it will help and its Pro & Con's. Please help.
    Thanks,
    B

    Hi B,
    Reading data from a DSO instead of an InfoCube will not improve reporting performance. The benefit in getting rid of the cube is that you have less loading to do.  You still need cubes for planning and inventory scenarios.
    You do not need a composite provider to report from DSOs in BW. Once you've migrated to HANA you use DSOs just as you would today, and you can report from a multiprovider. Yes, you can use a composite provider, but it is not necessary.
    If your report is slow today, you need to find out where it is slow.  HANA could provide a huge benefit as soon as you migrate, or it might not help much.  It depends on the scenario. OSS 1681396 is a good place to start.
    If the DB time is long, and you're not using BWA today, you can expect big benefits when you migrate to HANA.
    If the OLAP time is long, you might see big benefits when you migrate, as the OLAP engine during query execution is pushing more to HANA.
    If the frontend time is long, migrating to a different database isn't likely to change that, you'd need to address that separately.
    Finally, an important point to remember is that once you've migrated you open up additional possibilities for improvement that are not available to you in BW-on-non-HANA.  For example, you might be able to rewrite queries as HANA models.  I did some performance tests on this in a very simple case of exception aggregation.

  • Crystal reports from command line

    Post Author: DrewJ
    CA Forum: General
    Hi,
    I need to run Crystal reports from the command line.
    Does anyone know how to pass parameter arguments when launching the application?
    I have tried cr32w.exe c:\reports\report.rpt arg="099909"
    (which launches the right report, but does not pass in the arg) 
    Is it possible?
    Thanks in advance,
    Drew Johnston

    Hi,
    Thanks for the reply.  The application would not be on the same server as the machine.  So if I used the command that you gave me would that actually run the report (ie refresh the data and then save the report ,as instructed in the settings, on to the network location).  Or would it just open up the report.  Also, how would I send parameters to the report, eg Dates or Status.
    This is the scenario.  At the moment a user would input data on to database via an external applicaion.  After inputting all the data, they would then have to log into Crystal Infoview.  Navigate to the report.  They would then click on the Schedule hyperlink.  They would change the parameters eg Start Date and End Date.   And then press the Schedule button.  The report would then refresh the data, and as specified in the Destination, it would write out to a network location.
    So we want the external app to write a command line prompt, so that the user did not have to log onto Crystal at all.  The application would send the relevant parameters and run the crystal report automatically without the user having to log into Crystal at all.
    Regards,
    Prakash

  • How to run Discoverer 10g report from unix command line

    Hello Experts,
    I am aware that discoverer report can run through command line using "dis51usr.exe /connect username/passward@connection_string /opendb "DISCOVERER.<<report name>> /export xls"".
    Can we run discoverer 10g report (stored in database) from server location / unix command line? Is there any command?
    Please assist. Thank you.

    Hi Tamir,
    Can you please mention from where we have to execute/run these commands? After setting enviornmental variable, are these commands run from any location or we have to go to particular server location and then execute (ex. from directory BI or else).
    Thank you.

  • Read into report from On-line Document

    I have a report that substract all the comment lines from the source code and print them by screen,
    now I want to add to my report the on-line documentation
    "&purpose&, &prerequisites&,....",
    but I only get to print that on screen
    I use  the internal table TLINE:
       TDFORMAT: header or paragrafh
       TDLINE:  text line (&purpose&).
    I want to print the content of purpose.
    How can I get it?
    Anticiped thanks.

    Is there a common key characteristic between header and item?
    You can use an infoset on the two ODS to get what you want.

  • Calling report from form. Need PDF output

    I am calling a report from a form using RUN_PRODUCT. I need to display the form in PDF format. When the user clicks the button in the form to run the report, acrobat reader should open up and the report displayed there. Please help.
    Thanks

    Thanks for the response. The first part worked. I am able to get the output in PDF format. In the 2nd part where I want to open acrobat and display the output, I am having some trouble with the code. When I compile, it says
    win_api_environment.read_registry must be declared. Is there some package I need to attach?
    Also, in the After reports trigger, how do I pass vFile (I am assuming this is the PDF file name)?
    Thanks
    The first thing you'll want to do is pass parameters to the report IE DESTYPE, DESNAME and DESFORMAT where these could be FILE, 'c:\temp\report' and PDF.
    Then, you can try this piece of code I wrote (with some help from other people at Metalink and here) sometime back. Now, I call it from forms, but in your case, you'd have to run it in the after report trigger. Since with RUN_PRODUCT you don't know when the report is finished, if you did it from the form, it wouldn't work correctly.
    PROCEDURE OPEN_PDF(vFile IN VARCHAR2)
    IS
    vcServerApp varchar2(40);
    vcServerTag varchar2(600);
    vcCommand varchar2(2000);
    iArgPos pls_integer;
    dummy NUMBER;
    BEGIN
    -- 1 get the Server App for .PDF files
    vcServerApp := win_api_environment.read_registry('HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\.PDF','',true);
    -- 2 get the executable
    vcServerTag := 'HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\'||
    vcServerApp||'\SHELL\OPEN\COMMAND';
    vcCommand:= win_api_environment.read_registry(vcServerTag,'',true);
    -- 3 Sort out how to specify the Filename
    iArgPos:= instr(vcCommand,'%1');
    if iArgPos = 0 then --no substitution Var on the command line
    vcCommand := vcCommand||' '||vFile;
    else
    vcCommand := substr(vcCommand,1,(iArgPos-1))||
    vFile||substr(vcCommand,(iArgPos+2));
    end if;
    -- 4 Run using Winexec (or Host if preferred).
    win_api_shell.winexec(vcCommand);
    EXCEPTION
    when no_data_found then
    abortt('Acrobat Reader was not found! Please consult with your help desk to install it and try again.','N');
    END;
    Chad
    I am calling a report from a form using RUN_PRODUCT. I need to display the form in PDF format. When the user clicks the button in the form to run the report, acrobat reader should open up and the report displayed there. Please help.
    Thanks

  • How to create a new report from an information structure?

    Dear gurus,
    My customer wants to have a sales report by product hierachy. I want to create an information structure for product hierachy and create a report from this info structure like a standard report. I dun know which steps to do. Pls tell me how to do. Your help are highly appreciated.
    Thank you!
    Rgds,
    Nghi Do

    Hi,
    Steps in LIS EXTRACTION:
    T.code - :MC18 u2013 create field catalog
    1. Characteristic Catalog
    Application-01-Sales and Distribution, 02-Purchasing, 03-Inventory Controlling, etc..
    Catalog category 1. Characteristic catalog, 2. Key figures catalog 3. Date catalog Select characteristic catalog and enter, click on characteristic select the source table and it will be display the relevant source field and select the source field, copy + close, copy.
    Save, similarly create key figures catalog
    T.code : MC21 u2013 create infostructure
    Example u2013
    Inforstructure : S789
    Application u2013 01
    Choose characteristic select the catalog, select the fields, copy + close Choose key figures catalog select the key figures ,copy + close, save and generate
    T.code u2013 MC24 u2013 create updating
    Infostructure : S789
    Update group : 01- Sales document, delivery, billing document ,enter Select the key figures click on rules for key figures give suggest rules, copy save and generate Click on updating (activate updating) Select the infostructure set periodic split 1. Daily, 2. Week, 3. Month, 4. Posting period Updating u20131)No updating,2)Synchronous updating (V1), 3)As synchronous updating (V2), 4)As synchronous updating (V3),
    T.code u2013 LBW0 - Connection of LIS Information structures to SAPBW Information structure : S786 Select the radio button-Setup LIS environment and Execute.
    Select the radio button-Generate data source and Execute.
    For Delta update:
    Select the radio button-Generate updating and Execute Select the radio button -Activate / deactivate and Execute.
    T.code u2013 SBIW u2013 Display IMG (implementation guide) Setting for applications specific data source u2013 logistics u2013 Managing transfer information structure u2013 setup of statistical data u2013 applications specific setup of statistical data u2013perform statistical setup u2013 sales.
    Choose activity
    Setup u2013 Orders, deliveries, billing
    Choose the activities enter the infostructure (S789), give name of the run, date of termination, time of termination, No. of tolerated faulty documents. Then execute
    T.code u2013 RSA3 u2013 Extractor checker
    Give the data source name eg. 2LIS 01S789 and execute, result will get some records Go to BW side replicate data source u2013 Assign infosource u2013 Create infocube u2013 Create update rules u2013 create infopackage and schedule the package with initialize delta process.
    For delta update :
    In R/3 side
    T.code u2013 MC25, set update (V1) or (V2) or (V3)
    T.code u2013 LBW0, choose generate updating and execute then choose activate / deactivate and execute
    BW side - create infopackage and schedule the package with delta update.
    First time if your scheduling the infopackage -in R/3 side T.code :MC25 -Udating set to No update,insted of selecting the update V1,V2,V3.
    If your doing the Delta update:in R/3 side T.code :MC25-Updating set to either V1 or V2 or V3. and the to T.code :LBW0 -Select the radio button Active/deactivate and Execute.
    and schedule the infopackage with delta update.
    Modules for LIS : SD,MM, PP,QM.
    Deltas for LIS:
    After setting up the LIS environment, 2 transparent tables and 1 extract structure is generated for this particular info structure. Within transaction SE11 you can view the tables u2018SnnnBIW1u2019, u2018SnnnBIW2u2019 and the structure u2018SnnnBIWSu2019 and the InfoStructure itself u201ASnnnu2018
    The tables S5nnnBIW1 & SnnnnBIW2 are used to assist the delta update process within BW.
    Extract structure u2018SnnnnBIWCu2019 is used as an interface structure between OLTP InfoStructure and BW
    The OLTP system has automatically created an entry in the control table u2018TMCBIWu2019. Within transaction u2018SE16u2019 youu2019ll see, that for your particular InfoStructure the field u2018BIW activeu2019 has the value u2018Xu2019 and the field u2018BIW statusu2019 is filled with value u20181u2019 (refers to table SnnnBIW1).
    The orgininal LIS update program u201ARMCX#### will be enhanced within the form routines u201Aform Snnnbiw1_update_....u2018 and u201Aform Snnnbiw2_update
    With the transaction u2018SE38u2019 youu2019ll see at the end of the program starting at line 870 / 1006, that the program is enhanced within a u2018BIW delta updateu2019 coding
    Within the flag u201AActivate/Deactivateu2018 the update process into the delta tables (SnnnBIW1/Sn5nnBIW2) is swichted on/off. In the table u201ATMCBIWu2018 is defined, which table is active for delta update.
    Note: The delta updating is client dependent !
    Regards,
    Ram Pedarla
    Edited by: RamPedarla on Apr 1, 2010 10:35 AM
    Edited by: RamPedarla on Apr 1, 2010 10:35 AM

  • How to create a report from multiple dynamic XMLs

    Hi,
    I'm trying to build a consolidated report that gets data from multiple XML files and each XML file is different. Although the presentation of the data will be similar, the contents of the XMLs will vary and the number of XMLs to merge will also vary.
    What I would like to understand is the following:
    * Is it possible to generate a report template based on dynamic columns where the column names, their format and number is different for each business object?
    * Is it required to generate an XML with the entire data or can the template read information from different XML files? and if so how it can be done. Please notice that the formatting of each XML may be different.
    * Is it possible to use the services to generate the reports directly? Something around these lines was mentioned in one of the sessions but it was also mentioned that it's still WIP.
    I've been using the standalone version and although I can get the desired result, I couldn't merge data from multiple XMLs.
    Is the new BIP version available, or an enterprise version that I can use?
    Thanks in advance,

    Hi Rich,
    Even i had a similar kind of problem. I wanted to fetch data from BI through the XMLA Connector which are created in Query Designer and then i wanted to fetch these fields and rearrange them and put it in a report format by colouring certain fields. Can the same can be done in WebDynpro.

  • How can I create a Report from a SWT-Application?

    Post Author: mkoch
    CA Forum: JAVA
    I'm a Developer and new to Crystal Reports and I have the job to create a Report from a SWT-Application.The report-files ( *.rpt) were created with Crystal Reports 10 or 11.> I'm not sure but I have access to a machine where Crystal Reports 10 Developer an Crystal Reports 11 Runtime are installed.Can anybody describe in detail how I can start the creation of a report from my Java-Application?> What libraries are needed, where can I get them and so on.I saw in the CR10-Setup that there is a Java-feature - but unfortunately this is not installed on my test-machine.--> Is it necessary to install this feature or can I get this files on businessobjects.com?Is it possible to start the report-creation from command-line?I saw a Java-example on the internet which uses Report.exe - but I haven't found this on my machine.I hope, that somebody can help me.GreetingsMarkus

    Inv. #
    Item
    Sale Price
    Lisa
    Oct Sold 12
    Oct Sold 12-2
    Oct Sold 12-3
    149
    Vase Lidded
    25
    201
    Bird
    7
    7
    202
    Bird
    7
    203
    Bird
    7
    204
    Bird
    7
    7
    205
    Bird
    7
    7
    206
    Bird
    7
    7
    207
    Bird
    7
    207
    Bird
    7
    7
    208
    Bird
    7
    7
    209
    Bird
    7
    7
    This is my very simple inventory.  On previous program I could sort by those items that did not have any figure in the row across.  Then I could print a report of open inventory.  Such as 149 Lidded Vase has not sales amount in the four colums across, thus it is open inventory.  How can I capture all those items in one report?

  • Report (OFFSETTING   A/C  in  GL  LINE ITEMS) urgent

    hi everbody,
    i have to develop a report with
    OFFSETTING A/C in GL LINE ITEMS.
    if anyone has has code regarding this report
    then plz share with me.
    my id is- [email protected]
    plz i am looking for it.hope that u all will help me and share with me the code regadring above report.
    i will surely give points for ur effort.
    thanks & Regards
    sanjeev

    hi deepak,
    check the code . i have problem that i am not getting
    offsetting item after clicking my 2nd radio button.
    by clicking on this i am getting datathat is aslo reqired but along with it i should get offsetting item details
    aslo but i am unable to get it.
    so plz provide for this any solution .
    REPORT zglaccline NO STANDARD PAGE HEADING                              
                       LINE-SIZE 300                                         
                       LINE-COUNT 65(3).                                                                               
    TABLES : bkpf, bseg.                                                                               
    DATA : BEGIN OF it_bkpf OCCURS 0,                                       
            bukrs LIKE bkpf-bukrs,                                           
            belnr LIKE bkpf-belnr,                                           
            gjahr LIKE bkpf-gjahr,                                           
            monat LIKE bkpf-monat,                                           
            budat LIKE bkpf-budat,                                           
            brnch LIKE bkpf-brnch,                                           
            xblnr LIKE bkpf-xblnr,                                           
            waers LIKE bkpf-waers,                                           
            END OF it_bkpf.                                                                               
    DATA : BEGIN OF it_bseg OCCURS 0,                                        
    gsber LIKE bseg-gsber,                                                   
    hkont LIKE bseg-hkont,                                                   
    kunnr LIKE bseg-kunnr,                                                   
    sgtxt LIKE bseg-sgtxt,                                                   
    bschl LIKE bseg-bschl,                                                   
    wrbtr LIKE bseg-wrbtr,                                                   
    dmbtr LIKE bseg-dmbtr,                                                   
    pswsl LIKE bseg-pswsl,                                                   
    kostl LIKE bseg-kostl,                                                   
    prctr LIKE bseg-prctr,                                                   
    aufnr LIKE bseg-aufnr,                                                   
    shkzg LIKE bseg-shkzg,                                                   
    augbl LIKE bseg-augbl,                                                   
    END OF it_bseg.                                                                               
    DATA : BEGIN OF it_res OCCURS 0,                                           
    bukrs LIKE bkpf-bukrs,                                                    
    gjahr LIKE bkpf-gjahr,                                                    
    monat LIKE bkpf-monat,                                                    
    belnr LIKE bkpf-belnr,                                                    
    budat LIKE bkpf-budat,                                                    
    brnch LIKE bkpf-brnch,                                                    
    gsber LIKE bseg-gsber,                                                    
    hkont LIKE bseg-hkont,                                                    
    kunnr LIKE bseg-kunnr,                                                    
    bschl LIKE bseg-bschl,                                                    
    prctr LIKE bseg-prctr,                                                    
    kostl LIKE bseg-kostl,                                                    
    aufnr LIKE bseg-aufnr,                                                    
    pswsl LIKE bseg-pswsl,                                                    
    wrbtr LIKE bseg-wrbtr,                                                                               
    waers LIKE bkpf-waers,                                                 
    dmbtr LIKE bseg-dmbtr,                                                 
    xblnr LIKE bkpf-xblnr,                                                 
    txt50 LIKE skat-txt50,                                                 
    sgtxt LIKE bseg-sgtxt,                                                 
    shkzg LIKE bseg-shkzg,                                                 
    END OF it_res.                                                                               
    DATA : BEGIN OF itab_head OCCURS 0,                                     
           name1(20) TYPE c,                                                
           END OF itab_head.                                                
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-002.          
    PARAMETERS : p_sel1 RADIOBUTTON GROUP sel,                              
                 p_sel2 RADIOBUTTON GROUP sel,                              
                 p_sel3 RADIOBUTTON GROUP sel.                              
    SELECTION-SCREEN END OF BLOCK b_2.                                      
    SELECTION-SCREEN SKIP 1.                                                
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-001.          
    PARAMETER p_bukrs LIKE bkpf-bukrs DEFAULT 'ML' OBLIGATORY.              
    SELECT-OPTIONS : s_belnr FOR bkpf-belnr.                                
    SELECT-OPTIONS : s_gjahr FOR bkpf-gjahr OBLIGATORY.                     
    SELECT-OPTIONS : s_monat FOR bkpf-monat.                                
    SELECT-OPTIONS : s_blart FOR bkpf-blart.                                
    SELECT-OPTIONS : s_budat FOR bkpf-budat.                                
    SELECT-OPTIONS : s_waers FOR bkpf-waers.                                
    SELECT-OPTIONS : s_hkont FOR bseg-hkont.                                
    SELECT-OPTIONS : s_bldat FOR bkpf-bldat.                                
    SELECTION-SCREEN END OF BLOCK b_1.                                                                               
    SELECT bukrs belnr gjahr monat budat brnch xblnr waers                  
       INTO CORRESPONDING FIELDS OF TABLE it_bkpf                           
       FROM bkpf                                                            
       WHERE bukrs = p_bukrs                                                
       AND belnr IN s_belnr                                                 
       AND gjahr IN s_gjahr                                                 
       AND monat IN s_monat                                                 
       AND blart IN s_blart                                                 
       AND budat IN s_budat                                                 
       AND bldat IN s_bldat                                                 
       AND waers IN s_waers.                                                                               
    IF NOT it_bkpf[] IS INITIAL.                                            
      LOOP AT it_bkpf.                                                      
    IF p_sel1 = 'X'.                                                        
        SELECT gsber hkont kunnr sgtxt bschl wrbtr pswsl kostl shkzg        
                            dmbtr prctr aufnr augdt augbl                               
           INTO CORRESPONDING FIELDS OF TABLE it_bseg                       
           FROM bseg                                                        
           WHERE bukrs = it_bkpf-bukrs                                      
           AND belnr   = it_bkpf-belnr                                      
           AND gjahr   = it_bkpf-gjahr                                      
           AND pswsl   = it_bkpf-waers                                      
           AND hkont  IN s_hkont.                                           
    ELSEIF p_sel2 = 'X'.                                                    
        SELECT gsber hkont kunnr sgtxt bschl wrbtr pswsl kostl shkzg        
                dmbtr prctr aufnr augdt augbl                               
           INTO CORRESPONDING FIELDS OF TABLE it_bseg                       
           FROM bseg                                                        
           WHERE bukrs = it_bkpf-bukrs                                      
           AND belnr   = it_bkpf-belnr                                      
           AND gjahr   = it_bkpf-gjahr                                      
           AND pswsl   = it_bkpf-waers.                                    
          AND koart <> 'S'.                                              
    ENDIF.                                                                 
        IF sy-subrc EQ 0.                                                  
          LOOP AT it_bseg.                                                 
            SELECT SINGLE txt50 INTO it_res-txt50                          
                 FROM skat                                                 
                 WHERE spras = 'EN'                                        
                 AND   ktopl = 'MCA'                                       
                 AND   saknr = it_bseg-hkont.                                                                               
    it_res-bukrs = it_bkpf-bukrs.                                  
            it_res-gjahr = it_bkpf-gjahr.                                  
            it_res-monat = it_bkpf-monat.                                  
            it_res-gsber = it_bseg-gsber.                                  
            it_res-belnr = it_bkpf-belnr.                                  
            it_res-budat = it_bkpf-budat.                                  
            it_res-brnch = it_bkpf-brnch.                                  
            it_res-kunnr = it_bseg-kunnr.                                  
            it_res-hkont = it_bseg-hkont.                                  
            it_res-sgtxt = it_bseg-sgtxt.                                  
            it_res-bschl = it_bseg-bschl.                                  
            it_res-wrbtr = it_bseg-wrbtr.                                  
            it_res-pswsl = it_bseg-pswsl.                                  
            it_res-waers = it_bkpf-waers.                                  
            it_res-dmbtr = it_bseg-dmbtr.                                  
            it_res-kostl = it_bseg-kostl.                                  
            it_res-prctr = it_bseg-prctr.                                  
            it_res-aufnr = it_bseg-aufnr.                                  
            it_res-shkzg = it_bseg-shkzg.                                  
           it_res-augbl = it_bseg-augbl.                                 
            it_res-xblnr = it_bkpf-xblnr.                                  
            APPEND it_res.                                                 
            CLEAR it_res.                                                  
          ENDLOOP.                                                         
          CLEAR it_bkpf.                                                   
        ENDIF.                                                             
      ENDLOOP.                                                             
    ENDIF.                                                                 
    LOOP AT it_res.                                                        
      IF it_res-shkzg EQ 'H'.                                              
        it_res-wrbtr = it_res-wrbtr * -1.                                  
        it_res-dmbtr = it_res-dmbtr * -1.                                  
      ENDIF.                                                               
      WRITE : /2(4) it_res-bukrs,                                          
               13(4) it_res-gjahr,                                         
               21(2) it_res-monat,                                         
               31(10) it_res-belnr,                                        
               44(10) it_res-budat,                                        
               55(4) it_res-brnch,                                         
               60(4) it_res-gsber,                                          
               70(10) it_res-hkont,                                         
               82(10) it_res-kunnr,                                         
               94(2) it_res-bschl,                                          
               104(10) it_res-prctr,                                              
              116(10)  it_res-kostl,                                        
              128(12)  it_res-aufnr,                                        
              142(5)  it_res-pswsl,                                         
              148(13)  it_res-wrbtr,                                        
              164(5)  it_res-waers,                                         
              170(13)  it_res-dmbtr,                                        
             187(16)   it_res-xblnr,                                        
              205(50)  it_res-sgtxt.                                        
      MODIFY it_res.                                                        
      CLEAR it_res.                                                         
    ENDLOOP.
    Message was edited by: sanjeev singh

Maybe you are looking for