How to use this function module on abap hr GET_PDSNR_RANGE

how to use this function module on abap hr GET_PDSNR_RANGE
thankx.

PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE

Similar Messages

  • How to use this function module

    Guys I want to use this function moudle(/SAPAPO/TS_DM_SET  ) to uodate key figures ,
    but what are the key values to update key figures .
    Please guide me .,

    HI Arul,
    i_header is basically SAPscript: Text Header. You have
    pass the values like TDOBJECT - Texts: application
    object, TDNAME - Name, TDID - Text ID, TDSPRAS -
    Language Key thses are the main values you to pass to i_header.

  • How to use this function module DP_CREATE_URL

    hi,
    I am using the following function module DP_CREATE_URL
    now there i have to pass a parameter called as data,
    wat to pass to DATA and how to create it
    im am displayin an image from desktop onto a container in the screen using the class cl_gui_picture
    for tat i need to use the above function module to generate the URL

    Hi Amit,
    I'm not sure if I understand your problem. Is your image stored on a frontend? In that case use GUI_UPLOAD first to get the image in an internal table.
    Regards,
    John.

  • How to use this function modules

    Read Function modules FIRST_DAY_IN_PERIOD_GET and LAST_DAY_IN_PERIOD_GET to ge the first and last  dates of the periods entered on the selection screen. Here Year = First 4 characters and Period = Next two characters of YearPeriod field of the selection screen.

    * get the first day of the period
    CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
      EXPORTING
        I_GJAHR              = wgjahr
    *   I_MONMIT             = 00
        I_PERIV              = 'V9'
        I_POPER              = wbuper
      IMPORTING
        E_DATE               = wfirstday
      EXCEPTIONS
        INPUT_FALSE          = 1
        T009_NOTFOUND        = 2
        T009B_NOTFOUND       = 3
        OTHERS               = 4.
    * if today is not the first day of the period, return an error.
    if sy-datum <> wfirstday.
    * Date is not the first day of the fiscal period.
      MESSAGE E003(ZBW).
    endif.
    CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
               EXPORTING
                    I_GJAHR        = LOC_YEAR
                    I_PERIV        = '01'
                    I_POPER        = LOC_POPER
               IMPORTING
                    E_DATE         = LOC_DATE
               EXCEPTIONS
                    INPUT_FALSE    = 1
                    T009_NOTFOUND  = 2
                    T009B_NOTFOUND = 3
                    OTHERS         = 4.
          L_S_RANGE-LOW      = LOC_DATE.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'EQ'.

  • How to use the function module ....

    hi
    how to use the function module ssf_function_module_name in smartforms

    Hi..
    If you are using this Function module, you can get the generated function module name of smartform dynamically. It is good progrmaming practice to get the fucntion module name dynamically because there might be some problems if you are hard coding in program.
    This will return the name of the function module and then from the exporting parameters you can use the fucntion module name to pass parameters to Smartforms.
    Check this link.I am expalining here how to use this function module.
    https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2
    Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    <b>Reward points if useful</b>
    Regards
    Ashu

  • How to create RFC function module and how to call this function module

    Hi,
    i want to know step for creating RFC function module and then How to  use this function module from some other sap system.
    Thnaks,
    jigar

    Jigar,
    To implement a remote function module in ABAP, perform the following steps:
    Register the module as remotely callable in the RFC server system.
    In the function module Administration screen (transaction code SE37), set the field Can be called via REMOTE CALL. Registering a module as remote causes an RFC stub to be generated for it.
    Write the code for the function module.
    Create the destinations.....................
    Displaying, Maintaining and Testing Destinations
    To display, create or modify destinations, choose Tools ® Administration ® Administration ® Network ® RFC destinations or enter transaction code SM59.
    Remote Destinations are stored in table RFCDES. The RFCDES table describes logical destinations for remote function calls.
    It is not possible to maintain the RFCDES table directly.
    You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® AcceleratedSAP ® Customizing ® Execute Project ® SAP Reference IMG.
    In the Implementation Guide, expand the following hierarchy structure:
    Basis
    Application Link Enabling (ALE)
    Sending and Receiving Systems
    Systems in Network
    Define Target Systems for RFC Calls
    Displaying Destinations
    The initial screen for this transaction displays a tree:
    Different connection types (i.e. partner systems or programs) are possible. For further information, see Types of Destinations.
    To display all information for a given destination, double-click it, or place the cursor on it and press F2 .
    To search for a destination, press the Find button and specify your selection. You get a list of all entries matching your selection. Place the cursor on the one you want, and press F2 or simply double-click the destination. All information for the given entry appears.
    Creating Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    All available connection types are explained in Types of Destinations.
    To create a new RFC destination, press the Create button. A new screen is displayed with empty fields for you to fill in.
    If you want to create a new destination
    As you create a remote destination, you can specify a particular application server or a group of servers for a balanced distribution of system load.
    For details of the destination parameters, see Entering Destination Parameters.
    Changing Existing Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    You can display all information for a given destination by double-clicking it or pressing F2 on it.
    To change an existing destination, double-click it, or place the cursor on it and press the Change button.
    For details of the destination parameters, see Entering Destination Parameters.
    Testing Destinations
    To test a destination, choose the appropriate function from the Test menu.
    Connection (also available via the Test connection pushbutton)
    Authorization (checks logon data)
    Local network (provides a list of application servers)
    You can use the CALL FUNCTION statement to call remote functions, just as you would call local function modules. However, you must include an additional DESTINATION clause to define where the function should run:
    CALL FUNCTION RemoteFunction
    DESTINATION Dest
    EXPORTING
    f1 =...
    f2 =...
    IMPORTING
    f3 =...
    TABLES
    t1 =...
    EXCEPTIONS......
    The field Dest can be either a literal or a variable: its value is a logical destination (for example, "hw1071_53") known to the local SAP System. Logical destinations are defined in the RFCDES table (or the TRFCD table in R/2 Systems) via transaction sm59 or the following menu path: Tools ® Administration, Administration ® Network ® RFC destinations. You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® Customizing ® Enterprise IMG. In the Implementation Guide, you can then choose Cross-application components ® ALE ® Communication ® Define RFC destination.
    The remote function call concept, for example, allows you to access a function module in an R/2 System from an ABAP program in an R/3 System. If you want to read a customer record from your R/2 System’s database, create a remotely callable function module in the R/2 environment which retrieves customer records. Call this function from your R/3 System using a remote function call and listing the destination for the target R/2 System:
    Pls. reward if useful

  • How can i use this  function module

    Hai
    How can i use this function module /SAPHT/SALES_ORDER_READ, already apply the some parameters in this function module, but it shows the error , please tell me, how to declare the parameters in this function module ,
    thanks
    neelima

    Hi
    For a particular sales order,you have to pass the order number and the item number in the sales order.
    It will display the rest of the values which u can capture them using internal tables.
    Regards,
    Vishwa.

  • Regarding how to use the function module *control_form* in scripts

    HI friends,
    Can any one tell why and where do we use the function module control_form in scripts. Can you give me a small scenario how to use in scripts.

    hi satish,
    by using this function module we can pass the control
    commands to FORM THROUGH ABAP/4 PROGRAM.
    see the following example:
    TABLES: kna1.
    DATA: BEGIN OF it_kna1 OCCURS 0,
          kunnr LIKE kna1-kunnr,
          name1 LIKE kna1-name1,
          ort01 LIKE kna1-ort01,
          land1 LIKE kna1-land1,
          END OF it_kna1.
    DATA:records TYPE i,
         window TYPE i value 1.
    select-options:s_kunnr for kna1-kunnr.
    SELECT kunnr name1 ort01 land1 FROM kna1 INTO TABLE it_kna1
    where kunnr in s_kunnr.
    CALL FUNCTION 'OPEN_FORM'
      EXPORTING
        form     = 'ZSCRIPT4'
        language = sy-langu.
    LOOP AT it_kna1.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element  = 'ELE1'
          function = 'SET'
          type     = 'BODY'
          window   = 'MAIN'.
      DESCRIBE TABLE it_kna1 LINES records.
      IF window lt records.
        window = window + 1.
      CALL FUNCTION 'CONTROL_FORM'
       EXPORTING
            command         = 'NEW-WINDOW'
    EXCEPTIONS
      UNOPENED        = 1
    UNSTARTED       = 2
    OTHERS          = 3
      ENDIF.
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    thanks,
    raji

  • How to use SD_VBAK_ARRAY_READ functional module

    hello
    can you please tell me how to use SD_VBAK_ARRAY_READ  functional module. that means what i have to pass and what i should get.
    Please help me

    Hi Ravi,
    i want to display vkorg,kunnr,and some other fields from the VBAK. User enters VKORG and some other fields but VKORG is compulsory.
    so i written the code like this.
    TYPES :BEGIN OF TEITAB_VBAK,
           VKORG type VBAK-VKORG,
           KUNNR TYPE VBAK-KUNNR,
           VBELN TYPE VBAK-VBELN,
           AUDAT TYPE VBAK-AUDAT,
           VDATU TYPE VBAK-VDATU,
           ERNAM TYPE VBAK-ERNAM,
           END OF TEITAB_VBAK.
    DATA: ITAB_VBAK TYPE TABLE OF TEITAB_VBAK,
          WA_VBAK TYPE TEITAB_VBAK.
    SELECT-OPTIONS: s_VKORG FOR P_VKORG OBLIGATORY,         " Sales Organization
                    s_KUNNR FOR P_KUNNR,         " Sold-to party.
                    s_VBELN FOR P_VBELN,         " Sales Document.
                    s_MATNR FOR P_MATNR,         " Material number.
                    s_AUDAT FOR P_AUDAT,         " Document Date (Date Received/Sent).
                    s_VDATU FOR P_VDATU,         " Requested delivery date.
                    s_ERNAM FOR P_ERNAM,         " Name of Person who Created the Object.
                    s_VKAUS FOR P_VKAUS.         " Usage indicator.
    SELECT VKORG KUNNR VBELN AUDAT VDATU ERNAM
    FROM VBAK
    INTO CORRESPONDING FIELDS OF TABLE ITAB_VBAK
    WHERE VKORG IN S_VKORG AND AUART EQ 'ZRA'.
    CALL FUNCTION 'SD_VBAK_ARRAY_READ'
    EXPORTING
      I_BYPASSING_BUFFER          = ' '
      I_REFRESH_BUFFER            =
      TABLES
        IT_VBAK_KEY                 =
      ET_VBAK                     =
    EXCEPTIONS
      RECORDS_NOT_FOUND           = 1
      RECORDS_NOT_REQUESTED       = 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.
    so i confused where to call this fucntional module and what to pass. That means call this functional module before the select query or after the select query and what to pass.
    i am new in ABAP.
    Please help me to solve this problem .

  • How to use BAPI_MATERIAL_AVAILABILITY Function Module at batch level?

    How to use BAPI_MATERIAL_AVAILABILITY FM to check material available at batch level?
    And another question is what's the meaning of 'CHECK_RULE' in this FM. Thanks!

    Field name : PRREG
    fcheck more details on  f1 help...
    check_group defines the checking procedure to be used for  availability check in individual applications.
    along with the checkg group, checking rule  specifies the final procedure for chkg..
    eg:
    ST  for  stock transport order
    AQ for SD order project srock
    also chk this help doc.
    http://help.sap.com/saphelp_470/helpdata/en/cf/70124adf2d11d1b55e0000e82de178/content.htm
    search the forum for sample code..
    How to use BAPI_MATERIAL_AVAILABILITY Function Module....

  • How to use BAPI_MATERIAL_AVAILABILITY Function Module....

    Hi Experts,
    I want to know actual free available quantity (ATP Qty.) for mass materials,
    How to use BAPI_MATERIAL_AVAILABILITY function module ?
    I have select all material from MARA and inserted in itab.
    LOOP AT ITAB.
    CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
      EXPORTING
        PLANT                    =
        MATERIAL                 =
        UNIT                     =
      CHECK_RULE               =
      STGE_LOC                 =
      BATCH                    =
      CUSTOMER                 =
      DOC_NUMBER               =
      ITM_NUMBER               =
      WBS_ELEM                 =
      STOCK_IND                =
      DEC_FOR_ROUNDING         =
      DEC_FOR_ROUNDING_X       =
      READ_ATP_LOCK            =
      READ_ATP_LOCK_X          =
    IMPORTING
      ENDLEADTME               =
      AV_QTY_PLT               =
      DIALOGFLAG               =
      RETURN                   =
      TABLES
        WMDVSX                   =
        WMDVEX                   =
    I dont know how to use it.
    pl. guide us.
    Yusuf

    Hi,
           data:  iwmdvsx type table of bapiwmdvs with header line,
           iwmdvex type table of bapiwmdve with header line.
    parameters: p_matnr type mara-matnr,
                p_werks type marc-werks,
                p_meins type mara-meins.
    call function 'BAPI_MATERIAL_AVAILABILITY'
      exporting
        plant            = p_werks
        material         = p_matnr
        unit             = p_meins
      CHECK_RULE       =
      STGE_LOC         =
      BATCH            =
      CUSTOMER         =
      DOC_NUMBER       =
      ITM_NUMBER       =
      WBS_ELEM         =
      STOCK_IND        =
    IMPORTING
      ENDLEADTME       =
      AV_QTY_PLT       =
      DIALOGFLAG       =
      RETURN           =
      tables
        wmdvsx           = iwmdvsx
        wmdvex           = iwmdvex.
    check sy-subrc = 0.
    Text
    ATP information
    Functionality
    Using this function module, you can determine the receipt quantity still available for a particular material in a certain plant according to ATP logic (MRPII).
    The availability check is carried out on transferring the material number, the plant and the input table (WMDVSX). The scope of the check, that is, which stocks, receipts and issues are to be included in the check is defined by the combination of checking group (material master) and cheking rule. In the function module, the system uses the checking rule defined in Sales & Distribution (A). You can overrule this checking rule by using an interface or a user-exit (exit_saplw61v_001). A similar procedure is also valid for the plant parameters. The customer number in the user-exit means that the plant selection can be controlled via the customer. If no plant parameters are given via the interface, the system uses the parameter 'WRK' saved in the user's fixed values.
    The results of the availability check are recorded in the output table (WMDVEX). This table contains dates and available receipt quantities (ATP quantities). The results of the check depends on the following entries:
    If no date and no quantity is transferred, the system displays the ATP situation from today's date into the future as the result.
    If only a date and no quantity is transferred, the system displays the ATP situation from the corresponding date as the result.
    If both a date and a quantity are transferred, the system calculates the availability situation for the quantity specified.
    In the last two cases, the parameter 'DIALOGFLAG' is supplied. This can result in the following:
    ' ' (blank)   <=> quantity completely available
    'X'           <=> only partial quantity available or not available at
                      all
    'N'           <=> Material not included in the availability check
                      (Material not relevant to the availability check)
    The system also displays the end of the replenishment lead time (ENDLEADTME).
    regards

  • How to use SO_OBJECT_SEND function module

    Hi friends,
       how to use SO_OBJECT_SEND function module in 4.0B Server .

    hi
    good
    check this code
    REPORT ZTSAPMAIL.
    DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.
    DATA: BEGIN OF X_OBJECT_HD_CHANGE.
    INCLUDE STRUCTURE SOOD1.
    DATA: END OF X_OBJECT_HD_CHANGE.
    DATA: BEGIN OF X_OBJCONT OCCURS 10.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJCONT.
    DATA: BEGIN OF X_OBJHEAD OCCURS 0.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJHEAD.
    DATA: BEGIN OF RAW_HEAD.
    INCLUDE STRUCTURE SORH.
    DATA: END OF RAW_HEAD.
    DATA: BEGIN OF X_RECEIVERS OCCURS 0.
    INCLUDE STRUCTURE SOOS1.
    DATA: END OF X_RECEIVERS.
    PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name
    *BUILD MESSAGE HEADER
    MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field
    MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name
    MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title
    MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT
    MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language
    Object type of the new document
    MOVE 'RAW' TO X_OBJECT_TYPE.
    CLEAR X_OBJCONT.
    MOVE 'Contents of mail' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.
    MOVE 'More contents' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    MOVE 'Still more contents'
    to x_objcont-line.
    APPEND X_OBJCONT.
    MOVE ' ' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    Specific header (Dependent on the object type, here RAW)
    REFRESH X_OBJHEAD.
    DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.
    MOVE RAW_HEAD TO X_OBJHEAD.
    APPEND X_OBJHEAD.
    *RECEIVERS table
    CLEAR X_RECEIVERS.
    REFRESH X_RECEIVERS.
    MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name
    MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type
    MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
    MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
    APPEND X_RECEIVERS.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    folder_id = 'OUTBOX'
    forwarder = x_forwarder
    object_fl_change = x_object_fl_change
    OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
    object_id = x_object_id
    OBJECT_TYPE = X_OBJECT_TYPE
    OUTBOX_FLAG = 'X'
    OWNER = SY-UNAME
    store_flag = x_store_flag
    importing
    object_id_new = x_object_id_new
    sent_to_all = x_sent_to_all "May need to use
    TABLES
    OBJCONT = X_OBJCONT
    OBJHEAD = X_OBJHEAD
    objpara = x_objpara
    objparb = x_objparb
    RECEIVERS = X_RECEIVERS.
    reward point if hlepful.
    thanks
    mrutyun^

  • How to use the function module 'HR_ES_FEATURE_BACKFIELD'

    Hi,
    How to use the function module 'HR_ES_FEATURE_BACKFIELD'?
    I need the usage from both technical as well as functional point of view.
    What is the use of this function module and technically how it is to be used to retrieve a feature for a particular employee.

    hey iam from functional side can u be little bit clear of that feature
    thanks
    sikindar

  • How to use this function call function 'REUSE_ALV_COMMENTARY_WRITE' in alv

    hi all
    thanks in advance
    how to use this function in alv programming
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    why use and what purpose use this function plz tell me details
    plz guide me
    thanks

    Hi
    see this exmaple code where i had inserted a LOGO by useing this FM
    *& Report  ZTEST_ALV_LOGO
    REPORT  ztest_alv_logo.
    TYPE-POOLS : slis.
    *ALV Formatting tables /structures
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: gt_events   TYPE slis_t_event.
    DATA: gs_layout   TYPE slis_layout_alv.
    DATA: gt_page     TYPE slis_t_listheader.
    DATA: gs_page     TYPE slis_listheader.
    DATA: v_repid     LIKE sy-repid.
    *ALV Formatting work area
    DATA: w_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_events   TYPE slis_alv_event.
    DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
    INITIALIZATION.
      PERFORM build_events.
      PERFORM build_page_header.
    START-OF-SELECTION.
    *perform build_comment.     "top_of_page - in initialization at present
      SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
    *perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
    *USING = Row, Column, Field name, display length, table name, heading
    *OR
      PERFORM build_fieldcat.
      gs_layout-zebra = 'X'.
    *top of page event does not work without I_callback_program
      v_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program                = v_repid
          i_structure_name                  = 'BSID'
       i_background_id                   = 'ALV_BACKGROUND'
          i_grid_title                      = 'This is the grid title'
      I_GRID_SETTINGS                   =
          is_layout                         = gs_layout
          it_fieldcat                       = gt_fieldcat[]
          it_events                         = gt_events[]
        TABLES
          t_outtab                          = gt_bsid.
    Form..............:  populate_for_fm
    Description.......:  Populates fields for function module used in ALV
    FORM populate_for_fm USING p_row
                               p_col
                               p_fieldname
                               p_len
                               p_table
                               p_desc.
      w_fieldcat-row_pos      = p_row.          "Row Position
      w_fieldcat-col_pos      = p_col.          "Column Position
      w_fieldcat-fieldname    = p_fieldname.    "Field name
      w_fieldcat-outputlen    = p_len.          "Column Lenth
      w_fieldcat-tabname      = p_table.        "Table name
      w_fieldcat-reptext_ddic = p_desc.         "Field Description
      w_fieldcat-input        = '1'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " populate_for_fm
    *&      Form  build_events
    FORM build_events.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = gt_events.
      READ TABLE gt_events
                 WITH KEY name =  slis_ev_user_command
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_user_command TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
      READ TABLE gt_events
                 WITH KEY name =  slis_ev_top_of_page
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_top_of_page TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
    ENDFORM.                    " build_events
    *&      Form  USER_COMMAND
    When user command is called it uses 2 parameters. The itab
    passed to the ALV is in whatever order it currently is on screen.
    Therefore, you can read table itab index rs_selfield-tabindex to get
    all data from the table. You can also check r_ucomm and code
    accordingly.
    FORM user_command USING  r_ucomm     LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      READ TABLE gt_bsid INDEX rs_selfield-tabindex.
    error checking etc.
      SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
    ENDFORM.                    "user_command
    *&      Form  top_of_page
    Your own company logo can go here if it has been saved (OAOR)
    If the logo is larger than the size of the headings in gt_page,
    the window will not show full logo and will have a scroll bar. Thus,
    it is a good idea to have a standard ALV header if you are going to
    use logos in your top of page.
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_page
          i_logo             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "top_of_page
    *&      Form  build_fieldcat
    *Many and varied fields are available here. Have a look at documentation
    *for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
    FORM build_fieldcat.
      w_fieldcat-fieldname  = 'BUDAT'.
      w_fieldcat-seltext_m  = 'Dte pst'.
      w_fieldcat-ddictxt(1) = 'M'.
      w_fieldcat-edit = 'x'.
    Can change the position of fields if you do not want them in order
    of the DDIC or itab
    w_fieldcat-row_pos = '1'.
    w_fieldcat-col_pos = '10'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " build_fieldcat
    *&      Form  build_page_header
          gt_page is used in top of page (ALV subroutine - NOT event)
          *H = Header, S = Selection, A = Action
    FORM build_page_header.
    For Headers, Key is not printed and is irrelevant. Will not cause
    a syntax error, but is not used.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 2'.
      APPEND gs_page TO gt_page.
    For Selections, the Key is printed (bold). It can be anything up to 20
    bytes. It gets printed in order of code here, not by key value.
      gs_page-typ  = 'S'.
      gs_page-key  = 'And the winner is:'.
      gs_page-info = 'Selection 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'S'.
      gs_page-key  = 'Runner up:'.
      gs_page-info = 'Selection 2'.
      APPEND gs_page TO gt_page.
    For Action, Key is also irrelevant.
      gs_page-typ  = 'A'.
      gs_page-info = 'Action goes here'.
      APPEND gs_page TO gt_page.
    ENDFORM.                    " build_page_header

  • How to use the Function Module RH_READ_INFTY_1001...

    Hi,
    Can any one Tell me .. How to do the same functionality .. given below (select).
    Using the Function Module RH_READ_INFTY_1001...
    *reads CP (Central Person) based on BP (Business Partner)
    Select single objid (Object ID)
           from hrp1001
           into gv_sobid
           where subty eq 'B207'
           and sclas eq 'BP'
           and sobid eq  is_header-partner.
    *reads P (Person) Based on determined BP (Business Partner)
    select single sobid (ID related Object)
           from hrp1001
           into gv_sobid
           where subty eq 'B209'
           and   otype eq 'CP'
           and   objid eq gv_sobid.
    *determines UserID from IT0105 for determined personell ID
    select single usrid
           from pa0105
           into gv_usrid
           where pernr eq gv_sobid
           and   subty eq '999'.
    Reply ASAP....
    Answers will be Rewarded...

    objects-plvar = l_plvar.
                  objects-otype = 'S '.
                  objects-sobid = l_positions-objid.
                  APPEND objects.
                  CLEAR i1001_itab. REFRESH i1001_itab.
                  CALL FUNCTION 'RH_READ_INFTY_1001'
                       EXPORTING
    *                       AUTHORITY       = 'DISP'
    *                       WITH_STRU_AUTH  = 'X'
                            istat           = '1'
    *                       EXTEND          = 'X'
                            subty           = 'A008'
                            begda           = l_keyda
                            endda           = l_keyda
    *                       CONDITION       = '00000'
    *                       SORT            = 'X'
    *                       WITH_EV         = ' '
    *                       ADATA           = 'X'
                       TABLES
                            i1001           = i1001_itab
                            objects         = objects
                       EXCEPTIONS
                            nothing_found   = 1
                            wrong_condition = 2
                            OTHERS          = 3.
                  IF sy-subrc <> 0.
                    CLEAR i1001_itab. REFRESH i1001_itab.
                    CLEAR mngr_nr.
                  ELSE.
                    READ TABLE i1001_itab WITH KEY sclas = 'P'.
                    IF sy-subrc = 0.
                      mngr_nr = i1001_itab-sobid.
                    ELSE.
    THis is the sample code to use function module using this function module you can get upto HRP1001 selection for userid you need to use same select you write for PA0105

