Calling GUI_DOWNLOAD Function

i would like to store my internal table into my local disk , there are two functions GUI_DOWNLOAD and WS_DOWNLOAD.
how do i call these functions.
if i want to specify the file name in my selection screen what should be the data type of the file name.
when i call the function GUI_DOWNLOAD , there is an error saying mismatch of datatype of filename.

Dear Rajarshi,
  I gave the file name as a paramater with type c length 30 , but it is still showing the same error
The message is given below --
'The function Module interface allows you to specify only fields of a particular type under"FILENAME". The field PATH specified here has a different field type'
Please do suggest some solution.
Regards
Arun

Similar Messages

  • Issue with gui_download function module

    Hi All,
             I have an issue with gui_download function module that it is creating one extra line while downloading my internal table data into text file,which i donot want.i have searched for various threads but couldnot get the proper reply.Or please provide me some other Function Module which will not create one extra line.Please help.

    part 2
    INCLUDE RPPPXD00.
    DATA : BEGIN OF COMMON PART A.
    INCLUDE RPPPXD10.
    DATA : END OF COMMON PART.
    INCLUDE PC2RXTW0.
    INCLUDE RPC2RX00.
    DATA : BEGIN OF COMMON PART B.
    INCLUDE RPC2CD00.
    DATA : END OF COMMON PART.
    INCLUDE RPPPXM00.
    INCLUDE RPCMGR00.
    AT SELECTION-SCREEN OUTPUT.
      CONCATENATE SY-DATUM2(6) SY-UZEIT0(4) INTO REF_NO.
      LOOP AT SCREEN.
        IF R1 = 'X'.
          IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
             SCREEN-NAME = 'BTC'  OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
            SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT'"SOC BY ANKITA"
           OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
           OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
           OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
           OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
           OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
           OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
           OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
           OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        IF R2 = 'X'.
          IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
             SCREEN-NAME = 'BTC'  OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
             SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
             OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
             OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
             OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
             OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
             OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
             OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
             OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        IF R3 = 'X'.
          IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
            OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
            OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
            OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
            OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
            OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
            OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
            OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
            OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
            OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
            OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        IF R4 = 'X'.
          IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'"SOC BY ANKITA
             OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'BTC'  OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    START-OF-SELECTION.
      SELECT SINGLE * FROM T549Q WHERE PERMO = '01'
                                 AND   PABRJ = PRD+0(4)
                                 AND   PABRP = PRD+4(2).
      FR_DT = T549Q-BEGDA.
      TO_DT = T549Q-ENDDA.
      CONCATENATE FR_DT0(4) FR_DT4(2) INTO FR_P.
      CONCATENATE TO_DT0(4) TO_DT4(2) INTO TO_P.
      PN-PAPER = PRD.
      PN-PERMO = '01'.
    GET PERNR.
      RP-PROVIDE-FROM-LAST P0003 SPACE PN-BEGDA PN-ENDDA.
      RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ 1.
       SN = SN + 1.
       ITAB1-SNO = SN.
       ITCC-SNO = SN.
        ITAB1-ENO = PERNR-PERNR.
        ITAB1-NAM = PERNR-ENAME.
      ELSE.
        REJECT.
      ENDIF.
      RP-INIT-BUFFER.
      RP-SEL-CALC.
      CALL FUNCTION 'RP_EVALUATION_PERIODS'
        EXPORTING
          LAST_CALCULATED_DAY = P0003-ABRDT
          LAST_DAY_IN_PERIOD  = TO_DT
          RETROCALCULATED_DAY = RP-SEL-CALC-RRDAT
        TABLES
          DIR                 = RGDIR
          EVP                 = EVP
        EXCEPTIONS
          RGDIR_EMPTY         = 1
          INTERNAL_ERROR      = 2
          OTHERS              = 3.
      DESCRIBE TABLE EVP LINES LIN.
      IF LIN > 0.
        LOOP AT EVP.
          IF EVP-IAPER = TO_P AND EVP-PAPER = TO_P.
            RX-KEY-PERNR = PERNR-PERNR.
            UNPACK EVP-SEQNR TO RX-KEY-SEQNO.
            RP-IMP-C2-TN.
            READ TABLE BT INDEX 1.
            READ TABLE WPBP INDEX 1.
            READ TABLE TAX INDEX 1."CHANGES BY ANKITA
            ITAB1-BAC = BT-BANKN.
            ITAB1-BKEY = BT-BANKL .
            ITAB1-DEP = WPBP-KOSTL.
            ITAB1-BETRG = BT-BETRG."CHANGES BY ANKITA
            ITAB1-TAXID = TAX-TAXID."CHANGES BY ANKITA
            YEAR = VERSC-PAYDT+0(4) - 11.
            MONTH = VERSC-PAYDT+4(2).
            DAY = VERSC-PAYDT+6(2).
            CONCATENATE YEAR MONTH DAY INTO ITAB1-PDT.
           ITAB1-PDT = VERSC-PAYDT - 110000.
            ITCC-DEP = WPBP-KOSTL.
            LOOP AT RT WHERE LGART = '/559'.
              ITAB1-BTFR = RT-BETRG.
              ITCC-BTFR = RT-BETRG.
             IF EVP-SRTZA = 'P'.
               ITAB1-BTFR = ITAB1-BTFR - RT-BETRG.
             ELSE.
               ITAB1-BTFR = ITAB1-BTFR + RT-BETRG.
             ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
      APPEND: ITAB1, ITCC.
      CLEAR: ITAB1, ITCC.
    END-OF-SELECTION.
      CONCATENATE 'Prepared By:' ` ` PREPBY INTO PREPBY.
      CONCATENATE 'Approved By:' ` ` APROBY INTO APROBY.
      IF R1 = 'X'.
        FORMAT COLOR 2.
        ULINE (127).
        NEW-LINE.
        WRITE: 2 'Sr No.', 10 'Emp Num', 27 'Name'.
        WRITE: 57 'Department'.
        WRITE: 72 '  Transfer Amount' RIGHT-JUSTIFIED.
        WRITE: 92 'Bank Key', 107 'Bank AC. Number'.
        WRITE:1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
        NEW-LINE.
        ULINE (127).
        NEW-LINE.
        FORMAT COLOR OFF.
        LOOP AT ITAB1.
          SN = SY-TABIX.
          WRITE: 2 SN, 10 ITAB1-ENO, 27 ITAB1-NAM.
          WRITE: 57 ITAB1-DEP.
          WRITE: 72 ITAB1-BTFR.
          WRITE: 92 ITAB1-BKEY, 107 ITAB1-BAC.
          WRITE: 1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
          ULINE (127).
          NEW-LINE.
        ENDLOOP.
        SKIP 4.
        ULINE 90(32).
        NEW-LINE.
        WRITE: 90 PREPBY.
        SKIP 4.
        ULINE 90(32).
        NEW-LINE.
        WRITE: 90 APROBY.
      ENDIF.
      IF R2 = 'X'.
        LOOP AT ITCC.
          COLLECT ITCC INTO ITCOL.
        ENDLOOP.
        FORMAT COLOR 2.
        ULINE (44).
        NEW-LINE.
        WRITE:2 'Sr No.', 9 'Department'.
        WRITE: 27 'Transfer Amount  ' RIGHT-JUSTIFIED.
        WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
        NEW-LINE.
        ULINE (44).
        NEW-LINE.
        FORMAT COLOR OFF.
        LOOP AT ITCOL.
          SN = SY-TABIX.
          WRITE: 2 SN, 9 ITCOL-DEP, 27 ITCOL-BTFR.
          WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
          NEW-LINE.
          ULINE (44).
          NEW-LINE.
        ENDLOOP.
      ENDIF.
      IF R3 = 'X'.
        LOOP AT ITAB1.
          CLEAR: ITTF, P3, P11, P13, P6, V_BAC.
          LEN = STRLEN( ITAB1-BKEY ).
          IF LEN < 3.
            CONCATENATE ITAB1-BKEY '***' INTO P3.
          ELSE.
          LEN = LEN - 3.
            LEN = 3.
            P3 = ITAB1-BKEY+LEN(3).
          ENDIF.
          CLEAR LEN.
          V_BAC = ITAB1-BAC.
          REPLACE ALL OCCURRENCES OF '-' IN ITAB1-BAC WITH ''.
          CONDENSE ITAB1-BAC NO-GAPS.
          LEN = STRLEN( ITAB1-BAC )."if length of acc num > limit
          IF LEN > 11.
            IT_FAIL-EN = ITAB1-ENO.
            IT_FAIL-BA = V_BAC.
            APPEND IT_FAIL.
            CLEAR: IT_FAIL.
            CONTINUE.
          ENDIF.
          P11 = ITAB1-BAC.
          CONCATENATE P11 '***********' INTO P11.
    above step is for putting '' in place of unfilled chars of P11.
          P13 = ITAB1-BTFR * 100.
          P6 = ITAB1-PDT+2(6).
          CONCATENATE ` ` P3 P11 BTC P13 P6 INTO STR.
          ITTF-ROW = STR.
          APPEND ITTF.
        ENDLOOP.
        IF ITTF[] IS NOT INITIAL.
          CONCATENATE FLN SY-DATUM SY-UZEIT '.txt' INTO FILEPATH.
          CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            FILENAME                        = FILEPATH
            FILETYPE                        = 'ASC'
         WRITE_FIELD_SEPARATOR           = 'X'
            TABLES
            DATA_TAB                        = ITTF
         OTHERS                          = 22
          SKIP 2.
          IF SY-SUBRC <> 0.
            WRITE:/ 'Unable to Download file at ', FILEPATH.
          ELSE.
            WRITE:/ 'File with following data downloaded at ', FILEPATH.
            NEW-LINE.
            SKIP 2.
            LOOP AT ITTF.
              WRITE:/ ITTF.
            ENDLOOP.
          ENDIF.
        ELSE.
          WRITE 'No Data, no file was downloaded'.
        ENDIF.
        IF IT_FAIL[] IS NOT INITIAL.
          SKIP 2.
          FORMAT COLOR 2.
          WRITE 'Acc. No. of following employees exceeded the length limit'.
          WRITE:/ 'So their entry was not created in the file'.
          SKIP 1.
          WRITE : 'Employee Number', 20 'Bank Acc. No.'.
          FORMAT COLOR OFF.
          LOOP AT IT_FAIL.
            NEW-LINE.
            WRITE : IT_FAIL-EN, 20 IT_FAIL-BA.
          ENDLOOP.
        ENDIF.
      ENDIF.
      IF R4 = 'X'."CHANGES BY ANKITA
        WRITE:/ 'ERROR LOG - BANK A/C NO. CONTAINS ALPHANUMERIC'.
        WRITE:/ 'EMPID' COLOR COL_POSITIVE,12 '|',15 'Receiving Bank Code' COLOR COL_POSITIVE,
                                                                      40 '|','Receiver A/C No' COLOR COL_POSITIVE.
        PERFORM EXTRACT_DATA.
        SKIP 2.
      ENDIF."EOC
      RP-READ-PAYROLL-DIR.
    Edited by: ANKITA BHARDWAJ on Dec 9, 2009 10:36 AM

  • Type mismatch when calling gui_download

    Hello experts
    i written a test gui upload and downlaod program . program gives run time error  saying type mismatch in function call gui_download  .
    REPORT  ZCR_UPLOAD_DOWNLOAD .
    TABLES: SSCRFIELDS.
    TYPES:  BEGIN OF TY_STUDENT,
            ID TYPE ZSTUDENTDATA1-ID,
            NAME TYPE ZSTUDENTDATA1-NAME,
            COURSE TYPE ZSTUDENTDATA1-COURSE,
            DOJ TYPE ZSTUDENTDATA1-DOJ,
            ADDRESS TYPE ZSTUDENTDATA1-ADDRESS,
            END OF TY_STUDENT.
    DATA : IT_STUDENT TYPE TABLE OF TY_STUDENT,
           WA_STUDENT TYPE TY_STUDENT.
    DATA : FILE_NAME TYPE IBIPPARMS-PATH.
    selection-screen BEGIN OF BLOCK BK1 WITH FRAME TITLE TXT-001.
    PARAMETERS : P_FILE(30) TYPE C.
    PARAMETERS: UPLOAD RADIOBUTTON GROUP rad  DEFAULT 'X',
                DOWNLOAD RADIOBUTTON GROUP rad.
    SELECTION-SCREEN END OF BLOCK BK1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    FILE_NAME = P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    * EXPORTING
    *   PROGRAM_NAME        = SYST-CPROG
    *   DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = FILE_NAME.
    START-OF-SELECTION.
    IF UPLOAD = 'X'.
    PERFORM GUI_UPLOAD.
    ELSE.
    PERFORM DATA_RETRIEVE.
    PERFORM GUI_DOWNLOAD.
    ENDIF.
    FORM GUI_UPLOAD .
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILE_NAME
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = '#'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = IT_STUDENT
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    UPDATE ZSTUDENTDATA1 FROM TABLE IT_STUDENT.
    ENDFORM.                    " GUI_UPLOAD
    FORM DATA_RETRIEVE .
        SELECT ID
               NAME
               COURSE
               DOJ
               ADDRESS
               INTO TABLE IT_STUDENT FROM ZSTUDENTDATA1.
    ENDFORM.                    " DATA_RETRIEVE

    Hello sir
    Thanks for quick response.
    At first i declared same data type as filename field of FM f4_filename so i declare
    DATA : FILE_NAME TYPE IBIPPARMS-PATH.
    at selection screen the data type is
    PARAMETERS : P_FILE(30) TYPE C.
    then i assigned to FILE_NAME
    NOW i am assignig  field  FILENAME   of gui_download  to it but the data type of filename is string . should i covert the type of
    FILE_NAME TO STRING BEFORE ASSIGNING THE VALUE PLEASE SUGGEST.
    THANKS IN ADVANCE
    CHITTA RANJAN MAHATO

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

  • How to get field separator in flat file using GUI_DOWNLOAD function

    hi,
    how to get field separator in flat file using GUI_DOWNLOAD function.
                                    thanking you.

    Hi,
      Use WRITE_FIELD_SEPARATOR = 'X'.
      Check this sample code
    REPORT  z_file_download.
    DATA: w_name(90) TYPE c.
    DATA:
      BEGIN OF fs_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        price    LIKE sflight-price,
        currency LIKE sflight-currency,
      END OF fs_flight.
    DATA:
      BEGIN OF fs_head,
        carrid(10) TYPE c,
        connid(10) TYPE c,
        fldate(10) TYPE c,
        price(10) TYPE c,
        curr(10) TYPE c,
      END OF fs_head.
    DATA:
      t_head LIKE
       TABLE OF
             fs_head.
    DATA:
      t_flight LIKE
         TABLE OF
               fs_flight.
    fs_head-carrid = 'CARRID'.
    fs_head-connid = 'CONNID'.
    fs_head-fldate = 'FLDATE'.
    fs_head-price  = 'PRICE'.
    fs_head-curr   = 'CURRENCY'.
    APPEND fs_head TO t_head.
    SELECT-OPTIONS:
      s_carrid FOR fs_flight-carrid.
    START-OF-SELECTION.
      SELECT carrid
             connid
             fldate
             price
             currency
        FROM sflight
        INTO TABLE t_flight
       WHERE carrid IN s_carrid.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        filename                      = 'D:\flight.xls'
       FILETYPE                      = 'ASC'
    *   APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    *   CONFIRM_OVERWRITE             = ' '
    *   NO_AUTH_CHECK                 = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   WRITE_BOM                     = ' '
    * IMPORTING
    *   FILELENGTH                    =
      tables
        data_tab                      = t_head
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'D:\flight.xls'
          filetype                = 'ASC'
          append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_flight
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc EQ 0.
        MESSAGE 'Download successful' TYPE 'I'.
      ENDIF.
      IF sy-subrc <> 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • How to optimize GUI_DOWNLOAD function I am using...

    Hi,
    I have got 54 internal tables populated at the end of the report.
    I am using GUI_DOWNLOAD Function to download the data in flat files each corresponding to one internal table.
    Now in GUI_DOWNLOAD Function, I know I have to mention name of file and name of table as follows:
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = filenam
        WRITE_FIELD_SEPARATOR           = ' '
      FILETYPE                        = 'ASC'
      APPEND                          = ' '
      TABLES
        DATA_TAB                        = ITAB1.
    Now I do not want to code GUI_DOWNLOAD 54 times since there are 54 internal tables and I have to mention the name of table always in DAT_TAB parameter.
    How can I achieve this ?

    Hi,
    Probably have three parameters for the subroutine..
    perform download tables PTRVTGPER
    <b>* Folder - File path</b>
                              using 'Concatenate '
    bma-files-06\redirectedfolders$\tushar.shah\Desktop\TREATY_TABLE_DATA\'
    <b>* File name</b>                                  
                                       'PTRVTGPER.txt'.
    FORM download tables itab
                             using  folder
                                       fname.
    IF NOT ITAB[] IS INITIAL.
    <b>  Concatenate folder fname INTO fname.</b>
    Call the FM GUI_DOWNLOAD..
    ENDIF.
    ENDFORM.
    Is this what you want??
    Thanks,
    Naren

  • CNTL_ERROR while calling a function module from Java webdynpro

    I am calling a RFC function module from javawebdynpro app
    which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
    Any help on this is highly appreciated

    Good catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
    Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
    DATA:
          SOURCEVAL TYPE  /BIC/OIINVQTY,
          SOURCEUOM TYPE  /BIC/OIUSUOM,
          USITM TYPE  /BIC/OIUSITM,
          TARGETUOM TYPE  /BIC/OIUSUOM,
          CONVERTED_COST TYPE  /BIC/OIINVQTY.
    DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
    " get the Production UOM
        SELECT SINGLE I~/BIC/USPRDUOM
          FROM /BIC/PUSITM AS I
          INTO PRODUCTION_UOM
          WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
        IF ( SY-SUBRC = 4 ). " no records found
          "RAISE PARTNO_NOT_FOUND.
          RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
        ENDIF.
    " load the parameters
        SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
        SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
        USITM = SOURCE_FIELDS-/BIC/USITM.
    " then you can call the FM
        CALL FUNCTION 'Z_CA_CONVERT_US_COST'
          EXPORTING
            PSOURCEVAL                = SOURCEVAL
            PSOURCEUOM                = SOURCEUOM
            PUSITM                    = USITM
            PTARGETUOM                = PRODUCTION_UOM
          IMPORTING
            PTARGETVAL                = CONVERTED_COST
          EXCEPTIONS
            CONVERSION_NOT_MAINTAINED = 1
            PARTNO_NOT_FOUND          = 2
            OTHERS                    = 3.
    " ... [do the rest]
    Thanks for your help,
    Dennis

  • Error while calling a function.

    Hi,
    below is my callable statement through which am calling a function which returns the service years of a person with personid as parameter.
    But dont know why am getting an error which is returning the serviceyrs as 0.
    when i try to debug, the problem is in this statement
    System.out.println("the output1 is "+cs.getInt(1));
    is there any problem with my code.
    please look the code below
    thanks
    kumar
    OADBTransaction txn=getOADBTransaction();
    OracleCallableStatement cs = (OracleCallableStatement) txn.createCallableStatement("begin :1:=LMIG_UTILITY_PKG.GET_TOTAL_SERVICE(p_person_id => :2); end;",1);
    try
    cs.registerOutParameter(1,Types.INTEGER);
    cs.setInt(2,Integer.parseInt(pid));
    System.out.println("person id is "+pid);
    System.out.println("the output1 is "+cs.getInt(1));
    cs.execute();
    serviceyrs= cs.getInt(1);
    cs.close();
    catch(SQLException sqle)
    System.out.println("ERROR"+sqle.toString());
    System.out.println("Service years are "+serviceyrs);

    Hi, Guess u are missing the connection to the JDBC call.
    Try the following...it worked for me..
    Connection conn = this.getOADBTransaction().getJdbcConnection();
    OracleCallableStatement ocs = null;
    String param = null;
    try {       
         String stmt = "BEGIN :1 := <PkgName>.<FunctionName>(:2); end;";
         ocs = (OracleCallableStatement)conn.prepareCall(stmt);
         ocs.registerOutParameter(1, OracleTypes.CHAR);
         ocs.setString(2, <param>);
         ocs.execute();
         param = ocs.getString(1);
    } catch(SQLException se)
    {       throw OAException.wrapperException(se);    
    finally
         try {               
              ocs.close();
              return(param);
         } catch(Exception e)
              throw OAException.wrapperException(e);
    }

  • Can we call a function module in ADHOC query

    Hi
    Can we call a function module in ADHOC query if yes how.
    Also we ned to know how to call a function module in SAP query.
    An early responce is appreciated.
    Thanks and best regards
    Rajeev

    Okay as far as I understand your aim is:
    To fill a field in the output list with a value that is based on the current line information and calculated by a function module
    So go to SQ02 and create an additional field in the InfoSet.
    You can refer in the coding to the technical names you can see in the left tree window like P0000-PERNR.
    More information is avaiable in the Help part look for additional field in SQ02.
    Regards,
    Michael

  • Upload data from excel with vba by calling a function module

    Hello all,
    i have a problem with the function module "ALSM_EXCEL_TO_INTERNAL_TABLE". I will call this function module with vba to load data from excel to sap with a Buttonclick. I have copied this function module and set it remotable. But i can´t call it from excel.
    Can you give me some tips how can i
    upload data from excel with vba by click a button.
    The problem seems the function: call method cl_gui_frontend_services=>clipboard_import in the function module, because when i comment this function call the vba-call is true but no results. 
    How can I call the function module correct with vba?
    Thanks a lot for your tips!!!!
    Chris
    Message was edited by:
            Christoph Kirschner

    HI
    Uploading data directly from Excel file format
    * Upload data direct from excel.xls file to SAP
    REPORT ZEXCELUPLOAD.
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program
    <b>Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT</b>
    *Title : Excel Uploading
    TYPES:   BEGIN OF t_datatab,
             col1(25)  TYPE c,
             col2(30)  TYPE c,
             col3(30)  TYPE c,
             col4(30)  TYPE c,
             col5(30)  TYPE c,
             col6(30)  TYPE c,
             col7(30) TYPE c,
             col8(30)  TYPE c,
             col9(30)  TYPE c,
             col10(30)  TYPE c,
             col11(30)    TYPE c,
           END OF t_datatab.
    DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
          wa_datatab TYPE t_datatab.
    Data : p_table type t_datatab occurs 0 with header line.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '1',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    DATA: it_tab TYPE filetable,
          gd_subrc TYPE i.
    field-symbols : <fs>.
    *Selection screen definition
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_file LIKE rlgrap-filename
                   DEFAULT 'c:test.xls' OBLIGATORY.   " File Name
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      REFRESH: it_tab.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select File'
          default_filename = '*.xls'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      LOOP AT it_tab INTO p_file.
    *    so_fpath-sign = 'I'.
    *    so_fpath-option = 'EQ'.
    *    append so_fpath.
      ENDLOOP.
    START-OF-SELECTION.
      PERFORM upload_excel_file TABLES   it_datatab
                                 USING   p_file
                                         gd_scol
                                         gd_srow
                                         gd_ecol
                                         gd_erow.
    * END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3,
                wa_datatab-col4,
                wa_datatab-col5,
                wa_datatab-col6,
                wa_datatab-col7,
                wa_datatab-col8,
                wa_datatab-col9,
                wa_datatab-col10,
                wa_datatab-col11.
      ENDLOOP.
    *&      Form  UPLOAD_EXCEL_FILE
    *       upload excel spreadsheet into internal table
    *      -->P_TABLE    Table to return excel data into
    *      -->P_FILE     file name and path
    *      -->P_SCOL     start column
    *      -->P_SROW     start row
    *      -->P_ECOL     end column
    *      -->P_EROW     end row
    FORM upload_excel_file TABLES   p_table
                           USING    p_file
                                    p_scol
                                    p_srow
                                    p_ecol
                                    p_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
    * Has the following format:
    *             Row number   | Colum Number   |   Value
    *      i.e.     1                 1             Name1
    *               2                 1             Joe
      DATA : ld_index TYPE i.
    * Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename                = p_file
          i_begin_col             = p_scol
          i_begin_row             = p_srow
          i_end_col               = p_ecol
          i_end_row               = p_erow
        TABLES
          intern                  = LT_INTERN
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'Error Uploading file'.
        EXIT.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
         MOVE lt_intern-col TO ld_index.
         assign component ld_index of structure
         p_table to <fs>.
    move : lt_intern-value to <fs>.
    *     MOVE lt_intern-value TO p_table.
          AT END OF row.
            APPEND p_table.
            CLEAR p_table.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "UPLOAD_EXCEL_FILE
    Regards
    Pavan

  • /How to call a function in another PowerShell script

    Hi All,
    I want to use dot-sourced method to call the function from other script,While calling Function.ps1 from the second script there is a Null value in the beginning,
    How can we ignore this null value or there is a better approach of doing it without using Import-Module.
    #=======Function.ps1============
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    add $a $b
    #===========End==================
    The second script which has been dot-source to call the function
    #================Main script==========
    . C:\Users\Anirban\Desktop\Tester.ps1 |Out-Null
    add 1 2
    #================================
    Regards,
    Anirban Singha

    Dot Sourcing is adding the function ADD to console environment and the script is acting like a module vs a script with parameters.
    The Add $a $b line should be removed. (Where are $a and $b defined?)
    They are not defined hence, "The Value is " blank line
    #=======Function.ps1============
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    add $a $b
    Should be
    #=======Function.ps1============
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    PS C:\Test> . c:\tester.ps1
    Add 1 2
    Add 3 4
    The value is 3
    The value is 7
    However the add can work without dot sourcing the script file by parameterizing the script
    #=======Function.ps1============
    Param ($a,$b) # Parameters to the script
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    Add $a $b # body of script
    PS C:\Test> 
    C:\Tester.ps1 1 2
    C:\Tester.ps1 3 4
    The value is 3
    The value is 7

  • How to call a C pointer from call library function node

    I have a client/server application which the client I am trying to develop using Labview.  When I use to communicate the server and the client using the program provided by the manufacter, the system works perfectly.
    Now, I am trying to develop a system using labview, because I need to get another things.
    I have the DLL provided by the manufacter and the .h too, so I can check the functions parameters. One of these functions needs to be called using a struct element. Probably, the function's DLL instantiates the elements of this struct.  I use the call library function node to do it.
    When I receive the data, the function returns to me the struct that I passed as a parameter before, and then I can read all the elements of the struct, except the string element that returns nothing. The struct elements that are numerical, I can read them perfectly.
    Another thing that is important to say, is that the string data was not returned in fact by the DLL function that the system calls. I have to pass a pointer (I use it as unsigned 16 in Labview, but I tried before as string and unsigned 8) as a parameter, and this pointer will point to the memory location that the string is. When I try to read what is returned by the function, I can read nothing. The same function returns that the size of data that is returning is 17 bytes.
    How can I solve it?
    Thank you in advance

    Did you take a look at the example that ships with LabVIEW that shows how to do all sorts of data passing to DLLs. I believe your situation is one of the examples listed. You can find the example VI in the "<LabVIEW install directory>\examples\dll\data passing" directory.

  • How to call a function module from the Web Template?

    Hi all,
    how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
    Many thanks for your hints.
    Regards, Nils

    Hi!
    I am too working on a similar issue.
    Probably this helps:
    Re: Calling a function module from a Web Template
    Regards,
    Sri

  • Program making a RFC call to Function Module not working in background

    Hi All,
    I have an ABAP Program which is used to do a reconciliation check between the R/3 and BI system for Invoice Data. Please find below the details of the program flow:
    1.     Program counts the number of records in the DSO table and aggregates the Net_Value based on the date range (passed as parameters)
    2.     Program calls a Function Module (RFC Call) which counts the number of records in the R/3 table and aggregates the Net_Value for the same date range
    3.     Function Module Passes back the count values and aggregated Net_Value to the program
    4.     Program compares the count and aggregated Net_Value from EDWH and MSP systems and sends an email mentioning whether the counts match or not
    However we are facing an issue.
    Whenever, we execute the program in dialog mode, it works fine and fetches results within 5-6 minutes. However if we schedule the program to run in background (parameters through a variant), it gives no results even after running for over 3-4 hours. We tried figuring it out yesterday but could not come to any conclusion. Since there is a RFC call being to the function module, we were wondering if we need to specify some other parameter as well.
    Thanks & Regards
    Dharmendra

    RFC Call is a procedure for executing remote enables function modules. It is done via the 'Remote Enabled' radio button on the function module's attribute screen.

  • Passing arrays with Call Library Function does not work after application builder

    Calling a DLL with Call Library Function which requires an array of data works correctly in Labview, but after building an exe with application builder, the call no longer works.  Dereferecing the pointer in the DLL retuns all 0s and not the actual values.
    Solved!
    Go to Solution.
    Attachments:
    TEST.zip ‏28 KB

    I did not run your code because it is a little unclear to me what it does.
    Two things:
    First, is the DLL you are calling the DLL-ified version of PopUpNames.vi? Then the problem is likely that the panel is not being built into the DLL.
    When LabView builds an application / dll, it strips the front panel and block diagram from all VIs that it doesn't think need to show a panel at run time. This reduces file size and increases code security. The App Builder's panel inclusion logic can be overridden by Build Specifications -> Source File Settings -> Remove front panel. A better method is to put a property node on a control in a window you want to show marking it "visible"; this is sufficient to tell the App Builder it should keep the panel.
    Currently Source File Settings shows "no dependencies" (clearly incorrect---another evil side effect of Express VIs I guess) but if you change the settings as shown below to keep ALL panels, one might hope the App Builder can figure it to keep the panel when it deconstructs the Express VI. (Alternatively convert the Express VI into a regular one.)
    A second comment: I am a bit flummoxed at the larger goal here. You are calling LabView DLL from LabView, which doesn't make a lot of sense, so I assume your larger goal is to call LabView from C or vice-versa. In that case be aware that your DLL is x86 (32-bit) but you are passing 64-bit ints as your pointers. In this case it is 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers calling 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers, so it all works, but if your going to call this from C or whatnot you're going to have to follow that same design.
    When calling C code the LabView Call Library Function does have a "unsigned pointer-sized integer" data type that always appears to be 64 bits in the dev env but which actually passes a 64 or 32-bit int to the DLL depending on the environment. The "pointer sized int" has to be 64 bits in the "LabView" part of the code because LabView's strong typing requires the data type to be determined at compile time. Casting all pointers to the largest data type in LabView makes it possible to write platform-independent code, but down at the Call Library level you still have to put the right number of bytes on the stack.

Maybe you are looking for

  • How to use unicode font in J2ME

    Hi, I want to create some mobile application using Unicode Font in J2ME. Please help me about how to use Unicode Font in J2ME and how to configure Unicode Font in J2ME SDK 3.0 Early Access

  • Collections.. Is this illegal??

    Hello everyone,  So I was checking my credit score and I noticed a big drop on it. I checked why and it shows that an old debt it reporting again.. What happened is that I sent a PFD to a collection agency and ever since that, they started to report

  • Classic Environment & AppleTalk

    How do I activate AppleTalk when I am in Classic Environment? I have an old iMac G3 and I am trying to select a printer in Classic. It says to activate AppleTalk. Don't know how to do it. Any help?

  • Proxy Redirect is not working with anyconnect

    Hi, when users connect to the latest version of anyconnect there proxy server is not reconfigured to use the internal proxy server through the VPN tunnel. this is working for the normal VPN client. but not the anyconnect. Has anyone come accross this

  • Requirements to work on Web DynPro for ABAP

    hi all, what is it required to work on Web DynPro for ABAP. i have got ECC 5.0 installed in my system but i dont find "WebDynpro Comp/Intf" under the "Repository Browser" in SE80(ABAP WorkBech). How should i proceed further?? waiting for replies... R