cancel
Showing results for 
Search instead for 
Did you mean: 

OCI custom Form(HOOK_URL) Data Return

Former Member
0 Kudos

Hi,

We are planning develop a custom catalog using J2EE WebDynpro and link with SRM using OCI. SRM expects the return in HTML Form from external catalog, to fill the shopping cart. Is it possible to pass the Form with HOOK_URL shopping basket information from J2EE Webdynpro to SRM ?

Thanks

Shekhar

Accepted Solutions (0)

Answers (1)

Answers (1)

yann_bouillut
Active Contributor
0 Kudos

Hi Shekhar,

I am not an expert in this area and my answer is maybe not in line with your question...

All i can say is that i have a customer which is using a full specific java catalog with SRM...

Hope this helps,

Kind regards,

Yann

Former Member
0 Kudos

Hi Yann,

Thanks much for your response. Is there a way i can get the sample code of the way they are returning back to the SRM CAtalog as i want to try the same way in Webdynpro Java for a quick prototype.

-Shekhar.

yann_bouillut
Active Contributor
0 Kudos

Hi Shekhar,

Here is an OCI example :

Kind regards,

Yann

Message was edited by: Yann Bouillut

Former Member
0 Kudos

Hi Yann,

In Webdynpro we do not have any grip for writing our own javascript functions. so can i understand that this requirement cannot be derived from Webdynpro rather we have to use simple html form? Please let me know.

-Shekhar.

Former Member
0 Kudos

Hi Yann,

I am able to send values to the catalog but when it is transferring back to the HOOK_URL it is opening the whole window. I mean the control should be given back to SRM but here in the sub window it is opening the whole application again.

Can you please let me know if we have to process any thing on the HOOK_URL to just transfer the control?

-Shekhar.

Former Member
0 Kudos

probably adding target="_top" to the form would work:

<form name="Visiten" action= <%= HOOK_URL %>

method="post" onsubmit="return chkFormular()">

should become:

<form name="Visiten" action= <%= HOOK_URL %>

method="post" target="_top" onsubmit="return chkFormular()">

Former Member
0 Kudos

Hi,

I have implemented an own BSP (HTML) which transfers back the input data into a shopping cart.

Robin is right:

You have to add target="_top"

Perhaps try

<form name="Visiten" action= <%= HOOK_URL %>

method="post" OkCode="ADDI" target="_top"

onsubmit="return chkFormular()">

Former Member
0 Kudos

Robin / Andreas,

Can you please let me know how can i specify the parameter target = "_top" in the java webdynpro function. can it be urlConn.setRequestProperty("target", "_top"); looks like this statement did not work.

Please let me know.

-Shekhar.

Former Member
0 Kudos

Shekhar,

I have not implemented a webdynpro function yet.

All i could offer is my HOOK_URL, which is generated by my HTML FORM and the customizing in the SRM System

Here is the HOOK_URL, I think the most important statememts are to put the commands (top, ADDI..) in the right order:

http://"your server id"/scripts/wgate/"sessionid srm"/<b>?OkCode=ADDI&TARGET=_top&~CALLER=CTLG</b>

Regards

Andreas

Former Member
0 Kudos

Andreas,

The HOOK_URL that SRM is send to my webdynpro application while calling is as below:

HOOK_URL From SRM = http://sapsbx2.cnsl.com:8001/sap(cz1TSUQlM2FBTk9OJTNhc2Fwc2J4Ml9TUkRfMDElM2FtWFRHempFeHExZmFWSTVLUmV...?OkCode=ADDI&target=_top&client=900&language=EN&~HTTP_CONTENT_CHARSET=utf-8

In the above URL it already has ?OkCode=ADDI&target=_top.

Now when i am trying to add these again and when i am submitting it back SRM is not able to understand and its generating Javascript Error that object is null.

After i analyzed i am now confused that if the target=_top already exists in the HOOK_URL then it should work right?

Please let me know your thoughts. I am almost done but caught in the last step.

Kindly let me know.

-Shekhar.

Former Member
0 Kudos

Hi Shekhar,

attached you find my complete URL after submitting the data from the HTML Form to SRM

https://SYSTEM and PORT/sap(cz1TSUQlM2FBTk9OJTNhdWFjZ24wMDRfRUJYXzE0JTNhMEpucFZiemlHWDJ3U18zdDcyM3pxRXNYM1VBeV9iR0NyS0RoWkdRci1BVFQ=)/bc/gui/sap/its/bbpsc02/?uname=U36939<b>&OkCode=ADDI&TARGET=_top&CALLER=CTLG&client=010&language=DE&HTTP_CONTENT_CHARSET=iso-8859-1</b>

I have customized the BSP Application as a catalog in SPRO where I defined the params like this

OCI_VERSION 2.0

HOOK_URL

uname sy-uname

~OkCode ADDI

~TARGET _top

~CALLER CTLG

Perhaps the param CTLG is missing in your URL?

Regards

Andreas

Former Member
0 Kudos

Hi Andreas,

Like Target=_top is comming to my application from SRM which is part of the HOOK_URL is there a way that then can send CALLER=CTLG also as a part of HOOK_URL.

When I am trying to send from my Application its not working. Please let me know your feedback.

-Shekhar

Former Member
0 Kudos

Hi Shekhar,

I am not sure, if we are on the same path at the moment.

Let me try to explain you my way of implementation:

First I developed a bsp application.

Second I customized a catalog call structure for my bsp where i defined the following params:

Type of WebService: Product Catalog(then its using the standard OCI structure)

Call Structure

1 http://.../sap/bc/bsp/sap/....htm URL

3 OCI_VERSION 2.0 Fixed Value

4HOOK_URL Return URL

5 uname sy-uname SAP Field

6 ~OkCode ADDI Fixed Value

7 ~TARGET _top Fixed Value

9 ~CALLER CTLG Fixed Value

Now SRM generates the complete HOOK_URL for my application.

I just have to call that hook_url after pressing my submit button.

Have you tried to call your webdynpro as a catalog with the call structure yet?

HOOK_URL should be generated then....

Regards

Andreas

Former Member
0 Kudos

Hi Andreas,

Looks like i am pretty close and only one point is missing which is the CALLER CTLG paramenter.

For the Product Catalog(Motor in my case) i have added OCI_VERSION, uname and CALLER and i am surprised only OCI_VERSION and uname parameters are visible in the HOOK_URL and not the CALLER Parameter.

I tried rearranging the sequence still some how CALLER CTLG is not al showing up in the HOOK_URL.

Can you please suggest what you have done in your case for CALLER parameter to be shown up in the HOOK_URL.

-Shekhar.

Former Member
0 Kudos

Andreas,

The SRM team approached SAP and they happen to give them a note which they applied on the backend and now its able to send the Caller parameter. Thanks a lot for your help.

-Shekhar.

Former Member
0 Kudos

Hi Shekhar,

perfect! Finally solved )

Unfortunately my hints are not solving the problem finally but now everything works fine!

Could you just publish the note number here?

Thanks

Regard

Andreas

Former Member
0 Kudos

OSS Note 1238078 and 1237470 would solve the problem.

Former Member
0 Kudos

Hi,

I'm also trying to return shopping data from WedDynpro. Could you tell me how did you resolved your issue?

Thanks

Pradeep

Former Member
0 Kudos

Pradeep,

Were you able to resolve this ?

Vinit

Former Member
0 Kudos

Hi Andresa,

Could you please let me know how did you resolve this ?

Thanks,

Vinit

Former Member
0 Kudos

Hi Vinit,

Have you solved the catalogue data returning to webdynpro problem? if so Please give me the solution. Thanks.