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

CREATION OF OPPORTUNITY

Hi All,

I would like to create an opportunity with all the relavent fields using Function Modules. Can anyone provide me with a Report Program for the creation of an Opportunity.

Thanks in Advance,

Shwetha .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 01:18 PM

    Hi,

    i would be interested in a function module i could call to create opportunities as well.

    Best Regards

    Rene

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 04:58 PM

    You can use the BAPI BAPI_SLSTRANSACT_CREATEMULTI to create opportunity. Please look at where used list of same to get detials.

    Regards,

    Kiran

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:36 AM

    Hi

    Swetha to create an opportunity open crmd- order and open business transactions

    create an your opportunity type , later enter customer or sales prospect,,

    products

    partner, sales team , and org details like s org, sales office, division , distribution channel etc assesments , sales team then save assesments form and save the transaction on the top after saving you will find an opportunity number bottom of the application this is the procedure to create an opportunity

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:01 AM

    Fm : **********

    CRM_ORDER_MAINTAIN - to create orders ,opportunity.

    to see how it works goto se38 execute CRM_ORDER_MAINTAIN fill the selection screen and execute .

    After using this fm commit work should be used.

    Fm: ********

    CRM_ORDER_MAINTAIN_MULTI_OW to create multi orders

    Fm:****

    CRM_ORDER_MAINTAIN_SINGLE_OW to create single

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:41 AM

    Hi

    Sorry ,Mr Prasad she has asked for how to create a opportunity, not for any configuration or customization steps, please review the question.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 09:22 AM

    Hello Shwetha,

    The easiest way to create opportunities through FM is the BAPI_OPPORTUNITY_CREATEMULTI. Check where used list for more syntax details. Don't forget to call the BAPI_TRANSACTION_COMMIT after the createmulti.

    Hope this helps,

    Kind regards,

    Joost

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Good job Joost Stallaert.........

      A simple program using BAPI_OPPORTUNITY_CREATEMULTI .

      ******************************************************************

      DATA: ls_header LIKE bapibus20001_header_ins,

      lt_header TYPE STANDARD TABLE OF

      bapibus20001_header_ins,

      ls_opp LIKE bapibus20001_opportunity,

      lt_opp TYPE STANDARD TABLE OF

      bapibus20001_opportunity,

      lt_pricing TYPE STANDARD TABLE OF

      bapibus20001_pricing,

      ls_pricing TYPE bapibus20001_pricing,

      ls_input_fields TYPE bapibus20001_input_fields,

      lt_input_fields TYPE STANDARD TABLE OF

      bapibus20001_input_fields,

      lt_return TYPE STANDARD TABLE OF bapiret2 ,

      ls_return TYPE bapiret2 .

      DATA ls_saved_process TYPE bapibus20001_object_id.

      DATA: lt_guid_16 TYPE crmt_object_guid_tab,

      ls_guid_16 TYPE crmt_object_guid.

      DATA: lv_langu TYPE sylangu,

      lv_uname TYPE syuname,

      lt_SAVED_PROCESS type BAPIBUS20001_OBJECT_ID occurs 0 .

      CONSTANTS:

      pricing TYPE crmt_object_name VALUE 'PRICING',

      gc_handle_1 TYPE crmt_handle VALUE '0000000001',

      BEGIN OF gc_fieldname,

      startdate TYPE crmt_fieldname VALUE 'STARTDATE',

      expect_end TYPE crmt_fieldname VALUE 'EXPECT_END',

      END OF gc_fieldname,

      BEGIN OF gc_object_kind,

      orderadm_h TYPE crmt_object_kind VALUE 'A',

      orderadm_i TYPE crmt_object_kind VALUE 'B',

      END OF gc_object_kind,

      BEGIN OF gc_object_name,

      opport_h TYPE crmt_object_name VALUE 'OPPORT_H',

      order TYPE crmt_object_name VALUE 'ORDER',

      orderadm_h TYPE crmt_object_name VALUE 'ORDERADM_H',

      orderadm_i TYPE crmt_object_name VALUE 'ORDERADM_I',

      END OF gc_object_name.

      • ref kinds

      CONSTANTS: BEGIN OF gc_object_ref_kind,

      orderadm_h TYPE crmt_object_kind

      VALUE gc_object_kind-orderadm_h,

      orderadm_i TYPE crmt_object_kind

      VALUE gc_object_kind-orderadm_i,

      any TYPE crmt_object_kind

      VALUE space,

      END OF gc_object_ref_kind.

      • Admin Header

      ls_header-description = 'GV REDDY PRASAD'.

      ls_header-handle = '1'.

      ls_header-process_type = 'OPPT'.

      ls_header-descr_language = sy-langu.

      ls_header-langu_iso = sy-langu.

      APPEND ls_header TO lt_header.

      CLEAR ls_input_fields.

      ls_input_fields-ref_handle = '1'.

      ls_input_fields-ref_kind = 'A'.

      ls_input_fields-objectname = 'ORDERADM_H'.

      ls_input_fields-fieldname = 'PROCESS_TYPE'.

      APPEND ls_input_fields TO lt_input_fields.

      ls_input_fields-fieldname = 'OBJECT_ID'.

      APPEND ls_input_fields TO lt_input_fields.

      ls_input_fields-fieldname = 'DESCRIPTION'.

      APPEND ls_input_fields TO lt_input_fields.

      • Opportunity Header

      ls_input_fields-objectname = 'OPPORT_H'.

      ls_opp-ref_handle = '1'.

      ls_input_fields-fieldname = 'EXP_REVENUE'.

      ls_opp-exp_revenue = '0012'.

      APPEND ls_input_fields TO lt_input_fields.

      ls_input_fields-fieldname = 'CURRENCY'.

      ls_opp-currency = 'INR'.

      ls_opp-currency_iso = 'INR'.

      APPEND ls_input_fields TO lt_input_fields.

      ls_pricing-ref_handle = gc_handle_1.

      ls_pricing-ref_kind = gc_object_ref_kind-orderadm_h.

      ls_pricing-currency = 'INR'.

      APPEND ls_pricing TO lt_pricing.

      ls_input_fields-objectname = pricing.

      APPEND ls_input_fields TO lt_input_fields.

      ls_input_fields-objectname = gc_object_name-opport_h.

      ls_input_fields-fieldname = gc_fieldname-startdate.

      ls_opp-startdate = sy-datum.

      APPEND ls_input_fields TO lt_input_fields.

      ls_input_fields-fieldname = gc_fieldname-expect_end.

      ls_opp-expect_end = sy-datum.

      APPEND ls_input_fields TO lt_input_fields.

      CALL FUNCTION 'BAPI_OPPORTUNITY_CREATEMULTI'

      TABLES

      HEADER = lt_header

      OPPORTUNITY = lt_opp

      INPUT_FIELDS = lt_input_fields

      RETURN = lt_return

      SAVED_PROCESS = lt_saved_process .

      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .

      ***************************************************************************

      ******To display the record or error

      loop at lt_return into ls_return.

      write ls_return-MESSAGE.

      endloop.

      loop at lt_saved_process into ls_saved_process.

      write ls_saved_process-OBJECT_ID.

      endloop.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 09:57 AM

    Hi Swetha,

    Would you be kind enough to discuss with us the scenario that would require you to create an oppty using FM. Is there any coding involved, are you enhancing the standard delivery model.

    Would be rewared the maximum points.

    cheers,

    Muralidhar Prasad.C

    Add a comment
    10|10000 characters needed characters exceeded

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.