on 08-20-2011 8:16 PM
Hi all experts!
SAP send always SAPEVENT:POST as Return_url (HOOK_URL) to the catalog.
The Parameters are
URL testurl of the catalog Type2
USERAME testuser Type2
PASSWORD ******** Type2
HOOK_URL Type4
When the catalog is called, it shows the parameters sendet from SAP as follow:
USERNAME = testuser
PASWORD = *********
HOOK_URL = SAPEVENT:POST
METHOD = GET
What's wrong?
Thanks in advance
hirzi
Hi,
I don't believe that anything is wrong with SAP converting the 'return url' parameter in the background in to sapevent:post. This is normal behaviour and is similar in both SAP SRM and SAP PM/MM.
Via this paramater SAP knows that it needs to process the incomming post data included in the HTML page.
Ps. I couldn't really retrieve you exact question it might be the above but if not please restate what it's you're expecting.
Ps2. Instead of using method get you might want to go with method post. This can be set on catalog configuration header level, removing the marker 'Use HTTP Get to cal web service'
Kind regards,
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tiim!
Thanks for replay.
I'll tryto explain the Problem.
SAP snd as parameter HOOK_URL SAPEVENT:POST to the catalog/onlineshop.
So the catalog get hook_url=sapevent:post.
But sapevent:post is not an url.
The catalog needs an url like https://company/sap/etc?praremters
Where shoud the catalog send now the data from the ctalog.
In the help SAP write that a unique url will be generatet for each session an send as hook_url to the catalog.
Can you test to call the catalogs testpage from your SAP??
http://83.64.171.222/sap/testsap.php
Many thanks
hirzi
Hi Hirzi,
The HOOK_URL is a required paramater that indeed sends the value sapevent:post to the catalog within the return_url parameter field on header level. The catalog takes this value and includes it when returning from the catalog to SAP. This parameter lets you return/post the data from the catalog to the SAP solution -> You do not need an actual URL SAP will know what to do when you return/post via including the sapevent:post statement.
Your URL [http://83.64.171.222/sap/testsap.php] doesn't work and will never work as it doesn't contain any post statements. SAP can work with both the GET method (URL based) and POST (metadata in HTML body) method but the POST method is the normal way of doing things. Neither of those methods are included in your page.
1. First of all you need a webpage that you can open via SAP SRM, this can be any page as
2. Now most importantly that page needs to be able to return data via the post or get method to return from the webpage to SAP. You'll be using the POST or GET method in which you'll be including your catalog data but also the sapevent:post.
Hope this helps, best approach would be to open up an actual working catalog first and analyze what it returns with. Then build something similar via your solution of choice: f.e. joomla.
Kind regards,
Tim
Hi Tim!
1. Many many thanks for testing.
2. What does the catalog show as hook_url in the $_post or $_get array.
Only sapevent:post as hook_url or sapevent:post as a part of the hook_url.
3. The catalog contains post to sap.
You can reach it with the parameters:
url = http://83.64.171.222/sap/index.php
USER = testuser
PASSWORD = test01
HOOK_URL = generate from sap
The catalog sends the parameters via curl (its a part of php to sendig forms) to the destination (hook_url).
The format is
$this->_post['NEW_ITEM-DESCRIPTION['.$counter.']'] = substr($row->order_item_name,0,40);
$this->_post['NEW_ITEM-QUANTITY['.$counter.']'] = number_format($row->product_quantity, 3, '.', ''); // transform in 11.3
$this->_post['NEW_ITEM-UNIT['.$counter.']'] = substr($row->product_unit,0,3); //must be ISO Standard 3 chars
$this->_post['NEW_ITEM-PRICE['.$counter.']'] = number_format($row->product_item_price, 3, '.', ''); // transform in 11.3
$this->_post['NEW_ITEM-PRICEUNIT['.$counter.']'] = 1;
//$this->_post['NEW_ITEM-CURRENCY['.$counter.']'] = $row->order_item_currency; //must be zB. EUR
$this->_post['NEW_ITEM-CURRENCY['.$counter.']'] = 'EUR'; //must be zB. EUR
$this->_post['NEW_ITEM-LEADTIME['.$counter.']'] = 1;
$this->_post['NEW_ITEM-EXT_PRODUCT_ID['.$counter.']'] = $row->product_id;
$this->_post['NEW_ITEM-CUST_FIELD1['.$counter.']'] = $row->order_id;
$this->_post['NEW_ITEM-CUST_FIELD5['.$counter.']'] = substr($row->product_s_desc,0,50);
The catalog is written in german and its only a fake-catalog for testing the interface to sap.
4. you are right, it's joomla an virtuemart.
I'll try to write an interface from VM to SAP as a plugin.
Kind regards,
hirzi
Hi Tim!
The problem was, that i used curl to send data from catalog to sap, but curl can only send to a real URI.
The OCI-Interface instruction says that SAP send an URI as return_url to the cataloge, but in reality SAP use an event from it's own html-viewer as return_url.
So the catalog has to send a normal form to SAP that will be shown in html-viewer and by clicking on the submit.button the event SAPEVENT:POST will be fired.
The iterface is rewritten and works well.
You can test it with the logindatas above.
Thanks for help.
hirzi
So the catalog has to send a normal form to SAP that will be shown in html-viewer and by clicking on the submit.button the event SAPEVENT:POST will be fired. Could you please add some more details to this explanation if it is not way too late to remember? I have a one page bsp app for testing purposes and I have a form there that has hidden input fields and a submit button. I set action to HOOK_URL on form submit, but the HOOK_URL value is "SAPEVENT:POST" so do we have to create a handler for that event? right now the form submit just exits the catalog but no fields are transferred
Hi, Jesus
i have tested the plugins with joomla 1.5 vm 1.1.4.
I,ll send you the plugins and a simple instruction via mail.
hirzi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.