Maybe you are looking for

  • How to plot bar graph in the real time?

    Hi guys I have n row and 3 column array, n will vary according the time, for example t=10ms, n=1;t=20ms, n=2;..., I would like to display all the data of the array in the bar graph  in real time. I tryied with example "array to bar graph demo.vi" but

  • "Message Rejection Handler" for the file/ftp adapter using fault policy

    Hi guys, We are trying to implement "Message Rejection Handler" for the file/ftp adapter using following fault policy configuration. Fault Policy: ````````````` <?xml version='1.0' encoding='UTF-8'?> <faultPolicies xmlns="http://schemas.oracle.com/bp

  • WLC sitting in a DMZ zone on an ASA

    I am trying to figure out a way to do a Guest Network without using an ACL tied to the SSID. (Customer's request) Its a layer 3 network and they suggested creating a DMZ zone off their ASA and connecting the WLC there that way its outside their netwo

  • I am so stuck-programming is hard-can anyone help me please???

    My homework problem I am stuck on is this: Write the method for calculating the volume of a cube, with the formula being volume = a*b*c where a is width, b is the depth and c is the height of the cube. the method should return the result as a double

  • Two IDs in iTunes

    I originally had a .mac ID, now I have the same with a .me ID.  Is it possible to convert songs/movies from my .mac to my .me?  This would help with sighting my devices.