on 08-21-2015 12:52 PM
Hello,
I would like to read a relation that I´ve created via AET using Bpath. Unfortunately I get an exception (CX_WCF_BPATH_PARSING_ERROR).
Short code example:
LR_ENTITY ?= LR_ENTITY->GET_RELATED_ENTITIES_BY_BPATH( 'BTOrderHeader/*$')->get_first( ).
==>possible
LR_ENTITY ?= LR_ENTITY->GET_RELATED_ENTITIES_BY_BPATH( '/XYZ/EXT_BOL_RELAT0001/*$)->get_first( ). ==> error
To my mind the problem is caused by the used customer namespace '/XYZ/'.
So, how can use BPath when using a customer namespace, or is it not possible?
Thanks
Janine
Hi Janine,
I had a similar Problem the Solution is to mask the /XYZ/ Relation Name like this:
....get_related_entities_by_bpath( '\/XYZ\/EXT_BOL_ ...')
Also See SAP Note 1535509 which is about that topic.
Best regards,
Hendrik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janine,
What if you give LR_ENTITY ?= LR_ENTITY->GET_RELATED_ENTITIES_BY_BPATH( 'BTOrderHeader/EXT_BOL_RELAT0001/*$')->get_first( ).
But this relation should exist.
Thanks,
Faisal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Faisal,
I´ve tried that as well. This is also not possible.
The relation is correct.
The following coding is possible:
LR_ENTITY ?= lr_entity->get_related_entities_by_bpath('BTOrderHeader/*$')->GET_FIRST( ).
LR_ENTITY ?= LR_ENTITY->get_related_entity( IV_RELATION_NAME = '/XYZ/EXT_BOL_RELAT000001').
Thanks, Janine
Hi Janine,
as / is used as a separator in BPath expressions I would expect that using a custom name space in a relation is not possible. Although I haven't debugged the BPath parser/interpreter I would expect that your relation name ''/XYZ/EXT_BOL_RELAT000001' is interpreted two relations. Therefore the interpreter would first try to find a relation XYZ, which is not there, and consequently return an error.
If you like to add a custom name space to your relation I'd suggest using an other character to separate the name space (e.g. "-").
Christian
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.