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

Assigning Question list to an audit

Hi All,

I have a requirement to assign an already created question list to an audit.I have used the BAPI -BAPI_BUS20360_CREATE .This BAPI allows only to create and simultaneously assign question list to an audit.But does not assign already created question list to an existing audit.Please help me on this issue.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

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

  • Posted on May 14, 2012 at 09:51 AM

    Did you try BAPI_BUS20360_CHANGE ?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 17, 2012 at 05:01 AM

    Hi All,

    Please help me in this.My requirement is to assign a question list to an Audit.Using BAPI_BUS20360_CREATE allows me only to create a question list and assign it to an audit.But,

    i have to assign an existing question list to an audit.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      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
      exporting
      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.