04-28-2008 2:26 PM
Hi Experts,
Pls help me with this rek..
Kindly Help me
The commissioning Notification details which is got from Tenet in Excel file should be automatically uploaded to SAP R/3 using the transaction zcs15.
Note : Zcs15 transaction is used to upload the excel file which automatically updates the required SAP tables . The process of getting the excel file from Tenet server and uploading it into ZCS15 should be automized .
Regards
JAYA
Edited by: jaya ec on Apr 28, 2008 3:52 PM
Edited by: Alvaro Tejada Galindo on Apr 28, 2008 1:46 PM
04-28-2008 3:15 PM
Hi,
You can convert your xls to CSV separated ";" and then yse this source code:
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = ls_filename
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
read_by_line = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = lt_file
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_d_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.
MESSAGE e182 WITH p_tarq.
ENDIF.
CALL FUNCTION 'TEXT_CONVERT_CSV_TO_SAP'
EXPORTING
i_field_seperator = ';'
I_LINE_HEADER =
i_tab_raw_data = lt_file
i_filename = p_filename
TABLES
i_tab_converted_data = p_tabela
EXCEPTIONS
conversion_failed = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Fernando
04-28-2008 2:58 PM
Hi,
You need to have more info for starting the transaction..What are the different fields which you might get as part of the EXCEL file is the first thing you need to find..
2) you have to use any of the two FM's
ALSM_EXCEL_TO_INTERNAL_TABLE
CONVERT_XLS_TO_SAP
to read data from the EXCEL to SAP Internal tables
3) Then use a BAPI or an exisitng FM or write a BDC to the Transaction which creates commissioning Notification details in SAP..
this will be the guidelines on which you need to work
santhosh
04-28-2008 3:01 PM
What is your connection to the Tenet Server? Via FTP, internet. Can you access the source from your SAP System?
04-28-2008 3:14 PM
Hi Mike,
Thanks a lot for ur reply.
Reply to ur question-No there is no way that I can connect to Tenet as if now
Regards
Jaya
04-28-2008 3:23 PM
So when there is NO 'physical' connection, than there is no way of retrieving the data from the Tenet server.
There should be some sort of connection between you (SAP server) and tenet Server for you to get this thing working.
Did I read it correctly? What you want to do is retrieving the file from Tenet Server, BEFORE using it to upload to SAP, correct? So not the uploading part into SAP is the problem, but retrieving the file automatically from Tenet Server is the problem.
04-28-2008 6:47 PM
Hi Mike,
The commissioning Notification details which is got from Tenet in Excel file should be automatically uploaded to SAP R/3 using the transaction zcs15.
Here zcs15 is a customised tcode and the screen of this tcode consists of 2 screen parameters
one is name and other one is parameter field where i need to upload the excel file.
They want us to automise the uploading of excel file from Tenet to SAP system.
Kindly help me with this issue.
Thanx a lot in advance
Regrds
Jaya
04-28-2008 7:02 PM
Hi Mike,
Thnks for ur response.
Is there any way that i can retrieve the excel file from Tenet server automatically to SAP server
Regards
Jaya
04-28-2008 3:15 PM
Hi,
You can convert your xls to CSV separated ";" and then yse this source code:
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = ls_filename
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
read_by_line = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = lt_file
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_d_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.
MESSAGE e182 WITH p_tarq.
ENDIF.
CALL FUNCTION 'TEXT_CONVERT_CSV_TO_SAP'
EXPORTING
i_field_seperator = ';'
I_LINE_HEADER =
i_tab_raw_data = lt_file
i_filename = p_filename
TABLES
i_tab_converted_data = p_tabela
EXCEPTIONS
conversion_failed = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Fernando