cancel
Showing results for 
Search instead for 
Did you mean: 

call a SAP Transaction from BSP

Former Member
0 Kudos

Hi all,

I am a MM & CU developer and do not have a lot of know how with BSP. I have written a BSP Program that I call from the Web to get information in a list view and can draw down to the table info's. Now I would like to call a SAP Transaction like ME23 from the WEB when I select a record instead of getting the list view.

I have been looking threw Forum's and see that it is possible to call a SAP transaction from BSP, but I have not yet found a side, coding or book which states how this is done. There is stuff ITS and such, but I do not have any idea what they are talking about.

All I would like to know is, is there a way like 'Call Transaction 'ME23N' to call a transaction from BSP. When yes, HOW???

Any help is greatly appreciated !!

Mark

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

welcome to SDN.

are you on WAS6.40, if yes calling a transaction is simply calling the following url

http://washost.domain.com:port/sap/bc/gui/sap/its/webgui?~transaction=ME23&sap-client=001

if you or on a version less than 6.40 then you need either standalone ITS or you can use sap shortcut file to do this

Regards

Raja

Former Member
0 Kudos

Hello Raja,

Thanks for the Info. Were on 6.40 so this should work.

Question what is ITS ? I've seen it mentioned a lot but have not looked to see what it is exactly.

regards

Mark

athavanraja
Active Contributor
0 Kudos

Check this weblog to set it up and running ITS webgui - this was written for the sneak preview edition of ABAP engine, but would work in your case as well

/people/durairaj.athavanraja/blog/2005/08/21/running-your-first-its-webgui-application-in-sap-netweaver-04-abap-edition--nsp

getback, if you difficulty in following the weblog.

<u><b>Question what is ITS</b></u>

internet transaction server

http://help.sap.com/saphelp_nw04/helpdata/en/4f/2e6a52c3cdc44d83169b181a9c62ba/frameset.htm

Regards

Raja

Former Member
0 Kudos

Hi Raja,

Thanks for your help!

regards

Mark

Former Member
0 Kudos

Hello Raja,

your link work fine and the info you gave me fixed the problems I had. Thanks again for the help.

I have one question and was wondering if you can help.

I am looping a table to get a list of information set to the screen. This works fine. I am now trying to use your HTTP link to call a transaction which should be filled with the record number given from the list. I am using this link so far to set the table with information when the user selects a record they can see the table contence from the given record.

<td><a href="?onInputProcessing(search)&amp;s_ebeln=<%= page->to_string( value = v_ekko-ebeln ) %>">

<%= page->to_string( value = v_ekko-ebeln )

Is there a way to to use this link so that the information will be showen in the table and when the user clicks on the link, they become the transaction ME23 with the given record in which they have selected from the table?.

Thanks for any help you can give.

MArk

Former Member
0 Kudos

Hi Mark,

You can form the URL in this fashion to open up with the selected PO number:

http://<host>.<domain>.com:<port>/sap/bc/gui/sap/its/webgui?~transaction=ME23n&sap-client=812&RMMG1-...

Hope this helps,

Ps: Please award points for helpful replies.

regards,

Ravikiran.

Former Member
0 Kudos

Hello Ravikiran,

The extension is what I was looking for. Now I just have to figure out how to set the hppt link in my link so that I can call the transaction instead of the table.

I am trying to set the page->to_string to my link so that when I click the record I get the transaction. I thought the http link needed to be defined in the first page to string for the on click command. I am still working on this area.

Here is what I have so far, but this does not work.

loop at v_ekko_tab_archiv into v_ekko_archiv.

v_ekko = v_ekko_archiv-ekko.

<td><a href="?onInputProcessing(search)&amp;s_ebeln=<%= page->to_string( http://<host>.<domain>.com:<port>/sap/bc/gui/sap/its/webgui?~transaction=ME23n&sap-client=812&RMMG1-...

) %>">

<%= page->to_string( value = v_ekko-ebeln )

%>

</a>

</td>

<%

endloop.

%>

regards

Mark

Former Member
0 Kudos

Hello Ravikiran,

the link does not work as given. What is the &RMMG1-EBELN= is this a field or a table such as ekko-ebeln?

regards

Mark

Former Member
0 Kudos

Sorry Mark..

I gave you wrong info.. This is the correct one:

http://<host>.<domain>.com:<port>/sap/bc/gui/sap/its/webgui?transaction=ME23&okcode=/00&sap-client=812&RM06E-BSTNR=4500000017&DYNP_OKCODE=SHOW&&AutoStart=true

