Skip to Content
avatar image
Former Member

Pass Parameters via URL to VC in SP15 (Flex 2)

Hi experts,

I try to pass Parameters via URL to a Start Point in VC, following [Erez Sobol's How To|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2090414b-cd20-2a10-d594-8de9d146044a] and the Wiki-Entries, too.

However, passing parameters does not work. I tried many modifications:

unconverted:

<myportalurl...>/irj/portal?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.sap.gm.cnt%2Fcore%2FVCRole%2FPreviewWorkArea&object=pcd%3Aportal_content%2Fcom.sap.gm.cnt%2Fvcmodels%2Fcom.m230c.myProduct.1M2.BELEUNIG_TestFilter%2Fcom.m230c.myProduct.iviews%2Fcom.m230c.myProduct.1LM.Iview_1lm &_paramsXmlStr_=<Params><Row LISTMODE="true"></ROWS></PARAMS>

converted:

<myportalurl...>/irj/portal?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.sap.gm.cnt%2Fcore%2FVCRole%2FPreviewWorkArea&object=pcd%3Aportal_content%2Fcom.sap.gm.cnt%2Fvcmodels%2Fcom.m230c.myProduct.1M2.BELEUNIG_TestFilter%2Fcom.m230c.myProduct.iviews%2Fcom.m230c.myProduct.1LM.Iview_1lm %26_paramsXmlStr_%3D%3CParams%3E%3CRow%20listmode%3D%22true%22%3E%3C/Rows%3E%3C/Params%3E

In VC CE-Formatting

<myportalurl...>/irj/portal?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.sap.gm.cnt%2Fcore%2FVCRole%2FPreviewWorkArea&object=pcd%3Aportal_content%2Fcom.sap.gm.cnt%2Fvcmodels%2Fcom.m230c.myProduct.1M2.BELEUNIG_TestFilter%2Fcom.m230c.myProduct.iviews%2Fcom.m230c.myProduct.1LM.Iview_1lm &LISTMODE=true

furthermore with ' instead of ", with text and bool, without " or ', and so on...

My question: Who can tell me the correct URL-Syntax to transfer a parameter to a Start Point with VC 7.0 SP15 (Flex 2.0)?

Kindest Regards,

Benni

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 11, 2008 at 08:32 PM

    Hello Benjamin,

    I think the problem is that you are converting the wrong part of the url : you don`t to convert the pcd location of the navigationTarget parameters, it should be something like this:

    http://<server>:<port>/irj/portal?NavigationTarget=ROLES://portal_content/com.sap.gm.cnt/vcmodels/com.myComp.myProduct.HV9.testParametros&_paramsXmlStr_=<Params><Row%20PARAM="VALUEf"></Row></Params>

    Hope it helps.

    Marco.

    Add comment
    10|10000 characters needed characters exceeded

  • May 12, 2008 at 06:20 AM

    Hi Benni (and Marco),

    You almost got it right.

    Benni, you also encoded the parameters on the URL (&_paramsXmlStr_=) and this is wrong. You should leave the parameter un-encoded (so it should get parsed correctly) and encode everything afterwards:

    &_paramsXmlStr_=%3CParams%3E%3CRow%20param1%3D%22<value>%22%20param2%3D%22<value>%22%3E%3C/Params%3E

    Regards,

    Natty

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Benni,

      I think the trouble might be that there is an error in Erez Sobol's "How To" linked above. It says:

      SP14 patch and above (Flex2):

      &_paramsXmlStr_=<Params><Row param1="<value>" param2="<value>” …></Rows></Params>

      But note that the opening <Row> tag is <Row> NOT <Rows>. So the closing tag should be </Row> NOT </Rows>.

      I got the example given in that document to work with Flex 2 (SP15), with the parameter string encoded as follows:

      <my portal url>&_paramsXmlStr_=%3CParams%3E%3CRow%20BANK_CTRY%3D%22US%22%3E%3C/Row%3E%3C/Params%3E

      Except that in my case I only passed the BANK_CTRY value - I had previously hardcoded MAX_ROWS to eliminate another potential source of the problem. (If you use Sobol's example and my string above for testing, please be sure to hard code the MAX_ROWS value.)

      I hope this is helpful. Please try your example with this new information and let us know if that solves it!

      Margaret