cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MDG-M Get data of a node from other node. Manage Material - Governance App

raarriol
Explorer
0 Likes
345

Hi Experts.

I'm dealing with getting the data of node MAKT and entity MATERIAL from the feeder class associated to a search help of a new field that belongs to a different node (MARA). My feeder class is a subclass of CL_MDG_BS_MAT_FEEDER_FORM.

Within method /PLMU/IF_FRW_G_OVS~HANDLE_PHASE_2, I tried to instantiate class /PLMU/CL_FRW_CONTEXT_POOL and get the MAKT context from the attribute MT_CONTEXT_POOL, however, this is private and I cannot read it from my code.

Any advice? Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

XiaolangSolar
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi raarriol,

Please try with below abap codes to retrieve any node data for MDG Material in Feeder Class:

"Get dynamic Node Structure
lo_node_metadata = mo_applictaion->mo_metadata->get_node_metadata( iv_node_name = 'MARC' ).   "Get Node Metadata

lo_node_metadata->get_data_container ( Importing er_data_table = lr_node_data ).

Assign lr_node_data->* to <lt_node_data>

"Retrieve Node data with material number
mo_application_mode->retrieve(
 Exporting
  iv_node_name = 'MARA'
  iv_target_node_name = 'MARC'   "replace with your required node name
  it_node_it = lt_node_id        "internal table with material number
 Importing 
  et_node_data = <lt_node_data>     "dynamic field symbol 

Br.

Thomas

raarriol
Explorer
0 Likes

Hi, Thomas.

This is what I was looking for.

Many thanks.

raarriol
Explorer
0 Likes
Hi, Thomas,
raarriol
Explorer
0 Likes
Hi, Thomas. Now I'm facing a problem when a try to get the data more than once (for example, when I click on the matchcode button many times). The data is retrieved only the first time. I tried calling flush methods, but it doesn't work. Any advice? Thanks.

Answers (0)