on 05-03-2006 9:37 AM
Hi Gurus,
Has someone a simple ABAP code for InfoPackage from Flat File for:
1) Create Routine for name of the file (Tab External Data).
2) Subsequent Process (Tab Schedule).
Thnaks in advance.
Riccardo.
hi Riccardo,
not sure understand your question correctly
attached sample code to upload with selection from file.
info for file etc stored in table RSLDPSEL
hope this helps.
data: debug_flag(1),
l_idx like sy-tabix,
begin of it_kunnr occurs 0,
kunnr(10),
end of it_kunnr.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'c:\upload\customer'
FILETYPE = 'ASC'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = it_kunnr
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
*do.
if debug_flag = 'X'.
exit.
endif.
*enddo.
read table l_t_range with key
fieldname = 'KUNNR'.
l_idx = sy-tabix.
*....
DELETE l_t_range
WHERE iobjnm = '0CUSTOMER'
and fieldname = 'KUNNR'.
L_t_RANGE-SIGN = 'I'.
L_t_RANGE-OPTION = 'EQ'.
loop at it_kunnr.
L_t_RANGE-LOW = it_kunnr-kunnr.
append l_t_range.
endloop.
modify l_t_range index l_idx.
p_subrc = 0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi A.H.P.
Thank for your answer.
Another related question:
I' ve in directory a list of Flat File named "customer_aaaammgg" and I want to upload the last file on the base of the date. Is it possible from the routine in InfoPackage make this selection ?
And if it is possible would you please send me the code ?
Thanks in advance.
Riccardo.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.