Save PDF in KM - Personal Documents of user with Web Dynpro ABAP (WDA)
Hi Experts,
I have a WebDynpro ABAP Application, running in my Portal, which generates (after some input steps) a pdf (Adobe Form) as confirmation. Of course the user can save and print the pdf-form by himself, but I would like to save the PDF automatically to his "Personal Documents Folder" in KM to "archive" it.
Does anyone know how this might work? Is there a standard-way to do this?
Thanks for any proposal
Best regards.
Volker
We figured it out. We had been using an application parameter WDDISABLEUSERPERSONALIZATION to prevent users from hiding UI elements on the view. After upgrading to 7.31 this also prevented re-arranging columns and adjusting column sizes directly on the the grid. We replaced this parameter with WDENABLEUIELEMENTSHIDE instead to prevent users from hiding elements, but it now allows moving columns with drag/drop and resizing.
Similar Messages
-
Create portal user using web dynpro abap application
Dear All,
I would like to know is it possible to create portal user-id through web dynpro abap application.
My requirement is
> I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number as entry fields.
> I will click on submit, one unique id will get created. This unique id will be the login id for portal.
I found how to create portal user using web dynpro java, but i could not find regarding web dynpro abap.
If it is possible to create the portal users using web dynpro abap pls share the code as well.
Regards,
Swapnil IndulkarHi swapnil,
I think by using BAPi.. BAPI_USER_CREATE1 you can create.
Please check this...
Create portal user from webdynpro abap
Creating user and assigning a group through code
user administration su01
How can i get the portal user id from logon ticket in the webdyn 4 ABAP
Cheers,
Kris.
Edited by: kissnas on May 21, 2011 8:47 AM -
Userid of a Portal-user in Web Dynpro ABAP
Dear colleagues,
we want to migrate our application from BSP to Web Dynpro ABAP and I'm looking for a procedure how I can get the userid of a Portal-user in Web Dynpro ABAP which is running inside an iView ?
In BSP I used iView application parameter user_id and in the BSP the event handler for data retrieval with:
userid = runtime->server->request->get_form_field( 'userid' ).
Found a lot of entries how to do it in Java but no one for WDA ?
Thanks in advance
MichaelHi Michael,
Actualy it is not so trivial. You have some options:
1) In case user_id is parameter of iView you can read URL parameter like described here Webdynpro ABAP url-parameters
2) In case user_id is not iView parameter you can use usuall ABAP <i>sy-uname</i> system variable.
But pay attantion that it is not really EP user. Here we have 2 options: user mapping and SSO. In case of user mapping <i>sy-uname</i> will contain R/3 user which is mapped to EP user. In case of SSO <i>sy-uname</i> will contain same user name like in EP, because by using SSO user must ne the same on issuing and accepting systems.
Best regards, Maksim Rashchynski. -
BADI for changing Appraisal document application name for Web dynpro ABAP
Hi,
For Appraisal document customizing through PHAP_CATALOG_PA, We have BADI HRHAP00_BSP_TMPL to change the BSP application name which can be used in Web layout for output display. Using this we can change application name from HAP_DOCUMENT to custom BSP application name
Similarly, what is the BADI for changing Web dynpro ABAP applictaion name? Currently its triggering HAP_MAIN_DOCUMENT.
how do we change application name to some custom web dynpro application name
Regards,
KothandHi Karim,
I don't know, if there is any chance to get the Webdynpro application name. At least in the ABAP System fields is no information about the webdynpro application name.
One remark: I have allways problems with BAPIS / BADIS that behave different depending on the caller. Could it be a good idea to pass some information through the interface / parameters?
Best regards
Renald -
How to see the authorization data of a user in Web Dynpro ABAP
Hi all,
if I have authorization problems in a normal SAP transaction I can use transaction SU53 to see the missing authorization objects.
How can I get the missing authorization objects for a Web Dynpro ABAP application?
regardsWhat about using SU53 again - just log into ABAP system and use the F5 - "other use"r option to select the user having the issues.
There is unfortunately no way to see this as standard from the WDA application.
Sorry,
Chris -
Not able to upload file in DMS(Document Mang. system) using Web dynpro ABAP
Hi All,
I am facing a problem while uploading the file into the DMS ( Document Management System ) from Webdnrpo .
I am using the BAPI - BAPI_DOCUMENT_CREATE2 to create the document .
CASE - 1
when i am providing the storage category mention below and no data carrier1
ls_documentfiles-storagecategory = 'ZHMEL_CS'. it is not able to upload the document in the DMS system and when i check
in the debugg mode it giving error as ""Error while checking in and storing: C:\TEST.TXT "" .
CASE - 2
When i am not using the storage category and providing the the data carrier as default
ls_documentdata-DATACARRIER1 = 'DEFAULT'. It is able to create the document in the DMS but i am not able to read that document .
I checked with DMS Consultant that DMS is configured for ZOL ( documenttype) with a storage category as 'ZHMEL_CS'.
The code which i have used is below :
ls_documentdata-documenttype = 'ZOL'.
ls_documentdata-documentversion = '00'.
ls_documentdata-documentpart = '000'.
ls_documentdata-description = 'Test Document'.
ls_documentdata-laboratory = '001'.
ls_documentdata-WSAPPLICATION1 = 'TXT'.
ls_documentdata-DOCFILE1 = 'C:\TEST.TXT'.
ls_documentdata-SAVEDOCFILE1 = 'C:\TEST.TXT'.
*ls_documentdata-FILESIZE1 = 000000000000.
*ls_documentdata-FILESIZE2 = 000000000000.
ls_documentdata-WSAPPLICATION1 = 'TXT'.
ls_documentfiles-DOCUMENTTYPE = 'ZOL'.
ls_documentfiles-DOCUMENTPART = '000'.
ls_documentfiles-DOCUMENTVERSION = '00'.
ls_documentfiles-storagecategory = 'ZHMEL_CS'.
ls_documentfiles-WSAPPLICATION = 'TXT'.
ls_documentfiles-DOCPATH = 'C:\'.""lv_filename.
ls_documentfiles-DOCFILE = 'TEST.TXT'."lv_filename.
ls_documentfiles-description = 'Test Document'.
ls_documentfiles-language = 'EN'.
ls_documentfiles-CHECKEDIN = 'X'.
APPEND ls_documentfiles to lt_documentfiles .
*&----Fill Descriptions
w_descr-language = 'EN'.
w_descr-language_iso = 'EN'.
w_descr-description = 'Test'.
append w_descr to lt_descr.
clear w_descr.
**w_hostname = 'HMEL-DV1R3_DR3_00'.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_documentdata
*hostname = 'content-srv'
*pf_http_dest = 'SAPHTTPA'
*pf_ftp_dest = 'SAPFTPA'
IMPORTING
DOCUMENTNUMBER = lv_DOCUMENTNUMBER
return = gv_return
TABLES
documentdescriptions = lt_descr
documentfiles = lt_documentfiles.
Please let me know your valuable inputs on the same ..
Edited by: Omm Awasthi on Dec 30, 2010 12:22 AM
Edited by: Omm Awasthi on Dec 30, 2010 12:25 AMHi omm , from functional side your require a document type and content repository
I have used below code in a function module to create document , we have create object link as PO to the doc.
FUNCTION ZFM_SR_CREATE_FROM_EXTERNAL .
""Local Interface:
*" IMPORTING
*" VALUE(IV_DOCUMENTNUMBER) TYPE DOKNR OPTIONAL
*" VALUE(IV_DOCUMENTTYPE) TYPE DOKAR OPTIONAL
*" VALUE(IV_DOCUMENTVERSION) TYPE DOKVR OPTIONAL
*" VALUE(IV_DOCUMENTPART) TYPE DOKTL_D OPTIONAL
*" VALUE(IV_STORAGE_CAT) TYPE CV_STORAGE_CAT OPTIONAL
*" VALUE(IV_DOKST) TYPE DOKST OPTIONAL
*" VALUE(IT_DM_FILES) TYPE ZDM_TT_FILES OPTIONAL
*" VALUE(IV_EBELN) TYPE EBELN
*" EXPORTING
*" VALUE(EV_DOCUMENTNUMBER) TYPE DOKNR
*" VALUE(ES_RETURN) TYPE BAPIRET2
V00.00 DD.MM.YYYY *
*********************New Method of Uploading File*********************************
CONSTANTS path_name TYPE dms_path
VALUE '/tmp/'.
CONSTANTS log TYPE dms_path VALUE '/tmp/logFO.txt'.
DATA: ls_draw TYPE bapi_doc_draw2,
lt_documentfiles TYPE TABLE OF bapi_doc_files2,
ls_documentfiles TYPE bapi_doc_files2,
ls_dm_files TYPE zdm_files,
lv_filename TYPE string,
lv_ext TYPE string,
lv_file_type TYPE draw-dappl,
lv_file_name TYPE dms_path,
lv_msg(80) TYPE c,
lt_objectlinks TYPE TABLE OF bapi_doc_drad,
ls_objectlinks TYPE bapi_doc_drad,
lv_ebelp TYPE ebelp
Prepare Data
MOVE iv_documentnumber TO ls_draw-documentnumber.
MOVE iv_documenttype TO ls_draw-documenttype.
MOVE iv_documentversion TO ls_draw-documentversion.
MOVE iv_documentpart TO ls_draw-documentpart.
ls_draw-statusextern = iv_dokst.
ls_draw-statusintern = iv_dokst.
ls_draw-username = sy-uname.
LOOP AT it_dm_files INTO ls_dm_files.
SPLIT ls_dm_files-filepath AT '.' INTO lv_filename lv_ext.
CALL FUNCTION 'CV120_DOC_GET_APPL'
EXPORTING
pf_file = ls_dm_files-filepath
IMPORTING
pfx_dappl = lv_file_type.
TRANSLATE lv_file_type TO UPPER CASE.
OPEN DATASET log FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
TRANSFER lv_ext TO log.
ls_documentfiles-wsapplication = lv_file_type.
TRANSLATE ls_documentfiles-wsapplication TO UPPER CASE.
CONCATENATE path_name
lv_filename
lv_ext
INTO lv_file_name.
CONDENSE lv_file_name NO-GAPS.
TRANSFER lv_file_name TO log.
OPEN DATASET lv_file_name FOR OUTPUT IN BINARY MODE MESSAGE lv_msg.
*Transfer Attachment Content to Application Server
TRANSFER ls_dm_files-content TO lv_file_name.
CLOSE DATASET lv_file_name.
TRANSFER 'move data to lt_files' TO log.
ls_documentfiles-storagecategory = iv_storage_cat.
ls_documentfiles-docfile = lv_file_name.
ls_documentfiles-DOCUMENTVERSION = IV_DOCUMENTVERSION.
APPEND ls_documentfiles TO lt_documentfiles.
CLEAR lv_file_name.
CLOSE DATASET log.
ENDLOOP.
IF iv_ebeln IS NOT INITIAL.
ls_objectlinks-objecttype = 'EKPO'.
SELECT SINGLE ebelp INTO lv_ebelp FROM ekpo WHERE
ebeln = iv_ebeln
AND loekz eq space.
CONCATENATE iv_ebeln lv_ebelp INTO ls_objectlinks-objectkey.
APPEND ls_objectlinks TO lt_objectlinks.
ENDIF.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_draw
pf_ftp_dest = 'SAPFTPA'
pf_http_dest = 'SAPHTTPA'
IMPORTING
documentnumber = ev_documentnumber
return = es_return
TABLES
objectlinks = lt_objectlinks
documentfiles = lt_documentfiles.
DATA: ls_doc_data type bapi_doc_draw2,
ls_doc_datax type bapi_doc_drawx2,
ls_return type bapiret2.
Set value for document data
ls_doc_data-statusextern = 'IW'.
ls_doc_data-statusintern = 'IW'.
Set value for document data check
ls_doc_datax-statusextern = 'X'.
ls_doc_datax-statusintern = 'X'.
CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
EXPORTING
DOCUMENTTYPE = 'ROS'
DOCUMENTNUMBER = IV_DOCUMENTNUMBER
DOCUMENTPART = IV_DOCUMENTPART
DOCUMENTVERSION = IV_DOCUMENTVERSION
DOCUMENTDATA = ls_doc_data
DOCUMENTDATAX = ls_doc_datax
HOSTNAME =
DOCBOMCHANGENUMBER =
DOCBOMVALIDFROM =
DOCBOMREVISIONLEVEL =
SENDCOMPLETEBOM = ' '
pf_ftp_dest = 'SAPFTPA'
pf_http_dest = 'SAPHTTPA'
CAD_MODE = ' '
ACCEPT_EMPTY_BOM = ' '
IMPORTING
RETURN = ls_return
TABLES
CHARACTERISTICVALUES =
CLASSALLOCATIONS =
DOCUMENTDESCRIPTIONS =
OBJECTLINKS =
DOCUMENTSTRUCTURE =
DOCUMENTFILES = lt_documentfiles.
LONGTEXTS =
COMPONENTS =
move es_return to ES_RETURN.
IF es_return-type CA 'EA' ."NE 'E' AND es_return-type NE 'A'.
"do nothing
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
LOOP AT lt_documentfiles INTO ls_documentfiles.
DELETE DATASET ls_documentfiles-docfile.
ENDLOOP.
ENDFUNCTION. -
Web Dynpro Abap: Select-Options: Save Selection Data
Hello,
I am using select-options in web dynpro abap. Need to add a feature where the user can save his selection values as a variant.
All I can think of is getting all the selection values and saving these into a Z table.
Can you suggest a better way?
Thank you.
IreneHi Irene,
Alas, it's currently not possible. You could write your own wrapper though adding a save button. Inside of the action handler you could retrieve the range tables of all fields, convert their content to a structure you like and save it a fitting db table. My suggestion is to use XML and a DB table with a XSTRING field in the data section to store the range table values.
Using personalization will allow you to customize your ui and to hide certain select option fields.
Best regards,
Thomas -
How to save file in km using web dynpro abap
Hi Experts,
We have a requirement that file should be saved in a folder in km, the name of the folder should be the employee number.
Could you please tell me how to create folder with employee number in KM and store file in it using web dynpro abap.
Thanks and Regards,
Santhoshi.Thanks Naga Raju Meesala.
How come all these methods are deprecated...getEP5User
Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
u2022 \lib\prtapi.jar The portal runtime APIs
u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities -
Unable to upload File to DMS (Document Managemt Sys) Via web Dynpro App
Hi .
I want add file to DMS i,e, SAP Document Management System .
I first tried calling BAPI : BAPI_CREATE_DOCUMENT2 in Report and I was successfull.
I am trying out same thing via Web Dynpro Application but I am getting error in Return of BAPI .Error is Error while checking in and storing: C:\Documents and Settings\Desktop\Hi.doc.
I am pasting code I have written on click of Upload .
method ONACTIONON_UPLOAD .
implicitly available data objects
wd_Context type ref to if_wd_context_node.
wd_This type ref to if_FileUpload.
DATA: gv_documento TYPE draw-doknr ,
gv_clase TYPE draw-dokar VALUE 'Z99' ,
gv_version TYPE draw-dokvr VALUE '00',
gv_part TYPE draw-doktl VALUE '000',
gv_descripcion TYPE drat-dktxt VALUE 'Description111',
gv_return TYPE bapiret2,
filename(60) type c ,
lt_documentdata TYPE STANDARD TABLE OF bapi_doc_draw2,
ls_documentdata LIKE LINE OF lt_documentdata,
lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
lt_classallocations TYPE STANDARD TABLE OF bapi_class_allocation ,
lt_documentfiles TYPE STANDARD TABLE OF bapi_doc_files2 ,
ls_documentfiles LIKE LINE OF lt_documentfiles ,
lv_content type xstring ,
size type i.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_filename LIKE ls_context-filename.
get element via lead selection
lo_el_context = wd_context->get_element( ).
get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `FILENAME`
IMPORTING
value = lv_filename ).
ls_documentdata-documenttype = 'Z99'.
ls_documentdata-documentversion = '000'.
ls_documentdata-documentpart = '00'.
ls_documentdata-description = 'Test Document Created Parag'.
ls_documentdata-STATUSEXTERN = 'WR'.
ls_documentdata-USERNAME = 'I046361'.
ls_documentdata-WSAPPLICATION1 = 'DOC'.
ls_documentdata-DOCFILE1 = lv_filename.
ls_documentdata-DATACARRIER1 = 'DEFAULT'.
ls_documentfiles-wsapplication = 'DOC'.
ls_documentfiles-docfile = lv_filename.
ls_documentfiles-storagecategory = 'DMS_C1_ST'.
ls_documentfiles-checkedin = 'X'.
APPEND ls_documentfiles to lt_documentfiles.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_documentdata
pf_http_dest = 'SAPHTTP'
IMPORTING
return = gv_return
TABLES
documentfiles = lt_documentfiles.
IF gv_return-type CA 'AE'.
WRITE gv_return-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF .
endmethod.
Now Can anyone tell
In case of Web Dynpro what Is this code right ?
Do I need to change value of Parameters I have Set ?
Do i need to some change as I am trying to Upload file Via WebApplication ?
Do I have to change data Carrier ?
Please let me know urgently .Points will be surely Given ...
Regards ,
ParagHi ,
Finally I was successfull in Uploading Docs.It seems I was not getting right Parameters ..anyways correct code is as follows ...
method ONACTIONON_UPLOAD .
implicitly available data objects
wd_Context type ref to if_wd_context_node.
wd_This type ref to if_FileUpload.
DATA: gv_documento TYPE draw-doknr ,
gv_clase TYPE draw-dokar VALUE 'Z99' ,
gv_version TYPE draw-dokvr VALUE '00',
gv_part TYPE draw-doktl VALUE '000',
gv_descripcion TYPE drat-dktxt VALUE 'Description111',
gv_return TYPE BAPIRETURN ,
gv_return TYPE BAPIRET2 ,
gv_ruta TYPE bapi_doc_files2-docfile VALUE 'C:\BAPI_DMS.doc' ,
filename(60) type c ,
lt_documentdata TYPE STANDARD TABLE OF bapi_doc_draw2,
ls_documentdata LIKE LINE OF lt_documentdata,
lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
lt_classallocations TYPE STANDARD TABLE OF bapi_class_allocation ,
lt_documentfiles TYPE STANDARD TABLE OF bapi_doc_files2 ,
ls_documentfiles LIKE LINE OF lt_documentfiles ,
lv_content type xstring ,
size type i ,
lt_binary TYPE TABLE OF sdokcntbin ,
ls_binary LIKE LINE OF lt_binary ,
lv_size TYPE I ,
ls_doc_status TYPE CVAPI_DOC_STATUS ,
ls_API_ctrl TYPE CVAPI_API_CONTROL ,
l_MSG TYPE MESSAGES ,
lt_files type STANDARD TABLE OF CVAPI_DOC_FILE ,
lt_drao TYPE STANDARD TABLE OF DRAO ,
ls_drao LIKE LINE OF lt_drao ,
lv_documenttype TYPE DRAW-DOKAR ,
lv_documentnumber TYPE DRAW-DOKNR ,
lv_documentversion TYPE DRAW-DOKVR ,
lv_documentpart TYPE DRAW-DOKTL ,
lv_text TYPE string .
FIELD-SYMBOLS <fs> TYPE ANY.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_filename LIKE ls_context-filename .
get element via lead selection
lo_el_context = wd_context->get_element( ).
get single attribute
lo_el_context->get_attribute( EXPORTING name = `FILENAME` IMPORTING value = lv_filename ).
lo_el_context->get_attribute( EXPORTING name = `FILECONTENT` IMPORTING value = lv_content ).
CONCATENATE lv_text 'by' sy-uname 'cretaed at ' sy-uzeit INTO lv_text .
ls_documentdata-documenttype = 'Z99'.
ls_documentdata-documentversion = '00'.
ls_documentdata-documentpart = '000'.
ls_documentdata-description = 'Test Document Created in Web Dynpro ABAP '.
ls_documentdata-STATUSEXTERN = 'WR'.
ls_documentdata-USERNAME = 'I046361'.
ls_documentdata-WSAPPLICATION1 = 'DOC'.
ls_documentdata-DOCFILE1 = lv_filename.
ls_documentdata-DATACARRIER1 = 'DEFAULT'.
ls_documentfiles-DOCUMENTTYPE = 'Z99'.
ls_documentfiles-WSAPPLICATION = 'DOC'.
ls_documentfiles-DOCUMENTVERSION = '00'.
ls_documentfiles-DOCUMENTPART = '000'.
ls_documentfiles-DOCFILE = lv_filename.
ls_documentfiles-description = 'Test Document Created in Web Dynpro ABAP '.
ls_documentfiles-CREATED_BY = sy-uname.
ls_documentfiles-CHECKEDIN = 'X'.
ls_documentfiles-DOCFILE = lv_filename.
APPEND ls_documentfiles to lt_documentfiles .
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_documentdata
pf_http_dest = 'SAPHTTPA'
IMPORTING
DOCUMENTNUMBER = lv_DOCUMENTNUMBER
return = gv_return
TABLES
documentfiles = lt_documentfiles.
IF gv_return-type CA 'AE'.
WRITE gv_return-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING wait = 'X'.
get message manager
data lo_api_controller type ref to if_wd_controller.
data lo_message_manager type ref to if_wd_message_manager.
lo_api_controller ?= wd_This->Wd_Get_Api( ).
CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
RECEIVING
MESSAGE_MANAGER = lo_message_manager
CLEAR lv_text .
CONCATENATE 'Dcoument ' lv_filename 'Successfully stored with Document No. ' lv_DOCUMENTNUMBER INTO lv_text .
report message
CALL METHOD lo_message_manager->REPORT_SUCCESS
EXPORTING
MESSAGE_TEXT = lv_text
PARAMS =
MSG_USER_DATA =
IS_PERMANENT = ABAP_FALSE
SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CONTROLLER
VIEW =
SHOW_AS_POPUP =
CONTROLLER_PERMANENT_MSG =
MSG_INDEX =
CANCEL_NAVIGATION =
ENDIF .
endmethod. -
Unable to map the portal user with back end user through web dynpro coding
Hi All,
I 've a portal user which is mapped to back end user by system in the portal.
i 'm able to get the portal user from web dynpro application.
But unable to get the mapped back end user
this is my code
String systemalias = "SAP_CRM_PROD";
Map mapattr = new HashMap();
// IPrincipal principal = (IPrincipal) request.getUser();
// get user user mapping information
IUserMappingData userMapping =
//(IUserMappingData) UMFactory.getUserMapping().getUserMappingData(systemalias, principal, mapattr);
(IUserMappingData) UMFactory.getUserMapping().getUserMappingData(systemalias,principal,mapattr );
// For testing purposes only
//mappingData = userMapping;
HashMap map = new HashMap();
userMapping.enrich(map);
mappedPassword = map.get(UMAP_KEY_PASSWORD).toString(); //String "user"
mappedUserId = map.get(UMAP_KEY_USER).toString(); /
following is the error reported .
The project was not built since its classpath is incomplete. Cannot find the class file for javax.xml.soap.SOAPMessage. Fix the classpath then try rebuilding this project.
please help.Hi Sanjay,
request component need to be initialized before using it. Include these lines before ur code.
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
String mappedPassword = null;
String mappedUserId = null;
Also check these threads for ur help.
Accessing Mapped Username / Password
How to access user id and password via UserMapping ?
Reward points for helpful answers.
Regards,
Harini S -
Dynamically generate PDF with web dynpro
Is it possible to generate a PDF in web dynpro abap without using the interactive form UI element ? In other words just take the data in my context and convert that into a xstring pdf using a predefined template and interface?
Hi
Do tell your solution for others to benefit
Regards
Yuval -
Web Dynpro ABAP application users need a backend su01 account?
Hello Experts
i have been searching the forums trying to determine if all Web Dynpro ABAP application users need a backend su01 account?
thank you for assisting,
regards,
ThabisoSolved
-
Strange problem of Pdf downloading with Web Dynpro
Hi, experts, I have to setup a project to realize pdf downloading with web dynpro. But unluckily, I have tried all the methods in this froum ,there's really strange problem .Because when I click the link of Download UI link, there's no reaction at all, I really don't know why.Below is the codes I used , can anyone help me ? thank you very much!
public void wdDoInit()
//@@begin wdDoInit()
IWDAttributeInfo attInfo =
wdContext
.currentContextElement()
.node()
.getNodeInfo()
.getAttribute(
"Pdfsource");
ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;
binaryType.setFileName("test.pdf");
binaryType.setMimeType(WDWebResourceType.PDF);
try {
int length =
(int) wdContext.currentPdfdownloadElement().getBin_Filesize();
byte b[] = new byte[length];
b = wdContext.currentPdfdownloadElement().getBin_File();
wdContext.currentContextElement().setPdfsource(b);
} catch (Exception ex) {
"Pdfsource" is the context value attribute of type binary.And Bin_File is the xstring type parameter from my RFC contains pdf content.
I used two views and one customer-controller . I put some value in the first view to set search condition.and the second then appears and have the download UI element. Are there any additional codes I should use? pls help!Hi Hao,
Try this out
Suppose the file name is test.doc in c drive in server
create a context attribute filedata of binary type
bind it to data property
write the following code
try
File input = new File("C:
test.doc");
int length =(int)input.length();
//Create a byte array b to hold the file
byte b[] = new byte[length];
FileInputStream in = new FileInputStream(input);
//Reading the file to a byte array b
in.read(b);
in.close();
//Setting the data from the byte array to the context element.
wdContext.currentContextElement().setfiledata(b);
catch(Exception ex)
wdComponentAPI.getMessageManager().reportSuccess("Error in File
IO"+ex.toString());
// Structure information of the context attribute
IWDAttributeInfo attinfo = wdContext.getNodeInfo().getAttribute("filedata");
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attinfo.getModifiableSimpleType();
// Default File name which appears when opened on client machine
binaryType.setFileName("testing.doc");
//Explicitly setting the file type
binaryType.setMimeType(WDWebResourceType.DOC); -
Cannot download .pdf files and word docs from KM using Web Dynpro
Dear Portal Gurus,
Using KM API, I am trying to download, documents from KM in my Web Dynpro Application. But .pdf files and word docs with screenshots are not getting retrieved from KM. Word docs opens with no content and Adobe opens with an error saying "Either it is a damaged file or It is not a supported file".
I am using the following KM service to download the content.
public byte[] retrieveResourceInBytes(String strRid){
///// after a few lines ////
if (this.loggedOnUser.isAuthenticated()) {
// create a resource context with the authenticated user
rContext = new ResourceContext(this.loggedOnUser);
// create a RID to handle a resource
aRid = RID.getRID(strRid);
try {
// get an instance of a resource factory
final IResourceFactory aResourceFactory = ResourceFactory.getInstance();
// retrieve a folder/file with context
aResource = aResourceFactory.getResource(aRid, rContext);
if(aResource.isCollection()) {
aResource = (ICollection) aResource;
IPropertyMap objIPropertyMap = aResource.getProperties();
IMutablePropertyMap objIMutablePropertyMap =objIPropertyMap.getMutable();
objHashMap = new HashMap();
if (aResource != null) {
IContent oldContent = aResource.getContent();
InputStream objInputStream=oldContent.getInputStream();
byte[] theBytes = new byte[objInputStream.available()];
objInputStream.read(theBytes);
return theBytes;
} // catches all the exceptions here///
Could you please advise if I am doing something wrong else could you please advise me for any corrections which would help?
Thanks a lot in advance,
Zeena
Edited by: Zeena Ali on Mar 25, 2009 8:13 AMOn Apr 10, 2013, at 4:10 PM, AdityaKalania wrote: Replies in RED below:
Re: Cannot download pdf files from web sites
created by AdityaKalania in Adobe Reader - View the full discussion
Hi,
Which web browser are you using to view the PDF? Safari 5.1.8
When you open the PDF in Adobe Reader add-in you will either see a floating toolbar
http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-5224223-317859/430-90/floating +toolbar.JPG
or a normal toolbar
http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-5224223-317860/450-11/normalto olbar.JPG
both the toolbars have save button, use the button to save the file locally. I do not see these toolbars. I do, however see this
and it works! Thanks
Hope this will help you.
Thanks
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5224223#5224223
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5224223#5224223
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5224223#5224223. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Adobe Reader by email or at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746. -
Mass upload & Download of PDFs in Web Dynpro ABAP
Hi All,
Is it possible to download multiple PDF's at one go ? for example if you have a Table UI control where each row has one clickable link that generates a PDF using WebDynpro ABAP Application, we want to enable multiselect property of Table UI and provide Mass Download Button control on click of which all selected rows should generate PDF and then get dowloaded to a specific location on machine (c:/). or if there is any other alternative possible ?similarly for Mass Upload we wish to multi select PDFs and upload them to R/3 at one go ?
please let me know if such thing is possible ? if yes is it a good option to have ? as we have users who have to upload these PDF one by one and they wish if they could simply select all PDFs at one go and click Mass upload..Note that there are some validation that we perform once we upload PDF before posting PDF data to backend.
your help & comments would be Highly Appreciated !!
Thanks
Asif>
Maged Ishak wrote:
> Hi Thomas,
>
> could you give me an example how can i download multiple objects without multiple prompts with the class CL_ABAP_ZIP. I use a Web Dynpro for ABAP and I have for Example many word file and i want to download all file in one ZIP-File.
> thanks in advance
> mishak
You simply use the CL_ABAP_ZIP class to combine the multiple binary strings of the word files together.
data izip type ref to cl_abap_zip.
data zip_xstring type xstring.
create object izip.
loop at ifiles assigning <Wa_file>.
izip->add( name = <wa_file>-filename
content = <wa_file>-filecontent ).
endloop.
zip_xstring = izip->save( ).
Maybe you are looking for
-
Address book and calendar sync from Mac to Google
Hi, I have a HTC Desire phone and wish to sync my Contacts and Calendar items to it via Google. I have pulled my Address Book and Calendar from my old p1i phone on to my old Power Book and exported these. I have then imported these onto my Macbook Pr
-
After updating to iTunes11 I can only have it open for around 10 seconds then I get the beach ball and it crashes, even pluging the phone in to sync it still crashes after 10 seconds. I have tried a restart of the iPhone and the Mac, like I have seen
-
Is Apple ever going to address this force reload problem in Safari?
Seriously, Safari 5.1 is, for all intents and purposes, completely disabled now. I leave a lot of windows and tabs up at any given time, and when I return to a window after having been someplace else (usually coding in a plain text environment), the
-
App world not useable after upgrade
Hope someone can help me.since I have upgraded my app world iam no longer able to use it.it allows me in then brings up.A blackberry identity update is needed.would you like to install it now.you say "yes"then says contacting to blackberry I'd server
-
Block internal batch number at plant level
Dear Experts, I have activated the internal batch number assignments at client level. But for some plants or one of the company code, I want to block the internal batch number creation during the goods receipt at production order confirmation(CO11N).