Академический Документы
Профессиональный Документы
Культура Документы
1. Start T-code: BOB (Business Object Builder). Click on Custom Business Object. A wizard
opens as below proceed with continue.
2. Provide with a Prefix and Name and continue.
3. Propose a constant interface name and continue.
4. Propose a Persistent structure name, the Root node name is auto filled with ROOT.
The Persistent Structure defines the attributes that are stored in the database.
The Transient Structure defines the attributes calculated at runtime.
Both structures are implemented as regular DDIC structures and are created in the DDIC
transaction SE11. You can simply double click the structure to proceed with the structure
creation.
I have created the following structure.
5. Proceed with Continue in the wizard. The Combined Structure, Table type and the Database
Table is automatically proposed.
6. Proceed with Continue and complete the wizard. You will be prompted for package, which I
have assigned to Local Object.
Proceed with continue and complete the wizard. We now have the ITEM node created.
3. Select the record and click Execute Association button and click on ITEM.
Thank you.
I have demonstrated how to create a delegate node (Text Collection in our case), also have
created a test report program to demonstrate usage of helper class and retrieve by associations
to retrieve the text contents, going further we are consuming the Dependent BO in FPM.
Here we are embedding the Dependent Object /BOBF/TEXT_COLLECTION in our BO.
Node Prefix: The node prefix is used by BOPF at runtime in order to identify the Dependent Object
which is called by the consumer.
When you create the Delegated Node as described above BOPF automatically creates the required
association to the root node of the Dependent Object.
This is possible since the Text Collection Dependent Object supports a standard linkage to a hosting
Business Object. The standard linkage is supported for each Dependent Object that fulfils the
following requirement:
The embedded Dependent Object must have an alternative key on its root node that uses
/BOBF/S_LIB_K_DELEGATION as DATA_TYPE and /BOBF/T_LIB_K_DELEGATION as
DATA_TABLE_TYPE. The Alternative Key must be set to Not-unique to enable one-to-many usages
of it.
We can see that in the Dependent BO for Text Collection.
Navigate to ROOT_LONG_TEXT.
Click Create node instance, we may get the error.
Provide with the Test Schema ID as DEFAULT and TEXT_EXISTS_IND = X and click check. Save.
Now Opening the ROOT_LONG_TEXT we see:
Under TEXT create node instance and provide TEXT_TYPE and LANGUAGE_CODE. I have
added as:
Now Select the TEXT_CONTENT and create instance. Provide the Text Demo Text. Save. The
records are now saved.
Testing the BO to get the Text available in TEXT_CONTENT:
The structure and table types used in our program are from ROOT and ITEM nodes:
Add the below code:
*Association to a Delegated node.
DATA: lt_mod TYPE /bobf/t_frw_modification,
ls_mod TYPE /bobf/s_frw_modification,
lo_message TYPE REF TO /bobf/if_frw_message,
lo_chg TYPE REF TO /bobf/if_tra_change,
lr_srv_mgr TYPE REF TO /bobf/if_tra_service_manager,
lt_key TYPE /bobf/t_frw_key,
lt_target_key TYPE /bobf/t_frw_key.
*Flow:
*ZMAY1_TRQ ->ROOT -> ROOT_LONG_TEXT -> TEXT -> TEXT_CONTENT
*/BOBF/TEXT_COLLECTION -> ROOT -> TEXT -> TEXT_CONTENT
/scmtms/cl_common_helper=>get_do_keys_4_rba(
EXPORTING
iv_host_bo_key = zif_may1_trq_c=>sc_bo_key
iv_host_do_node_key = zif_may1_trq_c=>sc_node-root_long_text
iv_do_node_key = /bobf/if_txc_c=>sc_node-text_content
iv_do_assoc_key = /bobf/if_txc_c=>sc_association-text-text_content
IMPORTING
ev_node_key = lv_content_node_key
ev_assoc_key = lv_content_assoc_key ).
lr_srv_mgr->query(
EXPORTING
iv_query_key = zif_may1_trq_c=>sc_query-root-select_all
iv_fill_data = abap_true
IMPORTING
et_data = lt_root_data
et_key = lt_key
).
BREAK-POINT.
On the Next screen we see the Text Collection delegate node with the text content.
Thank you..
Alert Moderator
11 Comments
Matan.
Reply Like (0)
Thanks,
Dhivya
Reply Like (0)
1. Shashank Shivasharan HonakeriDecember 23, 2014 at 6:33 am
Hi Divya, Thanks for the reply,
Im totally new to these concepts , will u be able to elaborate the settinhgs please.
Reply Like (0)
can you please decribe what you tryed to do that lead to the error?
in the address DO case, this usally happens if the BAS validations failed, and the address cannot
be saved.
that means that the address was not created properly.
BR,
Matan.
Reply Like (0)
Regards,