Call BSP Application From ABAP
Hi,
I want to call BSP Application from ABAP. I've searched the forum and they all are displaying BSP Page in Container of the Screen. My requirement is to show it in a web browser. For that matter I am generating URL to call BSP Application. Following is the code which is throwing short dump.
DATA: url TYPE string,
l_appl TYPE string,
l_page TYPE string,
l_params TYPE LINE OF tihttpnvp,
params TYPE tihttpnvp.
l_appl = 'ZPWLS_SCH_RPT'.
l_page = 'SELECTION_SCREEN.htm'.
call method cl_http_ext_webapp=>create_url_for_bsp_application
exporting
bsp_application = l_appl
bsp_start_page = l_page
bsp_start_parameters = params
importing
abs_url = url.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
url = url
WINDOW_NAME = ' '
new_window = 'X'
BROWSER_TYPE =
CONTEXTSTRING =
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks,
Usman Malik
What is the dump? also you should uncomment the following lines to receive the exception thrown by the FM
* EXCEPTIONS
* FRONTEND_NOT_SUPPORTED = 1
* FRONTEND_ERROR = 2
* PROG_NOT_FOUND = 3
* NO_BATCH = 4
* UNSPECIFIED_ERROR = 5
* OTHERS = 6
Similar Messages
-
Calling BSP Application from Business Object?
Hi,
Can any one tried to call BSP Application from Business Object for showing in the Portal.
I have the following Scenario:
1. BSP Page: User will input the Date and Submit to store in the Database. and in this page the Workflow will be truggered and a Work item will be sent to the Next Level User.
2. When he executes the Work Item it has to trigger the BSP Application and has to show in the Enterprise Portal.
All this has to happen in the Enterprise Portal.
If any one knows how to triggere from business object, please let me know.
Thanks & Regards
SumanthHi Vijay,
Thanks for the information. Its long back i was working on this, but not successful,
Now the similar requirement i need to develope in R/3.
I checked the mentioned class in R/3 4.7, This class is not available. I hope this is only in CRM because of PC-UI.
Any Suggesions how can i achieve this execution of BSP.
In one of the document i saw the Business Object BUS1006 as an example but i could not locate the way to reutilize the similar way.
Thanks & Regards
Sumanth -
Calling BSP application from Portal causes error
Hi,
called a bsp application from our portal. The application prompts the following error message:
BSP Exception: The object sap-tray-type=PLAIN_sap-tray-padding=X_sap_ep_version=7.00.200611091758_sap_ep_baseurl=http://v900stwmk1902.v900dtk1.v900.intern:50000/irj/portal in der URL /sap bD1kZSZjPTIwMCZwPTMwOTUxJnY9NyUyZTAwJmk9MSZzPVNJRCUzYUFOT04lM2Fhc2FwdDAzZW4xX1QwMl8wMCUzYXBFMVdnMmlqS21LYnNSZ01mMzIyLXpRdkwxMjdoYWF2NHFBeU9fTGEtQVRU)/bc/bsp/sap/zsi02/sap-tray-type=PLAIN&sap-tray-padding=X&sap_ep_version=7%2e00%2e200611091758&sap_ep_ is not valid.
We used an BSP iView (EP 7.0 and BI 7.0) Any ideas?
Thanks.
FrankHi,
I am not sure how did you get that bsp-url but here are the steps:
1) Create a system and assign an alias to it.
2) Make sure you give proper values in Connector, User Management and ITS Property Category
3) Check the connection by creating a sample SAP Transaction iview using WebGUI
4) If this is working fine, then create a BSP iview. Make sure you select proper system alias, BSP Defination Type (BSP), give the correct Application Namespace, BSP Application, Customer Namespace and start page.
Let me know what are the values you have entered here and we can try to fix this problem.
Cheers,
Sunil
PS: Reward points for helpful answers. -
Execute bsp application from abap program
How can I do to execute a bsp application from abp program ?
I have two parameter in enter : text and language.
And i have one paramenter in exit : translated text.
Thanks for you help.but how to retrieve the result of the bsp ?
Here is my source code :
data: url type string,
l_appl type string,
l_page type string,
l_params type line of TIHTTPNVP,
params type TIHTTPNVP.
l_appl = 'ZAPI_TRADUCTION'.
l_page = 'appel.htm'.
l_params-NAME = 'text'.
l_params-value = 'pour le moment test'.
append l_params to params.
call method cl_http_ext_webapp=>create_url_for_bsp_application
exporting
bsp_application = l_appl
bsp_start_page = l_page
bsp_start_parameters = params
importing
abs_url = url.
DATA: http_client TYPE REF TO if_http_client .
DATA: w_string TYPE string ,
w_result TYPE string ,
r_str TYPE string .
DATA: result_tab TYPE TABLE OF string.
CLEAR w_string .
w_string = url.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = w_string
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2.
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
CLEAR w_result .
w_result = http_client->response->get_cdata( ).
REFRESH result_tab .
In the variable it brings me back the html source code of the BSP rather than run and bring me the result of the BPS.
Thank you for your help. -
Calling BSP application from CRM PCUI framework
Hi All,
We are using the CRM PCUI for channel partner management. Since CRM PCUI framework has some limitations as to how the data is formatted in the layout such as no multiple value selection ( since it is a generic framework using the blueprint tables we have to use the predefined layout settings) we want to call a standalone BSP application to maintain some of the data such as marketing attributes. We want to do this by providing a link to the standalone BSP application where the data can be maintained. Since we will be calling this application in the create mode of a new BP, is it possible to integrate the whole application as one logical unit ? I mean we want to commit the marketing attributes within the same 'save' methods of the pcui framework. Is this possible to do ? Any ideas or input is greatly appreciated.
Thanks.Hi,
we've already done a rework of the marketing attributes screen by using the technique I've described in my Weblog <a href="/people/gregor.wolf3/blog/2005/05/27/use-crm-pcui-html-viewer-to-call-a-custom-url">Use CRM PCUI HTML viewer to call a custom URL</a>. But it has one drawback: You can't use the Save button of the PC-UI applicaiton. You have to provide your own. But the usability enhanchement is rearly great.
Regards
Gregor -
Calling a BSP application in ABAP webdynpro
Hi Friends,
Is there any chance that i can call a BSP application from WEBDYNPRO.
regards
Nalinikanth.Hi Yashpal/ Pankaj,
I have one question regarding this.
The usage of the UI element link "link to URL" is pretty much understandable to call a stanalone application.
Whereas the usage of suspend and resume plugs, how does it work for BSP applications? For two WD components we can connect the plugs and it works.
As I do not know about BSP, does it have in/out plugs like WD components?
If so how to create the navigation link for this.
Please explain.
Sankar. -
Calling a BSP application from a report
Hi to everybody,
I have one BSP(Business Server pages)application.I want to call that application from report.How to call BSp from report.The SAPGui HTML control is great way to show a BSP page. You can create the HTML control (CL_GUI_HTML_VIEWER) in a full screen or subscreen (anywhere you can insert a container controll). Best yet you can activate SSO for the HTML control so that the user doesn't get prompted for credentials. The following is some code samples:
CREATE OBJECT custom_container
EXPORTING
container_name = 'CUSTOM_CONTAINER'.
CREATE OBJECT html
EXPORTING
parent = custom_container.
CALL METHOD html->enable_sapsso
EXPORTING
enabled = 'x'.
DATA: url TYPE string.
DATA: url1 TYPE url.
DATA: l_appl TYPE string,
l_page TYPE string.
l_appl = bsp_appl.
l_page = page.
CALL METHOD cl_http_ext_webapp=>create_url_for_bsp_application
EXPORTING
bsp_application = l_appl
bsp_start_page = l_page
bsp_start_parameters = params
IMPORTING
abs_url = url.
url1 = url.
CALL METHOD html->show_url
EXPORTING
url = url1. -
Web dynpro abap : Call an application from another with parameters
Hi ,
Could you please tell me how to call an application from another with parameters?
Thanks a lot
Karim* Construct the URL
call method cl_wd_utilities=>construct_wd_url
exporting
application_name = 'APPLICATIION_NAME'
importing
out_absolute_url = g_url.
* Append parameters to URL
data: g_par1 = lv_value. " value of your parameter
call method cl_http_server=>append_field_url
exporting
name = 'PAR1' " Parameter name
value = g_par1
changing
url = g_url.
* Call the Application
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 = lo_window_manager->create_external_window(
url = g_url ).
lo_window->open( ). -
Calling Java API from ABAP using JCo
I need to call Java API from ABAP & BSP also. For this I have got useful information related to JCo from following blog:
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
But, I am facing one problem. On executing Java program myExample5.java (recommended by Gregor Wolf) from command line I get following error message:
Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
Exception in server JCOSERVER01:
com.sap.mw.jco.JCO$Exception: (129) JCO_ERROR_SERVER_STARTUP: Server startup failed at Thu Apr 26 13:46:32 IST 2007.
This is caused by either a) erroneous server settings, b) the backend system has
been shutdown, c) network problems. Will try next startup in 1 seconds.
Connect to SAP gateway failed
Connect_PM TPNAME=JCOSERVER01, GWHOST=gateway, GWSERV=3300
LOCATION CPIC (TCP/IP) on local host
ERROR hostname 'gateway' unknown
TIME Thu Apr 26 13:46:32 2007
RELEASE 640
COMPONENT NI (network interface)
VERSION 37
RC -2
MODULE ninti.c
LINE 336
DETAIL NiPGetHostByName2: hostname 'gateway' not found
SYSTEM CALL gethostbyname_r
COUNTER 1.
Can anyone please help me out. Do I need to do any setting?
I'll surely reward points.
Thanks & Regards,
Nilesh KumarHi Nilesh,
From the error i think that the error is with the hostname.
Please enter the the Application Server IP/Hostname.
If you are loggin to SAP System "XX1" from SAP GUI. Then click the change Item tab and see Application server name/IP let say "XX2" for hostname or "xx.xx.xx.xx" for IP.
Replace <i>srv[0] = new Server("gateway","sapgw00","JCOSERVER01",repository);</i>
with <i>srv[0] = new Server("XX2","sapgw00","JCOSERVER01",repository);</i>
If App Server is IP then replace with
<i>srv[0] = new Server("xx.xx.xx.xx","sapgw00","JCOSERVER01",repository);</i>
Let me know if it is throwing any error.
Thanks,
Prashil -
Hello all,
i need some information about calling BSP's from SCM ICH(inventory collaboration hub) into EP. for this what steps i need to do.
pl suggest me
thx
pradeep<i>when i was trying to call bsp from ICH..it shows..loading..but not coming anything...</i>
One of the possible reasons could be that at the back end ABAP is trying to compile. Go to that particular BSP application and activate it manually and then try it in portal.
<i> maintained correct path for WAS. do i need to activate anything in BSP side?
What parameters do i put into
Application parameters
BSP definition type
BSP application...</i>
if this is the first time you are going to run BSP application there are certain nodes in SICF tree should be activated. Check out OSS Note# 517484 for info on this.
BSP definition type => BSP Application (if you have aliases defined and want to use it then you should use BSP alias)
BSP application => your BSP applicatio name
Start page => start page of your BSP application (default.htm)
System => the back end system alias to which this BSP should connect to (e.g DEV001)
Hope this helps.
Regards
Raja -
How to call java program from ABAP
Hi Experts,
My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
parameter TYPE string VALUE 'D:java MyFirstProgram'.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = command
parameter = parameter
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
OTHERS = 8.
Thanks.This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
Implement an RFC server in 7.0:
http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
Implement an RFC server in 7.1 or higher:
http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm -
Is it possible to call web service from ABAP SAP 4.6 c..If yes how
Hi Friends,
Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
Thanks in Advance.
Murali Krishna K
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PMOlivier CHRETIEN wrote:>
> Hi Terry,
>
> So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
>
> How much abap code lines do you have for a web service call ?
> Do you have to code the call specifically for each different web service ?
> Are you able to use the WSDL ?
>
> Nice job if you have coded your own private SOAP runtime !
>
> But I don't think this is an easy solution for everybody...
>
> Regards,
>
> Olivier
Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication. So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic. Here's some sample code:
DEST = 'SAPHTTPA'.
TRANSLATE HOST TO LOWER CASE.
MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
CONCATENATE HOST MYURL INTO MYURL.
REQUEST_HEADERS-DATA =
'Content-type: application/x-www-form-urlencoded'.
APPEND REQUEST_HEADERS.
CLEAR REQUEST_HEADERS.
*........Convert Order Number to External Format........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ORDER
IMPORTING
OUTPUT = ORDER.
*........Convert Item Number to External Format.........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITEM
IMPORTING
OUTPUT = ITEM.
*........Convert Material Number to External Format.....................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = MATERIAL
IMPORTING
OUTPUT = MATERIAL.
CONCATENATE 'sOrder=' ORDER
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sItem=' ITEM
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sMaterial=' MATERIAL
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CALL FUNCTION 'HTTP_POST'
EXPORTING
ABSOLUTE_URI = MYURL
RFC_DESTINATION = DEST
BLANKSTOCRLF = 'X'
TABLES
RESPONSE_ENTITY_BODY = RESPONSE_BODY
REQUEST_ENTITY_BODY = REQUEST_BODY
RESPONSE_HEADERS = RESPONSE_HEADERS
REQUEST_HEADERS = REQUEST_HEADERS
EXCEPTIONS
CONNECT_FAILED = 1
TIMEOUT = 2
INTERNAL_ERROR = 3
TCPIP_ERROR = 4
DATA_ERROR = 5
SYSTEM_FAILURE = 6
COMMUNICATION_FAILURE = 7
OTHERS = 8.
CHECK SY-SUBRC = 0. "more appropriate msg goes here
LOOP AT RESPONSE_BODY.
IF RESPONSE_BODY+0(7) <> '<string' AND
RESPONSE_BODY+0(8) <> '</string' AND
RESPONSE_BODY+0(5) <> '<?xml'.
SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
TRANSLATE FIELD_NAME TO UPPER CASE.
CASE FIELD_NAME.
WHEN 'HEIGHT'.
HEIGHT = FIELD_VALUE.
WHEN 'WIDTH'.
WIDTH = FIELD_VALUE.
WHEN 'LENGTH'.
LENGTH = FIELD_VALUE.
WHEN 'WEIGHT'.
WEIGHT = FIELD_VALUE.
WHEN 'QTY'.
QTY = FIELD_VALUE.
ENDCASE.
ENDIF.
ENDLOOP.
Hope this helps...
Terry
Edited by: Terry West on Feb 4, 2008 3:08 PM -
Ole excel application from abap
Hi all ,
I an calling one excel application from abap . I don't want to make excel file visible , but insted want to save and close the file , by using method
saveas for excel application and later i want to see the file . file name i want to store in a variable .
eg :
CALL METHOD OF H_EXCEL 'FILESAVEAS' = RC
EXPORTING #1 = filename .
Can it be possible ?
regards,
SAhi
i simpler method will be to use the function modules for this purpose.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
file_name = file_name .
lc_filename = file_name.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = lc_filename
filetype = 'DAT'
TABLES
data_tab = gt_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Fn module F4_filename will prompt for the name of the file to be saved and GUI_DOWNLOAD will save the file.
gt_itab is the internal table containing the data to be stored in excel. -
How to invoke java application from ABAP
How to invoke java application from ABAP ? Suppose I needto execute a EJB wihic is running on my SAP J2EE Enigne from an ABAP Program .
Thanks,
ManishHi Manish,
did you get some further documents concerning "abap program calls ejb"?
If yes, could you please send me some informations.
Thank you for your help.
Kind regards, Patrick. -
Error while calling java program from ABAP
Hi Experts,
We are trying for RFC inbound scenario.
We followed the below blog
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
We are working with SAP JCO 3.0.2
We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
'STFC_CONNECTION' could not be found in the server repository.
If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
'RFCPING' could not be found in the server repository.
We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
Please help us in resolving this issue.
Thanks
PrincePabi,
Using the RFC connection,we can establish a link between Java and SAP.
Afterwards,hope we can call Java program from ABAP.
Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
DATA: REQUTEXT LIKE SY-LISEL,
RESPTEXT LIKE SY-LISEL,
ECHOTEXT LIKE SY-LISEL.
DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
DATA: RFC_MESS(128).
REQUTEXT = 'HELLO WORLD'.
RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION RFCDEST
EXPORTING
REQUTEXT = REQUTEXT
IMPORTING
RESPTEXT = RESPTEXT
ECHOTEXT = ECHOTEXT
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
IF SY-SUBRC NE 0.
WRITE: / 'Call STFC_CONNECTION SY-SUBRC = ', SY-SUBRC.
WRITE: / RFC_MESS.
ENDIF.
Regards,
Sree
Maybe you are looking for
-
Mailbox database size before & after backup
Hi there i recently made a similar thread and someone told me that i should do it here so here is my issue : i've been assigned to do a specific report related to exchange and its backup so what we want is a report that would give us the global size
-
My ipod is connected to the internet via wi-fi in my house, but as of yesterday morning when I try to do anything online (webpage, mail accounts, itunes, maps) it says "cannot connect to the server. not currently online." but my wi-fi is active - i
-
I am trying to access the Cisco PIX device manager to get access to my firewall, but get the error message above when trying to start the applet: Is this a bug? Thankful for any input! See the Java concole output below: Java Plug-in 1.5.0_06 Using JR
-
Tag files for rendering JSF components
Hi people! It is possible to render component JSF using Tag-Files? (WEB-INF/tags). I am having problems with context, seems that the JSF does not recognize pageContext. Ex: My Tag-File <%@ attribute name="nameproperty" required="true" rtexprvalu
-
Hi Gurus, Im trying to execute a OS Command inside the file adapter. Its a .exe file which I have written. The exe file will take in 2 parameters. I entered this in the OS Command F:\test\run.exe test.xml output.txt However, it seems that t