Requirement: Open Transaction code in SAP GUI from WD ABAP application
Hello All,
I have a WD ABAP application which is accessed from SAP GUI and Portal. In SAP GUI, there is report which calls the application URL.
In the WD application, I need to call a transaction code. At this juncture, I made use of the ITS url. But,, the SSO does not work in SAP GUI.It works only in portal.
As a solution,we identified the entry point i.e. SAP GUI or portal. Then, based on entry from SAP GUI, we tried to call the transaction code using call transaction statement. But, that replaced the wd application. We instead wanted it as a popup or atleast another session.
Now, how do we open a transaction from WD screen in another session?
Also, can we setany configurations in the system to make sure the SSO works for all the transactions i.e. ITS used in SAP GUI.?
Thank you.
Regards,
Sharath
Hi,
This question gets asked many times.
Depending on the circumstances, this can be achieved with varying degree of success
So here is some code that might help you.
This can (does) load a Windows GUI.
Some things to consider.
1. Browser settings can get in the way a bit, asking the user if they want to open a ".sap" file
2. The user may have a SAP session open so consider adding a "/o" to the system code.
3. The Custom variable might want to contain a [Options] section for "Re-use"
4. The SAPLogon_ID may be required if using SSO (SNC)
I have modified the code below, but you will get the idea.
JS
* Create the shortcut contents
call function 'SWN_CREATE_SHORTCUT'
exporting
i_system_command = lv_com
i_saplogon_id = lv_logon_id
i_sysid = sy-sysid
i_client = sy-mandt
i_user = sy-uname
i_custom = lv_custom
importing
shortcut_string = lv_string
exceptions
inconsistent_parameters = 1
others = 2.
* Convert to xstring to execute....
call method cl_http_utility=>if_http_utility~encode_utf8
exporting
unencoded = lv_string
receiving
encoded = lv_xstring
exceptions
others = 1.
* Now call to open the shortcut.
lv_file_name = 'mytrans.sap'.
lv_mime = 'application/x-sapshortcut'.
call method cl_wd_runtime_services=>attach_file_to_response
exporting
i_filename = lv_file_name
i_content = lv_xstring
i_mime_type = lv_mime
i_in_new_window = abap_true.
Similar Messages
-
Hide Command field (where users enter transaction codes in SAP GUI)
In our requirement, the custom SAP transaction will be launched on CRM Web UI through transaction launcher technique (when users clicks a hyperlink on CRM UI)
But business people are asking us to not provide the user to enter transaction codes in command field. They don't want User's see command field when the back-end SAP GUI is displayed on CRM UI through transaction launcher and they don't want the user to navigate to any transaction from the SAP GUI. Please let us know you comments on this. Is this possible, if so please guide me?Hi Madhu,
This is a question for SAP basis.
One work around could be that the the users who would use ITS screens should not have any other AUTH objects for executing other TCODES. And when they try to do so they will get an error message like you do in a normal SAP GUI.
Basis can configure this by running a Auth Trace.
Hope it helps.
Thanks -
Invoke SAP GUI from Webdynpro ABAP
Hi All,
I am calling the webdynpro screen (using FM 'WDY_EXECUTE_IN_PLACE') from SAP GUI screen. In the webdynpro screen I have created one button upon clicking the button it should go back to the SAP screen from where I called the webdynpro screen.
Could some tell me how to do this.
Thanks in Advance.Hi Saba,
Please check this: [this FM seem to be not supported by SAP and only release internally within SAP|Re: how to exchange data between wda program and abap program?;
Thanks,
Duy -
Set the default field value to transaction code field, when calling from WD
Hi all,
Can we pass the value in a input field of a standard transaction calling from WD application. Suppose we are calling a transaction VA03 in an external window, then how will be pass the value in the VBAK_VBELN screen field.
Is there any way to pass the value to this transaction field. I have also tried out to set the parameter ID 'AUN' for VA03 transaction VBELN field. But it did not work for me.
Is there any way to set the default field value to transaction code field, when calling from WD?
Please suggest, if anyone have any idea.
Thanks
SanketHi,
I am using the below code to open a standard transaction. It will help you to explain my point more easily.
DATA: url TYPE string,
host TYPE string,
port TYPE string.
*Call below method to get host and port
cl_http_server=>if_http_server~get_location(
IMPORTING host = host
port = port ).
*create URL
CONCATENATE 'http'
'://' host ':' port
'/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'VA03'
INTO url.
*get the window manager as we are opening t code in external window.
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( ).
call the url which we created above
lo_window_manager->create_external_window(
EXPORTING
url = url
RECEIVING
window = lo_window ).
lo_window->open( ).
Note*
One more query I want to add to this thread, that is there any possibility to call a custom transaction as well? -
Problem in Transactional iView with SAP GUI Type
Hi,
I've one Transactional iView in which I'm opening one SAP report. This report can be downloaded using option Local File. Once I click on this option, one popup appear where format can be selected and afterward file can be downloaded.
Problem: Once I choose SAP GUI Type in Transactional iView is SAP GUI for HTML then it wouldn't allow me to download file and just hanged, once I click on popup download.
But same is working once I choose SAP GUI Type = SAP GUI for Windows.
Can someone suggest me, what is the problem exactly?
Thanks,
VikasYeah Michael, you are absolutely right, it seems same problem, I'm getting some applet loading exception.
But, I already have JVM installed version j2se1.6, same as colleague have.
I couldn't understand solution properly suggested in Note, can you brief me, would be really great.
The error I'm getting is..
load: class Query.class not found.
java.lang.ClassNotFoundException: Query.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Network is unreachable: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: Query.class
Please suggest.
Thanks,
Vikas -
Read/Open a file in SAP DMS from an external system
Hello Sap Gurus,
I want to read/open a file in SAP DMS from an external system . External system is basically a non-sap system.
Can this be achieved through an RFC..
Does anyone know of any BAPI's/FM's that can be called from an external system (non-sap system) through RFC which will open a document which is stored in SAP DMS.
Regards,
Madan Shetty.Hi Madan,
If you want to view documents from an external system, there are many ways of achieving this.
It depends on the solution that you are approaching.
Few methods that I have come across are, OData services, Custom RFC Function Modules, to retrieve document attachments.
FTP is also a possible solution.
Please let us know your exact requirement.
Regards,
Tamilnesan G -
Obsolete transaction codes in SAP 4.7 and above
Hi,
Need your assistant here as I need to know the full list of obsolete transaction codes in SAP 4.7 above which mean what are the transaction codes not in use anymore in ECC.
It could be great if can point me to the relevant URL. ThanksPlease check the table PRGN_CORR2 which gives the list of transactions that were changed from different versions from 3.1G to 4.70 and also above till ECC 6.0.
Please also refer to the Oss Note - 991377 for the above table which has a text file with some more transactions. These transactions are missed out in the above table.
Hope this helps you. -
Using the SAP GUI from the NW2004s SneakPreview Download
Hello,
does anyone else have major problems with the SAPGUI from the NW2004 SneakPreview download page?
Im getting a runtime error when logging on:
Runtime Errors MESSAGE_TYPE_X
Date and Time 24.12.2005 00:34:11
Short text
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Error analysis
Short text of error message:
Control Framework : Error processing control
Technical information about the message:
Message classe...... "CNDP"
Number.............. 006
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Trigger Location of Runtime Error
Program CL_GUI_CFW====================CP
Include CL_GUI_CFW====================CM002
Row 23
Module type (METHOD)
Module Name FLUSHHello Rich,
the sap gui from the NW2004s SneakPreview page is on patchlevel 8. The problem is when i use the latest sap gui from the service marketplace (full install!) i cant event call the gui. Getting a error when doubleclicking on the SAP Gui icon.
'The procedure entry point 'RfcResetTraceDir' could not be located in the dynamic link library 'LIBRFC32.dll' .'
So actually since i installed the NW2004s on my local notebook the only sap gui "working" (at least i can call it) is the one from the NW2004s Sneakpreview page but im getting this error mentioned here on all systems! not only on the NW2004s system
regards,
Markus -
Transaction code for SAP query reports
Hi All,
I am trying to create transaction code for sap query report but couldn't go further.
1) Created User group in SQ03
2) Created infoset in SQ03 and assigned that to the user group
3) Created query in SQ01 using the infoset.
I executed the report in SQ01 and it is working fine.
Now I try to create a transaction code in SE93 using the steps mentioned in the following link:
Assign transaction code to SAP Query (created via SQ01)
But when try to execute the report using the transaction code, it is giving error message 'User group xxxxxx is not yet created'
Could any one advice me if I miss something? Or please help me to create this transaction code and transport to production?
Thanks in advanceHI,
based on the thread you've already mentioned:
In SE93, Create a Paramter Transaction
-> Transaction = Start_report
-> In default values, give the below details:
D_SREPOVARI-REPORTTYPE = AQ
D_SREPOVARI-EXTDREPORT = Name of the Query
D_SREPOVARI-REPORT = User Group
So check if the user group is typed correct in SE93 and check also if the user group exits in the system where you are trying to run the transaction.
best regards, Christian -
How to add a transaction code in SAP?
Hello,
i just installed SAP NetWeaver Application Server ABAP 7.03 SP04. but when i login with a admin user that i created, i dont see any transaction codes under acoounting folder.
1-) how can i add transactions codes to SAP? ( to add invoice, order information etc..)
2-) how can i see these tables in database in SAP
thanks you
Regards...Notice that there are no application tables, transaction, data for modules like FI,SD, MM...
Purpose of trial/demo version available on store.sap.com is to practice ABAP and Basis skills.
For this you have SFLIGHT model and its tables available.
cheers
m./ -
How to execute a transaction code in prod.Server from development server
Hi Friends,
How to execute a transaction code in prod.Server from development server,Pls give me your valuable suggestions...
Regards,
V.Balajii have a program in production system if i type the request and execute its sends a mail to my admin saying to transport the request to production system.....thats y??????
just tell me ur idea............. -
Transaction Code for seeing the files in the Application Server
Hello All,
Can anybody please give me the transaction code for seeing the files in the Application Server
Thanks in Advance,
Regards,
LIJO.hi
good
try with tcode AL11.
thanks
mrutyun^ -
How to access SQL tables from WebDynPro ABAP application ?
Hi,
I am trying a scenario, where I need to send an user ID to SQL server table (update/modify/delete) from webDynpro ABAP application.
Basically ,I am trying to know:---
a>How to write a SQL Connection from ABAP code within webdynpro ABAP application
b>What are the ways to do it.(by code or any other API/mechanism)
I appreciate if anybody knows this.
Thanks
PraveenHi,
The EXEC CONNECT ... is usually used in the procedural ABAP code. For this you can refer to the ABAPDOCU.
I dont have any sample code on the classes I listed try to check out them for the parameters and the methods they have.
In WD for Java, we have these connection classes to connect to any databsae server.
Or try to create an RFC with DESTINATION for this
Pls check out this link for this -
Pull data from another r3 server using abap dynpro
Regards
Lekha -
Not able to checkout Files using Java Code and SAP BAPI from DMSServer
Hi
Able to download / checkout the files using T-Code SE37 (BAPI_DOCUMENT_CHECKOUTVIEW2).
But when same RFC is executed from Java, it alsways says -
Message ::::::::Document LGL/10000000003/000/00 does not exist
My inputs in Java Code is as below -
import java.io.*;
import java.util.*;
import com.sap.mw.jco.*;
//CREATED ON - 10-APRIL-2010.
public class BapiDocCheckOutview {
public static void main(String args[]){
try{
if(mConnection!=null){
JCO.Repository repository=new JCO.Repository("AraSoft",mConnection);
JCO.setMiddlewareProperty("jco.middleware.allow_start_of_programs", "SAPFTPA");
JCO.Function function=repository.getFunctionTemplate("BAPI_DOCUMENT_CHECKOUTVIEW2").getFunction();
//End of get function.
System.out.println("Before execution1");
if(function !=null){
JCO.Field DOCUMENTTYPE = function.getImportParameterList().getField("DOCUMENTTYPE");
DOCUMENTTYPE.setValue("LGL");
JCO.Field DOCUMENTNUMBER = function.getImportParameterList().getField("DOCUMENTNUMBER");
DOCUMENTNUMBER.setValue("10000000003");
JCO.Field DOCUMENTPART = function.getImportParameterList().getField("DOCUMENTPART");
DOCUMENTPART.setValue("000");
JCO.Field DOCUMENTVERSION = function.getImportParameterList().getField("DOCUMENTVERSION");
DOCUMENTVERSION.setValue("00");
JCO.Field GETSTRUCTURE = function.getImportParameterList().getField("GETSTRUCTURE");
GETSTRUCTURE.setValue("1");
JCO.Field GETCOMPONENTS = function.getImportParameterList().getField("GETCOMPONENTS");
GETCOMPONENTS.setValue("X");
JCO.Field ORIGINALPATH = function.getImportParameterList().getField("ORIGINALPATH");
ORIGINALPATH.setValue("C:
TEMP
DMS_");
JCO.Field GETHEADER = function.getImportParameterList().getField("GETHEADER");
GETHEADER.setValue("X");
JCO.Field PF_FTP_DEST=function.getImportParameterList().getField("PF_FTP_DEST");
PF_FTP_DEST.setValue("SAPFTPA");
//JCO.Field PF_HTTP_DEST=function.getImportParameterList().getField("PF_HTTP_DEST");
//PF_HTTP_DEST.setValue("SAPHTTPA");
System.out.println("Here Setting Values Inside Structure ::DOCUMENTFILE");
JCO.Structure DOCUMENTFILE=function.getImportParameterList().getStructure("DOCUMENTFILE");
DOCUMENTFILE.setValue("1","ORIGINALTYPE");
DOCUMENTFILE.setValue("WWI","WSAPPLICATION");
DOCUMENTFILE.setValue("ZHCL_CS","STORAGECATEGORY");
DOCUMENTFILE.setValue("E0DF7893E2BD5DF19C07001517B4A299","APPLICATION_ID");
DOCUMENTFILE.setValue("E0DF7893E2BD5FF19C07001517B4A299","FILE_ID");
DOCUMENTFILE.setValue("X","CHECKEDIN");
DOCUMENTFILE.setValue("X","ACTIVE_VERSION");
//DOCUMENTFILE.setValue("LGL","DOCUMENTTYPE");
//DOCUMENTFILE.setValue("10000000003","DOCUMENTNUMBER");
//DOCUMENTFILE.setValue("000","DOCUMENTPART");
//DOCUMENTFILE.setValue("00","DOCUMENTVERSION");
//JCO.Field GETCOMPONENTS = function.getImportParameterList().getField("GETCOMPONENTS");
//GETCOMPONENTS.setValue("X");
//JCO.Field GETHEADER = function.getImportParameterList().getField("GETHEADER");
//GETHEADER.setValue("X");
mConnection.execute(function);
If anyone have an Idea on what I have missed out...
Please do advice me.
Thanks
PrashantHi
To update in the initial requirement, I have added (prefixed, zeroes) in Document No., doing that, now the application is able to find the document, but not able to transfer the same from DMS Server to my local Machine, always giving the following error -
Type ::::::::E
Message ::::::::File d:\dms\z_IPI_PRASHANT01.doc cannot be created
Please let me know, if some services needed to checked in SAP System or some more information to be provided in RFC.
Thanks
Prashant
Dear Experts
Any advice on this. Still not able to download the documents from DMS Server.
I have also added few more code in my Java program -
private int use_sapgui;
public void setSapGui(int use_sapgui){
use_sapgui = 2;
PLease help !!
Regards
Edited by: Prashantroy on Sep 26, 2011 12:49 PM
Hi,
Further to my earlier Mail, while checking the Trace suing SM59 in ECC System I got the following Error -
Trace file opened at 20111010 142232 India Standard Time, SAP-REL 701,0,134
======> cannot open SAPGUI
ABAP Programm: SAPLSYSE (Transaction: )
User: IPI_PRASHANT (Client: 220)
Destination: SAPFTP (handle: 3, , )
SERVER> RFC Server Session (handle: 1, 43220900, {5D1DF3E0-ACBD-F11F-8EA0-00A0D1
SERVER> Caller host:
SERVER> Caller transaction code: (Caller Program: java)
SERVER> Called function module: RFC_START_PROGRAM
Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 1742
FUNCTION: 'exec_sapgui'
cannot open SAPGUI
PROG =sapftp erpdev sapgw00 43232164 IDX=4
Can someone help me in getting this sorted out.
Thanks N Regards
Edited by: Prashantroy on Oct 10, 2011 2:32 PM -
Opening SAP screen from an internet application
Hi,
I have a requirement in which it is needed to open up an SAP transaction screen from an internet application(salesforce.com).I have written a batch file which opens up the SAP transaction XD03 screen.This batch file can be called from a java program.But since our tool is an internet application,the java code has to be converted to a web service.
Is there any other approach to open SAP screen from internet applications?
Thanks & Regards,
VineethaResolved
Maybe you are looking for
-
The USB ports on my 30" Cinema HD display appear to not work. The monitor has not been used for almost a year, when I upgraded to a new Mac Book Pro and the 27" retina display. Now I need to move the computer back and forth between two locations us
-
Exit or Enhancement for TCode FB02 to manipulate Due Date
Hi, We would like to change the value on the due date field based on some custom logic in TCode FB02 on the item detail screen (program SAPMF05L screen no 304, SAP version 4.7). Is there any user exit or BADI for this? We have tried various user exit
-
Physical Path for KM Documents
Hi, I would like to know the path for the physical location of the documents that I have uploaded into the Portal. (EP6 SP9) Regards, Harish
-
Any1 there can help out with my assignment about washing machine by using labiew 2010
help me !!! Attachments: 2_apu_spcc_assignment_washing_machine.doc 92 KB
-
Do we need to include 0TCTAUTHH in Analysis Authorizations in BI 7.0
Hello Friends, Upgrading from 3.5 to 7.0. Can any one tell me abt hierarchies.like Do we need to include the characterstic <b>0TCTAUTHH</b> in analysis authorizations along with <b>0TCAIPROVIDER,0TCAKYFNM,0TCAVALID,0TCAACTVT</b>. and asign hierarchy