Skip to Content
0
Former Member
Nov 20, 2008 at 09:24 AM

PREL TO PNNNN

126 Views

Hi I have a proble with this method, the program is this, and the proble is the decimals when i use de method to pass the prel structure to other, because when the prel structure have decimals don't pass this parameters correctly, can you help me please????

REPORT z02_hr_upload.

data: g_fichero(364) OCCURS 0,

g_PREL_DB_TAB type PREL_DB_TAB,

  • g_prel_db_tab type PRELP_TAB,

g_wa_prel_tab type PRELp,

g_wa_t_2002 type Z02_E_2002,

g_wa_prel type prelp.

start-of-selection.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = 'C:\2002h.TXT'

  • FILETYPE = 'ASC'

  • HAS_FIELD_SEPARATOR = ';'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • VIRUS_SCAN_PROFILE =

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

data_tab = g_fichero

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

.

CALL method cl_hr_pannnn_type_cast=>pannnn_to_prel_db_tab

exporting

pannnn_tab = g_fichero

IMPORTING

prel_db_tab = g_PREL_DB_TAB

.

loop at g_PREL_DB_TAB into g_wa_prel_tab.

CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN

EXPORTING

PRELP = g_wa_prel_tab

IMPORTING

PNNNN = g_wa_t_2002.

insert into Z02_MT_PA2002 values g_wa_t_2002.

endloop.