This one works now! I have tested it...

RM06E-BSTNR field you can pass the Purchase order number.

Hope this helps.

Thanks & Regards,

Ravikiran.

Former Member
0 Kudos

Hello Ravikiran,

Perfect, Thanks a lot!

Now I just have to figure out how to call the transaction from my table list.

regards

Mark

Former Member
0 Kudos

Hi Mark,

Glad that it helped you. Have a look at the below code:


* local types
TYPES: BEGIN OF str,
  EBELN TYPE  EBELN,
  BUKRS TYPE  BUKRS,
  link TYPE string,
END OF str.
TYPES: tab TYPE TABLE OF str.
* page attributes
itab TYPE TAB
wa TYPE STR
* layout
<%@page language="abap" %>
<body BGCOLOR="#B5E1D2" >
<form method="post">
<b> List of Purchase Order Numbers </b>
<table border="1">
<tr>
<td> Purchase Order number </td>
<td> Company Code </td>
<tr>
<%
  loop at itab into wa.
%>
<tr>
<td> <a href="<%= wa-link %>"><%= wa-EBELN %></a></td>
<td> <%= wa-BUKRS %> </td>
</tr>
<%
  endloop.
%>
</table>
</form>
</body>
* eventhandler OnCreate

field-SYMBOLS: <wa> type str.
data: tmp TYPE string.

CONCATENATE `http://<host>.<domain>.com:<port>/sap/bc/gui/sap/its/`
            `webgui?~transaction=ME23&~okcode=/00&sap-client=812&`
            INTO tmp.

SELECT EBELN BUKRS from EKKO
                   INTO CORRESPONDING FIELDS OF TABLE itab.

loop at itab ASSIGNING <wa>.
  CONCATENATE tmp `RM06E-BSTNR=`
  <wa>-EBELN `&DYNP_OKCODE=SHOW&AutoStart=true` INTO <wa>-link.
endloop.

This will help you how to pass the link dynamically.

Hope this helps,

Regards,

Ravikiran.

Ps: Please assign points if found helpful.

Message was edited by:

Ravikiran C

Former Member
0 Kudos

Hello Ravikiran,

Exactly! Now I see what I was doing wrong.

100 Points for you!

Thanks for your Help!

Wish you and yours a Merry Christmas and a Happy New Year!

Regards

Mark

Former Member
0 Kudos

Hi Mark,

Thanks a lot for wishes and wish you Merry Christmas and a Happy New year!

Glad that it helped.

I had expected atleast a 6 points for my last post

Anyways thanks a lot!

Regards,

Ravikiran.

Former Member
0 Kudos

Hello Ravikiran,

Sorry to bother you, but do you know a way to call the transcation ME23N so that when it's called the selected record will be showen as in ME23 ? I can now call different transactions and view the record I have chosen but I have not been able to call the transcation ME23N with the wanted record.

Everything else is working fine thanks to your help!

Regards

Mark

athavanraja
Active Contributor
0 Kudos

you cannot do the same with ME23N, because of the way its has been delivered. if you call me23n, it will use the last viewed po number and not the one you had passed via url.

more info on passing parameters to ITS url can be found in this weblog.

/people/durairaj.athavanraja/blog/2004/09/23/pass-parameter-to-its-url-upadated-21st-june-2008

Regards

Raja

Former Member
0 Kudos

Hello Raja,

thats what I thought, just wanted to check.

Thanks for your help.

regards

mark

Answers (1)

Answers (1)

0 Kudos

Hi,

I've almost the same problem, when i call the transaction ME23N with my PO number in parameter with this link:

http://hostname:port/sap/bc/gui/sap/its/webgui?transaction=ME23&okcode=/00&sap-client=812&RM06E-BSTN...

the window opens but not on the right PO.

An idea please?

Regards,

Abdrahim

Former Member
0 Kudos

Hi Abdrahim,

To call ME23 you have to use ebeln. Like this for example

sap/bc/gui/sap/its/webgui?~transaction=ME23N&~okcode=/00&sap-client=100&P_EBELN=4500004858&DYNP_OKCO...

regards

Mark

Former Member
0 Kudos

Sorry Forgot to add this.

You can call the start side of ME23 without a record like this.

http://hostname:port/sap/bc/gui/sap/its/webgui?~transaction=ME23&~okcode=%2f00&=&DYNP_OKCODE=SHOW&Au...

0 Kudos

Good

Thank you Mark.