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

Using BAPI for Quotations: BAPI_SLSTRANSACT_CREATEMULTI

Hi everyone,

I am working with the BAPI: BAPI_SLSTRANSACT_CREATEMULTI to create an enquiry OR even a quotation. Using t.code SE37, in the following tables I enter:

Header: (2 fields)

Process_Type: ZAG (t.type for enquiry)

Description: description of the enquiry

Partner: (3 fields)

Partner_Fct: (partner function) - e.g. 00000001 (SP)

Partner_No: (partner number) - BP ID

KIND_OF_ENTRY

(Entered 5 partners; 1 that was entered manually (SP) and the other four which are determined auto.)

HENCE in the INPUT FIELD I have 5 BP's

INPUTFIELDS (1 Field)

Fieldname : entered 5 BP's

On execution, the return table shows three errors:

E CRM_ORDER_CUST 004 System error: Incorrect call of read module for table CRMC_OBJECTS!

W CRM_ORDER 003 Object type cannot be processed

A CRM_ORDER 009 Program error: Incorrect values in interface parameters

I entered handle 00000001 for header and 0000002 for the partner and specified the same in the INPUTFIELDS: REF_HANDLE, it leads to more errors

Any solutions please? Deserving points shall be awarded.

Best Regards,

Jacob.

Edited by: Jacob Raj on Mar 14, 2008 1:50 PM

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 Mar 15, 2008 at 11:15 AM

    Hi,

    May be following code is useful for you.

    ******************************Header Data***********************************

    DATA: lwa_header TYPE bapibus20001_header_ins,

    lwa_input_fields TYPE bapibus20001_input_fields.

    lwa_header-handle = '0000000001'.

    lwa_header-process_type = lwa_crmd_orderadm_h-process_type.

    APPEND lwa_header TO i_header.

    lwa_input_fields-ref_handle = '0000000001'.

    lwa_input_fields-objectname = 'ORDERADM_H'.

    lwa_input_fields-ref_kind = 'A'.

    PERFORM populate_input_field_name USING 'PROCESS_TYPE' CHANGING lwa_input_fields

    ********************************Partner Data********************************

    DATA:lwa_partner TYPE bapibus20001_partner_ins,

    lwa_input_fields TYPE bapibus20001_input_fields,

    lwa_partner-ref_handle = '0000000001'.

    lwa_partner-ref_kind = 'A'.

    lwa_partner-ref_partner_handle = '0001'.

    lwa_partner-kind_of_entry = 'C'.

    lwa_partner-partner_fct = '00000001'.

    lwa_partner-partner_no = <partner no>.

    lwa_partner-no_type = 'BP'.

    lwa_partner-display_type = 'BP'.

    APPEND lwa_partner TO i_partner.

    lwa_partner-ref_partner_handle = '0002'.

    lwa_partner-partner_no = <partner no>..

    lwa_partner-partner_fct = '00000014'.

    APPEND lwa_partner TO i_partner.

    lwa_partner-kind_of_entry = 'A'.

    lwa_partner-ref_partner_handle = '0003'.

    lwa_partner-partner_no = <partner no>.

    lwa_partner-partner_fct = '00000012'.

    APPEND lwa_partner TO i_partner.

    CLEAR lwa_input_fields.

    lwa_input_fields-ref_handle = '0000000001'.

    lwa_input_fields-objectname = 'PARTNER'.

    lwa_input_fields-logical_key = '0001'.

    lwa_input_fields-ref_kind = 'A'.

    PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.

    CLEAR lwa_input_fields.

    lwa_input_fields-ref_handle = '0000000001'.

    lwa_input_fields-objectname = 'PARTNER'.

    lwa_input_fields-logical_key = '0002'.

    lwa_input_fields-ref_kind = 'A'.

    PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.

    CLEAR lwa_input_fields.

    lwa_input_fields-ref_handle = '0000000001'.

    lwa_input_fields-objectname = 'PARTNER'.

    lwa_input_fields-logical_key = '0003'.

    lwa_input_fields-ref_kind = 'A'.

    PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.

    PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.

    FORM populate_input_field_name USING lv_field_name TYPE string

    CHANGING lwa_input_fields TYPE bapibus20001_input_fields.

    lwa_input_fields-fieldname = lv_field_name.

    APPEND lwa_input_fields TO i_input_fields.

    ENDFORM.

    ***************************CALL BAPI_SLSTRANSACT_CREATEMULTI*********************************

    CALL FUNCTION 'ZBAPI_SLSTRANSACT_CREATEMULTI'

    TABLES

    header = i_header

    return = i_return

    sales = i_sales

    partner = i_partner

    input_fields = i_input_fields

    created_process = i_created_process

    saved_process = i_saved_process

    .

    COMMIT WORK.

    If helpful kindly reward me.

    Thanks & Regards,

    Anirban

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello To All,

      My requirement is also the same, Just I required to created the Sample Order through BAPI_SLSTRANSACT_CREATEMULTI.

      Can any one have any idea regarding this.

      I need to pass the data in BAPI as shown in below Image.

      Kindly let us know How can i achieve this through BAPI.

      Thanks in Advance

      Srikanth

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.