cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple forms for audit

Former Member
0 Kudos

Hi there,

I want to assign different forms for audit based on audit type.

I have read SAP Note 432642 but still not clear what to do with class CL_PLM_AUDIT_FORM_AUDIT.

Is anyone have done this? Please advise.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

We haven't used that class either, but we handled it by employing conditions within a single smartform. You could try it if this method won't work.

Regards.

Former Member
0 Kudos

Hi,

Those forms are totally different, we cannot use your suggestion.

Anyway, I solved it by implicit enhancement in method DETERMINE_SMART_FORM/class CL_PLM_AUDIT_SERVICES.

arunsapqm
Participant
0 Kudos

Hi,

Ref to above requirement,check with ABAP team & create a Adobe smart forms in SFP transaction for different audit types.

Regards,

M.Arunkumar

SAP PLM Functioanl consultant

former_member193724
Active Participant
0 Kudos

Hey Thanh,

I have the same requirement . Can you help me how did you identified the audit type in the above class method. Also if possible can you send your code you worte in your enhancement to me , so that i can refer it.

Thanks

Former Member
0 Kudos

Hi Iohit,

I have implemented my enhancement at the end of the above-mentioned method.


ENHANCEMENT ZIM_PLM_AUDIT_FORM.    "active version

  DATA: ls_attributes TYPE CGPL_PROJECT,

        ls_audit TYPE PLMM_AUDIT.

  IF iv_object_type = 'AUO'."audit

    CALL METHOD ir_object->get_attributes

      IMPORTING

        ex_attributes    = ls_attributes

*      ex_attributes_old =

        .

    CALL FUNCTION 'PLM_AUDIT_ORDER_READ_DB'

      EXPORTING

        IV_GUID                            = ls_attributes-guid

*      IT_GUID                            =

      IMPORTING

        ES_AUDIT_ORDER_DB                  = ls_audit

*      ET_AUDIT_ORDER_DB                  =

      EXCEPTIONS

        PARAMETER_ERROR                    = 1

        RECORD_NOT_FOUND                    = 2

        AT_LEAST_ONE_RECORD_NOT_FOUND      = 3

        OTHERS                              = 4

              .

    IF sy-subrc <> 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 RAISING failed.

    ELSE.

      IF ls_audit-audit_type = 'SA'."system audit

        ev_formname = 'Z_PLM_AUDIT_1'."new form

      ENDIF.

    ENDIF.

  ENDIF.

ENDENHANCEMENT.

former_member193724
Active Participant
0 Kudos

Hi Thanh

Appreciate your reply.

I used another another way to get the data . But thanks for showing the way .

Answers (0)