Function module for F4 help download

HI Experts
What is the function module for F4 help download.
Thanks in advance

Hi,
  Function module is F4IF_FIELD_VALUE_REQUEST.
Use the Function moduel like this in this i create screen 100 by using se51.
REPORT zcl_f4_help.
TYPES: BEGIN OF values,
         carrid TYPE spfli-carrid,
         connid TYPE spfli-connid,
       END OF values.
DATA: carrier(3) TYPE c,
      connection(4) TYPE c.
DATA: progname TYPE sy-repid,
      dynnum   TYPE sy-dynnr,
      dynpro_values TYPE TABLE OF dynpread,
      field_value LIKE LINE OF dynpro_values,
      values_tab TYPE TABLE OF values.
CALL SCREEN 100.
MODULE init OUTPUT.
  progname = sy-repid.
  dynnum   = sy-dynnr.
  CLEAR: field_value, dynpro_values.
  field_value-fieldname = 'CARRIER'.
  APPEND field_value TO dynpro_values.
ENDMODULE.
MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.
MODULE value_carrier INPUT.
  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
       EXPORTING
            tabname     = 'DEMOF4HELP'
            fieldname   = 'CARRIER1'
            dynpprog    = progname
            dynpnr      = dynnum
            dynprofield = 'CARRIER'.
ENDMODULE.
MODULE value_connection INPUT.
  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            dyname             = progname
            dynumb             = dynnum
            translate_to_upper = 'X'
       TABLES
            dynpfields         = dynpro_values.
  READ TABLE dynpro_values INDEX 1 INTO field_value.
  SELECT  carrid connid
    FROM  spfli
    INTO  CORRESPONDING FIELDS OF TABLE values_tab
    WHERE carrid = field_value-fieldvalue.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = 'CONNID'
            dynpprog    = progname
            dynpnr      = dynnum
            dynprofield = 'CONNECTION'
            value_org   = 'S'
       TABLES
            value_tab   = values_tab.
ENDMODULE.
you use this exaple  code.
Plz Reward if Help,
Mahi.

