Calling a transaction in webdynpro
Hi,
As per my requirement when a button click happens I need to call the transaction CAT2 by skipping initial screen. How to achieve this in webdynpro.
Thanks
Raghavendra
Hi Raghavendra,
If you are using portal as a triggerring point of your web dynpro applications, then the below requirement is achieved by doing the following.
1. Create a BDC report program to call transaction CAT2 skipping the first screen.
2. The report has the same input parameters as that of the transaction CAT2.
3. Associate a transaction to the report program sat 'ZCAT2'.
In the event handler of the button in your web dynpro do that following
Data declarations
Local Internal tables(lt_)
lt_bus_parameter_list TYPE wdy_key_value_table,
lt_launcher_parameter_list TYPE wdy_key_value_table,
Local Work area's(ls_)
ls_keyvalue_pair TYPE wdy_key_value,
Local Variables(l_)
l_pcdpageurl TYPE string,
l_componentcontroller TYPE REF TO if_wd_component,
l_port_manager TYPE REF TO if_wd_portal_integration.
Constants(c_)
CONSTANTS:
c_transaction_code TYPE string VALUE 'ZCAT2',
c_okcode TYPE string VALUE 'F8',
c_param1 TYPE string VALUE 'P_Data_Entry_Profile',
c_param2 TYPE string VALUE 'P_person_number'.
l_componentcontroller = wd_this->wd_get_api( ).
l_port_manager = l_componentcontroller->get_portal_manager( ).
Fill all the business parameters
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = c_param1.
ls_keyvalue_pair-value = 'Data Entry Profile'.
APPEND ls_keyvalue_pair TO lt_bus_parameter_list .
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = c_param2.
ls_keyvalue_pair-value = 'Person Number'.
APPEND ls_keyvalue_pair TO lt_bus_parameter_list .
Fill the launcher parameters for the transaction
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'AutoStart'.
ls_keyvalue_pair-value = 'Yes'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'GuiType'.
ls_keyvalue_pair-value = 'WinGui'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'OkCode'.
ls_keyvalue_pair-value = c_okcode.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'System'.
ls_keyvalue_pair-value = 'SAP_R3_HumanResources'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'TCode'.
ls_keyvalue_pair-value = c_transaction_code.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'Technique'.
ls_keyvalue_pair-value = 'SSF'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
CLEAR ls_keyvalue_pair.
ls_keyvalue_pair-key = 'WinGui_Type'.
ls_keyvalue_pair-value = 'Shortcut'.
APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
SAP has provided us with customizing table to maintain the path for the iView.Here Resource_key is the key field to get the path.
We create a new entry in this table using which we uniquely identify the path of the iVew that needs to be launched.
get the url of the pcd page for the common transaction iView
SELECT SINGLE b~text
INTO l_pcdpageurl
FROM t7xssserstring AS b
INNER JOIN t7xssserres AS a
ON arespcdpage = bguid
WHERE a~ressource = /rio/zcl_hse_constants=>c_common_resource.
Navigate to the Injury Illness details
CALL METHOD l_port_manager->navigate_absolute
EXPORTING
navigation_target = l_pcdpageurl
navigation_mode = l_port_manager->co_show_external
use_sap_launcher = abap_true
business_parameters = lt_bus_parameter_list
launcher_parameters = lt_launcher_parameter_list.
The folowing is the flow of the program:
When user clicks a button to launch transaction CAT2, the event handler associated to it called.
Here we populate an internal table with the parameters to call transaction ZCAT2 and the iView is launched by calling navigate_absolute method with the right path.
I am not very much sure as to how the iViews are set up but there is a provision to read the key valure pair there. The values are read and the tranzation ZCAT2 is called which will inturn launch CAT2 transaction.
By adding Skip First screen statement we can get in the details directly.
Hope this helps.
Regards,
Sravan Varagani
Similar Messages
-
Calling sap transaction in webdynpro
hi friends,
can any body provide the solution how to call the standard transaction like va02 or .any . in Web dynpro abap.
thanks in advance.
sai.Hi,
It can be posible to display a standard transaction into Webdynpro.for that no coding required.you need to use webgui for that. ( pls refer transaction SICF ). in that case u can specify the Tcode u want use in URL.
like
http://<server-name>:8000/sap/bc/gui/sap/its/webgui?~TRANSACTION=va02
Call this url from linktourl or linktoaction
Tell me if you find any problem in doing this
Regards,
Edited by: Raju.. on Jun 30, 2009 5:51 PM -
Calling SAP transaction from WebDynpro
HI,
Could someone post a link as to how I may call a SAP transaction from a webdynpro.
Will this be an external call to R/3 or can i get it embedded in my dynpro.......
Tnks..Hi,
You can call by creating external window method.
create LINK to URL or LINK TO ACTION according to requirement, for this. write code in onaction of that.
data: iv_url type string value 'http://<server>:<port>/sap/bc/gui/sap/its/webgui?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP'.
data: api_component type ref to if_wd_component,
window_manager type ref to if_wd_window_manager,
window type ref to if_wd_window.
api_component = wd_comp_controller->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
window = window_manager->create_external_window(
url = iv_url
modal = abap_false ).
window->open( ).
Cheers,
Kris. -
How to call ABAP transaction from Webdynpro in NWBC
Hi
I need to develop an Webdynpro application who lists Sales Orders. The Application is launched in NWBC DESKTOP version.
This part is no big deal...
But: i need to gain users the possibility to display the Sales Orders in T-CODE VA03 (ABAP) when they click a link in the list. How can i do that?
I have tried to do a test like this:
method ONACTIONTEST_LAUNCH .
DATA: url TYPE string,
query TYPE string.
url = cl_nwbc=>url_construct( html_client = abap_false
canvas_transaction = 'VA03' ).
cl_nwbc=>url_launch( url ).
endmethod.
But this url launches the HTML version of NWBC (inside the Desktop version...). and i want the system to launch the ABAP system.Hi Jakob,
I would use Object Based Navigation in this case (OBN). With OBN you can define an OBN target in your WDA application and map that target to a transaction in your PFCG role.
Here is some help
http://help.sap.com/saphelp_nw74/helpdata/en/4c/5bdc7f97817511e10000000a42189b/content.htm?frameset=/en/66/48a793bc2f4ec5bdb8e7e93ea6cd9f/frameset.htm
Hth,
Simon -
Can we call an SAP transaction in Webdynpro
Hi,
I have a requirement to call an SAP transaction in Webdynpro, ie on clicking a button in a view, the particular SAP transaction has to come . Kindly tell me how to do it.
Regards,
LakshmiLakshmi,
You cannot call a transaction from WDA
check these threads
https://forums.sdn.sap.com/click.jspa?searchID=19319106&messageID=6146192
https://forums.sdn.sap.com/click.jspa?searchID=19319106&messageID=6476084
Thanks
Bala Duvvuri -
How to call transaction from webdynpro application
Hi Experts,
I have a web dynpro component zxx_comp.its corresponding web dynpro application zxx_app.
my requirement is , when i test the webdynpro application, i have to call a transaction zxx_txn corresponds to the module pool program zxx_pgm directly . How can i do that?
Regards
Ashwin KVHi Ashwin,
Use the following to open a T-Code from WD application.
CALL METHOD cl_http_server=>if_http_server~get_location
IMPORTING
host = lv_host
port = lv_port
out_protocol = lv_protocol.
DATA lv_url type string.
concatenate lv_protocol '://' lv_host ':' lv_port '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction='zxx_txn' into lv_url.
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.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window_manager->create_external_window(
EXPORTING
url = lv_url
RECEIVING
window = lo_window ).
Regards,
Harsha -
Calling SAP Transaactions in Webdynpro ABAP
Hi All
I have a requirement, i have 4 link to actions in view, and created different views for all links. I creat viewuielement container in mainview and i embed all views in that. Now I want to call sap transaction when i click perticular link to action and i have to display perticular transaction in that view. is it possible in webdynpro or only in portal side.
Thanks
Madhan.Hi Madan,
Yes It is possible in WDA as well as in Portal.
we can use ITS for tat. In View Container UI element call view in which u have to create IFrame then set this url to the IFrame :
http://<domain>:<port>/sap/bc/gui/sap/its/webgui?sap-client=800&~TRANSACTION=<transaction name>
since IFrame is deprecated u can call this in external window using Window Manager.
reply me if u need some more clarifications..
Thanks,
Regards,
Kiran -
How to call Function Module from webdynpro application ,up on click url in
Hi Experts,
I need your help for the following scenario.
In my WebDynpro application , I am displaying the sales orders in a table.
one of the column in table i.e. sales order number is displayed with hyper link, up on click the sales order number column, i have to pass the po number to the a remotefunction with as one parameter and enjoy = 'x' as another parameter that should call me23n transaction and the transaction screen should be displayed in the webdynpro application with po details.
Thanks In Advance.
your help is rewarded.
Best Regards.
Rao.Hi Rao,
1.Create binding to view to Controller.
2.Create table->Add column->Add table cell Editor(select LinkToAction UI Element in options).
3. Bind the property <i>text ->sales order number</i> (Output/<model node>)
4. Create an Event <salesOrder>
// do null check
// set your input parameters
// input sales order number = current output sales order number
// enjoy="x"
// call controller's method() that executes RFC
5. Bind this event LinkToAction property action-> <salesOrder>
To execute RFC, the code is available in sample tutorials.
Hope this helps
regards,
Siva -
Calling SAP scripts from WEBDYNPRO
Hi
We need to call SAP scripts from WebDynpro application. As per my understanding we need to do following steps
Create a new RFC function module and create sap script output in PDF format.For this
- use OPEN_FORM , by assigning TDGETOTF='X' in the Options(Structure
ITCPO).
- call function module CLOSE_FORM with option OTFDATA
- convert OTF data to PDF by using function module CONVERT_OTF_2_PDF
Now I would like to know how to display the PDF string from WebDynpro.
Please help....
Regards
SujithHi,
You can call by creating external window method.
create LINK to URL or LINK TO ACTION according to requirement, for this. write code in onaction of that.
data: iv_url type string value 'http://<server>:<port>/sap/bc/gui/sap/its/webgui?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP'.
data: api_component type ref to if_wd_component,
window_manager type ref to if_wd_window_manager,
window type ref to if_wd_window.
api_component = wd_comp_controller->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
window = window_manager->create_external_window(
url = iv_url
modal = abap_false ).
window->open( ).
Cheers,
Kris. -
Calling an iview from webdynpro do not run
Hello,
my environment consists of a Sap Netweaver Portal 7.0 (SP15) and ECC 6.0 (SP9).
On portal I have configured UWL, so when the user click on workitem a custom webdynpro is run.
Webdynpro is composed by some container, with some alv lists
included.
In an alv list an hotspot is linked to a purchase requisition
document number.
At the click on cell a method is called. Below the source.
REFRESH: lt_lp, lt_bp.
l_api_component = wd_comp_controller->wd_
l_portal_manager = l_api_component->get_portal_
ls_lp-key = 'P_TCODE'.
ls_lp-value = 'ME53N'.
APPEND ls_lp TO lt_bp.
ls_lp-key = 'P_BANFN'.
ls_lp-value = l_banfn.
INSERT ls_lp INTO TABLE lt_bp.
l_target =
'ROLES://pcd:portal_content/com.ieo.it.portaleieo/
_rilascio/ME53N'.
ls_lp-key = 'OkCode'.
ls_lp-value = 'ONLI'.
APPEND ls_lp TO lt_lp.
CALL METHOD l_portal_manager->navigate_absolute
EXPORTING
navigation_target = l_target
navigation_mode = '1'
use_sap_launcher = abap_true
business_parameters = lt_bp
launcher_parameters = lt_lp.
Variable "l_target" contain the link to a custom SAP Transaction
iview.
The SAP transaction calls the transaction received as parameter
(P_TCODE) with the other parameter (P_BANFN).
All is run perfectly on Develop system, but in Production the target
iview is not called. The two systems seems identical.
Could anyone help me to understand what happen?
Regards,
Corrado AuderoHi Praveen,
My code is given below :
<b>package scheduler;
import java.util.Properties;
import com.sapportals.wcm.service.scheduler.ISchedulerTask;
public class scheduler implements ISchedulerTask {
public void run( String id, Properties properties ) {
// implement the tasks to be scheduled
}</b>
I have to write some code in this run() to run the iView. How do I use ur statement?<b></b> -
Calling a transaction in Portal
Hi Guys,
I am calling a transaction in portal from WebDynpro.
Here is my code.
MOVE 'OkCode' TO param-key.
MOVE '/00' TO param-value.
APPEND param TO lparams.
MOVE 'TCode' TO param-key.
MOVE 'MIR4' TO param-value.
APPEND param TO lparams.
MOVE 'RBKP-BELNR' TO param-key.
MOVE stru_invoice-belnr TO param-value.
APPEND param TO bparams.
MOVE 'RBKP-GJAHR' TO param-key.
MOVE stru_invoice-gjahr TO param-value.
APPEND param TO bparams.
CALL METHOD l_portal_manager->navigate_absolute
EXPORTING
navigation_target = 'pcd:portal_content/com.cso.Prototype/com.cso.Page/SAPWebGUI/sap_transaction_html_gui'
navigation_mode = if_wd_portal_integration=>co_show_external
WINDOW_FEATURES = 'TOOLBAR=FALSE,LOCATION=FALSE,RESIZABLE'
business_parameters = bparams
launcher_parameters = lparams.
I seen in the forum that it need to create a transactional iView to acheive this.
In that case, do I still have to provide launcher_parameters in the FM. If not whats the use of launcher_parameters.
ThanksRefer the SAP Online help :
http://help.sap.com/saphelp_nw70/helpdata/EN/a5/b8fa41c915da6fe10000000a1550b0/frameset.htm
I hope it helps you.
Thanx.
Saurav. -
Dear Expert,
Is that possible to call a transaction code using a webdynpro for abap. I have a button in my program where when i click on the button, it need to all up the su01 screen.
My coding is as below
method ONACTIONEDIT_APPRAISAL .
LEAVE TO TRANSACTION 'SU01'.
endmethod.
However when i run this program, and click ont he button, the system return a short dump.
Any idea?
Thanks,
Regards,
BryanDear Suman or anyone,
I have solve this using the navigate_absolute method, however the NAVIGATION_MODE seem that does not works.
Code begin*
method ONACTIONEDIT_APPRAISAL .
data lr_componentcontroller type ref to ig_componentcontroller .
data l_api_componentcontroller type ref to if_wd_component.
data lr_port_manager type ref to if_wd_portal_integration.
lr_componentcontroller = wd_this->get_componentcontroller_ctr( ).
l_api_componentcontroller = lr_componentcontroller->wd_get_api( ).
lr_port_manager = l_api_componentcontroller->get_portal_manager( ).
Data:
target type string.
Data:
nmode type string.
target = 'pcd:portal_content/mysap/Appraisal/PPPM_PAGE'.
nmode = 'INPLACE'.
call method lr_port_manager->navigate_absolute
exporting
NAVIGATION_MODE = nmode
navigation_target = target
endmethod.
*code end
I have tried to use the INPLACE navigation mode, but it still display it in a new portal page. Anyway to control it? Do i need to define a area so that the target will show in that particular area?
Please help me...
Thanks
Regards,
Bryan -
Call Transacion from my WebDynpro.
Hi.
How I can to call a transaction from my Webdynpro?. I've a URL Link and when I push the link, i want to open a new window with a transaction.
Thanks.
Message was edited by:
Guillermo MorenoFrom the portal you start a transaction IVIEW, so that the gui is connected to SAP.
your WDA component can then simply use this the code below.
See instructions in prior post on how to create a start WDA in GUI transaction.
method ONACTIONCALL_TRAN .
data: lo_gui TYPE REF TO CL_WDR_SAPGUI_INTEGRATION2.
DATA lo_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER .
lo_COMPONENTCONTROLLER = wd_this->get_componentcontroller_ctr( ).
DATA lo_api_componentcontroller TYPE REF TO if_wd_component.
lo_api_componentcontroller = lo_componentcontroller->wd_get_api( ).
CALL METHOD lo_api_componentcontroller->GET_SAPGUI_MANAGER
RECEIVING
RESULT = lo_gui .
* now to call transaction 'SE37'.
lo_gui->fire_start_transaction( transaction = 'SE37' ).
endmethod.
regards
Phil. -
Call ITS Service from Webdynpro
Hello all,
Could somebody tell me how can I call an ITS Service from within a webdynpro? I've the following available with me.
System
Transction cocde
Parameters
Basically, I need to do something similar to the following (code snippet from a Portal Component)
IUrlGeneratorService urlGen = (IUrlGeneratorService)
request.getService("urlgenerator");
com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator
specUrlGen = urlGen.getSpecializedUrlGenerator("UrlGenerator_SAP_Class");
if(specUrlGen instanceof ISAPUrlGenerator) {
ISAPUrlGenerator portalGen = (ISAPUrlGenerator)specUrlGen;
issURL = portalGen.generateIACUrl(request, system, iac, queryString);
The background is, I've to call a transaction passing a few parameters to it from the webdynrpo. I cannot create a transaction/ITS iview because a)the parameters are dynamic b)I cannot use Portal Navigation service.
Any help is greatly appreciated.
Regards,
RajitHi,
thank you for the previous answer, but I have another web service that works fine into the WebDynpro project and the wsdl file is equal to the other. Do you know if there are any activity to do from Visual Administrator about web service?
Thanks and best regards,
Matteo -
Call BOBJ report fromthe webdynpro
Hi ,
I have a requirement where i need to call BOBJ reports in a new pop up window from webdynpro view
howcan this be done.Please suggest how to do
Thanks,
KalyaniHi,
You can try use the hyperlink in WebI to call SAP ITS.
For example, you want to use the data of the WebI report as a parameter to call a transaction in SAP, you can try this kind of hyperlink URL:
http://SERVER:PORT/sap/bc/gui/sap/its/webgui/?sap-client=CLIENT&sap-user=USER&sap-password=PASSWORD&transaction=TCODE&%TABLEFIELD%=FIELDVALUE&OKCODE=/00
May it's helpful.
Maybe you are looking for
-
IMac Freezing and Visual Artifacts
Hello to everyone! I have and iMac (early 2008, 3.06 GHz) and while on and doing nothing except for some chatting, mouse stopped responding and the whole screen got full with artifacts. To see what I mean click the link below to see the video. After
-
Switching presenters with Apple TV & iPad2s
Good Mornings, When using apple TV in the classroom, what is the suggested way to switch presenters/ipad2s? Instead of logging out first presenter and then logging in 2nd presenter... this is time consuming. Thanks for your patience as we are brand
-
Error in trigger: PLS-00049: bad bind variable
Hi, I am trying one of the XML/XDK samples from technet (http://otn.oracle.com/tech/xml/htdocs/XDBDemo2.html) and get this error while compiling the trigger: here's the code snippet create or replace trigger PURCHASEORDEREXPLOSION instead of insert o
-
JavaScript,sampling,RGB COLOR
How to get the coordinates of one pixel of the sampling point RGB color? Example, the figure for the RGB value sampling tool:
-
My macbook Pro won't turn on, is it because the battery pack is dead?
My Macbook Pro won't power on. Is it because the battery pack has died?