cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the change request data when it is getting processed

raveeshsaurabh3
Active Participant
0 Kudos

Hello Experts,

We have a requirement where classification table should be hidden in change material ->Edit->details tab for some of the change request types and material types.

We got a method CL_MDG_BS_COMMUNICATOR_ASSIST->CHANGE_CRUIBB_VISIBILITY where this can be achieved via implicit enhancement.

Change request type is available, but material type is not available. I was trying to fetch the material number via change request number using the method CL_USMD_CONV_SOM_GOV_API->IF_USMD_CONV_SOM_GOV_CR~GET_CREQUEST_DATA. But it is returning me initial output. I debugged the code and found out the material number is fetched inside, but some how it is not being passed to exporting parameter. Once i get the material number. I'll use it to fetch the material type using the API  READ_ENTITY_DATA.

Any suggestions how can i get the material type inside the method CL_MDG_BS_COMMUNICATOR_ASSIST->CHANGE_CRUIBB_VISIBILITY.

Thanks & Warm Regards,

Raveesh

Accepted Solutions (1)

Accepted Solutions (1)

raghu3
Contributor
0 Kudos

Hi,

Have you tried using class CL_USMD_CREQUEST_API to fetch the data related to the CR being processed.

Regards,
Raghu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Raveesh,

Please check also using class cl_usmd_gov_api as below:

EX;

DATA: lo_api TYPE REF TO if_usmd_gov_api,

          l_crequest TYPE USMD_CREQUEST,

           lt_data TYPE usmd_ts_entity_data_all.

  cl_usmd_gov_api=>get_instance(
         EXPORTING
           iv_model_name = 'MM'
         RECEIVING
           ro_gov_api    lo_api  
       ).


IF lo_api IS BOUND.
         lo_api->get_crequest_data(
           EXPORTING
             iv_crequest_id          =  l_crequest   " Change Request
           IMPORTING
             et_entity_data_inactive lt_data   " Data
         ).

ENDIF.