Get_url_new_session ignoring used alias

Hi,
we have a stateful web application not being in our namespace (it dooesn't start with y or z either) and so we defined an external alias using transaction SICF and stored anonymous logon data there.
Unfortunateley that application needs sap-sycmd=nocookie as parameter which forces mangling the session-id into the url.
If the user clicks a logout-button the follwing code gets executed:
DATA: l_url TYPE string.
* need to call get_url_new_session
* since we have to change the url
* because a new session-id has to be mangled
* into the url
l_url = runtime->get_url_new_session(  'index.do' ).
navigation->exit( l_url ).
l_url holds a newly generated session-id which is quite good but it points to the web application itself for which we can not store anonymous logon data without a modification.
Is there a way to have get_url_new_session recognize the url-path and take it into consideration while creating an url?
In short:
web application: /foo/bar (no logon data in SICF, service not editable without modification)
external alias: /xy/foobar (logon data in SICF)
application is called via: <a href="http://www.example.com/xy/foobar/index.do?sap-syscmd=nocookie">http://www.example.com/xy/foobar/index.do?sap-syscmd=nocookie</a>
after using logout button, method navigation->exit tries to navigate to: <a href="http://www.example.com/sap(<i>some stuff</i>)/bc/bsp/foo/bar/index.do">http://www.example.com/sap(<i>some stuff</i>)/bc/bsp/foo/bar/index.do</a>
result: browser presents http authentication popup
question: how to circumvent?
thanks in advance
Matthias

Hi Daniel,
it doesn't matter whether I use sap-syscmd=nookie or not.
get_url_new_session never takes the used alias into consideration althoug it should be very easy to detect since the url should either be an alias or start with /sap/...)/bc/bsp/
If i call the application using the external alias and syscmd=nocookie all form-tags have an action-attribute pointing to the /sap(...)/bc/bsp/foo/bar which of course leads to an authentication popup after having logged off in /xy/foobar.
If I call the application using the external alias but without sap-syscmd=nocookie there is no single form-tag containing an action-attribute but get_url_new_session will return a link to /sap(...)/bc/bsp/foo/bar as well.
(I know I don't need get_url_new_session in this case)
The implementation of IF_BSP_RUNTIME~GET_URL_NEW_SESSION in CL_BSP_RUNTIME tells us:
* REMARK: this method does NOT set the new BSP to stateful, but does only
*         create a URL that is does work as a stateful URL.
*         For "normal" BSP calls there is no difference between
*         GET_URL_STATELESS, .._NEW_SESSION and ..._SAME_SESSION.
*         Then the session id is transported via a cookie, and a new
*         BSP application means a new session. The result-URL will be identical.
*         The difference between these three methods makes only sense when the session
*         id is transported via URL. This is true, if the applicaion is called with the
*         parameter "sap-syscmd=nocookie", or if it is called from the portal.
*         There are 2 different techniques which are used by the portal:
*         1. the portal calls the application with the nocookie-Parameter
*         2. the portal calls the application with an external sessionid
so I consider this to be a bug too.
But maybe someone else comes up with a solution/explanation?

Similar Messages

  • Cannot use alias for dynamic column name in SELECT statement

    Hi,
    I want to retrieve values from several tables by using dynamic column & table name as below:
    DATA: tbl_name(30) TYPE c VALUE '/bic/tbi_srcsys',  " staticly initialized for this example
               col_name(30) TYPE c VALUE '/bic/bi_srcsys'.  " staticly initialized for this example
    SELECT (col_name) INTO CORRESPONDING FIELDS OF TABLE it_values FROM (tbl_name).
    The internal table "it_values" does not contain a field named "/bic/bi_srcsys", instead it has another generic field "value" so that the above code can be applied to other tables. I tried to use alias (AS) as below:
    SELECT (col_name) AS value INTO CORRESPONDING FIELDS OF TABLE it_values FROM (tbl_name).
    But this cannot work. I know that there are other ways to solve this problem, such as by using a single field in SELECT .. ENDSELECT and subsequently appending it to the work area and internal table as below:
    SELECT (col_name)  INTO (lv_value) FROM (tbl_name).
      wa_value-value = lv_value.
      APPEND wa_value TO it_values.
    ENDSELECT.
    Just wonder if there is any other more elegant workaround, because I might have several other fields instead of only one?
    Thanks.
    Regards,
    Joon Meng

    Hi Suhas,
    thanks for the quick reply.
    Sorry that I have not well described the structure of the internal table "it_values". This internal table contains several other fields (key, type, value, etc.).
    I guess that the following code
    SELECT (col_name) INTO TABLE it_values FROM (tbl_name).
    works if the internal table only has one field (value) or the field "value" is in the first position, right?
    In this case, I need to fill the "value" field of internal table it_values (ignore the other fields like type, key) with values retrieved from (col_name) of the DDIC table.
    Looking forward to your reply.
    BR,
    Joon Meng

  • Memory problems when using alias channel strips (3.0.2)

    I'm having memory issues when using alias channel strips.  What is happening is I create one instance of the plugin, say Massive.  Then make a bunch of other alias on different patches.  When looking at the memory usage everytime I add and alais it increases the memory usage by an amount the same as the origional plugin.  ie. add 3 alias and you have 3 times more memory usage.  See attached photos.
    Original plugin instance ~80mb memory usage
    Adding 3 Alias channel strips.  ~330mb memory usage
    By comparison here is the usage by adding 3 brand new instance of the plugins. ~160mb memory usage
    By comparison it is using less memory by having 4 seperate instances of the plugin compared to using 3 alias's of the origional.  This doesn't make sense since the whole point of an alias is to save memory by only loading one instance of the plugin. 
    Anyone have any thoughts?
    Jon

    What's interesting is that if I, starting with a blank concert, add a Massive to a patch and then make an alias the memory is as you say. But if I make a duplicate of the inital patch and then make alias's of that the memory is lower.
    Are you seeing the same with the built-in plug-ins?

  • Using alias in where statement

    simple sql:
    SELECT EMPLOYEE_ID,
    FIRST_NAME,
    LAST_NAME,
    EMAIL,
    PHONE_NUMBER,
    HIRE_DATE,
    JOB_ID,
    SALARY,
    COMMISSION_PCT,
    MANAGER_ID,
    DEPARTMENT_ID
    FROM EMPLOYEES
    WHERE EMPLOYEE_ID > 1000;
    is it somehow possible to use alias in where statement like
    SELECT EMPLOYEE_ID "ID",
    FIRST_NAME,
    LAST_NAME,
    EMAIL,
    PHONE_NUMBER,
    HIRE_DATE,
    JOB_ID,
    SALARY,
    COMMISSION_PCT,
    MANAGER_ID,
    DEPARTMENT_ID
    FROM EMPLOYEES
    WHERE "ID" > 1000;

    Hi,
    is it somehow possible to use alias in where statement likeWhy do you need it?
    To answer your question "Not directly"
    SQL> select empno eno, sal
      2  from emp
      3  where eno = 7900;
    where eno = 7900
    ERROR at line 3:
    ORA-00904: "ENO": invalid identifierColumn Alias are names given to give meaningful names to columns or the arithmetic operations' column.
    Twinkle

  • Ignoring duplicate Alias in the load rule

    Hi,
    Could anyone tell me how to ignore duplicate alias in the load rule while creating the dimension.
    Thanks,
    Ankoosh

    There is no option in load rule to ignore the duplicate alias. Either you need to modify the source or make aliases as unique by appending member names etc..
    Thanks,
    Naveen Mikkilineni

  • How to use Alias name in OData service in SAP HANA

    Hi,
         I need to change one column name with alias of another name in odata service definition or odata url running in rest client. I am trying to give alias name with as key in the service definition like sql query.
    ex:
    There is one table with column name of PRODUCT_ID. I exporting that table via odata service to SAP UI. In the UI i dont want the product id column as PRODUCT_ID. It should be ike "Prodcut". Like we are using in SQL example
    select "PRODUCT_ID" as "Product" from "producttab";
    But i can't use as key for alias name. So i am getting syntax error.
    I have tried in rest client also ie executing odata file in rest based service. But i got error only.
    If anyone knows about this alias name in odata service, Please help me to resolve this issue..

    Hi Thomas
         Thanks for your reply.
         Actually in odata service definition i am using attribute and calculation views only. But in some case from the model view itself i need to use some alias names to the UI through odata service.
         For example in attribute view i have some columns with name col1,col2... I am getting those columns in UI using  odata service, for particular col2 column i need to change column name as product. And i am using the same view as source of another odata service in that service i need to change that column name as productname.
         In that case i need alias name usage. So that only i am searching alias keyword in odata service.
         Is there any possibility to use alias names in odata service.

  • Using alias name from view

    Can I create somehow a view like this one:
    CREATE VIEW clerk_view AS
       SELECT employee_id as ei, last_name as ln, department_id as di
       FROM employees
       WHERE job_id = 'PU_CLERK' ;and using this view with aliases, e.g.:
    select * from clerk_view where ln = 'Mickey';
    My Oracle database version is 11.2.0.3
    Best.

    Hi,
    lesak wrote:
    So can you tell me what I'm missing in above CREATE statement? Sorry, no, not without knowing exactly what you're doing. That's why you need to post a complete test script that people can run to re-create the problem. Except for the identifier LN, there's nothing wrong with the code you posted per se , but there could be millions of things wrong with how how you're trying to use it. Even if I could post millions of suggestions, you wouldn';t want to read them all, just to fond the one or two that apply to your case. So way exactly what your case is. Post a complete test script that creates and populates the table (if necessay), calls the view, tries to use the view, and gets the error.
    When I create view in the same way in production and use alias name, I've got following error: ORA-00904. Not everyone who wants to help you has all the error codes memorized. That's why you should post the complete error message.
    So Oracle don't know that my employee_id or other column have also alias name?!Sure, it will know the alias name. That's exactly what aliases are for.

  • Using Alias for the table column

    Dear all,
       Can we use alias name for the table column while developing zreport.
    ie.,
      without using standard  table column name ( like mara-matnr ), i wish to use mat_num for matnr. So that, one can easily understand the column.
    Could you help me out in this regard.
    Thanks in Advance,
    S.Sridhar.

    yes you can declare in ur internal table like
    material_number like mara-matnr.

  • Using alias defined in forms.conf

    My app server is named srvr001
    This app server is version 10g.
    In my forms.conf file, I have defined two aliases:
    Alias /out_report/ "G:\reports\output\files/"
    Alias /out_rep_doc/ "F:\report_doc/"
    G:\reports\output\files is a local drive in srvr001
    Drive F is a network mapping to another server named srvr002
    This link using alias out_report, to bring up a local file, works fine:
    http://srvr001/out_report/testoutput.pdf
    Now if I use the alias out_rep_doc, to bring up a file from the other server, I get 404-Not Found:
    http://srvr001/out_rep_doc/testdocument.pdf
    I have another server, named srvr003 which is version 6i, and the same aliases are defined in the conf file. Both aliases work in that server.
    I use the same user id in both srvr001 and srvr003 to start-up the forms services.
    Why is it that, in app server 10g version, the alias pointing to a local drive works, while the alias pointing to a mapped network drive does not work?
    Is there another configuration file where I should define the alias in srvr001?

    Security and access privileges are all defined and working fine.
    About using sniffer, I would not go that way because I am not authorized to do such.
    Anyway, this problem is solved. So for anybody out there having the same problem, the solution is to also tweak your httpd.conf, not just forms.conf.

  • Hello! How I can cancel my iCloud account? I would like to use alias but I have create the second account by mistake. Now, user's name for one alias is unavailable!  Thank you! LG

    Hello! How I can cancel my iCloud account? I would like to use alias but I have create the second account by mistake.
    Now, user's name for one alias is unavailable!
    Thank you! LG

    To the best of my knowledge you have now unfortunately blocked yourself: you can't cancel an iCloud account and as you've got the address there you can't add it as an alias, and I don't know of any workaround for that.

  • Is it possiable to use "ALI SCRIPTING FRAMEWORK API " in JSR 168 Portlets?

    Hi,
    Is it possiable to use "ALI SCRIPTING FRAMEWORK API " in JSR 168 Portlets.
    With Regards
    Dheeraj Sai

    If you want to use (let say it's possible) "ALI SCRIPTING FRAMEWORK API" in JSR 168 then these porlets are not "JSR-168" compatible anymore. So you automatically lost the main benefit of JSR-168 portlet - works over different portal vendors.
    I guess if you have decided use JSR-168 you did this for reasons. Then stay this way and don't use any proprietary technologies.
    By the way, this topic may help:
    http://forums.bea.com/bea/message.jspa?messageID=500025455&tstart=0
    Edited by Bryazgin at 05/18/2007 6:36 AM

  • Query help - Using Alias in column equation

    Hi All,
    I have selected some data as an alias and would like to refer to the alias in another equation column. I cannot figure out how to do this correctly.
    Here is my full query below, with a NULL called '3 Mnth Average' column because I am unsure how to reference the Alias and data type correctly for the required equation.
    For example, I want to return the '3 Mnth Average' result being the '3 Mnth Total' Alias divided by 3.  ('3 Mnth Total'  / 3).... Every time I try... i fail.
    Any help would be most appreciated.
    Best regards,
    John
    SELECT T0.ITEMCODE, T0.ITEMNAME,
    Cast((T0.ONHAND - T0.IsCommited) As INT) As 'Available',
    Cast(T0.ONHAND As INT) As 'In Stock', Cast(T0.IsCommited As INT) As 'Committed',
    Cast((SELECT SUM(T1.[Quantity]) FROM INV1 T1 WHERE T1.ITEMCODE = T0.ITEMCODE
    AND DATEPART(mm,T1.[DocDate])  >= DATEPART(mm,getdate())-3
    AND DATEPART(mm,T1.[DocDate]) <= DATEPART(mm,getdate())) As INT) As '3 Mnth Total',
    (NULL) As '3 Mnth Average',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 1 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) As INT) AS 'JAN QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 2 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'FEB QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 3 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'MAR QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 4 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'APR QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 5 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'MAY QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 6 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'JUN QTY',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 7 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) As INT) AS 'JUL QTY',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 8 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS INT) AS 'AUG QTY',
    CAST ((SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 9 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) As INT) AS 'SEP QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 10 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'OCT QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 11 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'NOV QTY',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 12 AND T1.ITEMCODE =
    T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())) AS 'DEC QTY'
    FROM dbo.OITM T0
    LEFT JOIN dbo.INV1 T1 ON T1.ItemCode = T0.ItemCode
    WHERE T0.SellItem = 'Y'
    GROUP BY T0.ItemCode, T0.ItemName, T0.OnHand, T0.IsCommited, YEAR(T1.DOCDATE)
    HAVING YEAR(T1.DOCDATE) = YEAR(GETDATE())
    ORDER BY T0. ITEMCODE

    Hi John,
    If you are not using temporary table, you have to rewrite complete formula to get 3 month average. There is no way to reference within the same query.
    Thanks,
    Gordon

  • How to use alias in "From" field when I send a mail with utl_smtp ?

    Hi all,
    I'm using a PL/SQL package with an Oracle 11G database to send mails. It works fine but instead of use of my mail in "From" field like "[email protected]" as sender E-mail address, I would like to have "Toto" in the sender address. I tryied to use utl_smtp.mail(l_connection, '<toto> [email protected]') but it doesn't work. The only way I can send mail is when I set utl_smtp.mail(l_connection, '<[email protected]>') directly. When I use the Alias, I have an error from smtp server telling that I use a bad syntax address.
    Does someone know how to use the alias ? Where do I do a mistake ?
    Thank you for your help.
    sis2b

    Thank you, I find how to solve the problem thanks to your link.
    I try to send HTML E-mail so I had the From in the from field writen in the header of the mail and not to initialize the connection.
    sis2b.

  • No longer able to compose using alias

    My mail program changed. Now I can no longer compose a message using an alias. They don't exist in the drop down menu any more.
    If I try to add the alias in the preference window, it accepts it, but it ends up missing next time I enter that window.
    I'm using a .mac account and I do receive email (alias or not). If I go to reply to email sent to the alias, it shows that it is coming from my main email name instead of the alias.
    Any suggestions?
    BTW, the alias exist in the IMAP mail. Also, I don't have this problem on my Mac at work.

    I have this same problem. When composing an e-mail, I can no longer use an alias. I used to be able to until I got a new computer (24" iMac) and added it to the network. I have synced all of my macs, but the aliases are no longer there. When I go to .mac, they are there and if i use the web-based .mac, I can use the aliases, but not with the Mail program.

  • Problem using alias field names in a sql query

    Hello,
    I have a question regarding a simple Oracle database SQL query writeup:
    In the following (badly written but properly working) SQL query:
    Query 1:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    (soe.field5 - (soe.field2 + soe.field3)) as field6,
    (select comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 1:
    I am re writing the code (soe.field2 + soe.field3) to get the alias field4 or column name field4 that I have created on the fly in the previously for use with the following fields. Can't I rewrite the query as follows. There is something simple missing!
    Query 2:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6, <<< field4 does not work here
    (select
    comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select
    soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 2:
    Similar to the above problem, I was thinking to get a field parValue out of the CompTable table and re-use many times rather than the code shown in Query 1:
    Query 3:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6,
    soe.field7* (select comp.parValue from CompTable comp) as parValue1,
    soe.field8 - (parValue1*soe.field7+ soe.field9) as field10      <<<< parvalue1 does not work here
    parValue1*soe.field9 as TaxCondition               <<<< parvalue1 does not work here
    from
    SomeTable soe
    See that the query becomes so simple, but the above query does not work. There is something fundamentally wrong in my usage of the alias field names in creating other fields. The Query1 seems to be the only working option but its very slow as I am redoing and re-writing the whole code again and again to get the parValue field out of the CompTable table for use to create many other fields.
    I will appreciate if you can guide me in the right direction on this issue.
    Thanks and Regards
    Rama

    SELECT tmp.contract_no, tmp.Actual, tmp.Actual - tmp.NbHours
    FROM ( SELECT t.contract_no, sum(l.hrs) AS Actual, (c.labour_hours * c.labour_progress_per) / 100 AS NbHours
    FROM TASK_DELEGATION t
    INNER JOIN COST_CODE c
    ON t.cost_code = c.cost_code AND t.contract_no = c.contract_no AND t.is_inactive=0
    INNER JOIN Labour.dbo.LABOURALLOT l
    ON l.contractNo = c.contract_no AND l.costcode = c.cost_code AND l.pm = 'N'
    GROUP BY t.contract_no, c.labour_hours, c.labour_progress_per
    ) tmp

Maybe you are looking for

  • Video Buffering Slow iOS 7 to 8.2

    Ever since iOS 7, on my iPad 2, the video streaming is abysmal. I used to be able to stream a video directly from my PC over wifi FROM an SMB share on my iMac without any problems. NOT FROM THE INTERNET. It had a huge buffer and all was well with the

  • Binary file content check fails!

    Hello, I am finding it hard to capture the content of a binary file. Here is my code:   if(!(null == myInstance.getBin_File().toString())                            && !(myInstance.getBin_File().toString().equals(""))){       //    Do something     

  • Since 3 weeks printing on Fine Art Paper Black and White Image, I get a purple hue on all B

    Cant print using Photoshop CC, Photoshop SC6 and Lightroom profiles using Matt Ink MK on Fine Art Paper. I tried Printer Epson 4900 and Epson 2880. Always having a Purple Hue over the B and W. If I use PK Gloss Black no problem..

  • Erreur -63043

    Bonjour, Après réalisation d'un programme FPGA , lors de sa compilation sur  la sbrioil me dit compilartion réussi, mais quand j'execute le programme j'obtiens cette erreur( image ci-joint). Etant donné que je ne saisi pas vraiment a quoi cela est du

  • Issue "Could not complete requested operation"

    Hi, what can I do when I get the issue "Could not complete requested operation". OS is Mac OS X Application: Illustrator CS2 I has already removed and new installed the application. I has start the application on another user account from Mac OS X an