LSMW file upload from presentation server
Hi,
We are using LSMW to create new Document info records and will need to upload/ attach multiple files to the DIR.
everything is working except in the IDOC processing stage, it errors out -
"Error while checking in and storing:
otlta134a\pcm\test1.txt"
Its is unable to upload file from network drive, it works successfully when the same file is uploaded from application server.
I have worked in other LSMW projects and have successfully loaded files from network drive.
Please let me know what configuration setup is required, is it the content server or the gateway server?
Thanks for all your help.
Sheetal,
I think this is the problem due to the authorization....
try to open the file from AL11........... if u r still getting the problem better to contact the basis guys...
If it is the problem with the authorization... once u get this error open another session with SU53 tcode.. take the authorization object and give it to basis guys to allow the permissions to u...
Similar Messages
-
File Upload and Download From Presentation server
I have a requirement to provide a selection option to user to upload a big file from presentation server.
Not sure whther we can a upload the entire file at one short from presentation server. PLease provide some sample code to upload a huge file from presentation server and downlaod a file to presentation server.Hi,
Try this code for download----
TABLES:
kna1. " General Data in Customer Master
TYPES:
BEGIN OF type_s_kna1,
kunnr TYPE kna1-kunnr, " Customer Number
adrnr TYPE kna1-adrnr, " Address
anred TYPE kna1-anred, " Title
erdat TYPE kna1-erdat, " Date on which record created
ernam TYPE kna1-ernam, " Name of Person who Created the
" Object
END OF type_s_kna1.
DATA:
fs_kna1 TYPE type_s_kna1.
DATA:
t_kna1 LIKE
STANDARD TABLE
OF fs_kna1.
" Select-options----
SELECT-OPTIONS:
s_kunnr FOR kna1-kunnr. " Customer Number
AT SELECTION-SCREEN ON s_kunnr.
SELECT kunnr " Customer number
FROM kna1
INTO s_kunnr UP TO 1 ROWS.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE 'No such customer exists' TYPE 'S'.
ENDIF. " IF SY-SUBRC NE 0
START-OF-SELECTION.
PERFORM customer_selection.
FORM customer_selection .
SELECT kunnr " Customer Number
adrnr " Address
anred " Title
erdat " Date of record creation
ernam " Person who created object
FROM kna1
INTO TABLE t_kna1
WHERE kunnr IN s_kunnr.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'C:\TEMP\CUSTOMER.TXT'
FILETYPE = 'ASC'
write_field_separator = 'X'
HEADER = '00'
WRITE_LF = 'X'
col_select = 'X'
col_select_mask = 'XXXXX'
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
IMPORTING
FILELENGTH =
TABLES
data_tab = t_kna1
EXCEPTIONS
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " FORM CUSTOMER_SELECTION.
for upload----
" Table declarations----
TABLES:
bkpf. " Accounting Document Header
TYPES:
BEGIN OF type_s_bkpf,
bukrs TYPE bkpf-bukrs, " Company code
belnr TYPE bkpf-belnr, " Accounting Document Number
gjahr TYPE bkpf-gjahr, " Fiscal Year
blart TYPE bkpf-blart, " Document type
bldat TYPE bkpf-bldat, " Document Date in Document
END OF type_s_bkpf.
DATA:
fs_bkpf TYPE type_s_bkpf.
DATA:
fname(10) TYPE c VALUE 'ACCOUNTING' .
DATA:
t_bkpf LIKE
STANDARD TABLE
OF fs_bkpf.
*" Select-options----
SELECT-OPTIONS:
s_bukrs FOR bkpf-bukrs, " Company code
s_gjahr FOR bkpf-gjahr. " Fiscal year
OPEN DATASET fname FOR OUTPUT IN BINARY MODE .
PERFORM account_selection.
LOOP AT t_bkpf INTO fs_bkpf.
TRANSFER fs_bkpf TO fname.
ENDLOOP. " LOOP T_BKPF
CLOSE DATASET fname.
FORM account_selection .
SELECT bukrs " Company code
belnr " Accounting document number
gjahr " Fiscal year
blart " Document year
bldat " Document date
FROM bkpf
INTO TABLE t_bkpf
WHERE bukrs IN s_bukrs
AND gjahr IN s_gjahr.
ENDFORM. " FORM ACCOUNT_SELECTION
also try
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\TEMP\CUSTOMER.TXT'
FILETYPE = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = t_kna1
EXCEPTIONS
disk_full = 15
dp_timeout = 16
OTHERS = 17
IF sy-subrc EQ 0.
PERFORM customer_display.
ELSE.
MESSAGE 'No customer file exists'(006) TYPE 'S'.
ENDIF. " IF SU-SUBRC EQ 0
Regards,
jaya
Edited by: Jayapradha Neeli on May 28, 2009 11:38 AM -
Copy File from Presentation Server to Application Server in Background
Hi,
I need to copy Image file from Presentation Server to Application Server.
The below given code is workking fine in Foreground but whenevr I am trying to execute in Background, the job is cancelled and I am getting a dump.
data : wa_source type string,
wa_destination type string.
wa_source = 'C:\PARBIND.BMP'.
wa_destination = 'D:\PARBIND.BMP'.
start-of-selection.
call method cl_gui_frontend_services=>file_copy
exporting
source = wa_source
destination = wa_destination
* overwrite = SPACE
* EXCEPTIONS
* cntl_error = 1
* error_no_gui = 2
* wrong_parameter = 3
* disk_full = 4
* access_denied = 5
* file_not_found = 6
* destination_exists = 7
* unknown_error = 8
* path_not_found = 9
* disk_write_protect = 10
* drive_not_ready = 11
* not_supported_by_gui = 12
* others = 13
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
In backgound Error is....
Exception condition "CNTL_ERROR" raised.*
Any solution is appreciated.
Thanks
ArbindHi Arbind,
Just realize... when you run it in foreground, you have a foreground to capture the file location. so it runs fine..
but when you are running it in background, there is no foreground to check that is no gui present... how can it check where the C:\.... location is??
no need of reading any oss note... just see.. the name is cl_GUI_FRONTEND_service.. its only for front end..
u need open dataset, read dataset, close dataset kind of things while running in background. or RFCs to read the file... (search SDN). -
How to search file from presentation server
Hi All,
In a ABAP program i want to display a dialog box which will help me to find out any file from presentation server.That dialog box should be display after clicking on parameter on selection screen.Parameter is a simple variable,not a field from any internal table. so i can not use function module F4IF_INT_TABLE_VALUE_REQUEST
Please suggest me any function module which will satisfy my requirement.
Thank you.Hi,
Check this example..
DATA: T_FILETABLE TYPE FILETABLE.
DATA: RC TYPE I.
DATA: USER_ACTION TYPE I.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = T_FILETABLE
rc = RC
USER_ACTION = USER_ACTION
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks,
Naren -
Read XML file from presentation server
Hi All,
I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = D:\XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
is there any other alternative.
Thanks
Swarup,Hi Swarup,
Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
A sample code snippet :-
PARAMETERS: p_filnam TYPE localfile OBLIGATORY
DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
DATA: l_v_fieldname TYPE dynfnam.
l_v_fieldname = p_filnam.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = l_v_fieldname
IMPORTING
file_name = p_filnam.
START-OF-SELECTION.
TYPES:
BEGIN OF ty_tab,
name TYPE string,
value TYPE string,
END OF ty_tab.
DATA:
lcl_xml_doc TYPE REF TO cl_xml_document,
v_subrc TYPE sysubrc,
v_node TYPE REF TO if_ixml_node,
v_child_node TYPE REF TO if_ixml_node,
v_root TYPE REF TO if_ixml_node,
v_iterator TYPE REF TO if_ixml_node_iterator,
v_nodemap TYPE REF TO if_ixml_named_node_map,
v_count TYPE i,
v_index TYPE i,
v_attr TYPE REF TO if_ixml_node,
v_name TYPE string,
v_prefix TYPE string,
v_value TYPE string,
v_char TYPE char2.
DATA:
itab TYPE STANDARD TABLE OF ty_tab,
wa TYPE ty_tab.
CREATE OBJECT lcl_xml_doc.
CALL METHOD lcl_xml_doc->import_from_file
EXPORTING
filename = p_filnam
RECEIVING
retcode = v_subrc.
CHECK v_subrc = 0.
v_node = lcl_xml_doc->m_document.
CHECK NOT v_node IS INITIAL.
v_iterator = v_node->create_iterator( ).
v_node = v_iterator->get_next( ).
WHILE NOT v_node IS INITIAL.
CASE v_node->get_type( ).
WHEN if_ixml_node=>co_node_element.
v_name = v_node->get_name( ).
v_nodemap = v_node->get_attributes( ).
IF NOT v_nodemap IS INITIAL
* attributes
v_count = v_nodemap->get_length( ).
DO v_count TIMES.
v_index = sy-index - 1.
v_attr = v_nodemap->get_item( v_index ).
v_name = v_attr->get_name( ).
v_prefix = v_attr->get_namespace_prefix( ).
v_value = v_attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
* text node
v_value = v_node->get_value( ).
MOVE v_value TO v_char.
IF v_char <> cl_abap_char_utilities=>cr_lf.
wa-name = v_name.
wa-value = v_value.
APPEND wa TO itab.
CLEAR wa.
ENDIF.
ENDCASE.
* advance to next node
v_node = v_iterator->get_next( ).
ENDWHILE.
LOOP AT itab INTO wa.
ENDLOOP.
Regards
Abhii -
Hello everyone,
I have an requirement to attach an excel file in mail while sending from SAP ABAP. This excel file is a formatted one and its having a proper template which is stored in wwwdata table in sap. My program will pick the file with no changes in format from presentation server i.e. my desktop and will be sent to external email-ids .
I have searched in scn but couldn't get a proper answer which will send the .xls file as attachment with no changes in format of template and data of excel.
Please suggest the approaches how to handle this one.
Regards,
MadhusmitaI have read those two help file and was able to use it in the ABAP proxy code. Thanks.
This is the current outcome. I totally understand that SAP PI communicates via XML. So when PI picks up a file that contains XML tags, the Inbound proxy is triggered. I can see its processing in SM50. However, when I give the Sender FTP adapter a non-XML file to pick up, the Inbound Proxy does not trigger. The file itself should be read into memory so that I can save it to the application server via ABAP code (with no mapping). That is why there is no operation mapping
The reason I am using using FTP to ABAP proxy is because I need to call a subsequent RFC step to process the file. Else, I will just use FTP to File Adapter scenario.
Question 1: I am thinking that that file is the attachment. Is that where I am incorrect and I still need to send in an XML file with the attachment as an addition?
Question 2: Is this the best approach or should I use BPM? If BPM, what steps do I need? -
Issue in material master update from presentation server using BAPI....
Hi Guru's...
i am trying to change the material master from presentation server (desktop flat file)
using BAPI(BAPI_MATERIAL_SAVEDATA) ....
while executing my program i am getting the message like material had changed...
but while in mm02 i am un able to fine the updates...
please find below program logic and correct me if any mistakes....
thanks in advance...
*& Report ZAREPAS36
REPORT zarepas36.
DATA : gs_bapimathead TYPE bapimathead,
gs_clientdata TYPE bapi_mara,
gs_clientdatax TYPE bapi_marax.
TYPES : BEGIN OF gty_itab1,
matnr(18),
matkl(9),
spart(2),
ntgew(13),
gewei(3),
meins(3),
END OF gty_itab1.
DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
gwa_itab1 TYPE gty_itab1.
TYPES: BEGIN OF gty_itab2,
abc(132),
END OF gty_itab2.
DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
gwa_itab2 TYPE gty_itab2.
flat file at selection screen
PARAMETERS: p_files TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_files
filetype = 'ASC'
CHANGING
data_tab = gt_itab2
EXCEPTIONS
OTHERS = 8.
LOOP AT gt_itab2 INTO gwa_itab2.
IF gwa_itab2-abc(1) = 'S'.
gwa_itab1 = gwa_itab2-abc(132).
APPEND gwa_itab1 TO gt_itab1.
ENDIF.
ENDLOOP.
loop at gt_itab1 into gwa_itab1.
*Material
gs_bapimathead-material = gwa_itab1-matnr.
*Material details at client data
*material group.
gs_clientdata-matl_group = gwa_itab1-matkl.
gs_clientdatax-matl_group = 'X'.
*Division
gs_clientdata-division = gwa_itab1-spart.
gs_clientdatax-division = 'X'.
*Net Weight
gs_clientdata-net_weight = gwa_itab1-ntgew.
gs_clientdatax-net_weight = 'X'.
*Unit of Weight
gs_clientdata-unit_of_wt = gwa_itab1-gewei.
gs_clientdatax-unit_of_wt = 'X'.
*Base Unit of Measure
gs_clientdata-base_uom = gwa_itab1-meins.
gs_clientdatax-base_uom = 'X'.
endloop.
*calling BAPI for making changes in material and saving thru BAPI.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = gs_bapimathead
clientdata = gs_clientdata
clientdatax = gs_clientdatax.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE: / 'Error occured while changing material'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'material',gs_bapimathead-material,'changed'.
ENDIF.hi hello Guru's
i resolved the issuee..
pleaso go thru the below proram logic for your reference..........
*& Report ZAREPAS36
REPORT zarepas36.
DATA : gs_bapimathead TYPE bapimathead,
gs_clientdata TYPE bapi_mara,
gs_clientdatax TYPE bapi_marax.
TYPES : BEGIN OF gty_itab1,
matnr(18),
matkl(9),
spart(2),
ntgew(13),
gewei(3),
meins(3),
END OF gty_itab1.
DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
gwa_itab1 TYPE gty_itab1.
TYPES: BEGIN OF gty_itab2,
abc(132),
END OF gty_itab2.
DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
gwa_itab2 TYPE gty_itab2.
DATA:ls_return TYPE bapiret2,
lt_bapiret2 TYPE standard table of bapiret2.
flat file at selection screen
PARAMETERS: p_files TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_files
filetype = 'ASC'
CHANGING
data_tab = gt_itab2
EXCEPTIONS
OTHERS = 8.
LOOP AT gt_itab2 INTO gwa_itab2.
IF gwa_itab2-abc(1) = 'S'.
gwa_itab1 = gwa_itab2-abc(132).
APPEND gwa_itab1 TO gt_itab1.
ENDIF.
ENDLOOP.
LOOP AT gt_itab1 INTO gwa_itab1.
*Material
gs_bapimathead-material = gwa_itab1-matnr.
*Material details at client data
*material group.
gs_clientdata-matl_group = gwa_itab1-matkl.
gs_clientdatax-matl_group = 'X'.
*Division
gs_clientdata-division = gwa_itab1-spart.
gs_clientdatax-division = 'X'.
*Net Weight
gs_clientdata-net_weight = gwa_itab1-ntgew.
gs_clientdatax-net_weight = 'X'.
*Unit of Weight
gs_clientdata-unit_of_wt = gwa_itab1-gewei.
gs_clientdatax-unit_of_wt = 'X'.
*Base Unit of Measure
gs_clientdata-base_uom = gwa_itab1-meins.
gs_clientdatax-base_uom = 'X'.
ENDLOOP.
*calling BAPI for making changes in material and saving thru BAPI.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = gs_bapimathead
clientdata = gs_clientdata
clientdatax = gs_clientdatax
IMPORTING
return = ls_return.
LOOP AT lt_bapiret2 INTO ls_return.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE: / 'Error occured while changing material'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'material',gs_bapimathead-material,'changed'.
ENDIF. -
How to delete a local file in the presentation server.
Hi All,
How to delete a local file in the presentation server. As we do using 'delete dataset dsn' in application server. How can i achieve this. My requirement is after uploading file using gui_upload, i want to delete that source file. Please let me know, how can i achieve this.
Thanks in advance.
Regards,
Vishaldata: l_rc type i.
data: f_name type string.
move 'c:\YourFile.txt' to f_name.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_DELETE
EXPORTING
FILENAME = f_name
CHANGING
RC = l_rc
EXCEPTIONS
FILE_DELETE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
FILE_NOT_FOUND = 4
ACCESS_DENIED = 5
UNKNOWN_ERROR = 6
NOT_SUPPORTED_BY_GUI = 7
WRONG_PARAMETER = 8
others = 9
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to validate a Particular Directory or file path in Presentation server.
Hi SAP gurus,
I am having a requirement where I want to download a file into the Presentation server.
The file path to download will be provided in a parameter.
What I want to do is to throw a message to the user if He/She provides a wrong Directory or File path.
For example :
Say the user is providing the file download path as " E:\test.txt", but there is no "E" drive or such directory in the presentation. So in this case I should be able to check the wrong Directory provided by the user and throw some message to the user saying there is no such Directory present. Please give a proper directory or similar messages.
I have found a FM: PFL_CHECK_DIRECTORY but i am not able to use it properly.
So do you have any FM or any method and its explanation to fulfill my requirement .Do it this way:
tables:
spfli.
parameters:
p_file type rlgrap-filename " File name
obligatory.
Data:
t_final_data like table of spfli.
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.
at selection-screen.
data:
lw_file type string. " File Path
lw_file = p_file.
select * from spfli into table t_final_data.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lw_file
tables
data_tab = t_final_data.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if sy-subrc <> 0.
message 'File not found' type 'E'.
endif.
With luck,
Pritam. -
Is it possible to load a dump file collected from sql server to orcle 10gR2
Hi..
As a part of data migration from legacy systems , we need to migrate only required tables from Sql server to Oracle 10gr2 .
At present client is telling that he will give it as dump file.
My question is , Is it possible to load the dump file collected from sql server to oracle 10gR2?
Thanks in advance ..yes, it is.
Using for example SQL Developer Migration Workbench even allows you to create unload scripts for the desired SQL Server tables and it also creates the DDL scripts for you to create the Oracle tables similar to the SQL Server table AND it alows creates the SQL*Loader scripts that allow you to load the SQL Server generated dump file into the Oracle db.
Here the link:
http://www.oracle.com/technology/tech/migration/workbench/index_sqldev_omwb.html
If you do not want to use this utility, you can also use SQL*Loader to load the content of the SQL Server dump file into the Oracle database; but in this case you have to write the whole SQL*Loader control scripts on your own.
Edited by: kgronau on Sep 16, 2009 1:54 PM -
GUI_UPLOAD NOT READING DATA FROM PRESENTATION SERVER
H HI IN MY APPLICATION I HAVE USED GUI _UPLOAD TO READ DATA FROM PRESENTATION SERVER IT WAS WORKING FINE BUT NOW I HAVE SCHEDULED IT IN BACK BACKGROUND WHEN I DEBUGGED IT GUI _UPLOADI NOT READING DATA FROM PRESENTATION SERVER
Edited by: ravikumar1006 on Mar 10, 2012 1:18 PM
Moderator message: FAQ, please search before posting, do not write in all upper case.
Edited by: Thomas Zloch on Mar 10, 2012 3:17 PMThe issue is that, when you schedule a program as background job runs on application server not on local pc for that program use the application server resurces and its not possible to read files from pc. You can find a lot of answers in forum for this
-
"Import from Text File" & "Upload from Clipboard" icon not appearng in F110
Hi Experts,
While making the payment to the vendors through TN F110, in "PARAMETER" screen just next to 'STATUS' screen, there is a vendor field for selection in range and just ahead of this there is an icon for multiple vendor selection ( Bold arrow mark ). If I click on that multiple vender selection icon ( on bold arrow mark ), an another screen opens for multiple selection for vendors. In this screen 'Enter, Copy, Delete etc' icons are appearing at the bottom of the screen but "Import from Text File" & "Upload from Clipboard" icon are not appearing there.
Can you please let me know how to bring that icons there?
Points would be awarded.
Rgds,
ShaileshHi Ravi,
I have not yet created anything and have just entered the parameter. In the multiple screen for vendors there are 5 fields for individual and 5 for range selection. Even you can put more than five range selections or individual selections by clicking on the page button but there I am not finding these two icons.
Can you please check at your end and let me know if you are getting or what to do to bring those two icons in F110.
Rgds,
Shailesh -
Differentiate file uploaded from explorer view in SharePoint
Hello,
I am working on event receiver which on item adding updates few fields of document in library if those are not empty. The code is working fine in new file, drag and drop but in explorer view, I am not getting afterproperties values except two default field
values (vti_parserversion and vti_filesize). But in updating event we are getting those values.
Is there any way to differentiate file uploaded using explorer view in event receiver? So that I can work on updating in case of explorer view.
Thanks.Hi,
According to your post, my understanding is that you want to differentiate file uploaded from explorer view in SharePoint 2013.
I made a test in my environment, both the two ways(“new document” or “Open with explorer” ) to upload document, the AfterProperties only contains two default field values(vti_parserversion and vti_filesize) in
ItemAdding method in event receiver.
There are two steps occur when uploading a file to document library, the file is uploaded in the first step, then the list item properties will be modified in the second step.
So, it is recommended to update the fields of document in ItemUpdating
method in event receiver.
Best Regards
Dennis Guo
TechNet Community Support -
How do I enable CF to allow file uploads from Flex?
You will need to set the accept attribute of the cffile tag
to allow the mime type application/octet-stream. -
Upload a set of files from presentation server to app server.
Hello,
I need an urgent help.
I know how to use GUI_UPLOAD fm for simple file uploading.
However, my requirement is that in my report program(on selection screen) I give the source directory(presentation server) and the target directory
(application server). The report has to get all the files from the presentation server (from this source directory) and has to upload each file to the application server in the target directory.
Could anyone please help me in this?
It would be very helpful if anyone can put the code / standard example if there is any mechanism in ABAP to get the set of files from the presentation server, given the directory name.
THanks a lot for your help,
Best Regards,
Pramod S.HI Pramod,
After you get the data into the internal table, you need to pass the internal table, record by record into the application server.
data: wa_file type string.
data: tab_file like table of wa_file,
pcount type i.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
exporting
DIRECTORY = 'C:\test'
FILTER = '.'
FILES_ONLY = 'X'
DIRECTORIES_ONLY
changing
FILE_TABLE = tab_file
count = pcount.
loop at tab_file into wa_file.
clear it_data.
refresh it_data.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
exporting
FILENAME = wa_file
changing
data_tab = it_data.
open dataset <filename> for output in text mode encoding default.
if sy-subrc = 0.
loop at it_data.
transfer it_data to <filename>.
endloop.
close dataset.
endif.
endloop.
Thanks,
Ravi Kanth
Maybe you are looking for
-
Bluetooth and GT750M is not working after suspending to RAM.
Hello! I am yet another lucky owner of laptop with optimus Intel+nVidia technology. I had really frustrating issue with Bumblebee because my nvidia just randomly refused to change power state in the past, luckly after a few months someone added worka
-
Key commands are not stored in a separate file
On page 44 in the Logic Reference it says that key commands are stored in a separate preference file. But that's not right is it? I believe the key commands are stored in the general preferences file for logic.
-
Oracle JDeveloper 11g - Technical Preview 3 - SEVERE: FAILED_IN_CONFIG
Hi I have installed "Oracle JDeveloper 11g - Technical Preview 3" and build simple ADF application. When I am trying to run it is giving me below error. Apr 4, 2008 1:02:50 PM oracle.j2ee.xml.XMLMessages warningException WARNING: Exception Encountere
-
Having problems editing a template I downloaded and changed in photoshop
Hello, I recently downloaded a template. I added an image to the background in photoshop and saved it for the web. When I open the image folder the image I added to the background was there and everything looked good. When I opened the index file in
-
I cannot download free Adobe Illustrator trial on windows 8 - help please!
When I click on Download Trail, a brief message flashes on lower left corner of screen saying "waiting for scproxy-prod.adobecc-com", and then nothing else happens. I have successfully downloaded the 30 day trial of Photoshop with no problems previou