How to create a  schedule program in java

Hello Friends ,
Can any one provide me with an example how to create a schedule program using java.util.timer etc . I am in need of a program which should run as a schedule job that searches for a file in a directory and read the latest files from that directory in every minute of time as a schedule job .
Thanks
mahesh

I don't feel like writing my own example, but google will be happy to provide you with an example.

Similar Messages

  • How to creat a Dialer Program in Java

    Help me in creating a Dialer program which dials to a specifie ISP.It should work like the Dialer provided in windows.Help!! Can we code such a program in JAVA.If yes, HOW!!!!
    Abhishek([email protected])

    Get the Java Communications package - javax.comm (comm.jar)
    This will give you access to Windows/Solaris serial (and parallel) ports from Java.
    You then need some simple modem handling to perform the dial and initial handshake.
    Steve

  • How to create an Oracle DATABASE through Java Programming Language.. ?

    How to create an Oracle DATABASE through Java Programming Language.. ?

    Oracle database administrators tend to be control freaks, especially in financial institutions where security is paramount.
    In general, they will supply you with a database, but require you to supply all the DDL scripts to create tables, indexes, views etc.
    So a certain amount of manual installation will always be required.
    Typically you would supply the SQL scripts, and a detailled installation document too.
    regards,
    Owen

  • HOw to create a Batch file for java application and whats the use of this ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    First of all, you're OT.
    Second, you can find this everywhere in the net.
    If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
    javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
    Otherwise use:
    javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
    Don't specify the .class extension.
    Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
    The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
    This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
    Finally add dukes and give 'hem away.
    Bye.

  • How to create a packet by using java?

    Hi, i am currently working on a research and i have some problems here.
    1) how to create a packet by using java programming ?
    2) How can i set the packet's information (e.g: packet's length, size of its header, etc) by using java?
    I am currently in a midst of this now and i hope that someone is willing to correspond to my questions and help me out of it.
    Thank you!

    I wan to create a customize packet where the user can
    define the header size, the packet's length etc. in
    the program......Then you get to write it to the connection yourself. Look at the OutputStream classes to see how to write low level output to a connection.

  • How to create a "Explorer" like in java

    i'm just wonderin if there's a way on how to create "Windows Explorer" like in Java wherein you can view all your directories with yellow folder icon and also you can view all your files and drives....
    And when you double click the yellow folder icon it will then expand and will show all the subfolders and files ...
    How????
    Thanks!

    Yes, there is a way. Look up JTree in the API.-can you post some code.... i cant figure out on how to use JTree...
    i'm still confused on where will i get the entire directories of my drives...
    thanks

  • How to create a Batch file for java application  ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    [http://static.springsource.org/spring-batch/]
    Assuming you want to develop a batch application rather than actually just create a .bat file ..

  • How to create the exe file for java project.

    How to create the exe file for java project.
    am done the project in java swing , i like to create the project in exe format, so any one help for me,
    send the procedure for that.
    thanking u.

    How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
    http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
    and got several useful links.
    Better search terms might yield even better results.
    Sheesh.

  • HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE

    HAI FRIENDS
      1  I WANT TO KNOW HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE IN ABAP
      2 NEED ABAP PROGRAM EBOOK
    PLZ DO IT

    CHECK THIS ALV DRILL DOWN REPORT
    *& Report  ZHAI_SD_CUSTOMER_DETAILS_ALV
    REPORT  ZHAI_SD_CUSTOMER_DETAILS_ALV.
    TYPE-POOLS: SLIS.
        TYPES DECLARATIONS
    TABLES : KNA1.
    DATA : BEGIN OF IT_CUST OCCURS 0,
      KUNNR LIKE KNA1-KUNNR,
      NAME1 LIKE KNA1-NAME1,
      LAND1 LIKE KNA1-LAND1,
      ORT01 LIKE KNA1-ORT01,
      STRAS LIKE KNA1-STRAS,
      PSTLZ LIKE KNA1-PSTLZ,
           END OF IT_CUST.
    DATA:BEGIN OF IT_SALE OCCURS 0,
    VBELN LIKE VBAK-VBELN,"SALES DOC NO
    AUDAT LIKE VBAK-AUDAT,"DATE RECIEVED AND SENT
    AUART LIKE VBAK-AUART,"SALES DOC LIKE
    NETWR LIKE VBAK-NETWR,"NET VALUE IN DOC CURRENCY
    KUNNR LIKE VBAK-KUNNR,
          END OF IT_sale.
    TYPES: BEGIN OF TY_ITEM,
    VBELN TYPE VBAP-VBELN,
    POSNR TYPE VBAP-POSNR,"ITEM NO
    MATNR TYPE VBAP-MATNR,"MATERIAL NO
    CHARG TYPE VBAP-CHARG,"BATCH
    MATKL TYPE VBAP-MATKL,"MATERIAL GROUP
    MEINS TYPE VBAP-MEINS,"BASE UNIT OF MEASURE
    END OF TY_ITEM.
    SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR.
         INTERNAL TABLES
    DATA:
         IT_CUST  TYPE TABLE OF TY_CUST,
         IT_SALE  TYPE TABLE OF TY_SALE,
          IT_ITEM  TYPE TABLE OF TY_ITEM.
                       INTERNAL TABLES FOR ALV
    DATA: IT_FCAT   TYPE  SLIS_T_FIELDCAT_ALV,
          IT_FCAT1  TYPE  SLIS_T_FIELDCAT_ALV,
          IT_FCAT3  TYPE SLIS_T_FIELDCAT_ALV.
    DATA: IT_EVENTS TYPE TABLE OF   slis_alv_event,
          IT_EVENTS1 TYPE TABLE OF SLIS_ALV_EVENT,
          IT_EVENTS2 TYPE TABLE OF SLIS_ALV_EVENT.
    DATA: IT_LISTHEADER1 TYPE SLIS_T_LISTHEADER,
          IT_LISTHEADER TYPE TABLE OF slis_listheader,
          IT_LISTHEADER3 TYPE TABLE OF SLIS_LISTHEADER,
          IT_FOOTER TYPE TABLE OF SLIS_LISTHEADER.
    DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV,
          WA_SORT LIKE LINE OF IT_SORT.
                       WORK AREAS FOR ALV
    DATA: WA_LAYOUT  TYPE SLIS_LAYOUT_ALV,
          WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
          WA_FCAT    LIKE LINE OF IT_FCAT,
          WA_FCAT1   LIKE LINE OF IT_FCAT1,
          WA_FCAT3   LIKE LINE OF IT_FCAT3,
          WA_EVENTS  LIKE LINE OF IT_EVENTS,
          WA_EVENTS1 LIKE LINE OF IT_EVENTS,
          WA_EVENTS2 LIKE LINE OF IT_EVENTS.
            WORK VARIABLES
    DATA: W_REPID TYPE SY-REPID,
          W_KUNNR TYPE KNA1-KUNNR.
    $$**----
       WORK  AREAS
        MACROS
    DEFINE ADD_FCAT1..
    WA_FCAT1-COL_POS = &1.
    WA_FCAT1-FIELDNAME = &2.
    WA_FCAT1-TABNAME = &3.
    WA_FCAT1-REF_TABNAME = &4.
    WA_FCAT1-KEY = &5.
    WA_FCAT1-DO_SUM = &6.
    WA_FCAT1-HOTSPOT = &7.
    WA_FCAT1-EMPHASIZE = &8.
    APPEND WA_FCAT1 TO IT_FCAT1.
    END-OF-DEFINITION.
    START-OF-SELECTION.
      PERFORM F_GET_DATA.
      PERFORM F_BUILD_FCAT.
      PERFORM F_GET_EVENTS.
      PERFORM F_BUILD_LAYOUT USING WA_LAYOUT.
      PERFORM F_GET_DISPLAY.
    *&      Form  F_GET_DATA
    FORM F_GET_DATA .
    SELECT   KUNNR
              NAME1
              LAND1
              ORT01
              STRAS
              PSTLZ FROM KNA1
              INTO TABLE
    IT_CUST WHERE KUNNR IN S_KUNNR.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_GET_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY .
    CLEAR W_REPID.
    MOVE SY-REPID TO W_REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = w_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
         I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = 'DUCK'
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = WA_LAYOUT
         IT_FIELDCAT                        = IT_FCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         IT_EVENTS                          = IT_EVENTS
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_CUST
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_GET_DISPLAY
    *&      Form  F_GET_EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_EVENTS .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 0
        IMPORTING
          ET_EVENTS       = IT_EVENTS
        EXCEPTIONS
          LIST_TYPE_WRONG = 1
          OTHERS          = 2.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT IT_EVENTS.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'TOP_OF_PAGE' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_TOP_OF_PAGE'.
    MODIFY  IT_EVENTS  INDEX SY-TABIX FROM
    WA_EVENTS TRANSPORTING FORM.
      ENDIF.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_USER_COMMAND'.
    MODIFY IT_EVENTS FROM WA_EVENTS INDEX
    SY-TABIX TRANSPORTING FORM.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
    ENDIF.
    READ TABLE IT_EVENTS INTO WA_EVENTS WITH
    KEY NAME = 'END_OF_PAGE' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_END_OF_PAGE'.
    MODIFY IT_EVENTS FROM WA_EVENTS
    INDEX SY-TABIX TRANSPORTING FORM.
    ENDIF.
    ENDFORM.                    "F_GET_EVENTS
    *&      Form  F_BUILD_LAYOUT
    FORM F_BUILD_LAYOUT  USING P_WA_LAYOUT LIKE WA_LAYOUT .
    CLEAR P_WA_LAYOUT.
    P_WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    *P_WA_LAYOUT-F2CODE = '&ETA'.
    *p_wa_layout-detail_popup = 'X'.
    P_WA_LAYOUT-DETAIL_TITLEBAR = 'ALV REPORT'.
    *P_WA_LAYOUT-CONFIRMATION_PROMPT  = 'X'.
    ENDFORM.                    " F_BUILD_LAYOUT
    *&      Form  F_TOP_OF_PAGE
    FORM F_TOP_OF_PAGE .
    refresh it_listheader.
      DATA: LS_LIST TYPE SLIS_LISTHEADER.
      LS_LIST-TYP = 'H'.
      LS_LIST-INFO = TEXT-004.
      APPEND LS_LIST TO IT_LISTHEADER.
      LS_LIST-typ = 'S'.
      LS_LIST-key = 'Date: '.
      CONCATENATE sy-datum+6(2) '.'
      sy-datum+4(2) '.'
      sy-datum(4) INTO LS_LIST-info. "todays date
      append LS_LIST to IT_LISTHEADER.
      clear: LS_LIST.
      LS_LIST-TYP = 'S'.
      LS_LIST-KEY = 'DEVELOPED:'.
      LS_LIST-INFO = SY-UNAME.
      APPEND LS_LIST TO IT_LISTHEADER.
      CLEAR LS_LIST.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = IT_LISTHEADER
          I_LOGO             = 'GLOBAL'.
    ENDFORM.                    " F_TOP_OF_PAGE
    *&      Form  F_BUILD_FCAT
    FORM F_BUILD_FCAT .
    CLEAR: W_REPID,
           IT_FCAT.
      MOVE SY-REPID TO W_REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = W_REPID
         I_INTERNAL_TABNAME           = 'IT_CUST'
         I_INCLNAME                   = W_REPID
        CHANGING
          CT_FIELDCAT                  = IT_FCAT
    EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_BUILD_FCAT
    *&      Form  F_USER_COMMAND
    FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                              RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE  R_UCOMM.
    WHEN '&IC1'.
    IF RS_SELFIELD-FIELDNAME = 'KUNNR'.
    READ TABLE IT_CUST
    INDEX RS_SELFIELD-TABINDEX.
    MOVE rs_selfield-value TO W_KUNNR.
    IF IT_CUST IS NOT INITIAL.
       PERFORM F_GET_SECONDARY_DATA.
       PERFORM F_BUILD_FCAT1.
       PERFORM F_BUILD_EVENTS.
       PERFORM F_GET_SORT.
       PERFORM F_BUILD_LAYOUT1.
      PERFORM F_GET_DISPLAY1.
    ENDIF.
      ENDIF.
      ENDCASE.
    ENDFORM.                    " F_USER_COMMAND
    *&      Form  F_GET_SECONDARY_DATA
    FORM F_GET_SECONDARY_DATA .
    data:v_data.
    SELECT  VBELN
              AUDAT
              AUART
              NETWR
    KUNNR FROM VBAK INTO TABLE IT_SALE
    WHERE KUNNR EQ IT_CUST-KUNNR.
      IF IT_SALE[] IS INITIAL .
       CALL FUNCTION 'POPUP_TO_CONFIRM'
         EXPORTING
          TITLEBAR                    = SY-REPID
         DIAGNOSE_OBJECT             = ' '
           TEXT_QUESTION               = 'NO SALES FOR THIS CUSTOMER'
         TEXT_BUTTON_1               = 'Ja'(001)
         ICON_BUTTON_1               = ' '
         TEXT_BUTTON_2               = 'Nein'(002)
         ICON_BUTTON_2               = ' '
          DEFAULT_BUTTON              = '1'
          DISPLAY_CANCEL_BUTTON       = 'X'
         USERDEFINED_F1_HELP         = ' '
         START_COLUMN                = 25
         START_ROW                   = 6
         POPUP_TYPE                  =
         IV_QUICKINFO_BUTTON_1       = ' '
         IV_QUICKINFO_BUTTON_2       = ' '
        IMPORTING
          ANSWER                      = v_data
       TABLES
         PARAMETER                   =
        EXCEPTIONS
          TEXT_NOT_FOUND              = 1
          OTHERS                      = 2
       IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    case v_data.
    when '2'.
    leave screen.
    when 'A'.
    leave to screen '0'.
    endcase.
      ENDIF.
    ENDFORM.                    " F_GET_SECONDARY_DATA
    *&      Form  F_BUILD_FCAT1
    FORM F_BUILD_FCAT1 .
    REFRESH IT_FCAT1.
    CLEAR WA_FCAT1.
    ADD_FCAT1:
    '1' 'VBELN' 'VBAK' 'VBAK' 'X' ' ' 'X' 'C500',
    '2' 'AUDAT' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C400',
    '3' 'AUART' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C100',
    '4' 'NETWR' 'VBAK' 'VBAK' ' ' 'X' ' ' 'C300'.
    ENDFORM.                    " F_BUILD_FCAT1
    *&      Form  F_GET_DISPLAY1
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = SY-REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           =  'F_USER_COMMAND1'
         I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE1'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
         IT_FIELDCAT                       = IT_FCAT1
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
       IT_SORT                            = IT_SORT
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         IT_EVENTS                         = IT_EVENTS1
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_SALE
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_GET_DISPLAY1
    *&      Form  F_BUILD_EVENTS
    FORM F_BUILD_EVENTS .
    clear wa_events1.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = IT_EVENTS1.
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT IT_EVENTS1.
      read table It_events1 with key name = 'TOP_OF_PAGE'
      into WA_eventS1.
      if sy-subrc = 0.
        move 'F_TOP_OF_PAGE1' to WA_EventS1-form.
        append WA_eventS1 to it_events1.
      endif.
      READ TABLE IT_EVENTS WITH KEY NAME = 'USER_COMMAND'
      INTO WA_EVENTS1.
      IF SY-SUBRC = 0.
      MOVE 'F_USER_COMMAND1' TO WA_EVENTS1-FORM.
      APPEND WA_EVENTS1 TO IT_EVENTS1.
      ENDIF.
    *READ TABLE IT_EVENTS WITH KEY NAME = 'SUBTOTAL_TEXT'
    INTO WA_EVENTS1.
    IF SY-SUBRC = 0.
    MOVE 'F_SUBTOTAL_TEXT' TO WA_EVENTS1-FORM.
    APPEND WA_EVENTS1 TO IT_EVENTS1.
    ENDIF.
    ENDFORM.                    " F_BUILD_EVENTS
    *&      Form  F_TOP_OF_PAGE1
    FORM F_TOP_OF_PAGE1 .
    DATA: LS_HEADER TYPE SLIS_LISTHEADER.
    REFRESH : IT_LISTHEADER1.
      LS_HEADER-TYP = 'H'.
      LS_HEADER-INFO = 'SALES ORDER DETAILS FOR CUSTOMER'.
      APPEND LS_HEADER TO it_listheader1.
      CLEAR LS_HEADER.
      LS_HEADER-TYP  = 'S'.
      LS_HEADER-KEY = 'CUSTOMER NO:'.
      LS_HEADER-INFO = W_KUNNR.
      APPEND LS_HEADER TO IT_LISTHEADER1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER1
         I_LOGO                   = 'DUCK'
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.                    " F_TOP_OF_PAGE
    *&      Form  F_END_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM F_END_OF_PAGE .
    DATA:LS_FOOTER TYPE SLIS_LISTHEADER.
    LS_FOOTER-TYP = 'S'.
    LS_FOOTER-KEY = SY-UNAME.
    LS_FOOTER-INFO = 'DEVELOPED BY:'.
    APPEND LS_FOOTER TO IT_FOOTER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = IT_FOOTER
    ENDFORM.                    " F_END_OF_PAG
    *&      Form  F_USER_COMMAND1
          text
    -->  p1        text
    <--  p2        text
    FORM F_USER_COMMAND1 USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&IC1'.
    READ TABLE IT_SALE INDEX RS_SELFIELD-TABINDEX.
    PERFORM F_GET_SECONDARY2.
    PERFORM F_GET_FCAT3 USING:
    'VBELN' '1' 'C' '12' 'SALES_DOC'   'M'  'VBAP' 'X' 'C51' ' ',
    'POSNR' '2' ' '  '5' 'ITEM_NO'      'M'  'VBAP' ' ' 'C61' ' ',
    'MATNR' '3' ' '  '12' 'MATERIAL_NO' 'M'  'VBAP' ' ' 'C71' ' ',
    'CHARG' '4' ' ' '10' 'BATCH_NO'    'M'  'VBAP' ' ' 'C41' ' ',
    'MATKL' '5' ' ' '10' 'MAT_GROUP'   'M'  'VBAP' ' ' 'C31' ' ',
    'MEINS' '6' ' ' '12' 'BASE_UNIT'   'M'  'VBAP' ' ' 'C21' 'X' .
    PERFORM F_GET_EVENTS2 USING WA_EVENTS2
                         CHANGING IT_EVENTS2.
    PERFORM F_GET_DISPLAY3.
    REFRESH IT_FCAT3.
    ENDCASE.
    ENDFORM.                    " F_USER_COMMAND1
    *&      Form  F_GET_SECONDARY2
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_SECONDARY2 .
    SELECT VBELN
           POSNR
           MATNR
           MATKL
           MEINS
           FROM VBAP INTO
           TABLE IT_ITEM WHERE
           VBELN EQ IT_SALE-VBELN.
    IF SY-DBCNT EQ 0.
    MESSAGE E000(ZHAI) WITH TEXT-KO1.
    ENDIF.
    ENDFORM.                    " F_GET_SECONDARY2
    *&      Form  F_GET_DISPLAY3
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY3 .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = SY-REPID
       I_CALLBACK_PF_STATUS_SET          = 'F_PF_STATUS'
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE3'
       I_CALLBACK_HTML_TOP_OF_PAGE       = 'F_TOP_OF_PAGE3'
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = WA_LAYOUT1
       IT_FIELDCAT                       = IT_FCAT3
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           = IT_SORT
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
       IT_EVENTS                         = IT_EVENTS2
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_ITEM
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " F_GET_DISPLAY3
    *&      Form  F_GET_FCAT3
    FORM F_GET_FCAT3  USING    VALUE(P1)
                               VALUE(P2)
                               VALUE(P3)
                               VALUE(P4)
                               VALUE(P5)
                               VALUE(P6)
                               VALUE(P7)
                               VALUE(P8)
                               VALUE(P9)
                              VALUE(P10).
    CLEAR WA_FCAT3.
      WA_FCAT3-FIELDNAME = P1.
      WA_FCAT3-COL_POS = P2.
      WA_FCAT3-JUST = P3.
      WA_FCAT3-OUTPUTLEN = P4.
      WA_FCAT3-SELTEXT_M  = P5.
      WA_FCAT3-DDICTXT = P6.
      WA_FCAT3-REF_TABNAME = P7.
      WA_FCAT3-HOTSPOT = P8.
      WA_FCAT3-EMPHASIZE = P9.
      WA_FCAT3-DO_SUM  = P10.
      APPEND WA_FCAT3 TO IT_FCAT3.
    ENDFORM.                    " F_GET_FCAT3
    *&      Form  F_BUILD_LAYOUT1
          text
    -->  p1        text
    <--  p2        text
    FORM F_BUILD_LAYOUT1 .
    WA_LAYOUT1-totals_text = 'TOTAL'.
    wa_layout1-detail_popup = 'X'.
    ENDFORM.                    " F_BUILD_LAYO
    *&      Form  F_GET_EVENTS2
          text
         -->P_IT_EVENTS2  text
         <--P_WA_EVENTS2  text
    FORM F_GET_EVENTS2  USING    VALUE(P_WA_EVENTS2) LIKE WA_EVENTS2
                        CHANGING P_IT_EVENTS2 LIKE IT_EVENTS2.
    P_WA_EVENTS2-NAME = 'HTML_TOP_OF_PAGE'.
    P_WA_EVENTS2-FORM = 'F_TOP_OF_PAGE3'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    P_WA_EVENTS2-NAME = 'PF_STATUS'.
    P_WA_EVENTS2-FORM = 'F_PF_STATUS'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    P_WA_EVENTS2-NAME = 'USER_COMMAND'.
    P_WA_EVENTS2-FORM = 'F_USER_COMMAND3'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    p_wa_events2-name = 'HTML_END_OF_LIST'.
    P_WA_EVENTS2-FORM = 'F_HTML_END_OF_LIST'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR p_wa_events2.
    ENDFORM.                    " F_GET_EVENTS2
    *&      Form  F_TOP_OF_PAGE3
          text
    -->  p1        text
    <--  p2        text
    FORM F_TOP_OF_PAGE3 USING DOCUMENT TYPE REF TO cl_dd_document .
    data : link_area type ref to cl_dd_area,
           picture_area type ref to cl_dd_area.
    CALL METHOD DOCUMENT->ADD_TEXT
      EXPORTING
        TEXT          = 'ALV REPORT'
       TEXT_TABLE    =
       FIX_LINES     =
       SAP_STYLE     =
        SAP_COLOR     = cl_dd_area=>list_background_int
        SAP_FONTSIZE  = 'LARGE'
        SAP_FONTSTYLE = 'TIMES'
        SAP_EMPHASIS  = 'STRONG'
       STYLE_CLASS   =
    CHANGING
       DOCUMENT      =
    CALL METHOD DOCUMENT->NEW_LINE.
    CALL METHOD DOCUMENT->ADD_PICTURE
      EXPORTING
        PICTURE_ID       = 'LOGO1'
        WIDTH            = '10%'
    ENDFORM.                    " F_TOP_OF_PAGE3
    *&      Form  F_GET_SORT
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_SORT .
    WA_SORT-FIELDNAME = 'NETWR'.
    WA_SORT-SPOS  = 4.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO IT_SORT.
    ENDFORM.                    " F_GET_SORT
    *&      Form  F_PF_STATUS
          text
    -->  p1        text
    <--  p2        text
    FORM F_PF_STATUS USING RS_EXTAB TYPE SLIS_T_EXTAB .
    SET PF-STATUS 'ZHAIALV' EXCLUDING RS_EXTAB.
    ENDFORM.                    " F_PF_STATUS
    *&      Form  F_USER_COMMAND3
          text
    -->  p1        text
    <--  p2        text
    FORM F_USER_COMMAND3 USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&SALE'.
    IF RS_SELFIELD-FIELDNAME = 'VBELN'.
    SET parameter ID 'AUN' FIELD rs_selfield-value.
    CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
    ENDIF.
    WHEN '&MAT'.
    IF RS_SELFIELD-FIELDNAME = 'MATNR'.
    SET PARAMETER ID 'MAT' FIELD RS_SELFIELD-VALUE.
    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDCASE.
    ENDFORM.                    " F_USER_COMMAND3
    *&      Form  F_HTML_END_OF_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM F_HTML_END_OF_LIST USING DOCUMENT TYPE REF TO CL_DD_DOCUMENT.
    DATA : PAGE TYPE SDYDO_TEXT_ELEMENT.
    MOVE SY-PAGNO TO PAGE.
    CALL METHOD DOCUMENT->ADD_TEXT
      EXPORTING
        TEXT          = PAGE
       TEXT_TABLE    =
       FIX_LINES     =
       SAP_STYLE     =
       SAP_COLOR     =
       SAP_FONTSIZE  =
       SAP_FONTSTYLE =
       SAP_EMPHASIS  =
       STYLE_CLASS   =
    CHANGING
       DOCUMENT      =
    ENDFORM.                    " F_HTML_END_OF_LIS

  • How to create a oracle database by java code?

    how to create a oracle database by java code?
    please give some ways then that way's code

    I'm not sure what you mean with "database". Do you mean an Oracle instance or an Oracle user/schema (probably the latter, because that's the equivalent to a MS SQL Database).
    Creating an instance is definitely not possible from within Java. To create a new user this should be possible, as this can be done with SQL:
    GRANT connect,resource TO <newuser> IDENTIFIED BY <password>;
    I'm always cautious with questions like this. In 90% of the cases there is something wrong with the initial design. Creating a database shouldn't be something the application is doing.
    Thomas

  • How to Call abap functn/program from java layer

    Hi all,
        I have to develop a program which has to call abap function/program from java side or how to call a abap program through java ..
    pls send me related links or explanations.. dont send unrelated answers..
    Regards,
    Arivarasu S

    Hi,
    You mean accessing ABAP functions from J2EE perspective, then I think we can do this by using SAP Java Resource Adapter and also through webservices.
    SAP Java Resource Adapter (SAP JRA) can be used as an add-on for the SAP JCo SAP JRA enables the implementation of standard interfaces from diverse J2EE servers to the SAP JCo in the SAP Web AS. The SAP JRA thus simplifies
    communication with ABAP within heterogeneous J2EE landscapes.
    Go through the following links which has Good documentation on how to achieve this
    Accessing BAPIs Using the SAP Java Resource Adapter
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4]
    Connectivity and Interoperability
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/326d82e5-0601-0010-fca4-9caf27b89c26]
    Finally with WebServices. Accessing SAP Business Functions (ABAP) via Web Services
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4]
    Regards
    Raghu

  • How to create a SAS Dataset with Java

    Hello All,
    The subject line says it all. Does anyone out there know how to create a SAS Dataset using Java? I Googled it and searched here with no luck.
    Thanks
    KP

    Some parts of SAS appear to have been exposed via a Java API through this product:
    http://support.sas.com/rnd/app/da/workshop/faq.html
    Hope that helps
    Lee

  • How to create the exe files for java application

    How to create the exe file for java application?
    got any software to do that?
    Thanks

    In terms of converting java applications into exe files, there are 3 schools of thought:
    1) Instead of converting it to an exe, convert it to a jar file. Jar files are more portable than exe files because they can be double-clicked on any operating system. The caveat is that a Java interpreter must be installed on the target computer for the double-clicking to work.
    http://developer.java.sun.com/developer/Books/javaprogramming/JAR/
    2) Create an exe launcher that, when double-clicked, attempts to find a Java interpreter on the local computer and launches the Java application. The exe file is still double-clickable but whether your java application runs depends on whether a Java interpretor is installed on the target computer.
    http://www.sureshotsoftware.com/exej/
    http://www.objects.com.au/products/jstart/index.jsp
    http://www.duckware.com/products/javatools.html
    http://www.ucware.com/jexec/
    http://www.rolemaker.dk/nonRoleMaker/javalauncher/
    http://www.jelude.cjb.net/
    http://thor.prohosting.com/~dfolly/java/index.html
    3) Create an exe launcher that bundles a Java interpretor. Same as above but when the exe file is double-clicked, it searches for a Java interpreter and if one is not found, it installs one on the target computer. The caveat is that the exe file would have an overhead of 10 MB in size for the interpreter.
    http://www.excelsior-usa.com/jet.html (evaluation version available)
    4) Convert the Java application into a native exe file. The caveat is that if you use Swing for your GUI, it won't be converted. Also this option is still somewhat experimental.
    Can't think of any free options right now.

  • HOW TO CREATE PRODUCTION SCHEDULING PROFILE

    PLEASE
    TELL ME HOW TO CREATE PRODUCTION SCHEDULING PROFILE
    EXPLAIN IN STEPS
    THANKS

    Hi,
    Check the below link and the screen shot:
    http://wiki.sdn.sap.com/wiki/display/ERPLO/Production+Order+Type+Selection
    Hope it will help you.
    Regards,
    Alok Tiwari

  • How to create a Macromedia's Flash Java Player with JMF?

    How to create a Macromedia's Flash Java Player with JMF? Can you give me an example? My email:[email protected] [email protected]

    Yes, there is a way. Look up JTree in the API.-can you post some code.... i cant figure out on how to use JTree...
    i'm still confused on where will i get the entire directories of my drives...
    thanks

