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..
Similar Messages
-
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 -
Starting existing workflow from web dynpro application (ABAP)
Hi experts,
I am working on web dynpro application from which when I click on a button an existing workflow should trigger. This will be used in portal replacing existing iview with jsp. I did lot of reading on SDN maybe too much that I am confused how to get started. Here is what I have currently.
We have an existing workflow that sends an approval email to manager when ever some unit information changes. In current functionality, workflow is triggered by event which is linked to workflow in transaction "swetypv". We defined scenario in "qisrscenario" that contains all elements to populate workflow container. The methods to get data into workflow container, send email etc are all written in business object methods. We have a class that implements standard SAP BADI "IF_EX_QISR1"(IF_EX_QISR1~SCENARIO_PROCESS_USER_COMMAND method) that probably has all logic. In current functionality when the workflow gets created it sends notification number back to portal jsp page that triggered the workflow on button click. Users look at notification number in iqs23 for workflow log, PCR form data etc. and I need that functionality too. Now I am confused where I should start so that I can use ew web dynpro applciation instead of jsp iview but want all the functionality that we currently have. How can I start workflow and get notification number back to web dynpro so that I can display that to user? The approving manager goes to UWL to approve, reject the workitem and workflow then finishes.
Any help will be greatly appreciated.
Thanks.
MithunHi.,
Using FM SAP_WAPI_CREATE_EVENT You can Achieve this., try the below piece of code.,
DATA: OBJECT_TYPE TYPE SWR_STRUCT-OBJECT_TYP VALUE 'ZBUS333', " Enter Your Business Object here
OBJECT_KEY TYPE SWR_STRUCT-OBJECT_KEY,
EVENT TYPE SWR_STRUCT-EVENT VALUE 'FIRE'. " Enter Your Event here
DATA: lt_cont TYPE STANDARD TABLE OF swr_cont,
ls_cont TYPE swr_cont.
ls_cont-element = 'NAME'. " To Pass Values to business Object you append to container
ls_cont-value = lv_name.
APPEND ls_cont to lt_cont.
ls_cont-element = 'ID'.
ls_cont-value = lv_id.
APPEND ls_cont to lt_cont.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = OBJECT_TYPE
OBJECT_KEY = OBJECT_KEY
EVENT = EVENT
COMMIT_WORK = 'X'
EVENT_LANGUAGE = SY-LANGU
LANGUAGE = SY-LANGU
USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
TABLES
INPUT_CONTAINER = lt_cont
* MESSAGE_LINES =
* MESSAGE_STRUCT =
hope this helps u.,
Thanks & Regards,
Kiran -
How to change the Portal Password using a link from Web dynpro application
Hello Everybody,
I have a requirement to change the user password from a web dynpro application which is available on a mobile device. Firstly User will log into the portal through a mobile device and after getting authenticated user will be redirected to the mobile application. Within this mobile application there will be a link to change the login password(Portal login). Can somebody tell me how can i change the portal login password from a link available within the mobile application. Looking forward for a suitable reply.
Thanks to all,
Regards,
Saby.Hi Maksim,
Thanks for your reply..but i would also like to know can we directly use the Change Password Iview "persoUserPassword" from the portal. Can i directly Pass the URL of this iview from the portal to a "Change Password" link in the web dynpro application, so that when the user click this link he should be able to see this Iview on his/her mobile device and should be able to change the password from there. But i dont know whether this iview will appear properly on the mobile device or we have to have a custom web dynpro application for this purpose...Please reply with a suitable answer.
Thanks in advance.
Regards,
Sarabjeet Singh. -
Show ObjectSelector from web dynpro application
Hello, I´ve read in this how to configure a ObjectSelector UI pattern in a web dynpro application but even looking at the code I havent found out how to show it in actions event handler code.
In the caf tutorial center there is an example that implements the call for the ObjectBrowser, but the interface for ObjectSelector doesnt have the showView() method used for ObjectBrowser and even searching in the foruns I couldnt find a way to show the component.
Does anyone know how to do that ?
Thanks in advance,Hallow Experts,
Please give me some clue; I hope you will give me some clue.
Ok.
Thanks' and Regards
Tarapada Dan -
How to store text field data from web dynpro application in pcd ?
Hi Forum,
I am new to web Dynpro.
I want to store user specific data (a text field value) from a wd application in PCD and access it every time the user runs the application.How can I achieve this?
Thanks,
Mickey.Hi
I created the "read" and "update" methods in my application service. How can I call them? I created and implemented the methods just like here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/340fc0ea-0c01-0010-74bf-965b11031e77
Operations:
- readMyEntityService:
- updateMyEntityService
Implementation:
retValue = getMyEntityService().read(key);
getMyEntityService().update(dS0);
In Web Dynpro there is this update method with the code above (in my original post).
How can I call the update-method????????
Kind regards
Bettina -
Navigate from Web Dynpro application to an iView URL using parameters
Hi all,
I have a problem navigating from a Wed Dynpro application to an iView URL. For the navigation, I use the WDPortalNavigation.navigateAbsolute() method. The navigation works fine, unfortunately any parameter that I pass to the iView URL is ignored.
Here is the code I use:
WDPortalNavigation.navigateAbsolute(
"ROLES://portal_content/rack_visualization/RackView",
WDPortalNavigationMode.SHOW_INPLACE,
WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
"space=1&style=3&rack=none");
The RackView iView is based on the "iView URL" template. I expect that the navigation points to a URL like my_encapsulated_url?space=1&style=3&rack=none. Unfortunately the parameter passing doesn't seem to work.
Any help would be greatly appreciated!
Thanks,
Christophedid u get this working ???
I have a similar issue with the url iview.
thanks
venkat -
Accessing txt files in the App server from web application
Hi All,
We have a use case, where we need to access txt files from the ADF web application.
We will display to the user the path of the file and whenever he/she clicks, it should be downloaded automatically to the users machine.
Environments we need to develop: JDeveloper 10.1.3.4 and Oracle App Server 10.1.3.1
And our server has credentials and only those who have access to the server can access the files.
Point me or suggest me a good solution to this use case.
Regards,
Naga.Hi Joonas,
i was able to download the files, thanks a lot for your guidance. i will mark your answer as correct.
Can you let me know how to achieve the following usecase.
1. there will be multiple text files in the server i.e., out of our web application context like in some folder
2. And we need to give user a http link and if he clicks on the link that file should be downloaded automatically to his machine.
and we are using oracle app server 10.1.3.4, please point me to some document or example.
thank you.
naga. -
Calling a new Browser Window from Web Dynpro Application - Empty Context
Hello,
I want to open a view in a new browser window, and followed the same way which is described in this thread:
Open view in new browser window
My first try was creating two applications, which refer to the same Component Controller. The opening of a new browser window is triggered by an action, which is called in the other application. As both applications have the same Component Controller, I thought, the context content has to be the same, but actually the context attributes are empty after opening of the new window.
In my second try I created two applications with two different Component Controllers, mapped via embedded Interface Controller. The effect is the same - I have no context content in the view.
Please, can anybody help me?
Thank you in advance.
Ilona SeifertI done something like this:
[code]
try {
strURL =
WDURLGenerator.getApplicationURL(
"$<b>PROJECT_PATH</b>$/$<b>PROJECT_NAME</b>$",
"$<b>APPLIC_NAME</b>$");
} catch (WDURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
strURL += "?par1=";
strURL += var1;
strURL += "&par2=";
strURL += var2;
strURL += "&par3=";
strURL += var3;
[/code]
and after i retrieve them:
[code]
Var1Value= WDWebContextAdapter.getWebContextAdapter().getRequestParameter("var1");
[/code] -
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 -
Connecting to SAP from Web Dynpro
Hi,
I am new to web dynpro, but have downloaded the java sneak preview edition and worked through it a bit. I understand that we have to use JCo to connect to SAP from Java Web dynpro, . Is it true?
What about web dynpro for ABAP? Can we use normal select statements to connect to SAP? How is it exactly done in that case?
Thanks in advance
PGhi pg
Just go thru this example which describes how to connect to SAP from web dynpro application.
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on accessing abap functions in web dynpro - 4.htm
thanks
kris -
Insert multiple records from web dynpro
Hi,
How to insert multiple records from web dynpro applications to SAP backend system ?
Thanks,
sowmyaHi soumya..
if want to multiple row selected then save into the Sap back End..
value node--table.
Backend value node=table_bapi_input;
back end internal table --tableback.
int size=wdcontext.nodeTable().size();
int lead=wdcontext.nodeTable().getLeadSelection();
table_bapi_input in=new table_bapi_input();
wdcontext.nodetable_bapi_input().bind(in);
for(int i=size-1;i>0;i--){
tableback set=new tableback()
if(lead==i || wdcontext.nodeTable().ismultiSelection(i)){
set.setName(wdContext.nodeTable().getTableElementAt(i).getName();
in.addZc_input(set);
wdContext.currenttable_bapi_inputElement().modelobject().excute();
wdContext.nodeOutput().invalidate();
thanks
jati -
Navigate from Web Dynpro app to portal page
Dear All,
I've created a number of Web Dynpro applications which I run from various portal pages. From one of the Web Dynpro's I navigate to a different portal page using the WDPortalNavigation.navigateAbsolute method. This works fine, but I'm left with one problem:
I'd like to pass parameters from the Web Dynpro which navigates to the portal page to the Web Dynpro applications which run on that specific page. I've appended the parameters to the URL I'm navigating to (eg ROLES://<pcd location>?<param=xxx>) and in the Web Dynpro's I've added a parameter to the Default interface plug. This doesn't seem to work. As an alternative I've added the statement WDWebContextAdapter.getWebContextAdapter().getRequestParameter("param") to the doInit() method of the view, but this also doesn't work.
Either I'm doing something wrong, or what I want to accomplish is not possible. Does anybody know of a way to access parameters passed to a portal page from Web Dynpro applications contained on that page?
Thanks,
ArnoudI hope you are passing parameters between two WebDynpro applications.
Please go through the example available for passing interaction between two webdynpro components.
Please check the following link
Alternative method for navigating to another page ?
or the following link
Re: Can we pass parameters in querystring of the webdynpro application? -
"UnknownHost" exception while connecting to mysql from web dynpro
Hi
I am trying to connect to Mysql 5.0 database from web dynpro application.I am using NWDS 7.1.
I have followed this blog and created the datasource in NWA.
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8675
I have written the following code in my web dynpro application.
InitialContext ctx;
try{
ctx=new InitialContext();
DataSource ds=(DataSource)ctx.lookup("jdbc/dbconnect");
Connection conn=ds.getConnection();
wdComponentAPI.getMessageManager().reportSuccess("connected");
Statement stmt=conn.createStatement();
String query="select Col from TestTable";
ResultSet res=stmt.executeQuery(query);
while(res.next())
String str1=res.getString(1);
wdComponentAPI.getMessageManager().reportSuccess(str1);
}catch (Exception e) {
wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());
// TODO: handle exception
But I m getting the following error as "UnknownHost exception"
I checked with the datasource created in NWA.Here in the Driver status it is showing the driver as unknown.
I have added the following driver.
mysql-connector-java-5.0.8-bin.jar
Any idea on how to solve this problem?
Do I need to add the driver in my application also.
Thanks in advance,
SumangalaHi,
Have you created a datasource in Visualadmin?
Was that tested and was it success full?
If you havent done this this could be your issue
make sure the following code is using the correct datasource
DataSource ds=(DataSource)ctx.lookup("jdbc/dbconnect");
Regards
Ayyapparaj -
Debugging a Web Dynpro Application (e-recruitment)
Hi Experts,
I have an error in SLG1 coming from web dynpro application ERC_A_DEL_EXT_CAND
I am not sure how to debug this issue. Where do I put the breakpoint to get the debugger to launch?
Thanks in advance.
ShaneHi,
Here is the error:
The error occurred in program CL_HRRCF_SEARCH_MASK_GROUP====CM003 line 19
Customizing table T77RCF_SMG_ASM contains no corresponding entry for GROUP_ID=0021
The error occurred in program CL_HRRCF_SM_CUST_TABS=========CM006 line 20
The issue is, I have no entries in table T77RCF_SMG_ASM for GROUP_ID=21
Any thoughts?
Shane
Maybe you are looking for
-
Can you some how bring up the selected transient spots of a created apple loop into Logic for chopping purposes? then import them into an exs instrument? and if so will the chops adjust accordingly when the tempo is changed on the transport? thanks D
-
A few day ago I upgraded my Mac Pro 1.1 from Tiger to Leopard 10.5 then 10.5.8. I added Final Cut Suite 3 and Photoshop Elements 9. Now (in FCP) my viewer & canvas windows are only white. No graphics, no video clips... just white. There are also some
-
Looking for an API to get calculate the price
Hi , I am trying to find an API to calculate the Price of an item (Quote) This need to find the price considering the Modifier , and qualifiers. I have setup up qualifiers on Customer,Price List , Order levels. I have tried the below given script , b
-
My iPad turned on while it was in my suitcase and began playing through my iTunes music. I turned it off and can no longer turn it back on. I get a message "iPad disabled." How can I restore it without losing my data? I'm using a friend's computer a
-
Dyld Error Message with Sophos anti virus
Hi, I tried to uninstall Sophos Anti virus. However, I uninstalled it manually then this annoying message always appears to me. Is there any possible way to solve this problem? Thanks Process: SophosUIServer [2669] Path: /Library/S