cancel
Showing results for 
Search instead for 
Did you mean: 

Get the Changed Fields in MDG-M

eldho_kurianjacob
Participant
0 Kudos

Hi,

Does anyone know class/method to get the UI fields changed in MDG screen?

For example, if a field material type is changed, its entity/attribute will be shown as output or any other parameters. I wanted to know which all fields are changed in one action.

Thanks and regards,

Eldho

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member218472
Participant
0 Kudos
DATA : lt_crequest TYPE cl_usmd_mdf_change_document=>t_change_request.
DATA : lt_doc_header TYPE cl_usmd_mdf_change_document=>t_document_header,
       ls_doc_header LIKE LINE OF lt_doc_header.
       io_model TYPE REF TO if_usmd_model,


CALL METHOD cl_usmd_model=>get_instance
  EXPORTING
    i_usmd_model = '0G'
  IMPORTING
    eo_instance  = io_model
    et_message   = lt_msg.

gv_crequest = 3550.
APPEND gv_crequest TO lt_crequest.


CALL METHOD lo_chang_doc->read_document_header
  EXPORTING
    it_crequest        = lt_crequest
    io_model           = io_model
  IMPORTING
    et_document_header = lt_doc_header.


LOOP AT lt_doc_header INTO ls_doc_header.
  lo_chang_doc->read_document_lines(
    EXPORTING
      is_document_header   = ls_doc_header
      i_entity             =  ls_edata-entity
       io_model            =  io_model
    IMPORTING
      et_changed_value   = DATA(lt_changed_value)
      et_changed_detail  = DATA(lt_changed_detail)
      et_compound_value  = DATA(lt_compound_value)
      et_message         = DATA(lt_message)
  ).
ENDLOOP. "lt_doc_header
former_member218472
Participant

Hi Eldho,

Please refer my above code.

Thanks,

Mahesh

Peranandam
Contributor
0 Kudos

If you are looking change documents use CL_USMD_MDF_CHANGE_DOCUMENT. If you want to know charge happened for each action those detail will be available in entity or Cross entity BADI

former_member218472
Participant
0 Kudos

Hi Eldho,

Bit confused in the sentence : "Does anyone know class/method to get the UI fields changed in MDG screen?"

Do you want to know which attribute value is change on FPM UI during runtime ?.

Thanks,

Mahesh

eldho_kurianjacob
Participant
0 Kudos

Hi Mahesh,

Yes, exactly.

I wanted to know whether a field in the UI (attribute) is changed or not.

Thanks and regards,

Eldho