‎2013 Jul 23 1:00 PM
Hi All,
I have a requirement in which i need to create a .sap file from the abap program and saving it somewhere and then executing the same file.
Not sure whether i should store it on the local system or on the appli server.
Another ques is how should i execute the .sap file.
Can somebody please help.
Thanks.
Linda
‎2013 Aug 01 10:12 AM
''''Now i am left with one thing i want to open the transaction and directly want to go to the second screen of the transaction and skipping the first one''''
this is also done, to move to the second screen the command must start with * so in the handler class you have to somehow change the shortcut string so that the command starts with * .
for ex.Command=*tcode parameters.....
Thanks
‎2013 Jul 23 3:04 PM
When you create shortcut of SAP session on desktop, .sap file is created, it can be opened in Notepad.
Last icon in application toolbar gives create shortcut option.
If SAP GUI is installed, double clicking on .sap file launches it.
So it should be on local system.
‎2013 Jul 23 3:48 PM
Hi Manish,
so far search on internet reveals that it should be done with ICF and handler class CL_SWN_HTTP_SHORTCUT but no clear idea so far about how ...
do you have any idea?
Clearing my question in simple words. From abap program / web dynpro i have to open a transaction in sapgui.
Thanks
‎2013 Jul 24 9:05 AM
A wiki article suggests using FM SWN_CREATE_SHORTCUT to create data for shortcut file (internal table), which can then be written to local file with extension .sap. Method CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD can be used.
http://wiki.sdn.sap.com/wiki/display/ABAP/SAPGUI+shortcuts
Shortcut file is just a text file which can be opened in notepad. The source code of FM SWN_CREATE_SHORTCUT also creates text lines which should be present in shortcut file.
In order to run this shortcut from SAP, it would be just like opening any document on local machine.
You can called method CL_GUI_FRONTEND_SERVICES=>EXECUTE to open the shortcut file.
Something like this:
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = 'C:\temp\ppf.sap'
operation = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
OTHERS = 10.
‎2013 Jul 24 10:16 AM
Thanks Manish..
Can you further help me with ICF service. I dont want to save the .sap file rather calling an icf service with the parameters and the icf service will open the sapgui using these parameters.
P.S
the hanadler of the new service that i will create will be the CL_SWN_HTTP_SHORTCUT.
Thanks in advance for any further help
L.S
‎2013 Jul 24 11:26 AM
I found a discussion
http://scn.sap.com/thread/74529
that is what i need but there is no explanation on how i can call the service and pass it the required parameters.
can anybody help me with how from witin the ABAP program i can call the icf service and pass the required parameters and further within the service what configurations to be done to so that the service should be able to receive the paramaters passed and open the sapgui using the paramaters received.
Thanks
Linda
‎2013 Jul 25 1:30 PM
Here is what I am able to do.
SICF transaction used to create new service zicf_mk in path /default_host/sap/bc/icf/demo/.
Handler list of service has class CL_SWN_HTTP_SHORTCUT, keeping every other setting default.
Test service option results in Internet Explorer window, with no output.
Non-working URL ends with /sap/bc/icf/demo/zicf_mk?sap-client=200
I then modified the URL so that it ends with /sap/bc/icf/demo/zicf_mk?sap-client=200&client=200&transaction=SE93&sysid=DEV
Choosing OK takes me to password popup, and then to transaction SE93.
If you move this discussion to ABAP sub-space or to Internet Transaction Server, people over there would be able to give better replies.
‎2013 Jul 25 2:19 PM
Hi Manish,
Thanks for your detailed reply. i also did exactly the same here is the modified url ...
/sap/bc/icf/demo/zdoc_open?sap-client=010&~TRANSACTION=SE93&sysid=dev
but havnt workd fr me.
Another question is will it be possible to pass the values for various fields from the icf service to the sap transaction screen that will be opened.
P.S
Do you know how can i move the discussion to some other forum ?
Thanks a lot fr your help sofar
‎2013 Jul 25 7:49 PM
I think your SYSID is incorrect, and transaction parameter is being passed incorrectly.
SYSID or system id can be checked in debug mode using value of SY-SYSID variable.
My R/3 sysid is DEV, yours may be DR1, RD1 or something similar.
Check this in properties of your development system entry in SAP Logon Pad.
Assuming you want to launch SE93 transaction, and your development system is DR1, correct URL ending could be:
/sap/bc/icf/demo/zdoc_open?sap-client=010&TRANSACTION=SE93&sysid=DR1
Note: I have removed ~ character that was present before transaction parameter name.
My ICF knowledge is extremely limited. I don't know how to pass values from ICF service to transaction. Perhaps a custom handler is needed.
I think discussion can be moved by Space Moderator. Moderators are listed on left side in below link.
http://scn.sap.com/community/abap/people
Message can be sent to them by clicking on 'Communications' > 'Send Direct Message'.
‎2013 Jul 26 9:41 AM
Hi Manish,
Thanks for the reply.
The sysid i had already used the correct one , the one i written in previous post was just fr reference.
I removed the tilde sign from the transaction but still it doesnt work.
I try to move the discussion as you mentioned.
Thanks a lot for your help.
‎2013 Jul 26 3:40 PM
Hi Manish, Hi Linda,
FYI this is not an ITS service; ITS would not be using a handler: CL_SWN_HTTP_SHORTCUT
Standard ITS handler would be: CL_HTTP_EXT_ITS
ICF area is perhaps a better forum?
Most ICF queries are in the forum
http://scn.sap.com/community/netweaver-as
Regards,
Oisin
ITS/WGU SDN Moderator
Add forum link. Message was edited by: Oisin ONidh
‎2013 Jul 26 3:52 PM
Hi Oisin
Thanks for letting us know. We don't know much about using services. Progress done so far is just by searching tutorials on internet.
‎2013 Jul 29 8:45 AM
Hi Oisin,
Thanks for the info. I will post my question in that forum then for further help.
Thanks all for your help so far.
Thanks
‎2013 Jul 24 4:50 PM
Hi,
Analyse the SAP program 'RSWNSENDMAIL1' to create .SAP file. Use the class CL_GUI_FRONTEND_SERVICES method Execute the .SAP file.
Thanks & Regards
Bala Krishna
‎2013 Jul 30 12:12 PM
I finally achieved what i wanted to. Just one problem remaining (explained at the end) Following steps followed.
1) transaction create SICF service anywhere. give the handler name as CL_SWN_HTTP_SHORTCUT
2) activate and test service. it will open a explorer with the following link
http://xyz.com:8000/sap/bc/icf/demo/zdoc_open?sap-client=010
3)this wont do anything. just change the link to the following
now this will open the se38 transaction when this link will be pasted in the explorer.
Things to note is that the handler written above is expecting the parameter name as client and not sap-client. further the standard handler does not allow any transaction to be opened. so i copied the standard to custom and remove the restriction of the transaction.
Further if you want to send some parameter as well then append the link with ¶m= value and within the custom handler code then you can use these values and do whatever you want to do.
Now i am left with one thing i want to open the transaction and directly want to go to the second screen of the transaction and skipping the first one.
Please if someone knows that how can i achieve that..
Thanks
‎2013 Jul 31 10:36 AM
Perhaps you can call a custom transaction from URL, whose program does CALL TRANSACTION..AND SKIP FIRST SCREEN.
Another option could be to use transaction variant.
‎2013 Aug 01 10:12 AM
''''Now i am left with one thing i want to open the transaction and directly want to go to the second screen of the transaction and skipping the first one''''
this is also done, to move to the second screen the command must start with * so in the handler class you have to somehow change the shortcut string so that the command starts with * .
for ex.Command=*tcode parameters.....
Thanks