cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to change/delete the hidden parameter sap-client of the OCI-Call?

Former Member
0 Kudos

Hello all!

In the OCI-Call the system is using a hidden form to transfer parameters.

I would like to change/delete parameter sap-client.

In my case the system is using following parameters:

function renderCatalogFrame()  {

return'<html><head><meta http-equiv="Content-Type"

content="text/html;charset=utf-8"></head>

<body>

<form id="service_form"name="service_form"method="GET"action="https://www.xxx-xxxxxx.de/fis/fisesales/login_oci.htm"target="_self"autocomplete="off">

<input type="hidden" name="sap-client" value="100">

<input type="hidden" name="sap-language"value="D">

<input type="hidden" name="username" value="XXXXX">

<input type="hidden" name="password" value="YYYYY">

<input type="hidden" name="~OKCode" value="ADDI">

<input type="hidden" name="~Caller" value="CTLG">

<input type="hidden" name="OCI_VERSION" value="4.0">

<input type="hidden" name="OPI_VERSION" value="1.0">

<input type="hidden" name="returntarget" value="_top">

<input type="hidden" name="HOOK_URL" value="http://XXX.XXX.XXX:8000/sap/sapsrm/inbound_hdlr?CODEPAGE=utf-8&TARGET_URL=http%3a%2f%2fXXXX.XXX.XXX%...">

<input type="hidden" name="CATALOG_URL" value="https://www.xxx-xxxxxx.de/fis/fisesales/login_oci.htm">

</form>

<script language="Javascript">document.getElementById("service_form").submit()</script></body></html>';}

 

The vendor is also using SAP but with sap-client 001.

Unfortunately the client is transferred as a parameter and therefore client 100 is used for logon.

I was not able to find (debug) the coding where the parameters sap-client and
sap-language are added.

Where are these parameters added?

Is it possible to change the logic? (not to add a parameter or to change the
parameter).

Thanks in advance for all your inputs!

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi,

check your config

SAP Supplier Relationship Management->SRM Server->Master Data->Content Management->Define External Web Services (Standard Call Structure)

additionally you may implement BADI BBP_CAT_CALL_ENRICH

Regards

Konstantin

Former Member
0 Kudos

Hi Konstantin,

thank you for your reply.

The parameter sap-client is added by the system. It is not a parameter within "define external web services".

Within BADI this parameter is still not added by system.

Therefore the BADI can't be used.

Regards

Stefan

konstantin_anikeev
Active Contributor
0 Kudos

Yapp, sorry, it's from the system.

Try to set a breakpoint in the method /SAPSRM/CL_CH_WD_OUTBOUND_HDLR->IF_HTTP_EXTENSION~HANDLE_REQUEST - it generates HTML code for catalog frame.

Regards

Konstantin

robin_janke
Contributor
0 Kudos

The parameters are created a little before the call to the outbound handler. However if you remove the parameters in there they don't show up. So I guess an overwrite exit there should work (parameters are retrieved somewhere in the middle of the RENDER_CATALOG_REDIRECTION method - so overwrite that one).

Regards,

Robin

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks to Robin and Konstantin I have implemented following solution:

In Customizing of "Define External Web Services" I've added the parameter SAP-CLIENT with the client number of the vendor system. Thus there are two hidden parameters SAP-Client. One with the client of our SRM system and the one of the customizing.

In an enhancement of class /SAPSRM/CL_CH_WD_OUTBOUND_HDLR I determine if there are two hidden parameters SAP-CLIENT. If yes I overwrite the first with second.

Class: /SAPSRM/CL_CH_WD_OUTBOUND_HDLR

Method: RENDER_CATALOG_REDIRECTION

Enthancement before endmethod:

data: LT_MATCHES type STANDARD TABLE OF MATCH_RESULT,
         LR_MATCH_1 type REF TO MATCH_RESULT,
         LR_MATCH_2 type REF TO MATCH_RESULT,
         L_MATCH_COUNT type i.

find ALL OCCURRENCES OF '<input type="hidden" name="sap-client" value="'

       IN cv_html

       in CHARACTER MODE

       IGNORING CASE

       MATCH COUNT L_MATCH_COUNT

       RESULTS LT_MATCHES.

if L_MATCH_COUNT EQ 2.

   read TABLE LT_MATCHES index 1 REFERENCE INTO LR_MATCH_1.

   read TABLE LT_MATCHES index 2 REFERENCE INTO LR_MATCH_2.

   replace SECTION offset LR_MATCH_1->OFFSET length 49 of cv_html
                with cv_html+LR_MATCH_2
->OFFSET(49)

                in CHARACTER MODE.

   replace SECTION offset LR_MATCH_2->OFFSET length 51 of cv_html
                with
''
                in CHARACTER MODE
.endif.

endif.

robin_janke
Contributor
0 Kudos

Hi,

please check Function Module /SAPSRM/CLL_WSI_CALL and in there doubleclick on the map_cust_to_name_value form in here search for the sap-client string.

It looks like it is not that easy to get rid of it. Maybe create an implicit enhancement in the map_cust_to_name_value and remove those 2 entries again?

This function is actually called from class /SAPSRM/CL_CH_WD_NAVI_SERV and method /SAPSRM/IF_CH_WD_NAVI_SERV~LAUNCH_CATALOG

I don't think the BBP_CAT_CALL_ENRICH is going to be of help here as it is called later and doesn't have those 2 values available.

Regards,

Robin

Former Member
0 Kudos


Hi Robin,

thank you for your reply.

I've set a break-point and deleted the field sap-client in debug mode.

But the hidden parameter sap-client is still in my trace of the OCI-URL call.

Therfore it is not the right place where the hidden parameters are added.

Regards

Stefan