on 08-31-2015 8:25 AM
Hey guys,
I already figured out how to read entity data (for example BP_HEADER - Data Model for Customer) in general, but still have a few detail questions. At the moment I am using Convenience API using following approach:
My Questions:
Where can I get the data of AD_CONSO??
3. Reading Entity AD_POSTAL -> Leading Entity: ADDRNO + BP_HEADER, Qualifying Entity: AD_NATION
Where can I get the data of AD_NATION?
4. Reading Entity BP_CUSGEN -> Leading Entity: ASSGNM_ID + BP_HEADER
Where can I get the data of ASSGNM_ID?
Thanks and regards
Chris
Hi Chris,
what exactly are you trying to do?
GET_OBJECT_LIST returns only objects locked in a change requests. Those are usually only entity types with SUT 1 - you'll never get keys of entities with SUT4.
Best regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi MIhcael,
thanks for your answer. Ok then there must be another way. Actually I just want to call method read_entity_data of interface if_usmd_conv_som_gov_api.
CALL METHOD lo_conv_api->if_usmd_conv_som_gov_entity~read_entity_data
EXPORTING
* IV_STRUCT = GC_STRUCT_KEY_ATTR
* IF_ACTIVE_DATA = ''
it_entity_keys = lt_keys
* IF_SELECT = ABAP_TRUE
RECEIVING
rt_entity_data = lt_data. "<lt_data>
I need to pass table lt_keys. How do I get these values?
Thanks and regards
Chris
Hi Chris,
usually you calculate or maintain this list according to a given scenario. Take the common UIs as an example. You search for something and click on a specific link in the result list. Now the system triggers several reads using the key information you've clicked on. E.g. by clicking on a BP, the system reads addresses or bank details for the BP since those are displayed on the BPs main page. In that case it is valid to read using a partial key (BP keys only, leaving addresses or bank keys blank). This results in one to many addresses or bank details (simply depending on the amount of existing records).
Best regards
Michael
Ok in my case the problem is that I don't have any context or something i clicked on because the Scenario following: Just Show Business Partner Information (General Data, communication etc.) in a Fiori App (By extending the OData Service).
The only Information I have is the ChangeRequest ID. So what I did so far is.... Create instance of Convenience API and then SET_ENVIRONMENT to the passed ChangeRequestID. And I Need to get this key vales (eg. for BP_HEADER) from the Convenience API.
Thanks and regards
Chris
Hi Chris,
in that case your initial idea using GET_OBJECT_LIST is valid. The object list should contain the BP_HEADER locked in your current CR. Using the BP_HEADER you're able to read all data you want. Ssee my previous reply: it's sufficient to read with a partial key to get all records. BP_HEADER is part of each entity key in data model BP.
Best regards
Michael
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.