How to get the output in ALV format

Hi All,
this is my program, in this i want to get the output in ALV, i hv created two containers and m able to get the ALV layout successfully but i am not able to fetch the correct data.
the output it is showing is some RFC value.
here we have used -  abaplist, soli.
Please provide me the solution.
SELECT * FROM varid INTO CORRESPONDING FIELDS OF TABLE t_varid WHERE report in s_report.
LOOP AT t_varid .
  SUBMIT (t_varid-report) USING SELECTION-SET t_varid-variant
                EXPORTING LIST TO MEMORY
                AND RETURN.
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = listtab
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.
**************Old System Entry********
  CALL FUNCTION 'Z_GET_DETAILS'
    DESTINATION 'BWDCLNT900'
    EXPORTING
      report  = t_varid-report
      variant = t_varid-variant
    TABLES
      listtab = list_tab.
  IF sy-subrc EQ 0.
    CALL FUNCTION 'LIST_TO_TXT'
      TABLES
        listtxt            = listtxt1
        listobject         = list_tab
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2.
  ENDIF.
  if p_flag eq 'X'.
    clear p_flag.
    write : / 'Program Name',
              41 'Variant Name',
              66 'Output Match'.
    endif.
  IF listtxt EQ listtxt1.
    WRITE : /   t_varid-report,
             41 t_varid-variant,
             66 icon_green_light AS ICON HOTSPOT.
  ELSE.
    WRITE : /   t_varid-report,
             41 t_varid-variant,
             66 icon_red_light AS ICON HOTSPOT.
  ENDIF.
  CLEAR : listtab,list_tab,listtxt,listtxt1.
  REFRESH : listtab[],list_tab[],listtxt[],listtxt1[].
ENDLOOP.
AT line-selection.
    v_report  = sy-lisel(40).
    v_variant = sy-lisel+40(14).
call SCREEN 400.
module STATUS_0400 output.
SUBMIT (v_report) USING SELECTION-SET v_variant
                EXPORTING LIST TO MEMORY
                AND RETURN.
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = listtab
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.
   CALL FUNCTION 'LIST_TO_TXT'
      TABLES
        listtxt            = listtxt1
        listobject         = list_tab
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2.
**************Old System Entry********
  CALL FUNCTION 'Z_GET_DETAILS'
    DESTINATION 'BWDCLNT900'
    EXPORTING
      report  = v_report
      variant = v_variant
    TABLES
      listtab = list_tab.
CREATE OBJECT CCONT1
  EXPORTING
   CONTAINER_NAME = 'C1'.
CREATE OBJECT CCONT2
  EXPORTING
   CONTAINER_NAME = 'C2'.
CREATE OBJECT GRID1
  EXPORTING
   I_PARENT = CCONT1.
CREATE OBJECT GRID2
  EXPORTING
   I_PARENT = CCONT2.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
  EXPORTING
  I_STRUCTURE_NAME = 'abaplist'
  CHANGING
   IT_OUTTAB = list_tab.
CALL METHOD GRID2->SET_TABLE_FOR_FIRST_DISPLAY
  EXPORTING
  I_STRUCTURE_NAME = 'abaplist'
  CHANGING
   IT_OUTTAB = listtab.
  SET PF-STATUS 'ZUTDEMO2'.
endmodule.             
module USER_COMMAND_0400 input.
IF SY-UCOMM = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
endmodule.                 " USER_COMMAND_0400  INPUT

solved

