Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting dump. ''

former_member623843
Participant
0 Kudos

I am getting dump while running this program. Here I am maintaining the input data in text file in my PC. Even though I am getting dump.

Error message:

Runtime Error CALL_FUNCTION_CONFLICT_TYPE

Exception CX_SY_DYN_CALL_ILLEGAL_TYPE

Occurred on 09.03.2009 at 11:36:45

Type conflict when calling a function module.

program:

DATA: BEGIN OF itab OCCURS 0,
        matnr(10),
        werks(4),
        lgort(4),
      END OF itab.


PARAMETERS: p_file LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  CALL FUNCTION 'F4_FILENAME'
   EXPORTING
     program_name        = syst-cprog
     dynpro_number       = syst-dynnr
*   FIELD_NAME          = ' '
   IMPORTING
     file_name           = p_file .


START-OF-SELECTION.

  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                      = p_file
*         FILETYPE                      = 'ASC'
     has_field_separator           = 'X'
*         HEADER_LENGTH                 = 0
*         READ_BY_LINE                  = 'X'
*         DAT_MODE                      = ' '
*       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-matnr, itab-werks, itab-lgort.
  ENDLOOP.

Please:

Use Code tags

Use a better subject- "Getting a dump" is what a user would say.

Moved to the correct forum

Edited by: Rob Burbank on Mar 9, 2009 9:35 AM

5 REPLIES 5

Former Member
0 Kudos

HI,

p_file is of type rlgrap-filename. What you need to do is you need to declare the field with string type and pass to Fm.

DATA : l_string TYPE string.

l_string = p_file

CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_string

FILETYPE = 'ASC' 
has_field_separator = 'X'

HEADER_LENGTH = 0 
READ_BY_LINE = 'X' 
DAT_MODE = ' ' 
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.

Mohamed_Mukhtar
Active Contributor
0 Kudos

hi,


DATA: BEGIN OF itab OCCURS 0,
        matnr(10),
        werks(4),
        lgort(4),
      END OF itab.

data : lv_path type string  "---->  Declare a variable of type string
 
PARAMETERS: p_file LIKE rlgrap-filename.
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
 
  CALL FUNCTION 'F4_FILENAME'
   EXPORTING
     program_name        = syst-cprog
     dynpro_number       = syst-dynnr
*   FIELD_NAME          = ' '
   IMPORTING
     file_name           = p_file .
 
 
START-OF-SELECTION.
 
lv_path = p_file.

  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                      = lv_path "-------> replace p_file with lv_path
*         FILETYPE                      = 'ASC'
     has_field_separator           = 'X'
*         HEADER_LENGTH                 = 0
*         READ_BY_LINE                  = 'X'
*         DAT_MODE                      = ' '
*       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-matnr, itab-werks, itab-lgort.
  ENDLOOP.

Thanks & REgards

0 Kudos

Thanks to all...

Former Member
0 Kudos

Modified Code:

DATA: BEGIN OF itab OCCURS 0,

matnr(10),

werks(4),

lgort(4),

END OF itab.

PARAMETERS: p_file LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

  • FIELD_NAME = ' '

IMPORTING

file_name = p_file .

START-OF-SELECTION.

Data : g_fname type string. "santosh

move p_file to g_fname. "santosh

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = g_fname "santosh

  • FILETYPE = 'ASC'

has_field_separator = 'X'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • 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-matnr, itab-werks, itab-lgort.

ENDLOOP.

Former Member
0 Kudos

Hi Mahaboob,

Check the data types of the importing parameter FILE_NAME in the FM F4_FILENAME and the data type of the exporting parameter FILENAME in the FM GUI_UPLOAD. They both appear to be different. You are getting the value of p_file from F4_FILENAME and passing the same to GUI_UPLOAD. And that is the reason why you are getting the type conflict error.

Try to pass the correct format to the FM's and this would solve.

Regards,

Swapna.