Facing problem during file upload
hi
we r designing a portal where it is required to upload files based on individual users who have logged in.
For this purpose we r using a file field in one page and http upload tag in another page.
The file uploads successfuly to the database, but the problem is that we r not able to get the value of pReq.getUser() in the page where the httpfileupload tag exists.
we noted that request.getParameter() and session.getValue() is also not valid in this page.
we also tried setting the session value to true in provider.xml. Even this didnt work.
we noted that this problem comes only when the file field is used. can anyone tell me how to solve this??
Thanks in advance.
voyager
request.getParameter() nor session.getParameter() does not fetch anything. the value is null
Regards,
voyager
Similar Messages
-
Threading problem during File Upload with Apache faces upload tag
First I am going to tell you "My Understanding of how JSF Apache Upload works, Correct me if i am wrong".
1) Restores View (to show Input box and Browse button to facilitate users to select a file for upload)
2) Translates Request Parameters to Component Values (Creates equivalent components to update them with request values).
3) Validates Input(Checks to see whether the User has input the correct file)
4) Updates Backing Bean or Model to reflect the values.
5) Renders response to user.
I am uploading huge files of sizes 400MB and above with the help of JSF apache extensions tag
<h:form id="uploadForm" enctype="multipart/form-data">
<x:inputFileUpload style="height:20px;" id="upload" value="#{backingbean.fileContents}" storage="file" size="50" />
</h:form>
In the backing bean
private UploadedFile fileContents;
public UploadedFile getFileContents() {
return fileContents;
public void setFileContents(UploadedFile fileContents) {
System.out.println("File being uploaded...");
this.fileContents = fileContents;
Since, the file size is so huge, I am using temp folder to use for the apache tag instead of memory.
In web.xml i am using like this
<filter>
<filter-name>ExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>600m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>10m</param-value>
</init-param>
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/uploadfolder/</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ExtensionsFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
The upload process is working perfectly fine.
Now coming to the problem:
Suppose one user is logging into the application & uploading say 400MB of files.
Until these files are linked to the model objects as my understanding of step 2, if second user tries to open the application he gets stuck with the loading page.
The page gets loaded only after the request files are linked to the component values(Step 2 above) and updates the backing bean's values.
I don't see any error in the logs. User is getting stuck. The user is getting stuck only when uploading the files. The other operations like searching are not blocking any other activities performed by the user.
Server used: IBM Application Server V6.0. CPU is normal, memory usage is normal.Dear friend,
i am also trying to upload using the common file upload.
when try to run the file error is coming
can give some suggestion.
can i use if concurrent user file upload at a time -
I'm encountering this error and not sure how to fix, I'm quite new to vCenter so please bear with me.
I'm trying out vCenter 5.1 with Update Manager 5.1 right now. No license key has been entered and I still have 50 odd days to try it out.
2 ESXi hosts are being managed by this vCenter, and they're both running ESXi 4.0
I'm looking to use Update Manager to try to upgrade the ESXi 4.0 hosts to ESXi 5.1
I downloaded the image file VMware-VIMSetup-all-5.1.0-799735.iso from VMWare website, and is looking to import it using the Update Manager so I can update the ESXi hosts, but I keep on getting the error:
File name: VMware-VIMSetup-all-5.1.0-799735.iso
Failed to transfer data
Error was: A web exception has occurred during file upload
I tried importing it by using vSphere client to connect to vCenter server both remotely and locally, with firewall disabled.
I've read http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1026602
I've disabled firewall, and there is no anti-virus program on the server. I've also restarted the machine several times, to no avail, I didn't reinstall update manager because the whole Windows and VCenter installations are clean from scratch.
I logged into the vSphere Client using Active Directory credentials, and I've made all Domain Admins (which my account is a member of) part of the administrator group on the vCenter server. I can't log in using admin@System-Domain because it tells me I don't have permissions for it, I still haven't really had the chance to figure out why that is and not sure if that makes a difference.
Also, I'm fairly certain I'm using the right image file, as I've burned some DVD's used that image file to upgrade some other ESXi hosts. Unless there's a special image file I need to download?
I'm at lost on what I can do to make it work. Please advise.
Thanks.The ISO file you mentioned is the one for vCenter Server. What you need is the "VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso" (or VMware-VMvisor-Installer-201210001-838463.x86_64.iso) for the ESXi host.
André -
Problem with File Uploading.
Hi,
I have one problem with File Upload component.
JSP
<ui:upload binding="#{NewProblem.fileUpload1}" columns="#{SessionBean1.uploadedFile}" id="fileUpload1" labelLevel="3"
style="left: 24px; top: 24px; position: absolute" validator="#{NewProblem.fileUpload1_validate}"/>
Java
UploadedFile uploadedFile = getSessionBean1().getUploadedFile();
Variable uploadedFile is NULL :(((((((((((
web.xml
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<filter>
<filter-name>UploadFilter</filter-name>
<filter-class>com.sun.web.ui.util.UploadFilter</filter-class>
<init-param>
<param-name>maxSize</param-name>
<param-value>10000000</param-value>
</init-param>
<init-param>
<param-name>sizeThreshold</param-name>
<param-value>10024</param-value>
</init-param>
</filter>
Thanks.check out the fileUpload article
Using the File Upload Component
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/file_upload.html -
Problem in file upload......
hi
i had problem in file upload to server.
i gave a absolute path to stored location that is working.
but i tried to give relative path of the server that is not working
plz help me to this problem..
how to give relative path to Tomcat server...FilePart filePart = (FilePart) part;
String fileName = filePart.getFileName();
if (fileName != null) {
// the part actually contained a file
String path= getServletContext().getRealPath("/empimages");
File dir = new File(path);
long size = filePart.writeTo(dir);
} -
Problem in File Upload - URGENT
Hi All,
Advance thanks for your reply
My Query
we are not mention the clint-no in my flat file
During file upload its client no add to itab
i will mention code also
parameters: p_file type rlgrap-filename obligatory
DEFAULT 'c:\temp\pcard.dat'.
at selection-screen on value-request for p_file.
call function 'WS_FILENAME_GET'
exporting
mask = ',.,..'
importing
filename = p_file
exceptions
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
others = 5.
call function 'WS_UPLOAD'
exporting
filename = p_file
filetype = 'DAT'
tables
data_tab = itAB
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10.
Please send the guide lines or code for my query
i look forwar to your reply
Regards
RajCheck this
Uploading files from PC(Presentation Server)
There are also a number of other function modules which could be used for uploading/downloding files
between SAP and the presentation server.
* Retrieve data file from presentation server(Upload from PC)
DATA: i_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.
DATA: begin of it_datatab occurs 0,
row(500) type c,
end of it_datatab.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = i_file
filetype = 'ASC'
TABLES
data_tab = it_datatab "ITBL_IN_RECORD[]
EXCEPTIONS
file_open_error = 1
OTHERS = 2.
*& Report ZUPLOADTAB *
*& Example of Uploading tab delimited file *
REPORT zuploadtab .
PARAMETERS: p_infile LIKE rlgrap-filename
OBLIGATORY DEFAULT '/usr/sap/'..
*DATA: ld_file LIKE rlgrap-filename.
DATA: gd_file type string.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
name1 LIKE pa0002-vorna,
name2 LIKE pa0002-name2,
age TYPE i,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
wa_record TYPE t_record.
*Internal table to upload data into
DATA: BEGIN OF it_datatab OCCURS 0,
row(500) TYPE c,
END OF it_datatab.
*Text version of data table
TYPES: BEGIN OF t_uploadtxt,
name1(10) TYPE c,
name2(15) TYPE c,
age(5) TYPE c,
END OF t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.
*String value to data in initially.
DATA: wa_string(255) TYPE c.
CONSTANTS: con_tab TYPE x VALUE '09'.
*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:
*class cl_abap_char_utilities definition load.
*constants:
* con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INFILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_infile.
CALL FUNCTION <b>'WS_FILENAME_GET'</b>
EXPORTING
def_filename = p_infile
mask = ',*.txt.'
mode = 'O'
title = 'Upload File'(078)
IMPORTING
filename = p_infile
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
*START-OF-SELECTION
START-OF-SELECTION.
gd_file = p_infile.
CALL FUNCTION <b>'GUI_UPLOAD'</b>
EXPORTING
filename = gd_file
has_field_separator = 'X' "file is TAB delimited
TABLES
data_tab = it_record
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 NE 0.
write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
skip.
endif.
* Alternative method, where by you split fields at each TAB after you
* have returned the data. No point unless you dont have access to
* GUI_UPLOAD but just included for information
* CALL FUNCTION 'GUI_UPLOAD'
* EXPORTING
* filename = gd_file
* filetype = 'ASC'
* TABLES
* data_tab = it_datatab "ITBL_IN_RECORD[]
* EXCEPTIONS
* file_open_error = 1
* OTHERS = 2.
* IF sy-subrc NE 0.
* ELSE.
* LOOP AT it_datatab.
* CLEAR: wa_string, wa_uploadtxt.
* wa_string = it_datatab.
* SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
* wa_uploadtxt-name2
* wa_uploadtxt-age.
* MOVE-CORRESPONDING wa_uploadtxt TO wa_record.
* APPEND wa_record TO it_record.
* ENDLOOP.
* ENDIF.
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD
* Display report data for illustration purposes
LOOP AT it_record INTO wa_record.
WRITE:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
ENDLOOP.
http://www.sapdevelopment.co.uk/file/file_updown.htm
Hope this helps.
Kindly reward and close the thread. -
Newbie : memory problem with file uploading
Hello
I'm exdending a web app based on jsf and , being new to it and java in general, i'm having a problem with file uploading.
The customer needs to upload large file (more than 30 MB). The application accomplish this using a fileupload component, to let the user select the file, and passing the array of bytes to a web service method.
I'm using netbeans 6, tomcat 5.5.
When i try to upload a file too large i got an outofmemory on the local tomcat. So i've rised jvm memory and going on with tests i've found that growing the size i got an http 500 error from the service (the developer of the service has found an out of memory too ).
I think the service is not modifiable, so i were asking if threre were a way to optimize the file uploading process (a component, a library, a pattern ...) or my only chioice is to rise available memory on both sides.
I've notice the wsdl declares as base64binary type the data parameter , while netbeans 6 generates a client proxy with a byte[] parameter. Is correct or is a netbeans problem?
searching with google i've found few thing i haven't fully understood due to my lack of experience:
the mtom , how can evaluate if it's suitable to help in my problem (i suppose it involves more the web service rather than the client)
something about the size of a soap body.
thank you in advance
StefanoWhich component exactly are you using? Declaring the stream as a raw byte[] is certainly not efficient. Write code yourself, don't let it autogenerate.
I can highly recommend you the Tomahawk t:inputFileUpload component. It is easy to integrate in Mojarra. You can find here an useful article: [http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html]. -
Facing problem during uploadation of Routing data using CA01-BDC - URGENT
Dear All,
When I am trying to upload Routing data using CA01 in the Table Control scenario, then I am facing problem as my last 2 records are not getting uploaded from my Test file.
For example, I am having 47 records in my Test File and after setting Default size parameters (to avoid screen resolution problem)
I have 15 table control line items data per page. The Page down logic ('=P+') is working fine, but my below BDC code failed to take
the remainder last 2 records from the Test File.
Analysis: When I am running my Call Transaction bdc in foreground, then the 1st page down occurs after 15th record, 2nd page down occurs after 29th record( as in Table Control 1st pages 15th record is coming on the Top of 2nd page). 3rd page down occurs after 43rd record
(as 2nd pages 29th record is coming on the top of 3rd page). In the 4th Table Control Page 43rd record of previous page is coming on top, and then its taking 44th & 45th records from the Test File and then it is triggering SAVE (=BU). Thus, our last 2 records
(i.e. 46th, 47th record) are not getting uploaded in the routing screen from our Test File.
If anybody has encountered this scenario previously, please help me URGENTLY in fixing the bugs here. Its VERY, VERY URGENT
FYI. For others 45 successful records already uploaded, all the screen fields values are coming properly in the routing screen, and here there is no issue.
Thanks very much
Thanks & Regards
Sudipta Project Lead
Volvo Client Location
I am pasting my BDC source code below:
REPORT ZRT1_UPLOAD_CA01_F
NO STANDARD PAGE HEADING
LINE-SIZE 255.
I N C L U D E S *
Include for Data Declarations
INCLUDE zrout_top.
Include for Forms
INCLUDE zrout_form.
INCLUDE zrout_include_f_ca01.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field>
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
Attaching F4 help with filename
PERFORM F1001_GET_F4.
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Perform to read the input file
PERFORM f_read_file.
Perform to fill the BDC data
PERFORM f_fill_bdctab.
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
FREE: i_bdcdata,
i_messtab,
i_record.
x----
*& Include ZROUT_TOP *
D A T A B A S E T A B L E S *
TABLES: t100. "Messages
D A T A D E C L A R A T I O N S *
T A B L E T Y P E S *****************************
For input data
TYPES: BEGIN OF ty_record,
matnr(18), "Material Number
werks(4), "Plant
verwe(3), "Usage
statu(3), "Status
arbpl(8), "Work Center
steus(4), "Control Key
ltxa1(40), "Description of Operation
bmsch(13), "Base Quantity
meinh(3), "Unit of Measure
vgw01(11), "Machine
vge01(3), "Unit of measure of activity
END OF ty_record.
I N T E R N A L T A B L E S ***********************
Internal Table for input file name
DATA: i_file_tab TYPE STANDARD TABLE OF sdokpath INITIAL SIZE 0.
Internal Table for BDC Data
DATA: i_bdcdata TYPE STANDARD TABLE OF bdcdata INITIAL SIZE 0.
Internal Table for BDC Messages
DATA: i_messtab TYPE STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0.
Internal Table for Input file
DATA: i_record TYPE STANDARD TABLE OF ty_record INITIAL SIZE 0.
W O R K A R E A S *************************
Work Area for input file name
DATA: wa_file_tab LIKE sdokpath.
Work Area for BDC Data
DATA: wa_bdcdata LIKE bdcdata.
Work Area for BDC Messages
DATA: wa_messtab LIKE bdcmsgcoll.
Work Area for Input file
DATA: wa_record TYPE ty_record.
V A R I A B L E S ****************************
DATA: v_filename TYPE string,
v_fnam(40) TYPE c.
DATA: wa_opt TYPE ctu_params.
C O N S T A N T S ***************************
CONSTANTS: c_werks TYPE rc27m-werks VALUE 'tp',
c_steus TYPE plpod-steus VALUE 'PP01'.
*Selection Screen.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS:
Input file name
P_FILE TYPE rlgrap-filename OBLIGATORY. " DEFAULT 'C:\'.
SELECTION-SCREEN END OF BLOCK B1.
x----
*& Include ZROUT_FORM *
*& Form f_fill_bdctab
Form to fill the BDC Data
FORM f_fill_bdctab.
TABLES mapl. "Assignment of Task Lists to Materials
DATA: l_cnt_item(3) TYPE n VALUE 1. "Line item counter
DATA: first(3) TYPE n VALUE 16. "Line item counter
DATA: next(3) TYPE n . "Line item counter
DATA: lin(3) TYPE n . "Line item counter
DATA: l_v_bmsch(13), "Base qty
l_v_meinh(3), "Unit of Measure
l_v_vgw01(11), "Machine
l_v_vgw02(11), "Labour
l_v_vge01(3). "Unit of measure of activity
DATA l_v_nextline TYPE sy-tabix.
DATA wa_temp TYPE ty_record.
Initialize Counter
l_cnt_item = 1.
SORT i_record BY matnr.
LOOP AT i_record INTO wa_record.
AT NEW matnr.
REFRESH: i_bdcdata,
i_messtab.
SET PARAMETER ID 'PLN' FIELD space.
SET PARAMETER ID 'PAL' FIELD space.
PERFORM f_bdc_dynpro USING 'SAPLCPDI' '1010'.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'/00'.
Material Number
PERFORM f_bdc_field USING 'RC27M-MATNR'
wa_record-matnr.
Plant
PERFORM f_bdc_field USING 'RC27M-WERKS'
c_werks.
PERFORM f_bdc_field USING 'RC271-PLNNR'
Check if routing already exits for the material
SELECT * FROM mapl
INTO mapl
WHERE matnr EQ wa_record-matnr
AND werks EQ c_werks
AND plnty EQ 'N'.
IF sy-subrc EQ 0.
PERFORM f_bdc_dynpro USING 'SAPLCPDI' '1200'.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'=ANLG '.
ENDIF.
ENDSELECT.
perform f_bdc_dynpro USING 'SAPLCPDA' '1200'.
perform f_bdc_field USING 'BDC_OKCODE'
'=VOUE'.
Group Counter
perform f_bdc_field USING 'PLKOD-PLNAL'
Usage
PERFORM f_bdc_field USING 'PLKOD-VERWE'
'1'.
Status
PERFORM f_bdc_field USING 'PLKOD-STATU'
'4'.
ENDAT.
PERFORM f_bdc_dynpro USING 'SAPLCPDI' '1400'.
Check if page is full
IF l_cnt_item EQ '16'.
Page down
PERFORM f_bdc_field USING 'BDC_OKCODE'
'=P+'.
l_cnt_item = 1.
ELSE.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'/00'.
ENDIF.
CLEAR v_fnam.
Populate item level details
Work Center
CONCATENATE 'PLPOD-ARBPL(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
wa_record-arbpl.
Control Key
CONCATENATE 'PLPOD-STEUS(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
c_steus.
Description of Operation
CONCATENATE 'PLPOD-LTXA1(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
wa_record-ltxa1.
Base Quantity
CONCATENATE 'PLPOD-BMSCH(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
wa_record-bmsch.
Unit of Measure
CONCATENATE 'PLPOD-MEINH(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
wa_record-meinh.
Machine
CONCATENATE 'PLPOD-VGW01(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
wa_record-vgw01.
Labour
CONCATENATE 'PLPOD-VGW02(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
wa_record-vgw02.
Unit of measure of activity
CONCATENATE 'PLPOD-VGE01(' l_cnt_item ')' INTO v_fnam.
PERFORM f_bdc_field USING v_fnam
wa_record-vge01.
l_cnt_item = l_cnt_item + 1.
CLEAR wa_record.
AT END OF matnr.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'=BU'.
wa_opt-DISMODE = 'A'.
wa_opt-DEFSIZE = 'X'.
wa_opt-UPDMODE = 'S'.
PERFORM f_bdc_transaction USING 'CA01'.
Initialize Counter
l_cnt_item = 1.
ENDAT.
ENDLOOP.
ENDFORM. " f_fill_bdctab
x----
*& Include ZROUT_INCLUDE_F_CA01 *
*& Form f_read_file
Form to read the file from presentation server
FORM f_read_file .
To get the file name
DATA l_v_file TYPE string.
l_v_file = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_v_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = i_record
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.
ENDIF.
ENDFORM. " f_read_file
*& Form f_bdc_dynpro
Form to populate BDC Tab for new screen
-->fp_program Screen program name
-->fp_dynpro Screen Number
Start new screen *
FORM f_bdc_dynpro USING fp_program fp_dynpro.
CLEAR wa_bdcdata.
wa_bdcdata-program = fp_program.
wa_bdcdata-dynpro = fp_dynpro.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO i_bdcdata.
ENDFORM. "f_bdc_dynpro
*& Form f_bdc_field
Insert field *
FORM f_bdc_field USING fp_fnam fp_fval.
IF NOT fp_fval IS INITIAL.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = fp_fnam.
wa_bdcdata-fval = fp_fval.
APPEND wa_bdcdata TO i_bdcdata.
ENDIF.
ENDFORM. "f_bdc_field
*& Form f_bdc_transaction
Call transaction and error handling
-->fp_tcode Transaction code
FORM f_bdc_transaction USING fp_tcode.
DATA: l_mstring(480),
l_color TYPE i,
l_mode TYPE c.
REFRESH i_messtab.
CALL TRANSACTION fp_tcode USING i_bdcdata
OPTIONS FROM wa_opt
MESSAGES INTO i_messtab.
Messages during upload
LOOP AT i_messtab INTO wa_messtab.
CASE wa_messtab-msgtyp.
WHEN 'S'.
l_color = 5.
WHEN 'E'.
l_color = 6.
WHEN 'W'.
l_color = 3.
ENDCASE.
FORMAT COLOR = l_color.
SELECT SINGLE * FROM t100 WHERE sprsl = wa_messtab-msgspra
AND arbgb = wa_messtab-msgid
AND msgnr = wa_messtab-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH wa_messtab-msgv1 INTO l_mstring.
REPLACE '&2' WITH wa_messtab-msgv2 INTO l_mstring.
REPLACE '&3' WITH wa_messtab-msgv3 INTO l_mstring.
REPLACE '&4' WITH wa_messtab-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH wa_messtab-msgv1 INTO l_mstring.
REPLACE '&' WITH wa_messtab-msgv2 INTO l_mstring.
REPLACE '&' WITH wa_messtab-msgv3 INTO l_mstring.
REPLACE '&' WITH wa_messtab-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
WRITE: / wa_messtab-msgtyp, l_mstring(250).
ELSE.
WRITE: / wa_messtab.
ENDIF.
FORMAT COLOR OFF.
ENDLOOP.
SKIP.
ENDFORM. " f_bdc_transaction
FORM F1001_GET_F4.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SY-REPID
DYNPRO_NUMBER = SY-DYNNR
FIELD_NAME = P_FILE
CHANGING
FILE_NAME = P_FILE
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
File is not selected
MESSAGE I000 WITH TEXT-M01.
ENDIF.
ENDFORM. " F1001_GET_F4Sudipta,
Would request you to post this to ABAP-Forum for Immediate response.
I had this problem, but the ABAP guy did something to correct this...it was more of screen resoultion difference between the recorded system and uploading system. Please try to use the same system which was used to record and try.
Regards,
Prasobh -
Trailing spaces problem during file content conversion
I have developed a proxy to file scenario.And am using file content conversion for creating the file. The file is to be a fixed length file.
File Structure
<Header>
<Item>
<Item Trailer>
<File Trailer>
Each tab in the file has the last character mapped to spaces.
Eg: Header00000001 2006011700000000020060<blank space>
Item00000001 2006011700000000020060<blank space>
The problem is that during file content conversion. XI does not preserve trailing spaces at the end of the line i.e.if a particular line in the file ends with space. It terminates the line at the last non-space character (in this case at 060).
However we are required to maintain these trailing spaces at the end of each line.
I have tried preserve white space in data type that does not work.
I know that xslt mapping may solve the problem but I am looking for a workaround with my current graphical mapping.
Looking for suggestions !!
Thanks,
RashidaHi,
I have the problem quite opposite to this where we are getting the trailing spaces at end of each record which should not come.
File structure is
<Record>
- <Data>
<Content>11/09/2007@210@ZACSL007@GBB-56436@PS01@29@1044@19@646@0</Content>
</Data>
</Record>
............. n records
<Header>
<File_Name>UK01</File_Name>
</Header>
Record structure in communication channel used is
Header, Data
Data.fieldFixedLengths 1024
Data.addHeaderLine 0
Header.addHeaderLine 0
Header.fieldFixedLengths 0
Header.fixedLengthTooShortHandling Cut
Data.fixedLengthTooShortHandling Cut
Header.endSeparator '0'
Actually if the length of record is less than 1024, rest of the length is being filled with spaces which should not occur.
Many advanced thanks.
Jitender -
WEBUTIL PROBLEM ON FILE UPLOAD WUT-127 UNABLE TO CREATE WORKAREA
hi
pl help me i have installed webutil in forms OC4J
but when i tried the same steps in 9iAS rel2
i am facing problem
WUT-127 Unable to cretae workarea
and after prosseing Ok i am getting
WUT-123 The webutil.jar file cannot be found on the Application server class path- Some file transfer not work
c:\webutil;c:\temp\10_220_74_193_ptripathi\Tiles.bmp
Java.io.
********** this is entriy in webutil errorlog file
10.220.74.193:ptripathi: WUT-127: Unable to create workarea
10.220.74.193:ptripathi: WUT-123: The webutil.jar file cannot be found on the Appliciation Server Classpath - Some file transfer functions will not work. c:\webutil;c:\temp\10_220_74_193\ptripathi\BlueLace.bmp java.io.FileNotFoundException: c:\webutil;c:\temp\10_220_74_193\ptripathi\BlueLace.bmp (The filename, directory name, or volume label syntax is incorrect)
Regards
PuneetThe problem here seems to be that the .ENV file that you are using - e.g. Default.env does not have the correct classpath set so webutil cannot find the webutil.jar. Please refer to the Webutil doc to set this classpath up.
-
Hi all, my problem has something to do with internal working of pageflow.
Here is what has happened:
1. I have a page with a few portlets on it.
2. One of the portlet is for uploading file (lets call it upload portlet)
3. The rest of the portlet need to access the PortletBackingContext using the following code (put in a jpf):
PortletBackingContext portletCtx = PortletBackingContext.getPortletBackingContext(super.getRequest());
4. When the upload portlet transfers the file, the other portlets will refresh (i'm using refreshAction attribute).When the other portlets refresh, they can't get the PortletBackingContext. It always returns null.
If I remove the enctype="multipart/form-data" from the netui:form tag, it works as per normal (but of course the file uploading fails).
Any idea?
Thanks.
panji.a
[att1.html]This post may be useful:
http://forums.bea.com/bea/message.jspa?messageID=600021968&tstart=0 -
Limited bandwidth during file upload
Hi All,
Does it exist a possibility to limit used bandwidth during a file upload from a AIR app?
For example , is it possible to fix this limit to 10 or 100 kbps?
Thanks in advance
GianniHi,
any news about this discussion?
Thanks
Ennio -
Hi All,
We are looking for a BADI during the file upload for Supplier catalog. The requirement is to modify the file ocntents during upload.
We tried implementing BADI /CCM/CTLG_ENRICHMENT, but seems like this BADI is not called during the upload function at all..
Please help us to fix this..
Thanks in Advance
KarthikKarthik,
The Upload process is launched in a background task, that is why you have to 'insert a infinite loop' as Bertrand said, in order to enter in debug mode through transaction SM50.
PS: Please be careful, and use filters in your BADI implementation, because it is called also in the mapping and publishing processes.
Regards.
Vadim -
Hello all. Has anybody successfully got the UploadFilter classes -- as listed in Hortsmann and Geary's "Core JSF" -- going?
Everytime I submit a multipart form, I am not redirected to the appropriate next page (as specified in the navigation cases) . I have definitely set up the UploadFilter correctly, and any multipart form requests are getting parsed and uploaded into the correct directory. The only problem is that the resulting page isn't the one specified in faces-config.xml -- it's the original upload page.
If I get rid of the multipart/form-data encoding for the form, it works "okay" (in the sense that the file upload no longer works, but the behaviour matches the navigation cases).
I'm beginning to wonder whether the fact the form is a multipart form means that the submit button's action -- which is set to "submit", matching a value in faces-config.xml -- isn't being correctly parsed. Are there any "gotchas" I should be aware of in these cirumstances?Hi diritchie,
perhaps that thread helps you.
http://forum.java.sun.com/thread.jsp?forum=427&thread=473135
There are posts of some clazzes, to enable upload.
the clazzes are using Jakarta Commons FileUpload
btw. in MyFaces there is allready an upload-component.
Regards,
Matthias -
Problems with file upload using AMF or SOAP
We use your AMF to connect Flex with Ruby on Rails.
Everything is OK, except file upload.
We did not find how to upload file using AMF or SOAP RPC from
Flex. Only to use FileReference.upload().
The problem is that Flex uses different User-Agent in HTTP
header for this upload and for SOAP/AMF calls.
This means that sessions are different. And even if you
authenticated via SOAP/AMF you can not use it to upload file.
Could you, please, advice is there any other way to upload
files from Flex via SOAP or AMF?Please, help me on this issue, i am still waiting for someone replying me!
Maybe you are looking for
-
SCCM 2012 Clients at Secondary Site don't update and shows status as INACTIVE
I have 1 Primary site and 1 Secondary sites. I have setup Secondary site Boundaries using IP subnet. I see that the systems from secondary site show in the console and they all have clients installed but however 60% of the system shows client activi
-
Hi, I need to get the IP of the remort user connecting to my servlet. code i have tried is String ip = request.getRemoteAddr(); String host = request.getRemoteHost(); but the problem is that it always gives me the IP of the web server. as my servlet
-
Cannot access Adobe Folio Builder using Indesign (CS6) on Windows 7, error message is 'An error has occured while trying to sign in to the Folio Builder Panel' [IMS_ERROR_FAILURE]
-
SAP Note 723909 (Java VM): At what node to enter in Config Tool?
Hello all, I have problems to understand where to enter the information from the SAP Note 723909 in Config Tool since it has multiple nodes in Config Tool. I see it's possible at: cluster-data > instance (Tab: "Servers General") cluster-data > insta
-
CATs Webdynpro Screen Enhancement
Hi Experts, We have a requirement of adding a new display field in the ess cats webdynpro application. It is a display field which will store a calculated value based on the time entered in the time sheet. Could you please help me with the possbile