Dynamic selection of columns in report and print the output

Hi,
I tried to have dynamic selection of columns in SQL query using lexical parameter. The hitch is how to print those selected column in excel ouput ?
Suppose
I have select &col from table_name
Initial value of &col is col1 and in data layout only col1 appears
where &col was replaced with more than a column (col1,col2,col3)
now how to print the column selected at the run time,
i have coded in Before Report Trigger
:cell_val := ' <td><rw:field id:"cl1" src="col1"></rw:field></td>
<td><rw:field id:"cl2" src="col2"></rw:field></td>
<td><rw:field id:"cl3" src="col3"></rw:field></td> ' ;
and this user parameter was replaced in web source using JSP expression
<rw:getvalue id: "v_cell" src:"cell_val"></rw:getvalue>
<rw:foreach src:"g_val">
<table>
<tr>
<% =v_cell%>
</tr>
</table>
</rw:foreach>
but in the output i can see only blank columns
Regards
Suresh

The strings replaced by expression <%= v_cell %>
should print the field values contained in col1,col2,col3 columns, but nothing is printed . i think the custom tags (rw...) are not replaced by the jsp expression properly.

Similar Messages

  • How to run the report and show the output in excel file

    salam
    how to run the report and show the output in excel file,
    how to run the report and print the o/p via printer
    how to run the report and send the o/p via mail
    thank u all

    Hi,
    There are Parameters DESTTYPE, DESFORMAT and DESNAME. You can set these parameters to get as you want.
    1) Output in Excel File
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'DELIMITED');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<file_name>.XLS');2) output to printer
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<printer_name>');3) Email - Have to configure SMTP and all. ( i didn't checked it)
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'MAIL');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<email_id>');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • Automatic scheduling of report and send the output  to user via email

    Good Morning,
    Please i need to scheduled report and send the output via email in Discoverer . Please can someone assist in how to achieve this ?

    Hi,
    You cannot schedule and email a Discoverer report using standard Discoverer scheduling. You have to use a third party scheduler and Discoverer Desktop running on a windows PC.
    This presentation has some more details on how to do this.
    Rod West

  • How to Call and print the output eBusiness Report

    Hi
    I have gone through all the posted threads to see whether any of the thread solution matches my requirement. But, I couldn't find any.
    I have a report which is registered in eBusiness and I wanted to run the report and wanted to show the report output in APEX.
    How can I achieve this?
    Appreciate your Help.
    Regards
    Kiran Akkiraju

    i have thought a code like below...but its missing...please look at the comment line on the code...i hope i am on the right way...please correct me
    response.reset();
              ServletOutputStream cikti=response.getOutputStream();
              BufferedImage servletResim=new BufferedImage(150,50,BufferedImage.TYPE_INT_RGB);
              Graphics2D graf=(Graphics2D) servletResim.getGraphics();
              graf.     // here i must get the image file from hdd path but how?couldnt find any valid method?
              JPEGImageEncoder enkoder=JPEGCodec.createJPEGEncoder(cikti);
              enkoder.encode(servletResim);
              cikti.close();

  • Append the file and print the output in a single file in column manner

    Hi All,
    I have 2 files in UNIX.
    File1.txt
    NAME SAL
    Albert $4567
    Monali $7892
    Raj $8521
    File2.txt
    DOB
    12-JUL-1986
    5-Aug-1978
    13-MAR-1958
    so i apped both the file
    cat file1.txt file2.txt>>file3.txt
    The output of file3.txt was:
    NAME SAL
    Albert $4567
    Monali $7892
    Raj $8521
    DOB
    12-JUL-1986
    5-Aug-1978
    13-MAR-1958
    But i need the output below
    NAME SAL DOB
    Albert $4567 12-JUL-1986
    Monali $7892 5-Aug-1978
    Raj $8521 13-MAR-1958
    Could you please help me to resolve
    Edited by: user10069916 on Sep 6, 2012 12:07 AM

    $ man paste
    $ cat file1.txt
    NAME SAL
    Albert $4567
    Monali $7892
    Raj $8521
    $ cat file2.txt
    DOB
    12-JUL-1986
    5-Aug-1978
    13-MAR-1958
    $ paste file1.txt file2.txt >file3.txt
    $ cat file3.txt
    NAME SAL        DOB
    Albert $4567    12-JUL-1986
    Monali $7892    5-Aug-1978
    Raj $8521       13-MAR-1958
    $

  • Report Profile Use & fields in dynamic selection in RE-FX reports..

    I have two requirements:
    1. Some of the SAP delivered fields in RE master data of BE,PR,BU and RO are not required by our client. Thus we have hidden them using field status transaction. However they are still available in RE info system in Dynamic selection as well as in output screen. How can we remove these fields from information system as well.
    2. Some fields were added to the master data using BDT, they are visisble in the report however, they are not available in Dynamic Selections. How can we add them in dynamic selection as well during report execution.
    The transaction codes for reports are e.g. REISBE, REISBU, REISPR, REISRO, RECN, etc.
    Can ReportProfile be of some use?? If yes, how can we configure the same.
    Regards
    Rohit

    I am aware of this, however, creating a variant still keeps the fields in hidden list in change variant section and any user maygo and bring the same to viewable list.
    I am willing if we can simply remove those fields from the display screen to avoid any confusion in future.
    Regards
    Rohit

  • Runtime.getRuntime().exec hangs and doesn't print the output

    Hi,
    I have written the following code to execute the command "psexec ipaddress -u userid -p password -l -c execute.exe >> c:/25_showoutpout.txt" and print the output in 25_showoutpout.txt file.
    import java.io.*;
    public class ExecTest{
         public static void main(String args[]) throws IOException{
         String args1 = "psexec ipaddress -u userid -p password -l -c execute.exe >> c:/25_showoutpout.txt";
         try{
         Process p=Runtime.getRuntime().exec(args1);
    int i = p.waitFor();
         System.out.println("Done.with time "+i);
         }catch(Exception e){
              System.out.println("The error is "+e);
    But this program hangs and creates a blank 25_showoutpout.txt file.In the process list I can see the process running, but it doesn't redirect the output in the txt file.When i run the command from the command line it runs fine.Please help me.
    Thanks in advance

    Hi,
    I have written the following program to get the output.But still the required output is not coming in the console file.Only the messages that gets printed in the parent console that is coming in the file.But the expected output is to get the messages from the child window which gets executed while the .exe runs.
    import java.io.*;
    public class RuntimeExecTest{
    public static void main(String args[]){
    String s = null;
    String result= null;
    int count =0;
    try{
              // read the output from the command
    String cmd = "cmd.exe /c D:/installer/PsTools.zip/PsTools/psexec.exe ipaddress -u userid -p password -l -c excute.exe >> C:/RuntimeExec_25.txt";
         Process p = Runtime.getRuntime().exec(cmd);
         InputStream is = p.getInputStream();
         // Get the std in to the process.
         OutputStream os = p.getOutputStream();
         // Get the std err from the process.
         InputStream es = p.getErrorStream();
         // Create readers for those streams.
         BufferedReader reader = new BufferedReader(new InputStreamReader(is));
         BufferedReader errReader = new BufferedReader(new InputStreamReader(es));
         String line;               
         // Read STDOUT into a buffer.
         // If no STDOUT check STDERR.
         while((line = errReader.readLine()) != null){
              // Do something with data here if you wish.
         System.out.println( line );
         while((line = reader.readLine()) != null){
              // Do something with data here if you wish.
         System.out.println( line );
         System.exit(0);
    catch( Exception ex )
    ex.printStackTrace();
    }

  • Call first report in another report and download the ouput of first report

    Hi Experts ,
    Ther is 1 ALV Report which gives ouput.
    i need to call first report in second report and copy the output of first report to itab in second report and download that itab to excel in second report.
    Pls if anybody knows the solution reply as soon as possible.
    regards,
    Imran

    Moderator message - Cross post locked
    Rob

  • Daily & Monthly Backlog Reports and Printing program

    •     <b>Labeling program for Deliveries</b>: This program picks all deliveries created/updated on the current day, validates them by checking whether they have the required labeling information. If the program finds that the labeling information is missing, it populates WMS structures (header & detail) for further.
    •     <b>Daily & Monthly Backlog Reports and Printing program</b>: This program calls 2 separate reports (Daily & Qtrly. Backlog Reports), based on user selection, and directly prints the reports as well as converts them to PDF format and emails them as attachments to the MD.
              Please provide me the solution.

    For First program :
    Use table LIKP (SD Document: Delivery Header Data) & LIPS(item Data) for fetch inf all the data for selected date use field ERZET(Entry time) & ERDAT(Date creation of record) for created deliveries & refer TABLES - CDPOS and CDHDR for modified deliveries
    For Second object:
    Call multiple programs by using SUBMIT <program> with selection screen params.
    Print as per requirement by passing print parameters to Structure PRI_PARAMS &
       call function 'GET_PRINT_PARAMETERS'                     
       exporting destination = liprintr                         
                 mode        = 'CURRENT'                        
                 no_dialog   = 'X'                              
       importing out_parameters = pri_params.                       
    *To Convert ABAP List and SAP Script to PDF files use program - "RSTXPDFT4"
    ALSO REFER this nice weblog >
    /people/erwan.lebrun/blog/2007/04/16/tips-tricks-email-fax-through-the-same-output-type
    Hope it will help.
    Vishal
    Message was edited by:
            Vishal Tyagi

  • Reading and printing the pdf file in  abap reports.

    Hello friends .
    how to read  pdf file and print the contents of the  pdf file in abap reports.?
    Edited by: Shivanand Kalagi on Jan 11, 2008 12:47 PM

    HI Brad Bohn,
      Issue is not only with the file damaged.
      My requirement is to place the PDF file in FTP folder using FTP_COMMAND, FTP_R3_TO_SERVER Function Modules.
      I'm placing the PDF sucessfully in FTP Folder. When i try to open it's showing the  "File cannot be opened because it's damaged....".
    I'm not sure whether i'm placing the PDF file in correct way.
    Regards,
    Saran

  • Read an excel sheet and selected two columns like A and C will plot as a XY Graph (X as a A column and Y as a C column)

    hi sir i am read excel sheet using labview ,but unable to plot the selected colomns,so its needfull ,please find any body to sollution to the problem .i i already did some part ,it is take  too much delay
    Attachments:
    CSV File to XY GRAPH 13.lvproj ‏9 KB

    shambhulinga a écrit :
    hi sir i am read excel sheet using labview ,but unable to plot the selected colomns,so its needfull ,please find any body to sollution to the problem .i i already did some part ,it is take  too much delay
    First, you are not reading an Excel sheet but a text file (a csv file is a text file). From the listing of the function used (from the lvproj file) you are using the Read From Spreadsheet function, this function will return a 2D array. Use the Index Array function to extract the x and y value columns. Bundle them (using the Bundle function) and wire the output to your XY-Graph.
    Ben64

  • Will this SB1 reporting and printing forum will override the B1 forum ?

    Hi All,
    Will this SB1 reporting and printing forum will override the B1 forum ? If not, it means that the B1 will be purely the application or functional such as query FMS, store procedure or any work around.
    Rgds,

    Hello Jimmy,
    There is today a demand for a forum relating to printing and reporting for SAP Business One. We have taken the strategy to go for functional forums like this. This forum will in no way replace the main Business One forum, it is intended to compliment it. As we move further into the forums and as we reach ceilings in forums we will break them down into further functional forums such as this. There is a lot of threads relating to printing and reporting and Crystal Reports so we created this thread. I know you are a large contributor and hope that you can share your knowledge to these new forums.
    Regards,
    Paul Finneran
    SAP Business One Forums Team

  • To upload a RTF and a PDF file to SAP R/3 and print the same through SAP

    Hi,
    I have a requirement to upload a PDF file and a RTF file to SAP R/3 and print the same.
    I wrote the following code for uploading a RTF file to SAP R/3 and print the same. However, the problem is , the formatting present in the RTF document( bold/italics..etc) is not being reflected when I do the 'print-preview' after the executing the code below :
    report z_test_upload .
    data: begin of itab occurs 0,
             rec type string,
          end of itab.
    data: options like itcpo.
    data: filename type string,
          count type i.
    data: filetype(10) type c value 'ASC'.
    DATA: HEADER  LIKE THEAD    OCCURS   0 WITH HEADER LINE.
    DATA: NEWHEADER  LIKE THEAD    OCCURS   0 WITH HEADER LINE.
    DATA: ITFLINE LIKE TLINE    OCCURS   0 WITH HEADER LINE.
    DATA: RTFLINE LIKE HELP_STFA OCCURS   0 WITH HEADER LINE.
    DATA:   string_len TYPE i,
            n1 TYPE i.
    selection-screen begin of block b1.
      parameter: p_file1(128) default 'C:\test_itf.rtf'.
    selection-screen end of block b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      CALL FUNCTION 'F4_FILENAME'
           IMPORTING
                file_name = p_file1.
    start-of-selection.
    move p_file1 to filename.
    call function 'GUI_UPLOAD'
         EXPORTING
              filename                = filename
              filetype                = filetype
         TABLES
              data_tab                = itab
         EXCEPTIONS
              file_open_error         = 1
              file_read_error         = 2
              no_batch                = 3
              gui_refuse_filetransfer = 4
              invalid_type            = 5
              no_authority            = 6
              unknown_error           = 7
              bad_data_format         = 8
              header_not_allowed      = 9
              separator_not_allowed   = 10
              header_too_long         = 11
              unknown_dp_error        = 12
              access_denied           = 13
              dp_out_of_memory        = 14
              disk_full               = 15
              dp_timeout              = 16
              others                  = 17.
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    loop at itab.
      string_len = strlen( itab-rec ).
      n1 = string_len DIV 134.
      ADD 1 TO n1.
      DO n1 TIMES.
        rtfline-line = itab-rec.
        APPEND rtfline.
        SHIFT itab-rec BY 134 PLACES.
      ENDDO.
    endloop.
    HEADER-TDSTYLE = 'S_DOCUS1'.
    HEADER-TDFORM = 'S_DOCU_SHOW'.
    header-tdspras = 'E'.
    CALL FUNCTION 'CONVERT_TEXT'
      EXPORTING
      CODEPAGE               = '0000'
        DIRECTION              = 'IMPORT'
        FORMAT_TYPE            = 'RTF'
       FORMATWIDTH            = 72
        HEADER                 = header
        SSHEET                 = 'WINHELP.DOT'
        WITH_TAB               = 'X'
        WORD_LANGU             = SY-LANGU
        TABLETYPE              = 'ASC'
      TAB_SUBSTITUTE         = 'X09  '
      LF_SUBSTITUTE          = ' '
      REPLACE_SYMBOLS        = 'X'
      REPLACE_SAPCHARS       = 'X'
      MASK_BRACKETS          = 'X'
      IMPORTING
        NEWHEADER              = NEWHEADER
      WITH_TAB_E             =
      FORMATWIDTH_E          =
      TABLES
        FOREIGN                = RTFLINE
        ITF_LINES              = ITFLINE.
      LINKS_TO_CONVERT       =
    if sy-subrc <> 0.
    endif.
    CALL FUNCTION 'PRINT_TEXT_ITF'
      EXPORTING
         HEADER        = newheader
         OPTIONS       = options
    IMPORTING
      RESULT        =
      TABLES
        LINES         = itfline.
    if sy-subrc <> 0.
    endif.
    Any hints or suggestions to solve this problem will be highly appreciated.
    Thanks,
    Avra

    Hi Vishwas,
    Check out the thread [Efficient way of saving documents uploaded|Re: Efficient way of saving documents uploaded by users; and check the blog by Raja Thangamani.
    Also check the thread [Export Images through Function Modules   |Export Images through Function Modules;.
    Hope it helps you.

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Running report and get the report result with coding

    Hi all,
    In our R/3 system, there is a custom sales report.
    My question is: is there possibility to get data by running this report and grab it the result with code and store it in internal table?
    Sorry if my question too basic because I am not abaper
    I am just wondering to find new solution for my project.
    Regards,
    Steph

    My requirement is: I want to get the result from this report
    (rather than try to get the data from SAP original table, because this report is very complicated with a lot of selection data) and use it this result into my new program.
    The mechanism that I want is pull the result from the current report, not to add some code in current report to push into new program, to avoid changed the report.
    Btw, the output of this report not only the excel file, we can also run this report on foreground mode and see the result.
    The report is not ALV report.
    Regards,
    Steph

Maybe you are looking for

  • How do you remove an apple id from find m iphone if you are unable to contact previous owner

    i bought a phone from someone 4 months ago on craigslist and never went to activate it until now and saw that it wont let me passed the activation screen and im not able to contact the seller because i don't have their information how can i get it re

  • How can I hook up Zen Touch to my reciev

    I have a Yahama reciever and want to hook up my Zen Touch. I have a Y cable with RCA leads?(red and white)?when I hook up to the stereo I only get music out of one speaker or mono. It does not matter which port I use the results are always the same.

  • Temporary table

    Hi, I wrote procedure to populate temporary table. Since its temporary table , I cant see the data. Could I use 'execute' to see the data. Or how could I see the data get populated in the table.? Here I pasted the procedure. PROCEDURE gen_rpt_by_rang

  • FOP and OC4J

    Morning Guys, i am in the middle of a developing an application in Oracle Framework that gives me the possibiity to show/print the result of the VO in PDF. Unfortunatelly when i run the page it gives me the following error message: XSL-1000: (Fatal E

  • Oracle.webdb.utils.*;

    Hi. I have taken over the code for a portlet that was developed using JDeveloper3.2. I'm using Oracle9i JDeveloper, and I get a compilation error in oracle.portal.provider.v1.ProviderUser.java asking for the following class: oracle.webdb.utils.Simple