Similar Messages

  • How to get the output in .xls format instead of .csv.

    Dear All,
    I have added a exportButton on a table through personlization, when I click on the button it is opening in .csv instead of .xls file .
    Please let me know if I can change the format of that to .xls .
    Regards
    Karan deep.

    Hi,
    I tried that but I am not able to get the outplut in .xls format .......I think "export all rows" property is used to export all the rows of the particular table "VO attached to it".....I dont think that this property has any control of file format....

  • How to get the output of the report in pdf format

    how to get the output of the report in pdf format?
    Thanks in advance,
    madan.

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

  • How to send the output to PDF format in reports 6i?

    Hi,
    How to send the output to PDF format in reports 6i? I given Mode = BITMAP.
    DESTYPE = File, DESFORMAT = PDF, DESNAME = C:\x.pdf.
    Report is running fine. But PDF file not generated. I don't know what i missed. Any one can help this?
    Thanks
    Kavitha

    Hello,
    Do you get this problem only for DESFORMAT=PDF ?
    Test with :
    DESFORMAT = RTF, DESNAME = C:\x.rtf
    or
    DESFORMAT = HTMLCSS, DESNAME = C:\x.html
    does it work ?
    Check if DESNAME is modified in the reports itself.
    Regards

  • Are You All Able to get the Output In EXCEL Format

    Hi All,
    I have one question. Are You All Able to get the Output In EXCEL Format?? I am working on Oracle Apllication 11.5.10.2 and my XML builder is 5.0.1. Problem which i m facing is this...... Whenever i am submitting a concurrent program with format type different from PDF i could not able to view the ouput in desired format. When i am pressing view output it gives me a file in XML and when i save that file with extention 'xls' or 'rtf' then i could able to see the saved file in desired format.
    Can anyone tell me where is the problem??? Is it a bug?
    I am using microsoft world 2000 sp-3.
    Please give your valuable comments. May be your comments can solve my problem..
    Thanks
    Ravi

    Hi I got Same issue
    When I change Format to EXCEL from
    Submit request>> Option>> Format = EXCEL
    In window I am getting something HTML code and
    when I try to copy it to Browser from Tools>> Copy File in to Browser I am getting following message
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    End tag 'p' does not match the start tag 'a'. Error processing resource 'http://our url.com:8000/OA_CGI...
    <p class="c0"><a name="Text4" id="Text4"><a name="Text1_1" id="Text1_1"><span class="c1">Dept No <...
    But I can see the output when Format is PDF
    Pls suggest solution ,I am using EBS 11.5.10.2.
    Thanks
    Rahul
    Message was edited by: Rahul
    user576181

  • How to change the output as text format in Apps R12.1.3

    Hi All,
    Currently iam trying to modify the Java Concurrent Program (FDExtractAndFormatting) in Batch Payment Process. This Program is generated in text format in 11i APPS. Now we are upgrading to R12.1.3. In R12.1.3 output is coming as PDF format. Here my requirement is how to change the output as text format in R12.1.3 also.
    Please do the needful and suggest me.
    Regards,
    Jagadeesh

    1. It is seeded java concurrent program. Some attributes are missing from 11i to R12. In 11i it is a text format.So i have to investgate on how to retrive those attributes in R12. What is the concurrent program name?
    Have you tried to change the output and submit the request?
    2. Once all are attributes are coming in PDF format. Client wants to open same output in text format as it is 11i (In R12 it is generated in PDF format).If the above does not help, please log a SR.
    Thanks,
    Hussein

  • In fnd_request.add_layout how to get the layout in EXCEL Format

    Hi All,
    After applying the patch (5688014), in WSH_DOCUMENT_SETS package fnd_request.add_layout is getting called as below. I am getting the output in PDF format, when called from Document sets.
    But my requirement is i want the report to be in EXCEL Format. Is there any other patch is available to get the report in EXCEL when called from Document Sets/ Or any other alternative solutions to acheive this..
    Can any body help me on this...
    l_print_pdf := 'N';
    IF(l_output_file_type = 'XML' ) THEN
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, 'template' || l_template_code);
    END IF;
    IF (l_template_code is not NULL) then
    IF l_nls_lang.COUNT <> 0 THEN
    select iso_language,iso_territory into l_language, l_territory
    from fnd_languages
    where language_code = l_nls_lang(l_nls_count).lang_code;
    ELSE
    select iso_language,iso_territory into l_language, l_territory
    from fnd_languages
    where language_code = userenv('LANG');
    END IF;
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, ' language ' || l_language || ', territory ' || l_territory);
    END IF;
    l_ret_status :=fnd_request.add_layout(l_appl_short_name,
    l_template_code,
    l_language,
    l_territory,
    'PDF');
    IF l_ret_status THEN
    l_print_pdf := 'Y';
    ELSE
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, 'Error returning from fnd_request.add_layout :'||x_return_status);
    END IF;
    wsh_util_core.add_message(x_return_status);
    END IF;
    ELSE
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, 'No template was specified for this report. Hence could not generate the pdf output' );
    END IF;
    fnd_message.set_name('WSH', 'WSH_NO_DEFAULT_TEMPLATE');
    fnd_message.set_token('CONC_PROG_NAME', document.user_concurrent_program_name);
    x_return_status := wsh_util_core.g_ret_sts_error;
    wsh_util_core.add_message(x_return_status);
    END IF; --} If template_code is not null
    END IF; --} If l_output_file_type = 'XML'
    Thanks in Advance..

    Hi,
    I tried your approach and got the following error..
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 14808954 on node FAHQSNA09SFTD07 at 24-JAN-2012 04:13:08.
    Post-processing of request 14808954 failed at 24-JAN-2012 04:13:09 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    ------------- 2) PRINT   -------------
    Not printing the output of this request because post-processing failed.
    After analysing the log i found there is some issue in OPP Service log.
    Below is the service log error..
    It says there is 'No corresponding LOB data found' in below query
    SELECT l.file_data file_data, DBMS_LOB.getlength (l.file_data) file_length,
    l.LANGUAGE LANGUAGE, l.territory territory,
    b.default_language default_language,
    b.default_territory default_territory,
    b.template_type_code template_type_code,
    b.use_alias_table use_alias_table, b.start_date start_date,
    b.end_date end_date, b.template_status template_status,
    b.use_alias_table use_alias_table,
    b.ds_app_short_name ds_app_short_name,
    b.data_source_code data_source_code, l.lob_type lob_type
    FROM xdo_lobs l, xdo_templates_b b
    WHERE l.application_short_name = :1
    AND l.lob_code = :2
    AND l.application_short_name = b.application_short_name
    AND l.lob_code = b.template_code
    AND (l.lob_type = 'TEMPLATE' OR l.lob_type = 'MLS_TEMPLATE')
    AND ( (l.LANGUAGE = :3 AND l.territory = :4)
    OR (l.LANGUAGE = :5 AND l.territory = :6)
    OR ( l.LANGUAGE = b.default_language
    AND l.territory = b.default_territory
    But i see the data for this query.
    Please let us know is there any setups that needs to be done to achieve this..
    below is the OPP log error...
    Thanks in Advance.
    [1/24/12 4:13:09 AM] [710131:RT14808954] Executing post-processing actions for request 14808954.
    [1/24/12 4:13:09 AM] [710131:RT14808954] Starting XML Publisher post-processing action.
    [1/24/12 4:13:09 AM] [710131:RT14808954]
    Template code: EMP_DETAILS
    Template app: EMP_DETAILS
    Language: en
    Territory: US
    Output type: EXCEL
    [1/24/12 4:13:09 AM] [UNEXPECTED] [710131:RT14808954] java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA,DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.DS_APP_SHORT_NAME DS_APP_SHORT_NAME, B.DATA_SOURCE_CODE DATA_SOURCE_CODE, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.APPLICATION_SHORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ))
         at oracle.apps.xdo.oa.schema.server.TemplateInputStream.initStream(TemplateInputStream.java:402)
         at oracle.apps.xdo.oa.schema.server.TemplateInputStream.<init>(TemplateInputStream.java:235)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.getTemplateFile(TemplateHelper.java:1163)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3450)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)

  • How to get the output of Standard HR forms in PE51

    Hi Experts,
    How to get the output of standard HR forms available in PE51 Transaction for coutry grouping 99.
    Please advice.
    Regards,
    IFF

    Hi
    Use the t code for country grouping 99....PC00_M99_CEDT - Remuneration Statement. to get the variant in tcode PC00_M99_CALC_SIMU - Simulation.
    Like this test for all the standard forms, what all are the available in PE51 for country grouping 99

  • How to get the output format options of SAP QUERY

    Hi Gurus,
    I want to get the output options available for sapquery program.means when you execute the program "AQZZ/SAPQUERY/FDF1============" you will get output options like sap alv,display as table,wordprocessing  etc.
    i am not able to unsderstand the logic in that standard code.my requirement is after fetching the data from the database i want to provide the ouput options SAP ALV,DISPLAY AS TABLE,WORD PROCESSING,SPREAD SHEET,FILESTORE.
    I can output the data in SAP ALV and i can store the data.But i am not able to use the the remaining options in my program.please provide me solution.
    I am very much thankful to the people who can provide me the solution.

    Hi,
    If you have a query then go to transaction 'SQ01' . Then press the change button . Then u will able to see the Output Options.Their u can select the option what ever u want.

  • How to get Report Output in csv format

    Hi,
    How can i get report Output in csv format, can any one tell me the word used for output type to get output in csv format.
    i have used XLS output type but it opens in excel format.
    conc.addLayout(appCode,concReqCode,"en-US","US",XLS);
    Thanks
    Babu

    Hi Babu,
    Till now in xmlpublisher there is no method to create file in csv format ,you have to create Excel file and then save it in .csv format.Unless and until ur using BI Publisher in which some work around are possible.
    Thanks

  • How to get the output of a procedure in to a log file ?

    Hi, Everyone,
    Could you please tell me
    How do i write the output of a procedure to a log file ?
    Thanks in advance...

    Hi,
    could you please explain me more on how to use the UTL_file to get the output to a log file as in am new to PL/SQL
    my script file is
    EXEC pac_sav_cat_rfv.pro_cardbase (200910,'aaa',100,'test_tbl');
    i need the output of this statement in a log file.
    Could you please explain to me how it can be done.
    thanks in advance

  • How to get the SUBTOTAL_TEXT  in ALV

    Hi
    we have a requirement, it needs to get the SUBTOTAL_TEXT in ALV.
    Can i know how to do it in ALV.
    Can you give me any Example.
    And How to Use TOP-OF-PAGE in ALV. What is the Purpose of TOP-OF-PAGE.
    Regards,
    N.L.

    Hi,
    I am giving you sample code look at this regarding TOP-OF-PAGE.
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program      = i_repid
            i_callback_user_command = 'USER_COMMAND_PERNR'
            it_fieldcat             = header
            is_layout               = gt_layout
            i_callback_top_of_page  = 'TOP-OF-PAGE1'
            i_grid_title  = 'Communication device details - Deleted records'
            it_sort                 = gt_sort[]
            i_default               = 'X'
            i_save                  = 'U'
            is_variant              = gt_variant
            it_events               = gt_events
           TABLES
            t_outtab                = ITAB.
         clear itab.
    Form TOP-OF-PAGE1
    form top-of-page1.
      data: header type slis_t_listheader,
      wa type slis_listheader. "infield like wa-info, nline type n.
    TITLE AREA
      wa-typ = 'S'.
      wa-info = 'Communication device details'.
      append wa to header.
      wa-typ = 'S'.
      write sy-datum to wa-info MM/DD/YYYY.
      concatenate 'Date: ' wa-info into wa-info separated by space.
      append wa to header.
      wa-typ = 'S'.
      concatenate 'User Name: ' sy-UNAME into wa-info separated by space.
      append wa to header.
      wa-typ = 'S'.
      concatenate 'Prog Name: ' sy-repid into wa-info separated by space.
      append wa to header.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = header
                i_logo             = 'ENJOYSAP_LOGO1'.
    endform.
    In this top of page you will get Report name date etc and your company logo or SAP enjoy logo what ever you want.
    You check this link also for reference.
    http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    Thanks.
    If this helps you award points and close the thread.

  • How to get the output data of Standard drill down report into z-program?

    HI every one,
            I want to get the output data of drill down report into z-program.
           Actually,if the output is only one, I can get into z-program,
          But, Here the report consists 3 alv outputs. when double clicking function happens, it will direct to another alv output.
        Those, all the outputs of report i want to get into z-program.
    PLease , give reply as early as possible.
    Thank u in advance,
    karthik

    HI,
      When i download,only one output i will get.
      But,if i double-click the particular record it will show another output. I want that output also.
      Like that,when i double-click particular record, it will show some other alv ouput based on record,     
    i wanted all those outputs.
    If  i copy the code, whether i face any problems?

  • How to get the output of a standard report  RFBILA00 in PDF form.

    hi,
    I have to get the output of the standard report RFBILA00 in the PDF form.
    Thanks.

    Hi Rao,
    you can run your report RFBILA00 in background  and in background  job you can add one more step, next in that step you can add custom  report like zsubmit .
    job should be set like
    step1:  RFBILA00 with variant.
    Step2:  zsubmit report with variant.
    In Zsubmit report  you can  read, your first step spool using FM GET_JOB_RUNTIME_INFO
    and pass that spool  in the FM  CONVERT_ABAPSPOOLJOB_2_PDF.
    when second  report run in job  you can set your target like download in the server or  send email etc.
    Regards,
    Prasenjit

  • How to get the output path in Java?

    Hi all,
    is there a way (method) to get the output path (where compiled classes are put) in Java?
    thx a lot!
    Michele

    If you have already successfully loaded the classes into memory, and you want to find out where the classes are physically stored, then you can use Class.getResource() to retrieve the location of the file.
    import java.net.URL;
    public class Find
      private void run(String obj) {
        try {             
          Class cls = Class.forName(obj);
          //Here is the change to input correct resource path
          //instead of class name 
          String resourcePath = "/"+obj.replace('.','/')+".class";
          URL url = cls.getResource(resourcePath);
          System.out.println(url);
        catch (Exception e) {
          e.printStackTrace();
      public static void main(String[] args) {
        Find find = new Find();
        find.run(args[0]);   
    }java Find java.lang.String
    jar:file:/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar!/java/lang/String.class
    Edited by: Jin on Oct 23, 2007 10:38 AM

Maybe you are looking for

  • Error on Portal Logon Page

    Hi Experts, We are getting exception while calling the Portal URL. Recently, we changed the password policy and made some customizations on the com.sap.portal.runtime.logon.par file. After that when I tried to access the Logon page, it gave an except

  • UDF to get the filename for File Sender Adapter

    Hi, I had an requirement to get the  the Filename and map to the  target payload. I had configured the File Sender Adapter settings in the ID This is the following UDF i got from SDN. DynamicConfiguration conf = (DynamicConfiguration) container.getTr

  • Allow multiple but only display 1 choice

    with dreamweaver 8, how do I set the display to only show 1 choice initially? e.g. I have a month list. Initially, I want it to display Jan - and Jan ONLY. I want to allow multiple choice of month, e.g. I can choose Jun, July and Aug. I set type to L

  • UnmarshalException - Method not found

    I am using weblogic 7. The server and client are separate machines. When I ran the client, the following error appeared: Start server side stack trace: java.rmi.UnmarshalException: Could not unmarshal method ID; nested exception is: java.rmi.Unmarsha

  • SQL 2012 not recognizing modification of scalar function

    I have two scalar functions which are both very similar. Both required three variables. Then I realized that I needed another variable in both functions so I added it to both.  I then modified the call to each function (e.g. select dbo.function(var1,