Skip to Content
author's profile photo Former Member
Former Member

how to access the current URL in table interface

Hi,

I've got an object of type CL_RSR_PARAMETER.

I need to get the last URL of a webtemplate to create context sensitive links (ascending, descending sorting)in the header line of the table.

Where (and how) do I have to create the object to get the last executed URL?

Thanks

Mike

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2004 at 11:11 AM

    Hi,

    try reading out the window.location object by JavaScript.

    -> www.selfhtml.org gives you some tips.

    Bye

    Ralf

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2004 at 01:23 PM

    Hi Mike,

    You can do this way. You can add the previous url as a parameter to the current url using javascript and then access that parameter in the table interface as below. I mean ,

    present url = present url&PARAMETER_NAME=<previous url>

    N_R_CREATION_PARAMETERS->GET( I_ID = 'PARAMETER_NAME' I_INDEX = 0 ).

    Cheers,

    Kartheek

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      thanks for your answer.

      Do I really have to use javascript?

      Isn't there a possibility to get the last executed url at the backend, because the server should know wich was the last command it got!

      If I look at other parameters (like REQUEST_NO) it works.

      Cheers

      Mike

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2004 at 06:55 AM

    Hi Mike,

    It may not be possible to get the previous url in the table interface. Request_no and pageno are generated at the server on a random basis( even though they seem to follow a particular pattern) . Hence, you may have to use javascript.

    Cheers,

    Kartheek

    Message was edited by: Kartheek Kandikuppa

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kartheek,

      right now I am trying to get it via the HTTP Framework (HTTP Request).

      Do you think this will work?

      The only problem I have is, that the documentation (http://help.sap.com/saphelp_erp2004/helpdata/en/78/98527bc06b11d4ad310000e83539c3/content.htm) sais to that there is a server-object created for every incoming request.

      But whats the name of it and how to access it.

      currently I am trying to do it this way:

      DATA: REF_IF_HTTP_REQUEST TYPE REF to IF_HTTP_REQUEST,

      server type ref to CL_HTTP_SERVER.

      create object server.

      REF_IF_HTTP_REQUEST = server->IF_HTTP_SERVER~REQUEST.

      call method REF_IF_HTTP_REQUEST->IF_HTTP_ENTITYGET_HEADER_FIELD( EXPORTING NAME = 'REQUEST_URI'

      RECEIVING VALUE = test ).

      But there I just get a empty object.

      cu

      Mike

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2004 at 03:35 PM

    You will be able to get the URL parameters using the method

    URLVALUE = N_R_CREATION_PARAMETERS->GET( I_ID =

    'URLPARAM' I_INDEX = 0 ).

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you,

      but this I already tried and it doesn't work.

      I dynamicaly create a link to sort (url-parameters: SORT_DIRECTION, SORT_TYPE, IOBJNM ...).

      But with this method I don't get these parameters.

      The thing I want to do is to modify the caption line of the table this way, that the user clicks on it to sort acending. The scond time he clicks on it it should sort descending.

      But therefore I need SORT_DIRECTION from the former call.

      cheers Mike

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.