on 01-07-2014 4:18 AM
Hi Experts,
Have you ever got the following error message when trying to execute get EntitySet method ?
Error Info : Dereferencing the NULL reference
Class : CX_SY_REF_IS_INITIAL
My data definition :
DATA : ls_payment TYPE zcl_zgw_ebpp_mpc=>ts_payment,
INSERT ls_payment INTO TABLE et_entityset.
initially i have 'Payment' Entity Type with Navigation Property and Association link to another Entity.
if I delete Navigation Property and Association - it works fine.
I am NOT sure if i need to define the data into something else because of navigational property and Association.
Please let me know what you think.
Thank You in advance !
Hi Martin,
As you know both Navigation Property and Association Sets refer to Association.
When you play around with these artifacts (delete/create), sometimes you might end up with wrong names of associations, thus loosing the reference for association sets and navigations resulting in above error.
As I understand, you do require Association Sets for Associations to work. Association Set tells which Entity Set need to be used for an Association's End. If one of your Association End (Entity Type) is Partner, Association will tell if this Partner refers to Buyers or Sellers. (Entity Set).
Regards
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Atanu and Krishna,
Thanks for your response.
So I deleted Association Sets of the Entity.
Then clean the cache from the following transaction code
* /IWBEP/CACHE_CLEANUP
* /IWFND/CACHE_CLEANUP
I tested my deep insert entity program and it still works without association set.
But I still got the same problem with get entityset method.
For some reason, they are still checking - /IWFND/IF_MED_MDL_OBJECT_CLASS~GET_ASSOCIATION_SET_BY_ASSOC method
and I got error in the following line
lv_base_eset_name = lo_base_type->/iwfnd/if_med_mdl_node~get_entity_set_name( ).
I don't have any answer for this as of now.
Thank You,
-Martin Darmawi-
If you remember, in the get entity output, in each entry you see links to all associated entries. This might be the reason why it looks for Association Sets.
Hope you have deleted both Associations, related Associates Sets and related Navigations.
In this method "/IWFND/IF_MED_MDL_OBJECT_CLASS~GET_ASSOCIATION_SET_BY_ASSOC" you can check which association is getting referred to.
Hi Krishna,
Thanks for your response.
How can you see the links to associated entries from get entity output ? or maybe you refer to the SEGW data model.
et_entityset will have structure of an entity.
i can see correct data gets populated in et_entityset when I debugged my code.
I deleted only Association Sets.
I would need Association and Navigations for my Deep insert entity logic.
Thanks,
-Martin Darmawi-
For example see this. ES1
https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZCD204_EPM_DEMO_SRV/BusinessPartners('0100000000')
It has links to navigate to Sales Orders.
Hi Atanu,
I got an error from /IWFND/IF_MED_MDL_OBJECT_CLASS~GET_ASSOCIATION_SET_BY_ASSOC Method
this is the code where error came from
lv_base_eset_name = lo_base_type->/iwfnd/if_med_mdl_node~get_entity_set_name( ).
I am not sure why they are trying to get association set.
Now, I am thinking maybe i should delete association set that i created before.
Do you know if we need to create association sets for Deep_insert_entity ?
Thank You,
-Martin-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
From whihc class are you getting the error? I do not think that the dump is comig for association/navigartion property .Did you try putting a breakpoint in the DPC get_entitySet() method
and check the data that is being returned from the method?
Regards,
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.