How to get the output in EXCEL form from RIDC.

Hi,
I want the list of all views from UCM in EXCEL form. In RIDC code i am using GET_SCHEMA_VIEWS service to get
all the defined schema views.
But i want this list in EXCEL sheet. How can i do this in RIDC code?
Thanks,
SSJ

But i want this list in EXCEL sheet. How can i do this in RIDC code?You can't. RIDC will help you to get data from UCM to Java (in a form of an object in memory). If you want to store this object persistently as a file (e.g. in Excel spreadsheet format) you have to use other Java techniques/libraries like this one: http://www.vogella.com/articles/JavaExcel/article.html or http://jexcelapi.sourceforge.net/

Similar Messages

  • 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

  • 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 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 get the first 4 chars form a var ?

    Hi guys,
    How to get the first 4 chars form a var ?
    i.e  temp type num20 value '00000000000012345678'.
    how to move the first 4 chars to another var?
    thx in advance.

    hi
    use OFFESTS..
    example:
    var1 = '12345678'.
    var2 = var1+0(4).
    now var2 conatins '1234'.
    thx
    pavan

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • How to get the current logged in username from windows and put it into an AS var

    Hello,
    I was hopeing someone would know how to get the current logged in username from windows and put it into a var, so I can create a dynamic text box to display it.
    Thanks in advance
    Michael

    Just for everyone’s info, this is the script I have used to get the logged in windows username into flash ---- not and air app.
    In the html page that publishes with the .swf file under the <head> section:-
    <script language="JavaScript" type="text/javascript">
    function findUserName() {
         var wshell=new ActiveXObject ("wscript.shell");
         var username=wshell.ExpandEnvironmentStrings("%username%");
         return username;
    </script>
    The ActionScript:-
    import flash.external.ExternalInterface;
    var username:String = ExternalInterface.call ("findUserName");
    trace (username); // a quick test to see it in output

  • 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

  • Run the Report as a Background job and Get the Output in Excel in Local PC

    Hello Gurus,
    I have one following requirement.
    One should be able to run the report as a background job and it should be possible to get the report in Excel format, also when running the report in background. The excel report should have the same information and look as the current SAPreport.
    Please provide some solution.
    Any helpful answer get surely awarded.
    Thanks a lot,
    Varlanir

    GUI_* WS_* Function In Background, CSV Upload
    GUI_* and WS_* function modules do not work in background
    When scheduling a job in the background the appropriate statement to read in your file is OPEN DATASET, and the file must be on the file system that the SAP server can see.
    At anytime, a user can switch of the Personal Computers even though the job is still running in the background.  Therefore GUI_* and WS_* function modules are not designed to work in that way, as they need to access your personal computer  file.
    To choose the correct download method to used, you can check the value of SY-BATCH in your code,
    if it is 'X' use OPEN DATASET and if it is ' ' use WS_UPLOAD.
    *-- Open dataset for reading
    DATA:
      dsn(20) VALUE '/usr/test.dat',
      rec(80).
    OPEN DATASET dsn FOR INPUT IN TEXT MODE.
    IF sy-subrc = 0.
      DO.
        READ DATASET dsn INTO rec.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
          WRITE / rec.
        ENDIF.
      ENDDO.
    ENDIF.
    CLOSE DATASET dsn.
    *-- Open dataset for writing
    DATA rec(80).
    OPEN DATASET dsn FOR OUTPUT IN TEXT MODE.
      TRANSFER rec TO '/usr/test.dat'.
    CLOSE DATASET dsn.
    What is the difference when we use upload, ws_upload, gui_upload function modules?
    UPLOAD, WS_UPLOAD, GUI_UPLOAD, are used in BDC concepts.  ie., Batch Data Communication.
    Batch Data Conversion is a concept where user can transfer the Data from non SAP to SAP R/3.  So , in these various Function Modules are used.
    UPLOAD---  upload a file to the presentation server (PC)
    WS_UPLOAD----    Load Files from the Presentation Server to Internal ABAP Tables.
    WS means Work Station.
    This is used upto SAP 4.6 version.
    GUI_UPLOAD-------    Replaces WS_UPLOAD. Upoad file from presentation server to the app server.  From 4.7 SAP version it is replaced.
    How to Upload csv file to SAP?
    Common File Download Upload Questions:
    How  you upload the data from text file to sap internal table?  From my knowledge its by upload or gui_upload. 
    How you download the data from sap internal table to text file?
    How  you upload the data from xls (excel) file to sap internal table how you download the data from sap internal table to xls(excel) file.
    You can upload data from presentation server to an internal table using gui_upload. Use gui_download to download from internal table to flat file.
    Use fm ALSM_EXCEL_TO_INTERNAL_TABLE to upload data frm excel.
    Use function module GUI_UPLOAD
    The FILETYPE refer to the type of file format you need: For e.g 'WK1' - Excel format , 'ASC' - Text Format etc.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\test.csv'
       FILETYPE                      = 'ASC'
      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.

  • 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

  • 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 .pdf file of a quiz to report to the quiz results analyzer on my internal server (mamp)

    I created a quiz.
    Created an internal server on my compute rising a MAMP.
    When I publish my quiz using the multi-file publishing options...
    I am able to use both the "HTML" and the "swf" output files to complete a quiz and reporting the results to the quiz results analyzer.
    However, I am unable to get the output .pdf field to reporting to the quiz results analyzer.
    Any help? Would this issue have to do with the Acrobat Professional setting? Captivate setting? My internal server setting? or output fuel placement?
    I tired to put the .pdf file in the same MAMP root folder location as my "internalserverreporting.php and internalserverread.php files.
    Thanks for the help.

    Hello Varun,
    You cqan submit the report as a JOB and export the out put to memory, once the job is complete you can read the list to display the output.
    Cheers,
    Mano
    Cut & Paste form SAP help.
    Submit report ....
    EXPORTING LIST TO MEMORY
    Does not display the output list of the called report, but saves it in ABAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. In addition, you must not assign a function code to the ENTER key in the current GUI status. The saved list is read from the SAP memory using the function module 'LIST_FROM_MEMORY' and can then be saved to the database using EXPORT, for example. You can process this list further with the function modules 'WRITE_LIST', 'DISPLAY_LIST' ... of the function group "SLST".

  • 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

  • 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 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

Maybe you are looking for