Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Type conflict when calling a function module.

Hi all

am getting type conflict error when i execute my program.

am using GUI_UPLOAD fm.

here is my code please tell me what is wrong in my code.

REPORT zpr_test02 MESSAGE-ID zmtr_bank LINE-SIZE 679 .

tables: zmonthpay.

data : begin of itab occurs 0,

mnth type zmonthpay-mnth,

ecode type zmonthpay-ecode,

accno type zmonthpay-accno,

end of itab.

selection-screen begin of block b1 with frame title text-001.

parameters: path(60) type c.

selection-screen end of block b1.

at selection-screen on value-request for path.

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

DEF_FILENAME = 'C:\ORDER'

DEF_PATH = 'E:\'

MASK = ',.,..'

MODE = 'O'

TITLE = 'OPEN'

IMPORTING

FILENAME = path

  • RC =

EXCEPTIONS

INV_WINSYS = 1

NO_BATCH = 2

SELECTION_CANCEL = 3

SELECTION_ERROR = 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.

START-OF-SELECTION.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = path

FILETYPE = 'ASC'

  • HAS_FIELD_SEPARATOR = ' '

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

tables

data_tab = itab

  • 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.

LOOP AT ITAB.

WRITE:/ ITAB-ECODE, ITAB-MNTH,ITAB-ACCNO.

ENDLOOP.

Regards

Prajwal.k

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question