Similar Messages

  • Function Module for F4 Help

    HI Experts
    What is the function module for F4 help download.
    Thanks in advance

    Hi,
    try these fn modules,
    F4IF_INT_TABLE_VALUE_REQUEST
    its a F4 help that returns the values selected in an internal table.
    F4_IF_FIELD_VALUE_REQUEST
    It uses values from a DDIC table to provide a list of possible values

  • Function Module for search help Exit

    How to create a function Module for search help exits?
    please explain in details with step by step process.

    Hi,
    How to create a function Module for search help exits?
    function module for search help F4IF_SHLP_EXIT_EXAMPLE
    dynamic search help use 'F4IF_INT_TABLE_VALUE_REQUEST'
    please check out the link below it will help you
    A repository object maintained in the ABAP Dictionary. It supplies input fields on Dynpros with single- or multi-column input helps. Search helps can be linked in the Dictionary with components from structures, data elements, and check tables. A search help enables you to search for entry values with assigned data, without you having to know the exact spelling of the value.
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee52446011d189700000e8322d00/content.htm
    please explain in details with step by step process.
    create a search help exit:
    1. create an fm with this interface:
    *" TABLES
    *" SHLP_TAB TYPE SHLP_DESCR_TAB_T
    *" RECORD_TAB STRUCTURE SEAHLPRES
    *" CHANGING
    *" VALUE(SHLP) TYPE SHLP_DESCR_T
    *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
    put this logic in it:
    Delete duplicate filter logic.
    This logic only needs to apply at the 'DISP' event - which is just
    before the hit list is displayed
    if callcontrol-step = 'DISP'.
    delete adjacent duplicates from record_tab.
    endif.
    2. edit your search help in se11 and enter the name of the above search help exit fm
    check this sample code..for dynamic search help
    REPORT  ZTEST_F4HELP                              .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           exceptions
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                others               = 11.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.
    also check this link it will help you
    /message/3854825#3854825 [original link is broken]
    *********please reward points if the information is helpful to you*************

  • Function module for getting logo downloaded in excel/word

    Hi All,
    Can you please tell any function module in SAP through which we can download a logo in excel/word pad.
    thanks
    Gaurav Maini

    Hope this helps: [Display Number of working and non working days on Remuneration Statment.|http://wiki.sdn.sap.com/wiki/display/Snippets/DisplayNumberofworkingandnonworkingdaysonRemunerationStatment.]
    else find a FM to  calculate the number of working days, in the given period...
    if Nov 14 to Dec 15
    there are FM's which can give the last working day of the month.. split leave period from Nov14th to last working day and then first working day of next month to dec15th.
    Dont ask for date FM's that against rulez of the forum..

  • Function module for f4 help in presentaion server and application server.

    hi guys,
    I need to create a function module that will get the file or folder name by f4 help for the file in the presentation server or  application server based on the location selected.
    For this function module what are the minimum impot parametrs  and export parameters required.
    i have tried with 'f4_filename' for presentation server
    and '/SAPDMC/LSM_F4_SERVER_FILE' for application server.
    but i am not able to get this.
    can any one help me in this regard ?
    cheers,
    kumar.

    hi use like this ..
      if p_presvr = 'X'.
    *-- if the file is to be downloaded to presentation server
        call function '/SAPDMC/LSM_F4_FRONTEND_FILE'
          changing
            pathfile         = p_file
          exceptions
            canceled_by_user = 1
            system_error     = 2
            others           = 3.
        if sy-subrc <> 0.
          if sy-batch = 'X'.
            message id sy-msgid type 'S' number sy-msgno
                    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into v_msg.
            write / v_msg.
            clear v_msg.
            stop.
          else.
            message id sy-msgid type 'S' number sy-msgno
                      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          endif.
        endif.
      else.
    *-- if the file is to be downloaded to application server
        call function '/SAPDMC/LSM_F4_SERVER_FILE'
          exporting
            directory        = '/'
            filemask         = '*'
          importing
            serverfile       = p_file
          exceptions
            canceled_by_user = 1
            others           = 2.
        if sy-subrc <> 0.
          if sy-batch = 'X'.
            message id sy-msgid type 'S' number sy-msgno
                    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into v_msg.
            write / v_msg.
            clear v_msg.
            stop.
          else.
            message id sy-msgid type 'S' number sy-msgno
                      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          endif.
        endif.
      endif.

  • Function Module for F1 help

    Hi all!
    I want to know the function module to create your own F1 help.
    Please Help me Out

    U can use FMs 'DSYS_SHOW_FOR_F1HELP'/1.     HELP_OBJECT_SHOW_FOR_FIELD /HELP_OBJECT_SHOW
    Example:
    REPORT  ZGB_TEST_SEARCH_HELP                    .
    INTERNAL TABLE FOR STORING NAMES IN SELECTION LIST
    data: begin of t_itab occurs 0,
            name(10) type c,
          end of t_itab.
    *FIELDNAME AND TAB NAME FOR THE SELECTION
    DATA :field_tab LIKE dfies  OCCURS 0 WITH HEADER LINE.
    *THE TABLE FOR RETURNING THE NAME OF THE SELECTED ITEM
    DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    *START THE SELECTION SCREEN BLOCK
    selection-screen begin of block ss1 with frame.
    parameters: p_name1(10) type c.
    selection-screen end of block ss1.
    *& F4 Help for p_name1                                                 *
    at selection-screen on value-request for p_name1.
    *CLEAR ALL EXISTING DATA
    *TO BE DONE EVERYTIME F4 HELP IS REQUESTED
    REFRESH t_itab.
    REFRESH field_tab.
      field_tab-fieldname = 'ERNAM'.
      field_tab-tabname = 'VBAK'.
    APPEND field_tab.
    t_itab-name = 'Andrews'.
    append t_itab.
    t_itab-name = 'Jennie'.
    append t_itab.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = field_tab-fieldname
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      DYNPROFIELD            = ' '
      STEPL                  = 0
        WINDOW_TITLE           = 'Select name'
      VALUE                  = ' '
      VALUE_ORG              = 'C'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      tables
       value_tab              = t_itab
       FIELD_TAB              = field_tab
       RETURN_TAB             = return_tab
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 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.
    else.
    p_name1 = return_tab-fieldval.
    ENDIF.
    *& F1 Help for p_name1                                                 *
    at selection-screen on help-request for p_name1.
    CALL FUNCTION 'DSYS_SHOW_FOR_F1HELP'
      EXPORTING
      APPLICATION              = 'SO70'
        dokclass                 = 'TX'
        DOKLANGU                 = SY-LANGU
        dokname                  = 'Z_GAURAB_DEMO'
      DOKTITLE                 = 'This appears as bold title'
      HOMETEXT                 = ' '
      OUTLINE                  = ' '
      VIEWNAME                 = 'STANDARD'
      Z_ORIGINAL_OUTLINE       = ' '
      CALLED_FROM_SO70         = ' '
      SHORT_TEXT               = ' '
      APPENDIX                 = ' '
    IMPORTING
      APPL                     =
      PF03                     =
      PF15                     =
      PF12                     =
    EXCEPTIONS
       CLASS_UNKNOWN            = 1
       OBJECT_NOT_FOUND         = 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.
    Regards,
    Joy.

  • Function module for F4 help in ranges.

    The function module COMPLEX_SELECTIONS_DIALOG is used for providing the multiple selection popup screen for a particuler field.Now the problem is F4 help is not availble for each row in the multiselection pop up screen if the field refers to a custom table's field.But it is available if it refers to standard table.
    Please suggest if there is nayway to do this or is there any other alternative function module.
    Thanks!
    Savitha.

    Hi
    Have you assigned the CUSTOM table as a CHECK table against the fields of the row.
    Or declare as a master data table fields to see the F4 help.
    Or use the fun module F4IF_INT_TABLE_VALUE_REQUEST
    see the sample code
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 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.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3. 
    Regards
    Anji

  • Function Module for F4 Help for stext ( table Hrp000 ) type field

    Hello all,
    I have defined one selection parameter as "Event_NAME FOR HRP1000-STEXT" .
    But while running the program, system does not provide any drop down for Event_Name,just displaying it as a text field. I wanted a drop down that contains all entries of STEXT in Hrp1000.
    For that I have written following code to make drop down available for event name in selection screen.The code is working fine.But the issue is that i can just select one value from the list on selection screen.I need multiple selections.How can i do that??
    PARAMETERS : EV_NAME LIKE HRP1000-STEXT AS LISTBOX VISIBLE LENGTH 50.
    PARAMETERS : EV_GRP LIKE HRP1000-STEXT AS LISTBOX VISIBLE LENGTH 50.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR EV_NAME.
    SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_NAME WHERE OTYPE = 'E'.
    SORT  F4_EV_NAME BY EV_NAME.
    DELETE ADJACENT DUPLICATES FROM F4_EV_NAME.
    LOOP AT F4_EV_NAME.
    LWA_VRM2-KEY = F4_EV_NAME-EV_NAME.
    APPEND LWA_VRM2 TO L_VRM_VALUES2.
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = 'EV_NAME'
    VALUES = L_VRM_VALUES2
    EXCEPTIONS
    ID_ILLEGAL_NAME = 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.
    For Event Group*************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR EV_GRP.
    SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_GRP WHERE OTYPE = 'L'.
    SORT  F4_EV_GRP BY EV_GRP.
    DELETE ADJACENT DUPLICATES FROM F4_EV_GRP.
    LOOP AT F4_EV_GRP.
    LWA_VRM3-KEY = F4_EV_GRP-EV_GRP.
    APPEND LWA_VRM3 TO L_VRM_VALUES3.
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = 'EV_GRP'
    VALUES = L_VRM_VALUES3
    EXCEPTIONS
    ID_ILLEGAL_NAME = 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.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    i have done this as following code:it appears as a range selection parameter but no options available in 2 drop downs.
    any replies??
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-ft2.
    SELECT-OPTIONS :EV_NAME FOR HRP1000-STEXT,
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN ON EV_NAME.
    SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_NAME WHERE OTYPE = 'E'.
    SORT  F4_EV_NAME BY EV_NAME.
    DELETE ADJACENT DUPLICATES FROM F4_EV_NAME.
    LOOP AT F4_EV_NAME.
    LWA_VRM2-KEY = F4_EV_NAME-EV_NAME.
    APPEND LWA_VRM2 TO L_VRM_VALUES2.
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = 'EV_NAME'
    VALUES = L_VRM_VALUES2
    EXCEPTIONS
    ID_ILLEGAL_NAME = 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.

  • Error in XXL_FULL_API function module for download report to excel

    Hi all,
    I am using XXL_FULL_API function module for download report to excel, In this FM we have to fill a table called sema        = t_gxxlt_s. in this table we have a fields called
    i_sema-col_no  = 19.
      i_sema-col_src = 19.
      i_sema-col_typ = 'STR'.
      i_sema-col_ops = 'DFT'
    here in 'col_typ' if we put STR in excel it will come as a text but i wnat the time field what i have to pass ?
    and for filed 'col_ops' also ??
    Thaks,
    Sridhar

    Hi sridhar joshi,
    Please check this program
    REPORT Excel.
    TABLES:
      sflight.
    * header data................................
    DATA :
      header1 LIKE gxxlt_p-text VALUE 'Suresh',
      header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
    * Internal table for holding the SFLIGHT data
    DATA BEGIN OF t_sflight OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA END   OF t_sflight.
    * Internal table for holding the horizontal key.
    DATA BEGIN OF  t_hkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_h.
    DATA END   OF t_hkey .
    * Internal table for holding the vertical key.
    DATA BEGIN OF t_vkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_v.
    DATA END   OF t_vkey .
    * Internal table for holding the online text....
    DATA BEGIN OF t_online OCCURS 0.
            INCLUDE STRUCTURE gxxlt_o.
    DATA END   OF t_online.
    * Internal table to hold print text.............
    DATA BEGIN OF t_print OCCURS 0.
            INCLUDE STRUCTURE gxxlt_p.
    DATA END   OF t_print.
    * Internal table to hold SEMA data..............
    DATA BEGIN OF t_sema OCCURS 0.
            INCLUDE STRUCTURE gxxlt_s.
    DATA END   OF t_sema.
    * Retreiving data from sflight.
    SELECT * FROM sflight
             INTO TABLE t_sflight.
    * Text which will be displayed online is declared here....
    t_online-line_no    = '1'.
    t_online-info_name  = 'Created by'.
    t_online-info_value = 'KODANDARAMI REDDY'.
    APPEND t_online.
    * Text which will be printed out..........................
    t_print-hf     = 'H'.
    t_print-lcr    = 'L'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the header'.
    APPEND t_print.
    t_print-hf     = 'F'.
    t_print-lcr    = 'C'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the footer'.
    APPEND t_print.
    * Defining the vertical key columns.......
    t_vkey-col_no   = '1'.
    t_vkey-col_name = 'MANDT'.
    APPEND t_vkey.
    t_vkey-col_no   = '2'.
    t_vkey-col_name = 'CARRID'.
    APPEND t_vkey.
    t_vkey-col_no   = '3'.
    t_vkey-col_name = 'CONNID'.
    APPEND t_vkey.
    t_vkey-col_no   = '4'.
    t_vkey-col_name = 'FLDATE'.
    APPEND t_vkey.
    * Header text for the data columns................
    t_hkey-row_no = '1'.
    t_hkey-col_no = 1.
    t_hkey-col_name = 'PRICE'.
    APPEND t_hkey.
    t_hkey-col_no = 2.
    t_hkey-col_name = 'CURRENCY'.
    APPEND t_hkey.
    t_hkey-col_no = 3.
    t_hkey-col_name = 'PLANETYPE'.
    APPEND t_hkey.
    t_hkey-col_no = 4.
    t_hkey-col_name = 'SEATSMAX'.
    APPEND t_hkey.
    t_hkey-col_no = 5.
    t_hkey-col_name = 'SEATSOCC'.
    APPEND t_hkey.
    t_hkey-col_no = 6.
    t_hkey-col_name = 'PAYMENTSUM'.
    APPEND t_hkey.
    * populating the SEMA data..........................
    t_sema-col_no  = 1.
    t_sema-col_typ = 'STR'.
    t_sema-col_ops = 'DFT'.
    APPEND t_sema.
    t_sema-col_no = 2.
    APPEND t_sema.
    t_sema-col_no = 3.
    APPEND t_sema.
    t_sema-col_no = 4.
    APPEND t_sema.
    t_sema-col_no = 5.
    APPEND t_sema.
    t_sema-col_no = 6.
    APPEND t_sema.
    t_sema-col_no = 7.
    APPEND t_sema.
    t_sema-col_no = 8.
    APPEND t_sema.
    t_sema-col_no = 9.
    APPEND t_sema.
    t_sema-col_no = 10.
    t_sema-col_typ = 'NUM'.
    t_sema-col_ops = 'ADD'.
    APPEND t_sema.
    CALL FUNCTION 'XXL_FULL_API'
      EXPORTING
    *   DATA_ENDING_AT          = 54
    *   DATA_STARTING_AT        = 5
       filename                = 'TESTFILE'
       header_1                = header1
       header_2                = header2
       no_dialog               = 'X'
       no_start                = ' '
        n_att_cols              = 6
        n_hrz_keys              = 1
        n_vrt_keys              = 4
       sema_type               = 'X'
    *   SO_TITLE                = ' '
      TABLES
        data                    = t_sflight
        hkey                    = t_hkey
        online_text             = t_online
        print_text              = t_print
        sema                    = t_sema
        vkey                    = t_vkey
    EXCEPTIONS
       cancelled_by_user       = 1
       data_too_big            = 2
       dim_mismatch_data       = 3
       dim_mismatch_sema       = 4
       dim_mismatch_vkey       = 5
       error_in_hkey           = 6
       error_in_sema           = 7
       file_open_error         = 8
       file_write_error        = 9
       inv_data_range          = 10
       inv_winsys              = 11
       inv_xxl                 = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    please refer this link
    http://www.thespot4sap.com/Articles/Download_to_excel.asp
    Best regards,
    raam

  • Function Modules for uploading the file

    Hi experts ,
                      I have a requirement to download a file (csv) from my local sytem (say desktop) into an internal table first and then update the contents of the same internal table into the database table.
    Can anybody provide me with a sample program for doing the same or at least the name of function modules for the same.
    Prompt replies will be rewarded.
    TIA
    Abhishek

    Hi Abhishek,
    How to use INSERT Statement..
    Check this Sample Program..
    TABLES:MARA.
    DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    ITAB-MATNR = '123ABCDA'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    ITAB-MATNR = '123ABCDB'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    LOOP AT ITAB.
    INSERT MARA FROM ITAB.
    MODIFY MARA .
    ENDLOOP.

  • Function Module for open Purchase Order & Sales Order?

    Hi, commonly I read the data from tables and calculate the open quantity for sales order and purchase order, but I want to know, are there any standard function modules for getting the list of open "purchase order" and "sales order" respectively?
    Thanks and Regards.

    hi Ren,
    u can check all these bapi's related to salesorder
    BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
    BAPI_SALESORDER_CONFIRMDELVRY Sales Order: Confirmation of Delivery; Document Flow Update
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
    BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    May be this FM can help you
    MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)
    Regards,
    Naveen

  • Function module for GL account open items at a key date

    Is there a function module for "GL account open items at a key date" similar to following for customer and vendor accounts?
    BAPI_AR_ACC_GETOPENITEMS Customer account open items at a key date
    BAPI_AP_ACC_GETOPENITEMS Vendor account open items at a key date
    If not, please suggest any alternatives. I am looking to capture the output of FBL3N (GL account line item display) in a program.
    Thank you in advance.
    Prasanna Pujari

    hi,
    please go through the below link i think it will help u.
    http://sapfunctional.com/FI/GL/Balance.
    Regard
    Abhishek Tripathi

  • Function Module for Job reschedule

    Hello Experts,
    Is there a function module for job rescheduling as i need to create a automation program where i need to select all jobs from excel sheet and reschedule at different time.
    Thanks and Regards,
    Nikhil Kanegaonkar.

    You could use the following FM
    - [BP_JOB_READ|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bp_job_read] (read first from TBTCO to fill field JOBCOUNT)
    - [BP_JOB_CREATE|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bp_job_create] (change schedule parameters first)
    - for recent versions [BP_JOB_COPY|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bp_job_copy]
    You should take a look at FM of the FG BTCH and SAP documentation like [Programming with the Background Processing System (BC-CCM-BTC)|http://help.sap.com/saphelp_nwpi71/helpdata/en/fa/096c53543b11d1898e0000e8322d00/frameset.htm]
    Regards,
    Raymond

  • Function Module for creation of variant in BADI

    I need to create a variant to store shipment no's which are coming in BADI. And variant need to be passed to a report which has to be run  Background. can anyone help me out how to do it. Can anyone know the function module for this.

    Hi Anirban,
    Use the bapi BAPI_BUSPROCESSND_CREATEMULTI to achieve the same.
    <b>Reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Function module for getting the all PO waiting for release

    Hi,
    Is there any standard Function module for gettting all the PO's which all waiting for release.
    Regards
    Bala.

    hi Bala,
    ECC 6.0 Exits for VA01
    go through the above link i think that will help u...
    Regards,
    sindhu.

Maybe you are looking for

  • App V 5.0 Sequence - Lync 2013 Client

    Hello, Could you please help me find sequencing steps to virtualize Lync 2013 Client (Basic/Enterprise) using App-V 5.0 SP2? Regards, Srinivasa Prasad

  • Problems saving to pdf files with adobe acrobat on imac

    I have just installed and activated Adobe Acrobat 9.0 on my new iMac OS X 10.8.2, but it keeps coming up with an error message when trying to save a powerpoint presentation to a pdf file. I have downloaded all updates, painfully, one by one, from 9.1

  • Why cant i purchase clash of the clans gems

    i have linked a credit card, i have tried so many things.. this is very frustrating im trying to purchase an ingame item because i play a lot and yeah .. reset my ipod and everything..

  • Pb with the layout tab in WAD

    Hi, I have a problem in the WAD. When I create or modify a web template, i cannot use the layout tab (I have no error msg...). I have the possibilty to use the others tabs (XHTM or Overview) but not the layout tab. It's problematic because I cannot c

  • Exectue a function at the beginning

    Hi, I need some help here, I have an action in my backing page that reads an xml file and creates menus, and I would want to execute this action right after the jspx page is created or during the creation. I don't want to use neither appModule nor th