Calling a Method in Web Dynpro ABAP
Hi Experts,
I have created a class in se24 and called its methods in web dynpro by simply creating its object. It is working fine. After that i came to know that method should be called through creating a service call in WD.
What is the standard way and why?
Thanks
Ravindra.
Hello Ravindra ,
I think the better way is to create an assistance class ( Say A1) and create an attribute (Say AC1) as object of your class ( Say C1 ).
In the costructor of you assistance class A1 you can instanciate the object of C1 .
Now inside a method of assistance class you can call the method of C1 any time because AC1 is already instantiated .
MVC architecture recommends you should have separate method to aceess the data and you write your business logic in assitance class methods .
Hope this will help you .
Regards
Vivek
Similar Messages
-
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 -
How to call custom themes for Web Dynpro ABAP Application?
Hi,
I need to change the appearance of Web Dynpro ABAP application. So far I followed below steps,
1. Created theme folder u2018testngou2019 (SE80->MIME Repositoty -> SAP->PUBLIC->BC->UR->nw5->themes -> u2018testngou2019 ).
2. used program BSP_UPDATE_MIMEREPOS to dowmloaod content of u2018sap_tradeshowu2019 (SE80->MIME Repositoty -> SAP->PUBLIC->BC->UR->nw5->themes -> sap_tradeshowu2019) to desktop.
3. Modified the themes using Eclipse Theme Editor.
4. used program BSP_UPDATE_MIMEREPOS to upload modified themes to MIME repository u2018testngou2019 (SE80->MIME Repositoty -> SAP->PUBLIC->BC->UR->nw5->themes -> u2018testngou2019) .
My current URL is like http://server.name:XXXX/sap/bc/webdynpro/sap/hrrcf_a_startpage_int_cand?sap-client=XXX.
Now I want to know how custom themes called for Web Dynpro ABAP Application.
Is my approach correct?
...NaddyHi Naddy,
What you used is one way and even I failed when tried that method,
Instead go to SE38 - WD_THEMES - and you need to upload the zip file and you need to follow a folder structure.
it is case sensitive, atleast the zip file.
Make a zip file by name "Project.zip" -
Create a Folder Project and have the below folder structure,
1 data - all the properties files and also the designinfo file, below is the code
2 themes - (to get all the files download the theme from portal and you will have all the folders)
2.1 ur
2.1.1 name of the theme
2.1.1.1 common
2.1.1.2 csf
2.1.1.3 r
2.1.1.4 ur - all the css files (would be good if you can get the files from the server.)
2.1.1.5 WSRP
3 war - empty folder
*.designinfo
isVisible=true
version=7.0.14.1.0
isDefault=false
isSapDesign=false
designName=**** name of the theme
Once done create a zip file and click on Start Import and give the path and will ask for transport request, it will take a while to upload once done as mentioned in the use the parameter sap-ep-themeroot="path"
This will resolve the issue.
Cheers-
Pramod
reward points if helpful -
How to call standard report in web dynpro abap.
Hi All,
I need the output of one standard report e.g RHXSTR00 on web dynpro abap.
How can I achieve this?
Please help!!! Points will be rewarded.
Thanks in advance!
Cheers,
Darshna.Hi Darshna,
The report result is ALV and in most of the cases we generally do not have function modules or any other easy way to get the output.
In such cases the best approach which we follow is, to run this in background mode and generate the spool and display the ouput in PDF.
But if intertactive form is not present in your requirement then we need to debug the logic of the report (if no FM or class present) and get the results and display it in the View.
Best regards,
Suresh -
How to call t-code from web dynpro ABAP application
Dear Gurus,
I am new to ABAP web dynpros. I have to add a button and have to call a SAP standard t-code if user clicks on this button? How to accomplish this task? Any help or example would be appreciated.
Thanks,
GSMHi GSM,
You have to create a SAP transaction iView in your Portal, then obtain its URL in your webdynpro and call WDPortalNavigation.absolute() method.
Below are the same steps in more detail:
1) Create a SAP Transaction iView or an Internet Application Component iView (whichever you find convenient). While creating you can select whether you want to use SAP GUI for windows or SAP GUI for HTML. For the latter(GUI for HTML) ensure that your ITS is working fine and configured while creating the system in EP.
2) Open the properties of the SAP transaction iView created. In the OK code field you can give the ok code value just as you give in SAP R/3 in case you want to navigate to the second screen of SAP R/3 when you pass values from WebDynpro.
Example for the above would be say Transaction "VA03" for displaying Sales order. Suppose from Webdynpro i want to pass a parameter called "Order number" and when i click a button it should pass the order number to R/3 and skip the first screen required for inputting the sales order numbe.
It should directly go to the main display of sales order for that ordernumber.
3) Create your WebDynpro component and deploy it on the server. In your WebDynpro use the WDPortalNavigation.absolute() method and give the url of the SAP Transaction iView created as a parameter and also the required parameters that you would like to pass from WebDynpro.
4) Create a SAP WebDynpro iView in the Portal.
5) Now run the Component. It should open up your SAP Transaction iview.
Regards,
Uday -
Call a report from web dynpro abap
hi i need to call a abap program inside my webdynpro project anyone know how i can do it? i´m using the submit command to do it but a exception error is displayed
Hi John
you can't direct call report program from ABAP. Instead you can write the functionality in Function module and get the result in some internal table and that table you can show in webdynpro for ABAP using some UI element.
Regards
Naresh -
Calling a smart form on click of a button in web dynpro abap
Hi experts,
I have a requirement like if I click a button in a view i need ti generate a PDF through smart form.
Is this possible. If so please tell me the way..
Thanks & RegardsHi Sharma,
Create Interactive form in your view, create one node say PDF_SOURCE under this one attribute PDF_SOURCE of type XSTRING.
Bind this to IF form Datasource and pdfsource.
in your button action write code to call your smartform
using SSF_FUNCTION_MODULE_NAME
using FM CONVERT_OTF and attach_file_to_response
*convert to pdf
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_bytecount
TABLES
otf = ls_job_output_info-otfdata
lines = lt_lines
EXCEPTIONS
err_conv_not_possible = 1
err_bad_otf = 2.
loop at lt_lines into ls_line.
lv_string = ls_line.
export mydata = lv_string to data buffer lv_buffer.
import mydata to l_xline from data buffer lv_buffer in char-to-hex
mode.
concatenate l_pdfstring l_xline into l_pdfstring in byte mode.
endloop.
call method cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'ZWTY_PACKINGSLIP'
i_content = l_pdfstring
i_mime_type = 'BIN'
i_in_new_window = abap_false
i_inplace = abap_false.
also check this..
http://abapcodexperiments.wordpress.com/2011/03/20/smartform-pdf-webdynpro-abap/
Call smartform in web dynpro abap
Cheers,
Kris. -
Problem in calling abap editor with the program name in Web Dynpro ABAP
Hi,
I have to caal ABAP Editor screen with the display of program after clicking a button from web dynpro abap application.
I am able to call the ABAP Editor initial screen, but i want the editor display screen with a program.
How to do that?
Please find my code below:
DATA : FINAL_URL TYPE STRING,
URL TYPE STRING.
DATA: LV_HOST TYPE STRING,
LV_PORT TYPE STRING.
DATA V_TCODE TYPE TCODE.
DATA: LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA: LO_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.
DATA: LO_WINDOW TYPE REF TO IF_WD_WINDOW.
DATA: LD_URL TYPE STRING.
V_TCODE = 'SE38'.
*Call below method to get host and port
CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
IMPORTING
HOST = LV_HOST
PORT = LV_PORT ).
CONCATENATE 'http'
'://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?sap-client=&transaction=' V_TCODE '&OKCODE=SHOW'
INTO URL.
LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
LD_URL = URL.
CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = LD_URL
RECEIVING
WINDOW = LO_WINDOW.
LO_WINDOW->OPEN( ).
Now, how to pass my Zprogram name into the URL.
I need to get the editor screen with the display of the program.
Thanks,
RadhikaHi Kiran,
Please find my code below:
DATA : URL TYPE STRING.
DATA: LV_HOST TYPE STRING,
LV_PORT TYPE STRING.
DATA: LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA: LO_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.
DATA: LO_WINDOW TYPE REF TO IF_WD_WINDOW.
DATA: LD_URL TYPE STRING.
*Call below method to get host and port
CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
IMPORTING
HOST = LV_HOST
PORT = LV_PORT ).
CONCATENATE 'http'
'://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?&transaction=se38&RS38M-PROGRAMM=Y2PSOLTREE&~okcode=shop'
INTO URL.
LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
LD_URL = URL.
CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = LD_URL
RECEIVING
WINDOW = LO_WINDOW.
LO_WINDOW->OPEN( ).
Here,, Y2PSOLTREE is the program, that should show in SE38 screen.
I used the above code, but still it is showing the SE38 initial screen.
Thanks,
Radhika -
Web Dynpro ABAP calling another ABAP program
I have a question and just want to know if it's possible or not.
Is it possible to write a Web Dynpro ABAP program that calls another ABAP program which happens to be an ALV report?
Rather than re-write the ABAP ALV report, I was wondering if it's possible to call the ABAP ALV report within a Web Dynpro ABAP program and display the results within the Web Dynpro program.
If it's not possible, then I assume it would be better to re-write the code from the ABAP ALV report in the Web Dynpro ABAP program.
Thanks
JohnThe ALV report in your classic program is coded to be displayed in the GUI only.
Your best bet would be to create a Function Module or Method that will return the data to be used in your ALV. Simply call the Function/Method from your Web Dynpro and then bind the table to the DATA context node of the ALV INTERFACE CONTROLLER. -
Call a user defined method in web dynpro from interactive forms
Hi All,
how to call a user defined method in web dynpro java, when a selecting value from drop down list which is in interactive forms by adobe
thanks.
Edited by: venkat99 on May 24, 2010 4:52 PMWell, you can use F4 help, of course, check here: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/a1900622ec062be10000000a42189d/frameset.htm
You need to select the value first and then use the submit button, which is mapped to the WD action submit (you have to set this up in WD designer!!). To use the submit button for more actions, you need to use something like a hidden field, where the value is set according to the action you want to do with your submit button. The submit sends this value back to WD, where you can switch the program code according to the value.
Otto
p.s.: and maybe this blog can help: /people/shruti.rathour/blog/2008/02/07/uploading-sap-interactive-form-on-the-abap-webdynpro-view -
[Integration] Web Dynpro ABAP calling Flex in Popup (without Flash Islands)
Hi,
We do not intend to install Enhancement Package 1 in a near future.
Nevertheless, we do have requirements where Flex should be integrated with Web Dynpro ABAP (Flex components embedded or 'attached' to Web Dynpro ABAP applications).
I would like to open a popup showing a Flex component. Then, the user validates and the Web DYnpro ABAP application is resumed. All this integrated within EP 7.0.
What, according to you, would be the most effective combination :
- Suspend / Resume plug
- Server-side cookies
- iFrame (although it is deprecated)
Given what I have read so far, it seems encapsulating the .swf within a BSP application would be the best shot. Could it be possible to get rid of this 'additional layer' ?
Thanks in advance.
Best regards,
GuillaumeWeb Dynpro ABAP
Define a suspend and a resume plug.
BSP
Retrieve the parameters sent by WDA either by AUTO attributes or the following code
CONSTANTS: c_resume_name TYPE string VALUE `sap-wd-resumeurl`.
DATA: lt_tihttpnvp TYPE tihttpnvp.
FIELD-SYMBOLS: <fs_httpnvp> LIKE LINE OF lt_tihttpnvp,
<fs_dept_magasin> LIKE LINE OF t_dept_magasins.
** Lecture des paramètres envoyés (par le WD ABAP)
CALL METHOD request->get_form_fields
CHANGING
fields = lt_tihttpnvp.
READ TABLE lt_tihttpnvp ASSIGNING <fs_httpnvp> WITH KEY name = c_resume_name.
IF sy-subrc = 0.
e_url = <fs_httpnvp>-value.
ENDIF.
Flex
To return to the Web DYnpro ABAP, call a Javascript function within the BSP using this kind of code :
jsReturn = ExternalInterface.call("sendBackToSAP", selectedDepartmentsParam, orderParam);
BSP
First, to react to the user action in the Flex component, define a Javascript function in the
function sendBackToSAP(departements, ordre) {
fireServerEvent(departements, ordre);
return("Done");
To fire a server-event (in order for BSP to call the WDA resume plug), I use this declaration :
<!-- Event used by the Javascript to trigger OnInputProcessing so as to create
the server-side cookie -->
<bsp:htmlbEvent name= "fireServerEvent"
id = "flexAction"
p1 = "departements"
p2 = "ordre"></bsp:htmlbEvent>
Last, I simply call the URL that the WDA gives me first :
navigation->goto_page( e_url ).
If people are interested in a more detailed presentation, feel free to reply to this post, and I will write a blog about this. Nevertheless, it should become pretty obsolete with the Flash Islands release...
Edited by: Guillaume Garcia on Oct 11, 2008 11:13 AM -
How can I call a java object from Web dynpro ABAP application?
I made Web dynpro ABAP application and posted it to SAP EP.
For certain business purpose, we need to call external 3rd party java object using 3rd party's java api in Web dynpro application.
Is there anybody who experienced this kind of java interface issue?
I know Web dynpro Java environment can fully support this kind of requirement. but regarding Web dynpro ABAP, I couldn't find any clue for this.
Any comment or suggestion would be greatly appreciated.
Thanks,
Raymond, ABAP Consultantif you have jco configured, then you can make calls to java api from ABAP .
check out this weblog.
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
Raja -
How to call call transaction in web dynpro abap
hello experts,
i need to call one RFC in web dynpro.In RFC we maintained the BDC program. but while calling the same RFC in web dynpro through service call function, it is not working.Kindly suggest any way out.this is very urgent.
RegardsHi Rajat,
Please use the below mentioned link.May be it will help you:
The webdynpro/ABAP (WDA) calling RFC enabled FM of other ECC systems
Thanks and Regards,
Neha -
Web Dynpro ABAP call transaction in the foreground
In Screen Painter/SAP ALV, we can create a screen where for example if you double click on a sales order field it can take you a VA03 transaction by :
call transaction VA03 ... and skip first screen.
I am creating Web Dynpro ABAP application that needs to do the same thing where if we click on the field, it will take to VA03 transaction or other transactions.
Has anyone done this in Web Dynpro ABAP? I have done some research and determine that we cannot call transaction in the foreground? I hope I am wrong. Any help/insights will be greatly appreciated.Hi Phong,
WDA is generic client to Netweaver connection based on HTTP/S.
At this stage on a few clients are supported. WEB dynpro client and Browsers...
SAPGUI connects to SAP using a different protocol.
No SAPGUI connection is implied by a WDA client connection.
Therefore abap statements that invoke screens and otherwise assume SAPGUI
is connected are not supported in WDA. eg call screen, call transaction
You can either
a) build your own WDC to front end calls to BAPIs to get the Sales order data.
b) open/ exit to the new WDC for Sales Orders in ERP2005
see LORD_MAINTAIN_COMP
c) exit to the INTERNAL ITS URL for transaction VA03
eg http://<host>:<port>/sap/bc/gui/sap/its/webgui?~Transaction=VA03
but getting the skip first screen may require you to call custom tran ZVA03
which calls VA03 to skip first screen setting the PID appropriately.
Hopefully you opt for option a) or b).
c) can work... I have used it from BSPs but it not pretty.
regards
Phil -
How to call an web dynpro abap application with an particular theme
Dear friends,
i have created one web dynpro abap application. i created one theme XYZ in portal with required font size. when i applied this theme on portal all web dynpro application use this theme.
i want to use current theme for one application not for all.
is it poosible to call an web dynpro abap appl with the particular theme where as others should not be temper with this theme.
please guide me by some useful steps.
regards
sunilSunil,
Check if this helps.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7015b1f9-535c-2910-c8b7-e681fe75aaf8?QuickLink=index&overridelayout=true
Cheers!
Sandeep Tudumu
Maybe you are looking for
-
How to trigger crystal report from SAP ECC
Hi All, I hope i m right forum to ask this question. we want to do label printing from Crystal reports. data will be present in SAP ECC . So I below issues 1 ) how to connect SAP ECC database with Crystal Reports. 2 ) how to trigger print output in C
-
How to restore an effect on logic pro 9
For accident i have deleted an efect called Wah and i dont know how to recover it or even where is the location. need a help from a expert.
-
Indesign, office, pages won't open "bad access" HELP!!
Last night I launched Indesign and it crashed. Now office and even pages are giving me the same problem, all when I try to launch them. I've deleted some plists, repaired permissions etc. Does anyone have any ideas what I can try next, I need to get
-
Hi I am facing this weird problem with RTFEditorKit placed in my JApplet, I load a document onto the RTFEditorKit via FTP, here i face no sort of problems, if i copy an rtf document and paste it onto the RTFEditorKit document, i loose the formatting
-
My itunes store home screen is white and wont accept my login? I'm on a mac
I can't get the itunes store to recognize my apple Id or login and the home screen is just blank white? my apple id does however show in the top right corner? Anyone have any ideas?