cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Sales order through BAPI_BUSPROCESSND_CREATEMULTI

former_member252769
Active Participant
0 Kudos

Hi All,

Please help me. I am new to the CRM.

I have a requirement to create a simple 1 line item Sales order through BAPI "BAPI_BUSPROCESSND_CREATEMULTI" via SE37.

I am providing below data in BAPI fields but not getting Sales order generated. Please help and let me know where I am doing the mistake.

Thanks.

Regards

Brillion

        1. Header

            HANDLE                          0000000001

           PROCESS_TYPE                   ZO01    ---- Sales order type

           DESCRIPTION                    TEST

      2. ITEM

            HANDLE                            0000000002

            ORDERED_PROD                   13

            NUMBER_INT                     0000000010

     3. ACTIVITY

            REF_HANDLE                     0000000001

    4.   APPOINTMENT

             REF_HANDLE                     0000000001

            APPT_TYPE                       ORDERACTUAL

            TIMESTAMP_FROM            14.11.2013 12:22:00

            TIMEZONE_FROM                  CET

            TIMESTAMP_TO                   14.11.2013 12:22:00

            TIMEZONE_TO                    CET

            DATE_FROM                      14.11.2013

            DATE_TO                        14.11.2013

            TIME_FROM                      00:00:00

            TIME_TO                         00:00:00

     5.   INPUT_FIELDS

           REF_HANDLE                     0000000001

           REF_GUID

           REF_KIND                          B

           OBJECTNAME                    ORDERADM_H

           FIELDNAME                       ORDERED_PROD

       6.  CONFIG_INS

           REF_HANDLE                     0000000001

           QUANTITY                           1

           QUANTITY_UNIT                  EA

Accepted Solutions (1)

Accepted Solutions (1)

rene_markytan
Advisor
Advisor
0 Kudos

Hi,

set a breakpoint in crm_order_maintain and/or crm_order_save. Check if all needed parameter are correctly transfered in crm_order_maintain.  You can also compare the situation when creating directly an order in crmd_order. Check in debugger and compare the fields.

Br

Rene

former_member182421
Active Contributor
0 Kudos

Hi,

Also you can check the test program: CRM_CALL_ACTIVITY_INTERFACE I know, do you want to create sales order not activities, but the apis are the same, so you can take it as example or at least to understand how it works

Cheers!

Luis

former_member252769
Active Participant
0 Kudos

Thanks for your answer.

I tried with debugger and able to find data which is required but struck with the error in Return structure as below:

ID                                   Message                             
CRM_ORDERADM_I          Item was not found

CRM_ORDER                    Incomplete interface dat; no reference specified.

Please let me know which values needs to be modified.

Regards

Brillion

former_member182421
Active Contributor
0 Kudos

It's quite harad to help you without seeing the code... do you inform the NPUT_FIELDS with the item as well?

former_member252769
Active Participant
0 Kudos

Hi Luis

I am not using ABAP, I trying to create sales order through executing BAPI via SE37.

There in structures I am filling the data as below:

   1. Header

            HANDLE                          0000000001

           PROCESS_TYPE                   ZO01    ---- Sales order type

           DESCRIPTION                    TEST

      2. ITEM

            HANDLE                            0000000002

            ORDERED_PROD                   13

            NUMBER_INT                     0000000010

     3. ACTIVITY

            REF_HANDLE                     0000000001

    4.   APPOINTMENT

             REF_HANDLE                     0000000001

            APPT_TYPE                       ORDERACTUAL

            TIMESTAMP_FROM            14.11.2013 12:22:00

            TIMEZONE_FROM                  CET

            TIMESTAMP_TO                   14.11.2013 12:22:00

            TIMEZONE_TO                    CET

            DATE_FROM                      14.11.2013

            DATE_TO                        14.11.2013

            TIME_FROM                      00:00:00

            TIME_TO                         00:00:00

     5.   INPUT_FIELDS

           REF_HANDLE                     0000000001

           REF_GUID

           REF_KIND                          B

           OBJECTNAME                    ORDERADM_H

           FIELDNAME                       ORDERED_PROD

       6.  CONFIG_INS

           REF_HANDLE                     0000000001

           QUANTITY                           1

           QUANTITY_UNIT                  EA

Thanks

Brillion

former_member182421
Active Contributor
0 Kudos

Hi Brillion,

Sorry I was involved in other discussion very similar and I crossed both at least I see this two incorrect points in your parameters:

1- Input fields for orderadm_h should be an A

2- The input field needs more data, for each segment you are trying tu update (ACTIVITY, APPOINTMENT, ORDERADM_I,etc,)

I really recommend you to take a closer look how the CRM_ORDER_MAINTAIN is used by the standard via debugger, so put a break point in the FM do all the stuff you want to do with the BAPI in the web client or SAP GUI see how the standard fills the parameters of the FM once you understand it fill the parameters in the SE37, should be a copy paste operation. If you only try-error the BAPI with no reference (from the standard execution) will take you forever!

Cheers!

Luis

Answers (0)