Maybe you are looking for

  • Macbook Pro to Macbook Pro Retina

    Hi, i am having troubles with my Macbook Pro OS X 10.9.5 as the system perfomance is so slow and the applications have tendencies to crash all the time. Is there any way that I could sent it to Apple and actually upgrade it to a Macbook Pro Retina in

  • Regarding file naming convention(while publishing a file to FTP)

    Hi, In one of our usecases, we need to configure the file name based on the client's requirement.(to place the file in FTP. But the file name should be customized by us.) We referred to the link given below. http://www.b2bgurus.com/2008/04/customizin

  • Configuring Encoders Counts per Revolution using a flexmotion function

    Hello, I am having a problem configuring a connected encoder in labview using the flexmotion function. The setting: I am building a labview vi I want to run on a computer with the connected hardware. But I may NOT have access to the machine to config

  • HTML tags in comments

    How do you disallow HTML tags in comments? I want users to be to be able to submit comments on my site but I don't want them to input their own html. Whatever they type should show as plain text on the comments page. I am using PHP / MySQL.

  • TS1702 what do i do if the "app store" app is not responding?

    i tried downloading an app from the app store and it gives me the confirmation message of app such and such is downlaoding now ok? and the ok button doesnt work meanwhile the rest of the store is frozen and i cant use the store