cancel
Showing results for 
Search instead for 
Did you mean: 

Handle custom field from URL

Former Member
0 Kudos

Hi Gurus,

I am implementing one enhancement for SRM shopping chart, according the requirement the value of the new customizing field should be populated from one new parameter of the URL as follow:

'http://<domain>/sap/bc/gui/sap/its/bbpstart?CUSTOM_FIELD=XYZ&sap-client=100&sap-language=EN'.

I have implemented the following code in the request handler class to get the whole URL, but I got back only the standard part of the URL not the custom part.

url = server->request->get_header_field( if_http_header_fields_sap=>request_uri ).

I have also tried the following code, but it dos not returned the value.

url = server->request->get_uri_parameter( 'CUSTOM_FIELD' ).

I would appreciate any help if you had experience with any similar requirement.

Thanks and Regards,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

ralph_schillein
Explorer
0 Kudos

Hi K. F.,

try:

url = server->request->get_form_field( name = 'CUSTOM_FIELD' ).

instead of:

url = server->request->get_uri_parameter( 'CUSTOM_FIELD' ).

I know it sounds just wrong, but try it.

For me, it worked fine.

br,

ralph

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ralph,

Thanks for your reply, but it is did not work for me. And even if I used the code;

CALL METHOD server->request->get_form_fields

CHANGING

fields = li_fields.

to get all form fields I got only the following standard field values in the output table

~client

~language

~logingroup

sap-client

sap-language

addsession

parentbbpsession

sap-client

sap-language

I just manually added the CUSTOM_FIELD to the URL. May I have to configure this parameter somewhere else too? (The ITS service is BBPSC01 in SRM.)

Thanks for your help.

Regards,

Peter

Edited by: K. F. Kubus on May 7, 2009 2:46 PM