Skip to Content
avatar image
Former Member

Parameters not passed from link(URL) to GET_URL

Hi,

There is a particular problem that I am getting in trying to retrieve parameters from a URL.

Scenario is :

-- There is a page index.htm and consists of three frames

a) default.htm

b) idoc.htm

c) segment.htm

-- In default.htm, a document number is entered and submit button is pressed. On pressing submit button in frame idoc.htm, a tree is shown with the Document segments and each document node of that tree has a link.

The link is something similar to this:

http://abc.xyz.com:8080/sap/bc/bsp/sap/ytestidoc/segment.htm?pa_s_idoc-mandt=100&pa_s_idoc-docnum=0000000000199014&pa_s_idoc-counter=000&pa_s_idoc-segnum=000001&pa_s_idoc-segnam=E1KNA1M&pa_s_idoc-psgnum=000000&pa_s_idoc-hlevel=01&pa_s_idoc-dtint2=0+&pa_s_idoc-sdata=turkey

-- When the program goes to On Initialization event of segment.htm(I assume that you have clicked on this document node-link), I have called the get_attribute(PAGE->GET_ATTRIBUTE) method. In the page, it gave me an error stating that "pa_s_idoc-segnam attribute not present". However the address bar showed the entire URL.(Question is, how did I see the URL, since I am using frames. Well in the TVIEWNODE structure , I mentioned target="_blank" for testing purposes. 😊 )

-- This was funny as in the URL, it showed the entire attribute, but while fetching it , it mentions no such attribute present and throws an EXCEPTION. I used the RUNTIME->GET_URL method to obtain the URL and in debugging just check what the URL is. Well the URL just had segment.htm and no attributes. I wonder why.

Please let me know if I have missed out on certain information.

Kindly advise.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 27, 2004 at 09:46 AM

    Hello Yogeshwari,

    I think your problem here is that you try to get an attribute that you haven't explicitly set before with the set_attribute method. Have you tried the request->get_form_field( pa_s_idoc-segnam ) instead?

    Another idea could be to declare page attributes for segment.htm. You declare for example "segname" and set it's auto flag, and in the URL you use in your tree node you put instead :

    http:/[...]segment.htm?segname=EKNA1M&[...]

    If you need to put it in a structure, you can do that in the OnInitialization event of segment.htm by doing ps_s_idoc-segname = segname. Of course it would work the same way with every other parameter.

    Regards,

    François

    Add comment
    10|10000 characters needed characters exceeded