Launching instant messaging component from web dynpro
Hi
We have a requirement to launch instant messaging component from a web dynpro java link. Could you tell me what APIs can be used here? Is it possible to launch the component in a new browser window through some API calls?
From collaboration launch pad if we take the link of instant message from properties and try to open it a new browser instance, we find a message staing "Session not started" and there is some java script error in the page. Also the Send button is invisible and the other buttons Leave Session, Close Session are inactive. Is it possible to launch the messaging window from a url?
The url we used to launch it is as below.
http://host:port/irj/servlet/prt/portal/prtroot/com.sap.netweaver.coll.appl.ui.rtc.RTCComponent?jspName=Chat.jsp¶mIndex=2&initiator=X
Looking forward for your comments.
Thanks
Sudeep
It's possible. On your alv you have to add botton with action to call bsp.
You can use the following coding to determine the object type...
CALL METHOD lr_mapping_srv->determine_ui_object_of_bor
EXPORTING
iv_bor_object_key = lv_bor_object_key
iv_bor_object_type = ls_orderadm_h-object_type
iv_logical_system = ls_orderadm_h-logical_system
RECEIVING
rv_result = lv_ui_object_type.
Then you have to build bsp...
lv_orderadm_h_guid_c = ls_orderadm_h-guid.
CONCATENATE
lc_par0 sy-mandt
lc_par1 lv_ui_object_type
lc_par2 lc_display
lc_par3 lv_orderadm_h_guid_c
lc_par4 'nocookie'
INTO lv_query.
CALL METHOD cl_bsp_runtime=>if_bsp_runtime~construct_bsp_url
EXPORTING
in_application = lc_bsp_application
in_page = lc_bsp_page
IMPORTING
out_abs_url = lv_open_url.
CONCATENATE lv_open_url lv_query INTO lv_open_url.
and finally you have to call browser...
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
CALL METHOD lo_window_manager->create_external_window( EXPORTING url = lv_open_url
RECEIVING window = lo_window ).
lo_window->open( ).
Similar Messages
-
Pass Parameters to an external appl when launched from web dynpro ABAP .
I want to Pass Paramaters to an external application when launced from Web dynpro ABAP . I have successfully launched an .exe file ( Notepad / eViewHSEditor ) from Web dynpro using the logic from Standard WD_TEST_APPL_ACFEXECUTE component But I am unable to Pass paramters to the .exe file .
example :- I would like to pass parameters text1 text2 in the arugement list and I expect it opens an untitled notepad and in the file it will have parameters text1 text2 . But it is behaving in a different way . Below are the detailed steps of what I have done .
The steps that I followed :-
1) Right now I have created the white list Configuration for Notepad.exe
2) I have created 1 and 2 postions both of type string and permission Legal .
3) The Paramter Value is * for both 1 and 2 .
4) I activated the whitelist and it generated an .XML file
5)
application = 'C:
WINDOWS
system32
notepad.exe'.
argument = 'text1 text2' .
co_element :- I am reading the element from the conrtext .
co_element = wd_context->get_lead_selection( ).
co_element_stru-attribute_name = 'ERROR'.
co_element_stru-element = co_element.
wd_this->acf_method_handler->if_wd_acfexecute~execute( application = application
argumentlist = argument
errorinformation = co_element_stru ).
when i execute the application , it is trying to launch a notepad with file 'text1 text2.txt' and it doesn't have one , it is asking do you want to create . If You yes, it will open notepad with name 'text1 text2.txt' . If you Pass abcd in the arugement list , if the file with name abcd.txt exists , it opens the notepad with that file name .You try to open notepad from your PC with the same command, you will the same result.
start->run->notepad "test1 test2". You get the popup saying that "test1 test2" file is not existing. You can google it to find a way to pass the text while opening notepad and try to fit that in your WebDynpro argument. I doubt if it is possible though. -
SRM 7.0 find transparent table name from Web dynpro Component
Hi ,
I am trying to find the transparent table name from Web dynpro component dictionary structure. I am working in SRM 7.0. Please let me know how to find the transpartent table for a field.
Thanks,
Monicahi,
your question is very unclear and does not relate to performance.
SRM uses webdynpro ABAP so the recommendation will not help.
Do you need a technical UI element?
Or the application table where the business data of an UI is stored???
If it is the later, then you can use the SQL trace, change to element you are interested in, and trace it. The table should appear in the trace in connection which an UPDATE command. Still a bit cimbersome.
Siegfried -
How to get the Response Code when a URL is launched from Web Dynpro
Hello Experts,
I have a Web Dynpro Application in which in one of its views i have an IFrame UI element in which i will show a resource stored somewhere ..
But before showing it i want to check if the resource actually exists. For this i have to check the HTTP Response code from Web Dynpro Application without setting it in the Iframe..
I am using the following code to get the Response Code:
try{
URL url = new URL("Some Url");
HttpURLConnection.setFollowRedirects(false);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.connect();
wdComponentAPI.getMessageManager().reportSuccess("Response code ="+connection.getResponseCode());
}catch(Exception e){
wdComponentAPI.getMessageManager().reportSuccess("Exception");
Now the Problem is whatever response Code occurs 403 (for No Proper Authorization), 404 (for Resource not found) etc..
i always get Response Code= 500 (which is for Internal Server Error) shown in the messgae i have printed.
Please let me know the correct way of getting the Response Code from Web Dynpro.
Also my resource is lying on a SAP Portal 6.4
Best Regards
Sundeep
Edited by: Sundeep Sethi on Feb 18, 2008 9:07 AM
Edited by: Sundeep Sethi on Feb 18, 2008 10:23 AMHi,
Check this code from /thread/5242768 [original link is broken] if it works.
try{
URL myurl = new URL("http://calendar.google.com");
URLConnection connection = myurl.openConnection();
if(connection instanceof HttpURLConnection) {
HttpURLConnection httpConnection = (HttpURLConnection) connection;
HttpURLConnection.setFollowRedirects(true);
httpConnection.setRequestMethod("HEAD");
httpConnection.connect();
System.out.println("Response = "+httpConnection.getResponseCode());
catch(Exception e) {
// print exception
Regards,
Harini S -
CAF DB Update for CAF Entity Service from Web Dynpro
Hi all,
I have created an entity service in CAF called Contacts which contains the following attributes.
phoneNo
cellNo
emailID.
Another entity service called "Person" is created. This contains the following attributes.
personId
personName
personAddr
contactsRef. (Cardinality -> 0..n , Relational Type -> Composition)
That means Contacts entity service is used within Person entity service. Now it is working fine within CAF service browser. Now the Web Dynpro DC of CAF application is used within another custom Web Dynpro DC project. I want to store data from Web Dynpro.
Within the context of component controller of Web Dynpro the structure is like
APerson
|_ personId
|_ personName
|_ personAddr
|_ contactsRef
|_ phoneNo (Under contactsRef)
|_ cellNo (Under contactsRef)
|_ emailID (Under contactsRef)
So I have written the following code within web dynpro custom method.
APerson person = PersonServiceProxy.create();
java.util.List ls = new ArrayList();
for(int i=0; i<4;i++)
AContacts contact = ContactsServiceProxy.create();
contact.setCellNo("9092130156");
contact.setEmailID("[email protected]");
contact.setPhoneNo("432258");
contact.getAspect().sendChanges();
ls.add(contact);
person.setRelatedModelObjects("contactsRef",ls);
person.setPersonID("9999");
person.setPersonName("xyz");
person.setPersonAddr("ABC, KOL");
wdContext.nodeAPerson().bind(person);
person.getAspect().sendChanges();
CAFServiceFactory.getServiceFacade(idendityDefinition.class);
After saving the data from Web Dynpro I am trying to test it from CAF service browser. But I am getting only the parent row. I mean only the value of personId, personName and personAddr fields which I have stored from Web Dynpro. But no value is coming within the table for Contacts entity service for composition relation.
Could anybody help me how can I solve my problem?
Thanks & Regards
Chandan
Message was edited by:
Chandan JashHi Chandan,
Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
I am not sure the code is actually adding the contact model object to person.
Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
award points if info is helpful
Regards,
Anish -
Calling Batch input from Web Dynpro - any alternatives for table updates?
Hi!
I am asked to create a screen in Web Dynpro for the GJ30 transaction (JV Cutback mapping of WBS' elements). I created a remote enabled function module which call batch input for GJ30 . Testing the Function modules direclty goes fine, but not calling the function module from WD. then I get the same error message as when I once tried to call SAP GUI from Web Dynpro ( Call transaction /submit program).
My next step is to try to create a batch input session (instead of call transaction) and run it using rsbdcsub, and then check the result of the run. But maybe this will fail of the same reason as well, and I suppose this will make the user waiting longer for the response .
I read somewhere that Web Dynpro does not support batch Input. But what can you do when there are no standard BAPI's for the update you want to do in SAP ? We are not supposed to do direct table updates.
Anyone who have struggled with the same issues and found a solution??
regards, TineHi,
as BDC is calling screens and in Webdynpro ABAP you cannot use SAP GUI sceeen, you are getting short dump.
Refer CNTL_SYSTEM_ERROR in webservices from r/3 system
Thanks,
Chandra -
HTTP form post from Web Dynpro Java Application without opening new window
Hi Experts,
We are trying to submit form data to an external URL from Web Dynpro Java application. We are achieving this with the following piece of code.
try
strPrintContent="<html>"+
"<head>"+
"<script type=\"text/javascript\">"+
"function myfunc () "+
"{"+
"var frm = document.getElementById(\"paymentForm\");"+
"frm.submit();"+
"}"+
"</script>"+
"</head>"+
"<body onLoad=myfunc()>"+
"<form id=paymentForm method=post action=\""+merchantURLPart+"\">"+
"<INPUT type=hidden name=username value="+userName+">"+
"<INPUT type=hidden name=pass value="+passWord+">"+
"<INPUT type=hidden name=senderid value="+senderID+">"+
"<INPUT type=hidden name=dest_mobileno value="+mobile+">"+
"<INPUT type=hidden name=message value='"+msg+"'>"+
"<INPUT type=hidden name=response value="+response+">"+
"</form>"+
"</body>"+
"</html>";
IWDWebResource webResource = WDWebResource.getWebResource(strPrintContent.getBytes(),WDWebResourceType.HTML);
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(webResource.getAbsoluteURL(),"WBSEDCL");
window.show();
catch(Exception e)
wdComponentAPI.getMessageManager().reportException("Error : "+e.toString(),false);
But it opens another window. We dont need that. We have to stay on the same window. Please suggest what can be done.Hi,
You can create a HTML file with the request post parameters and the external URL something like this:
public java.lang.String GetRedirecturl( )
// External URL
String html = "<html><head></head><body onload=\"load()\"> " +
"<form id=\"form1\" action=\"https://www.abc.com/xyz.jsp\" method=\"POST\">" +
// Post Parameters
"<INPUT TYPE=\"HIDDEN\" NAME=\"Param1\"VALUE=\""+Param1Value+"\">"+
"<input name=\"sap-wd-resumeurl\" type=\"hidden\"/>" +
"</form> " +
"" +
"<script>" +
"function load(){" +
"var loc = window.location.search.substring(1);" +
"var queryString = loc.split(\"sap-wd-resumeurl=\");" +
"if(queryString.length > 0)" +
"{" +
"var resumeURL = queryString[1].split(\"&\");" +
"if(resumeURL.length >= 0)" +
"{" +
" document.forms['form1'].elements['sap-wd-resumeurl'].value= unescape(resumeURL[0])" +
"}" +
"}" +
"document.getElementById('form1').submit();" +
"}" +
"</script>" +
"</body> </html>";
String redirectUrl = "";
byte[] byteArrayHtmlData = null;
try {
byteArrayHtmlData = html.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
wdComponentAPI.getMessageManager().reportException("Internal error occurred. Please try after some time",true);
IWDResource htmlResource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(byteArrayHtmlData), "Redirect.html", WDWebResourceType.HTML, true);
redirectUrl = htmlResource.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());
return redirectUrl;
Hope this will be helpful.
Regards,
Anurag -
Regarding how to pass the data from web dynpro to workflow
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayCheck this [thread|SAP_WAPI_START_WORKFLOW;
-
How to pass the data from web dynpro to workflow.
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayHi
you can use function module
data ls_input_container TYPE swr_cont.
data lt_input_container TYPE TABLE OF swr_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = ptask
IMPORTING
return_code = lv_return_code
new_status = lv_new_status
TABLES
input_container = pinput_container
message_lines = lt_message_lines
message_struct = lt_message_struct.
where you pass the data in imnternal table "pinput_container" as
ls_input_container-element = 'KUNNR'.
ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'CLUSER'.
ls_input_container-value = lv_cluser.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'BUKRS'.
ls_input_container-value = lv_bukrs. " youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VKORG'.
ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VTWEG'.
ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'SPART'.
ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
*Also Forgot to mention where ptask is your workflow ID *
Regards,
Arvind
Edited by: Arvind Patel on May 14, 2010 7:38 AM -
Passing parameters to Transactions from Web dynpro Application through ITS
Hi,
i need to call a transaction from Web dynpro through ITS. On action from web dynpro application, i am concatenating the respective parameters mentioned below along with URL. The problem is one parameter(VARIANT) is being passed to the t-code CAT3 correctly. The next mandatory parameter(PERNR) is not passed to the respective field.Here is the URL Code:
CONCATENATE 'http'
'://' host ':' port
'/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'CAT3'
'%20TCATST-VARIANT=' lv_name2 '&CATSFIELDS-PERNR=' lv_name1 INTO url.
Called T-Code CAT3
Passing Parameters are:
Data Profile TCATST-VARIANT
Pernr: CATSFIELDS-PERNRPradeep,
iam trying to pass values from webdynpro application to SAP GUI Transaction
here is the sample code which iam using
CONCATENATE 'http://s0164dep01.adta.uae:50000/irj/portal/interop?NavigationTarget=pcd:portal_content/Testing/trn_iw33?'
'%20CAUFVD-AUFNR='
'ApplicationParameter=CAUFVD-AUFNR='
lv_workorder';'
'DYNP_OKCODE=SHOW'
INTO lv_url.
i could'nt able to succed as its displaying page not found exception.
Help me on this to proceed further
Regards
Jaipal.E -
Calling adobe form from Web Dynpro ABAP
Hi Friends,
This is the following error, which i got when i tested my application. Calling adobe form from Web Dynpro ABAP.
WebDynpro Exception: ADS: Request start time: Tue Nov 16 14:00:22 YEKT
2010(200,101).
Can some one tell me how to solve this....
Regards
SankarHi,
Please refer to this same link in forum
WebDynpro Exception: ADS: Request start time, start Interactive Form
WebDynpro Exception: ADS: Request start time
Thanks
Pradeep -
Trigger File Generation to a Server from Web Dynpro Application
Hi Everybody! Hope you had a good new years eve
Is it possible to generate a File on a Server outgoing from Web Dynpro?
I tried to use GUI_DOWNLOAD. But as I couldn't use the GUI_DOWNLOAD from the Web Dynpro, I wrote a Report "ZCMI_EXPORT_FILE" that generates a Text-File. When I start the Report by myself, the file gets generated. All fine.
To be able to generate the File from Web Dynpro, I created a Batch Input Function Module, that I call in the Web Dynpro. The File is not created and it does not show any errors.
Do you have any idea how i can get this working? I'd also be happy with a different approach.
Best Regards and Thanks,
Steffen
REPORT that is called with Batch Input from Web Dynpro:
call function 'ZFM_GENERATE_EXPORT'
exporting
it_detail_record = lt_records
is_export = gs_export
importing
ev_string = gs_export-document
et_dataset = data_tab
exceptions
parameter_is_initial = 1
others = 2.
if sy-subrc <> 0.
endif.
concatenate '\\SERVER\EXPORT\' gs_export-filename into lv_filename.
call function 'GUI_DOWNLOAD'
exporting
filename = lv_filename
tables
data_tab = data_tab
exceptions
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
others = 5.
if sy-subrc <> 0.
exit.
endif.HI,
GUI_DOWNLOAD does not get's executed in the Backgroud.
there is no way to do it as a background job.. create the folder.. transfer the file to the application server in the backgorund using OPEN DATASET... use the tcode CG3Y to download the file from the app server to your folder.. -
Authorization error calling a XI web service from Web Dynpro
Hi all,
I'm trying to communicate to XI from a Web Dynpro application but I get an Unauthorization error (401).
I've generated a WSDL in XI and import it to web dynpro as a new Model. But when a I call the web service, the exception "Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized." appears.
I don't know how to pass the right user and password from Web Dynpro, I've tried the web service from SOAP client tools and it works fine.
I'll apreciate any help.
Regards,
Diego.Hola mi nombre es Luis,
Creyendo que eres español te escribo en tal idioma.
He visto que a ti también te devolvía un error de autentificación 401, y que lo subsanaste, pero a mi con la solución que te dieron no me vale, ya que implemento el código que te ofrecieron para arreglarlo y ahora me da un fallo de "Server Error" poniendo en usuario y password, los correspondientes a XI.
+Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay req=new Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay();
wdContext.nodeRequest_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay().bind(req);
req._setUser("username");
req._setPassword("password");+
No sé si es que ese usuario y contraseña son otros distintos.
Si pudieras ayudarme, te lo agradecería.
Un saludo, Luis -
Calling a Report Program from Web Dynpro
Hi all,
I have a requirement, where i have to call a report program from web dynpro?. Wether its possible to call a report program in web dynpro?. Is we can call it, how this functionality has to be achived?Hello,
Yes it is possible to call report using SUBMIT statement from one of the method defined in COMPONENTCONTROLLER's method tab.
Once you define the method with SUBMIT statement then call that method with proper event.
Rest configuration will remain same for ABAP webdynpro.
Hope this helps.
Thanks,
Augustin. -
Example "Designing Component-Based Web Dynpro Applications" in NWDS 7.1
hi,
importing Designing Component-Based Web Dynpro Applications.zip into NWDS 7.1, I get ~ 200 errors.
after repairing the projects (in WEB-Dynpro View) ands migrating, there are 76 errors:
Component 'CustomersUIComp': Used component/component interface is missing: ComponentInterfaceImplementation com.sap.cd355.comp.adv.modelcomp.ModelCompInterface Hint: Check availability of public part archive LocalDevelopmentcd355compadvui_final~sap.com/src/packages/com/sap/cd355/comp/adv/ui/customers CustomersUIComp.wdcomponent ModelComponent 1240309796017 1800
TextView 'city_editor.text': Context attribute 'CustomersView.Customers.Address.city' does not have a type and cannot be bound to a UI element. Hint: Remove the binding or bind a context element matching the property's type. LocalDevelopmentcd355compadvui_final~sap.com/src/packages/com/sap/cd355/comp/adv/ui/customers CustomersView.wdview text 1240309796032 1821
ViewUsage 'com.sap.cd355.comp.adv.ui.customers.CustomersUICompInterfaceViewCustomersUIComponentUsage1': Embedded View/InterfaceView is missing. InterfaceView com.sap.cd355.comp.adv.ui.customers.CustomersUICompInterfaceView Hint: Repair Window LocalDevelopmentcd355compadvmaster_final~sap.com/src/packages/com/sap/cd355/comp/adv/master MasterComp.wdwindow Unknown 1240309796503 1823
hermannSeems like your example requires some other DCs as well, which don't appear to be part of the zip you mentioned.
Maybe you are looking for
-
How to trigger a process task on IT Resource process form
Hi, I want to know how to trigger a process task on IT resource process form using OIM API.For Example:- If a task ilike an e-mail is to be sent on the departure date of a user.So,how can it be done using API? Thanks.
-
Creating a shopping cart in iweb?
Does Apple have software that allows me to create a shopping cart in Iweb?
-
Material type for Project related
Hi , When creteing the material master we have which take "Material Type" if it related to project , i am perticular about construction and instaltion related business topic . Normally we take Raw material , semi finished material and finished mate
-
I cannot send text message from the message icon. When I click on the app, it asks me to sign up for Imessages. When I do that, it tells me that my existing e-mail address is already associated as an Apple I.D. Can anyone offer any suggestions on
-
Why do u need conversion routine at object level?
hi friends, what scenerio we use conversion routine at object level, while creating my character , there is option conversion routine, when we use, please give me 1 scenerio with sample code? regards ss