Function module to display the time and date in the report-sy-udate And s

Hi.
wish to have a function module which can display the system time and date through function module.
the format that this function module should display should be like this:
if its today-date and time then:
05-Jan-08 01.25.57 PM
please note that i want them to be in one single row in the top-of page
kinldy help on this.
thanks!

hi,
check this.
https://forums.sdn.sap.com/click.jspa?searchID=19175181&messageID=4628668
Thanks

Similar Messages

  • Function module for displaying the location

    Hi,
          Could anyone tell  the Function module for displaying the location in our system  without a  file name while downloading, when the user press f4.
    thanks

    * read the default pathname on application server
      call function 'FILE_GET_NAME'
           exporting
    *           CLIENT                  = SY-MANDT
                logical_filename        = lc_logical_filename_ftappl
                operating_system        = sy-opsys
    *           parameter_1             = ' '
    *           PARAMETER_2             = ' '
    *           USE_PRESENTATION_SERVER = ' '
    *           WITH_FILE_EXTENSION     = ' '
    *           USE_BUFFER              = ' '
           importing
                emergency_flag          = l_emergency_flag
                file_format             = l_file_format
                file_name               = l_file_name_ftappl
           exceptions
                file_not_found          = 1
                others                  = 2.

  • Function module to display the programe name , title, linesize..etc

    hi Guru's,
    My requirement is to create a fuction module  for displaying the classical report header and footer.
    in header i need Program Name,Program Title ,page no, date , time , user..
    Can any one provide me with function module.
    cheers,
    kumar.

    hi,
    you can make this type of FM or take help from this...
    CALL FUNCTION 'Z_Z00_STD_HEADER'
           EXPORTING
                line_size           = sy-linsz
                listtitle           = sy-title
           EXCEPTIONS
                mandt_not_found     = 1
                line_size_too_small = 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.                 
    FUNCTION Z_Z00_STD_HEADER.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(LINE_SIZE) DEFAULT 80
    *"     REFERENCE(LISTTITLE) DEFAULT SPACE
    *"     REFERENCE(PARAM1) OPTIONAL
    *"     REFERENCE(PARAM2) OPTIONAL
    *"  EXCEPTIONS
    *"      MANDT_NOT_FOUND
    *"      LINE_SIZE_TOO_SMALL
      data : pos_center1(3) type n,
             pos_center2(3) type n,
             pos_right1(3)  type n,
             pos_right2(3)  type n,
             tit_len type i.
    Table to store the client name
      DATA iT000 type T000.
    Clear Internal Table
      CLEAR it000.
    Get client name from the T000 table
      SELECT SINGLE MANDT MTEXT INTO iT000 FROM T000
             WHERE  MANDT  =  SY-MANDT.
      IF SY-SUBRC NE 0.
        RAISE MANDT_NOT_FOUND.
      ENDIF.
      if line_size < 75.
        raise line_size_too_small.
      endif.
    Initialize values of the position counters
      pos_center1 = ( LINE_SIZE / 2 ) - 5.
      pos_right1 = LINE_SIZE - 19.
      pos_right2 = LINE_SIZE - 12.
      tit_len = strlen( listtitle ).
      pos_center2 = ( LINE_SIZE / 2 ) - ( tit_len / 2 )  - 1.
    Write the standard header
    First Line
      uline at (line_size).
    Second Line
      WRITE:            /3 text-010,                 "Report Text
                        12 sy-cprog.   "PERIASAS on 19/04/2004
      WRITE AT pos_center1  iT000-Mtext.
      WRITE AT pos_right1   text-006 RIGHT-JUSTIFIED. "Date Text
      WRITE AT pos_right2  sy-datum RIGHT-JUSTIFIED.
    Third Line
    WRITE:            /3 text-009,                 "Report Owner
                       10 sy-uname.
      WRITE  AT  /3 param1.      "PERIASAS on 19/04/2004
      WRITE  AT  pos_center2 listtitle.
      WRITE  AT  pos_right1  text-007 RIGHT-JUSTIFIED. "Time Text
      WRITE  AT  pos_right2 sy-uzeit RIGHT-JUSTIFIED.
    Fourth Line
      WRITE  AT  /3 param2.   "PERIASAS on 19/04/2004
      WRITE AT  pos_right1  text-008 RIGHT-JUSTIFIED.  "Page Text
      WRITE AT  pos_right2  sy-pagno RIGHT-JUSTIFIED.
    Fifth Line.
      uline at (line_size).
    ENDFUNCTION.
    with regards
    Lokesh
    Edited by: Lokesh Tripathi on Oct 16, 2008 12:32 PM

  • Function module to display the card details for the tcode BCA_CN_card_03

    HI all,
       I need to know the function modules to create the card data  and also to display the card details in accounts management in CRM.
    Points will be awarded.
    Thanks and regards,
    vinoth.

    1 BUPA_ADDRESS_GET_DETAIL
    2 BUPA_IDENTIFICATION_GET_DETAIL
       BUPA_IDENTIFICATIONDETAILS_GET
    3  BUPA_TAX*
    4,5 BUPA_PCARD*

  • Is there a function module to display the selection options

    Hi all,
    How can I display the selection options (F2) popup, like the one in the data browser (SE11) selection screen? I have a custom report. Instead of right clicking on the selecion-options field, user want a button to click so the selection options popup appear on the screen. Is there a FM that I can use?
    Thanks in advance.

    Hello,
    i have tried debugging the standard code.... and i could find the below code which is triggering the F2 functionality for a field.
    CALL METHOD call_method
        EXPORTING
            method  = 'SetButtonState'
            p_count = 3
            p1 = fcode
            p2 = m_enabled
            p3 = m_checked
        EXCEPTIONS
            OTHERS    = 1.
    IF sy-subrc NE 0.
       RAISE cntl_error.
    ENDIF.
    class - CL_GUI_toolbar
    method - Set_button_state.
    You may try this.
    Regards,
    Venkatesh

  • Function module to display the given numbers in graphics / chart.

    Hi all,
    I was given a situation where if I give some number, those numbers shud be displayed in graphics or like a chart ( X & y axis chart). Is there any function modules for this? Pls help me.
    Thanks in advance.
    Vijaykumar.G

    You might want to try this function module.
    [code]
    REPORT ZRICH_0005 .
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
               DATANAME(15),
               QUANTITY1 TYPE I,
               QUANTITY2 TYPE I,
               QUANTITY3 TYPE I,
          END OF ITAB_DATA.
    Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
               OPTION(20),
          END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Maple'.
    ITAB_DATA-QUANTITY1 = 5500.
    ITAB_DATA-QUANTITY2 = 6200.
    ITAB_DATA-QUANTITY3 = 5900.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Oak'.
    ITAB_DATA-QUANTITY1 = 3500.
    ITAB_DATA-QUANTITY2 = 5200.
    ITAB_DATA-QUANTITY3 = 4400.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Cherry'.
    ITAB_DATA-QUANTITY1 = 1800.
    ITAB_DATA-QUANTITY2 = 2200.
    ITAB_DATA-QUANTITY3 = 1900.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
         EXPORTING
              COL1        = 'Jan'
              COL2        = 'Feb'
              COL3        = 'Mar'
              TITL        = 'Lumber Usage in $'
         TABLES
              DATA        = ITAB_DATA
              OPTS        = ITAB_OPTIONS
         EXCEPTIONS
              OTHERS      = 1.
    [/code]
    Regards,
    Rich Heilman

  • Function Module to display Campaign

    Dear SAPiens,
    I need a Function Modul, which displays the campaign.
    In my Report I have the GUID or the Object ID of the campaign.
    Regards,
    Ahmet

    The solution
        DATA lv_cpg       TYPE REF TO cl_crm_mktpl_application.
          CREATE OBJECT lv_cpg.
          CALL METHOD lv_cpg->start_application
            EXPORTING
              im_select_object = l_f_guid
              IM_MODE          = 'D'.

  • Function module to find the columns in Internal table

    Hi Group,
    Is there any function module which displays the columns of the internal table. I guess there is one cos when we debug any program and select the "Tables" button while debugging and enter an internal table and then do a "Find" the pop up which comes up shows the internal table columns. As this functionality is in the debugger which I cannot debug hence was wondering if some one has come across any such function module. Thanks in advance.
    Regards,
    Ankur Bhandari
    [email protected]

    Hi again,
    1. In the above FM
       Pass Program as SY-REPID (U cann pass other prg name also)
    in FieldName Pass the name of the internal table
       eg. 'ITAB'
    2. This FM will give u the details of the
       internal table.
       The u can display the COMPONENTS table
       using ALV or anyother method u like.
    Regards,
    Amit M.

  • Reg: function module to fetch the overall taxs for  a sales order

    Hi Experts,
    I need a fuction module which fetches all the taxes for a sales order with the tax values.
    (i.e) i need a function module with displays the overall tax values and not line itemwise..
    Regards,
    Vikram.S

    Hi,
    Check if it works
    POS_SALES_DOCUMENT_HEAD_TAXES

  • Function module to get the dates from the year and the period

    Is there a function Module to get the dates from the year and the period

    Check with :
    To get last day of period use .
    LAST_DAY_IN_PERIOD_GET.
    To get last of month Use :
    RE_LAST_DAY_OF_MONTH
    HRVE_LAST_DAY_OF_MONTH
    LAST_DAY_OF_MONTHS
    ISB_PREVIOUS_PERIOD_DATE_GET
    Thanks
    Seshu

  • What are the function modules used in interactive ALV and parameters?

    what are the function modules used in interactive ALV and parameters?

    hi sunil
    check these links,
    About ALV:
    http://www.geocities.com/mpioud/Abap_programs.html
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    and few more,
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    also run the folowing code and see
    check this sample code.you will be well versed with all the events of a interactive alv report.mark points if useful.
    *& Report ZALV4_INTERACTIVE *
    *& interactive alvs *
    REPORT ZALV4_INTERACTIVE NO STANDARD PAGE HEADING
    MESSAGE-ID ZMSG
    LINE-COUNT 37(3)
    LINE-SIZE 134.
    TYPE-POOLS : SLIS.
    TABLES DECLARATION ********************
    TABLES : VBRK, " BILLING MASTERS TABLE
    VBRP. " BILLING ITEM TABLE
    TYPES DECLARATION ********************
    TYPES : BEGIN OF TY_VBRK, " types for billing masters table
    VBELN TYPE VBRK-VBELN, " billing document
    WAERK TYPE VBRK-WAERK, " document currency
    VKORG TYPE VBRK-VKORG, " sales organization
    FKDAT TYPE VBRK-FKDAT, " billing date
    BUKRS TYPE VBRK-BUKRS, " company code
    BUTXT TYPE T001-BUTXT, " company name
    NETWR TYPE VBRK-NETWR, " net currency value
    LINE_COLOR(4) TYPE C,
    END OF TY_VBRK.
    TYPES : BEGIN OF TY_VBRP, " types for billing document item data
    POSNR TYPE VBRP-POSNR, " billing item
    FKIMG TYPE VBRP-FKIMG, " actual invoiced quantitty
    VRKME TYPE VBRP-VRKME, " sales unit
    NETWR TYPE VBRP-NETWR, " net currency value
    MATNR TYPE VBRP-MATNR, " material number
    ARKTX TYPE VBRP-ARKTX, " short text for sales order item
    END OF TY_VBRP.
    FIELD CATALOG ********************
    DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
    LAYOUT DECLARATION ********************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV.
    EVENTS DECLARATION ********************
    DATA : TY_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    PF STATUS ********************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    USER COMMAND ********************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
    R_UCOMM LIKE SY-UCOMM.
    INTERNAL TABLES ********************
    DATA : IT_VBRK TYPE TABLE OF TY_VBRK, "internal table for billing master
    IT_VBRP TYPE TABLE OF TY_VBRP, "internal table for billing item
    *internal table for field catalog
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    WORK AREA ********************
    DATA : WA_VBRK LIKE LINE OF IT_VBRK, "work area for billing master
    WA_VBRP LIKE LINE OF IT_VBRP. "work area for billing item
    VARIABLE DECLARATION ********************
    DATA : V_DATE TYPE SY-DATUM, " variable to store date values
    V_VBELN TYPE VBRK-VBELN, " variable for billing document
    V_FKDAT TYPE VBRK-FKDAT, " variable for billing date
    V_FLAG(1). " variable for flag
    SELECTION SCREEN ********************
    SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN , " Billing document
    S_FKDAT FOR VBRK-FKDAT, " Billing date
    S_MATNR FOR VBRP-MATNR. " Material number
    PARAMETERS : R1 RADIOBUTTON GROUP G1, "whole item details
    R2 RADIOBUTTON GROUP G1. "selected item details
    INITIALIZATION ********************
    INITIALIZATION.
    V_FLAG = 'X'.
    V_DATE = SY-DATUM - 20.
    S_FKDAT-SIGN = 'I'.
    S_FKDAT-OPTION = 'EQ'.
    S_FKDAT-LOW = V_DATE.
    S_FKDAT-HIGH = SY-DATUM.
    APPEND S_FKDAT.
    SELECTION SCREEN VALIDATION ********************
    AT SELECTION-SCREEN.
    PERFORM CONVERSION. " performs data conversion for input
    PERFORM VBELN_VALIDATE. " validating the billing document
    PERFORM FKDAT_VALIDATE. " validating the billing date
    START OF SELECTION ********************
    START-OF-SELECTION.
    SET TITLEBAR 'AAAA'.
    PERFORM VBRK_POPULATE. " populating the billing master detais
    PERFORM FIELDCATALOG. " designing the field catalog
    PERFORM EVENTS. " performing the events for top of page
    PERFORM DISP_BASICLIST." displaying the basic list
    *& Form VBELN_VALIDATE
    text validating the billing document
    --> p1 text
    <-- p2 text
    FORM VBELN_VALIDATE .
    IF S_VBELN IS INITIAL.
    MESSAGE E000 WITH 'Make entries in all required fields'.
    ELSE.
    SELECT SINGLE VBELN
    FROM VBRK
    INTO V_VBELN
    WHERE VBELN IN S_VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH 'BILLING DOCUMENT DOESNT EXIST'.
    ENDIF.
    ENDIF.
    ENDFORM. " VBELN_VALIDATE
    *& Form FKDAT_VALIDATE
    text validating the billing date
    --> p1 text
    <-- p2 text
    FORM FKDAT_VALIDATE .
    SELECT SINGLE FKDAT
    FROM VBRK
    INTO V_FKDAT
    WHERE FKDAT IN S_FKDAT.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH 'BILLING DATE DOESNT EXIST'.
    ENDIF.
    ENDFORM. " FKDAT_VALIDATE
    *& Form VBRK_POPULATE
    text populating the billing master details
    --> p1 text
    <-- p2 text
    FORM VBRK_POPULATE .
    DATA : LD_COLOR(1) TYPE C.
    LD_COLOR = 5.
    SELECT VBRK~VBELN
    VBRK~WAERK
    VBRK~VKORG
    VBRK~FKDAT
    VBRK~BUKRS
    VBRK~NETWR
    T001~BUTXT
    FROM VBRK INNER JOIN T001
    ON VBRKBUKRS = T001BUKRS
    INTO CORRESPONDING FIELDS OF TABLE IT_VBRK
    WHERE VBRK~VBELN IN S_VBELN AND
    VBRK~FKDAT IN S_FKDAT.
    LOOP AT IT_VBRK INTO WA_VBRK.
    LD_COLOR = LD_COLOR + 1.
    IF LD_COLOR = 8.
    LD_COLOR = 1.
    ENDIF.
    CONCATENATE 'C' LD_COLOR '10' INTO WA_VBRK-LINE_COLOR.
    MODIFY IT_VBRK FROM WA_VBRK.
    ENDLOOP.
    ENDFORM. " VBRK_POPULATE
    *& Form CONVERSION
    text data conversion to take leading zeroes into account
    --> p1 text
    <-- p2 text
    FORM CONVERSION .
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = S_VBELN
    IMPORTING
    OUTPUT = S_VBELN.
    ENDFORM. " CONVERSION
    *& Form DISP_BASICLIST
    text displaying the basic list
    --> p1 text
    <-- p2 text
    FORM DISP_BASICLIST .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = PF_STATUS
    I_CALLBACK_USER_COMMAND = USER_COMMAND
    I_STRUCTURE_NAME =
    IS_LAYOUT = WA_LAYOUT
    IT_FIELDCAT = IT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = 'X'
    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
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRK
    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. " DISP_BASICLIST
    *& Form FIELDCATALOG
    text designing the field catalog
    --> p1 text
    <-- p2 text
    FORM FIELDCATALOG .
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'VBELN'.
    WA_FIELDCAT-SELTEXT_L = 'BILLING DOCUMENT'.
    WA_FIELDCAT-COL_POS = 1.
    WA_FIELDCAT-EMPHASIZE = 'C610'.
    WA_FIELDCAT-KEY = 'X'.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'WAERK'.
    WA_FIELDCAT-SELTEXT_L = 'DOCUMENT CURRENCY'.
    WA_FIELDCAT-COL_POS = 2.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'VKORG'.
    WA_FIELDCAT-SELTEXT_L = 'SALES ORGANIZATION'.
    WA_FIELDCAT-EMPHASIZE = 'C610'.
    WA_FIELDCAT-COL_POS = 3.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'FKDAT'.
    WA_FIELDCAT-SELTEXT_L = 'BILLING DATE'.
    WA_FIELDCAT-COL_POS = 4.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'BUKRS'.
    WA_FIELDCAT-SELTEXT_L = 'COMPANY CODE'.
    WA_FIELDCAT-COL_POS = 5.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'BUTXT'.
    WA_FIELDCAT-SELTEXT_L = 'COMPANY NAME'.
    WA_FIELDCAT-COL_POS = 6.
    WA_FIELDCAT-OUTPUTLEN = 25.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'NETWR'.
    WA_FIELDCAT-SELTEXT_L = 'NET CURRENCY VALUE'.
    WA_FIELDCAT-COL_POS = 7.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_LAYOUT-ZEBRA = 'X'.
    WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    ENDFORM. " FIELDCATALOG
    *& Form SET_PF_STATUS
    text set the pf status
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'Z50658_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM. "SET_PF_STATUS
    *& Form SET_USER_COMMAND
    text set the user command
    FORM SET_USER_COMMAND USING R_UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN 'CLICK'.
    IF R1 = 'X'.
    IF NOT IT_VBRK IS INITIAL.
    SELECT POSNR
    FKIMG
    VRKME
    NETWR
    MATNR
    ARKTX
    FROM VBRP
    INTO CORRESPONDING FIELDS OF TABLE IT_VBRP
    FOR ALL ENTRIES IN IT_VBRK
    WHERE VBELN = IT_VBRK-VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH ' NO BILLING DETAILS FOUND'.
    ELSE.
    IF V_FLAG = 'X'.
    PERFORM DET_FIELDCATALOG.
    V_FLAG = ''.
    ENDIF.
    PERFORM DET_LISTDISPLAY.
    ENDIF.
    ENDIF.
    ENDIF.
    IF R2 = 'X'.
    READ TABLE IT_VBRK INTO WA_VBRK INDEX RS_SELFIELD-TABINDEX.
    IF SY-SUBRC = 0.
    SELECT SINGLE POSNR
    FKIMG
    VRKME
    NETWR
    MATNR
    ARKTX
    FROM VBRP
    INTO CORRESPONDING FIELDS OF WA_VBRP
    WHERE VBELN = WA_VBRK-VBELN.
    ENDIF.
    APPEND WA_VBRP TO IT_VBRP.
    ENDIF.
    IF V_FLAG = 'X'.
    PERFORM DET_FIELDCATALOG. "designing the field catalog for items
    V_FLAG = ''.
    ENDIF.
    PERFORM DET_LISTDISPLAY. "displaying the secondary list
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'UP'.
    LEAVE TO SCREEN 0.
    WHEN 'CANCEL'.
    CALL TRANSACTION 'SE38'.
    ENDCASE.
    ENDFORM. "SET_USER_COMMAND
    *& Form DET_FIELDCATALOG
    text designing the field catalog for item details
    --> p1 text
    <-- p2 text
    FORM DET_FIELDCATALOG .
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'POSNR'.
    WA_FIELDCAT1-SELTEXT_L = 'BILLING ITEM'.
    WA_FIELDCAT1-COL_POS = 1.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'FKIMG'.
    WA_FIELDCAT1-SELTEXT_L = 'INVOICE QUANTITY'.
    WA_FIELDCAT1-COL_POS = 2.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'VRKME'.
    WA_FIELDCAT1-SELTEXT_L = 'SALES UNIT'.
    WA_FIELDCAT1-COL_POS = 3.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'NETWR'.
    WA_FIELDCAT1-SELTEXT_L = 'NET CURRENCY VALUE'.
    WA_FIELDCAT1-COL_POS = 4.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'MATNR'.
    WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUMBER'.
    WA_FIELDCAT1-COL_POS = 5.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'ARKTX'.
    WA_FIELDCAT1-SELTEXT_L = 'SALES ORDER ITEM'.
    WA_FIELDCAT1-COL_POS = 6.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_LAYOUT1-ZEBRA = 'X'.
    ENDFORM. " DET_FIELDCATALOG
    *& Form DET_LISTDISPLAY
    text displaying the secondary list
    --> p1 text
    <-- p2 text
    FORM DET_LISTDISPLAY .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME =
    IS_LAYOUT = WA_LAYOUT1
    IT_FIELDCAT = IT_FIELDCAT1
    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
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRP
    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.
    CLEAR IT_VBRP[].
    ENDFORM. " DET_LISTDISPLAY
    *& Form EVENTS
    text
    --> p1 text
    <-- p2 text
    FORM EVENTS .
    CLEAR TY_EVENTS.
    TY_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
    TY_EVENTS-FORM = 'TOP_OF_PAGE'.
    APPEND TY_EVENTS TO IT_EVENTS.
    ENDFORM. " EVENTS
    *& Form TOP_OF_PAGE
    text
    FORM TOP_OF_PAGE.
    SKIP.
    ULINE.
    WRITE :/2 ' DATE :', SY-DATUM,
    45 'INTELLIGROUP ASIA PVT LTD',
    110 'TIME :', SY-UZEIT.
    WRITE : /3 'USER :', SY-UNAME,
    45 'TITLE :', SY-TITLE,
    110 'PAGE :', SY-PAGNO.
    ULINE.
    SKIP.
    ENDFORM. "TOP_OF_PAGE
    Cheers
    navjot
    Reward with points if it is helpful
    Message was edited by:
            navjot sharma

  • Function Module to find the Difference between two times.

    Hi All,
    Wud you plz let me know the Function Module to find the Difference between two times.
    Input Time1( Hours:Minutes) Time2 ( Hours:Minutes)
    Need Output in Hours:Minutes only . ( No seconds Needed )
    Ex :
    Input :
           06:00 to 18:00 Output : 12:00
    and  20:00 to 06:00 Output: 10:00 with +ve sign only. No -ve sign.
    Thanks,
    N.L.Narayana

    check this .
    data : p_timel like sy-uzeit,
           p_timeh like sy-uzeit,
           diff like sy-uzeit,
           di(8) type c .
           p_timel = '200000'.
           p_timeh = '060000'.
           diff = p_timeh - p_timel.
           concatenate diff+0(2) ':' diff+2(2) into di.
           write:/ di.
    also check for this.
           p_timel = '060000'.
           p_timeh = '180000'.
    see if this can be implemented in ur code .
    or else  u can try with  Fm L_TO_TIME_DIFF passing startdate enddate starttime endtime with UOM as MIN
    hope this helps regards,
    vijay

  • Function module to predict the date for a given date

    hi friends,
    is there any function module to predict the date
    means  for example if i enter one date  , what will be the date
    after 4 months(say)  to the given date.
    my requirement is when a person is hired today (10.06.2008)
    and if he is under probationary for 6 months, then on what date he comes into the permenant employee's list(predicted date after date 6 months)

    Date calculations
    DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
    DATE_IN_FUTURE Calculate a date N days in the future.
    RP_CALC_DATE_IN_INTERVAL Add days/months to a date
    RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
    SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
    MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
    DATE_CREATE Calculates a date from the input parameters:
    Example: DATE_CREATE
    CALL FUNCTION 'DATE_CREATE'
    EXPORTING
       anzahl_jahre  = 1
       anzahl_monate = 2
       anzahl_tage   = 3
       datum_ein     = '20010101'
    IMPORTING
       datum_aus     = l_new_date.
       Result:
       l_new_date = 20020304
    Example: MONTH_PLUS_DETERMINE
    data: new_date type d.
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
    EXPORTING
    months = -5 " Negative to subtract from old date, positive to add
    olddate = sy-datum
    IMPORTING
    NEWDATE = new_date.
    write: / new_date.

  • Standard function module for checking the sales organization and plant

    Hi all,
        Does have standard function module for checking the relationship between sales organization and plant?
    Thanks a lot!
    Nina

    hi
    good
    check these BAPIS
    BAPI_SALESGROUP_GET_DETAIL     Sales Group: Display Name                                                
    BAPI_SALESOFFICE_GET_DETAIL    Sales Office: Display Name                                               
    BAPI_SALESOFFICE_GRP_EXIST     Sales Office / Sales Group: Existence Check                              
    BAPI_SALESORG_EXIST            Sales Organization: Existence Check                                      
    BAPI_SALESORG_GET_DETAIL       Sales Organization: Display Data                                         
    BAPI_SALESORG_OFFICE_EXIST     Sales Organization / Sales Office: Existence Check                       
    PLANT=>
    BAPI_PROMO_GETSITEPLANNING     Detailed Data for the Plants Involved in a Promotion   
    thanks
    mrutyun^

  • Function Module to find the Last Execution date of Back ground Job

    Hi,
    Is there any function module to find the <b>last execution date of back ground job</b>.
    So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
    thanks in advance.
    Eswar.

    Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.

Maybe you are looking for