Skip to Content
author's profile photo Former Member
Former Member

Assigning a Question list to existing Audit ID

Hi All,

I want to add a question list to existing Audit ID. I have tried using the BAPI like BAPI_BUS* ...

I could find that while creating an Audit ID using BAPI_BUS20350_CREATE i can assign a Question list, but i have got a scenario where i have the Audit ID and i need to assign the Question list.

I have also checked BAPI_BUS20360_CREATE/CHANGE and BAPI_BUS20310_CREATE/CHANGE, but neither of this helps.

Please can any one let me know if there is any BAPI/FM which can be used to assign a Questionlist to an existing Audit ID like the standard transaction PLMD_AUDIT does.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2012 at 07:09 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      After exploring a lot we could not find any Badi/Function Module to assign already existing Question List while creating new Audit. But after debugging standard transaction PLMD_AUDIT, we found the solution which goes as follows:-

      Use BAPI_BUS20350_CREATE to create Audit

      Following method can be used to assign Question List to an Audit:-

      call method cl_plm_audit_quest_services=>assign_questionnaire_2_audit
      ir_audit = ir_audit
      * IV_AUDIT_GUID =
      * IR_QUEST_H =
      iv_quest_h_guid = l_questlist_guid

      We need to pass following info:-

      1) Audit: Pass Audit Guid or Audit instance

      We tried to pass Audit Guid generated by BAPI_BUS20350_CREATE into above Method but it failed.

      That left us with passing Audit Instance only and obviously this means that we need to code above method somewhere during Audit creation i.e. BADI since only there we can find audit instance.

      PLM_AUDIT_ATTRIBUTES is one of the BADIs which is triggered for Audit creation using BAPI_BUS20350_CREATE. Its method - CHANGE_AUDIT_AT_CREATION solved our purpose.

      2) Question List: Pass Guid or Question List instance

      Question List Guid can be found in table CGPL_PROJECT by passing name of question list as EXTRENAL_ID

      Use method cl_plm_audit_quest_services=>assign_questionnaire_2_audit

      with above two parameters in an Audit BADI and you should be able to assign the Question list to Audit.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.