IDoc Issues when creating a Sales Order in CRM System
Hi All,
We have a BSP application in place which allows the customers to create orders online. This BSP application is linked to R/3. The R/3 BSP application remotely calls a custom code in the CRM system which creates an IDOC for the CRM Order and the IDOC is processed and a CRM Order gets created. In the BSP page we have given a provision to the client to enter a Requested Delivery Date which is mapped to the delivery date in CRM system.
Now comes the problem. When the customer creates an order, he enters the requested delivery date but the order which is getting created is not being populated with the date entered in the screen but with the current date.
But when I try and reprocess the IDOC through WE19 without changing any IDOC data records the order gets created with the date which was entered in the webpage.
Any pointers regarding what is happening?
Regards,
Karthik
Hi Karthik,
Just check on the field date, this request delivery date in CRM.
Does it come from date profile? If it does, then try to remove the
date rule or any default value for this date.
Alternatively, I am afraid you have to separately save the date
after first IDOC document creation is done. Seems that the default
value taken place (and replaced) after the document has created.
Hope this helps.
Gun.
Similar Messages
-
Issue with creation of sales order in CRM system
Hi Experts,
Here are the details of the process we followed
1. We found a Function Module u201CBAPI_BUSPROCESSND_CREATEMULTIu201D which is used to create a sales order in CRM.
2. We have set a Break point in the FM u201CCRM_ORDER_MAINTAINu201D and tried to create a sales order using the transaction u201CCRMD_ORDERu201D. For this the parameters we have given are
a. sold-to-party
b. ship-to-party
c. quantity
d. product
And after this we have saved the order and the order is saved and in the debug mode we have the parameters in u201CCRM_ORDER_MAINTAINu201D and we found all these parameters in the FM.
3. After this we have given all the parameters mentioned above in the FM u201CBAPI_BUSPROCESSND_CREATEMULTIu201D and still the order is not created, gave an error message saying that CRM_ORDER: Incorrect values in the interface object.
4. We checked the CRM_ORDER badiu2019s interface and it is having only header guid to be given. We gave this header guid also in the FM u201CBAPI_BUSPROCESSND_CREATEMULTIu201D and then it gave a different error saying that : Document cannot be saved.
5. Finally we are not able to know the parameters to be passed to the FM to create an order.
Any inputs will be highly appreciated.
Thanks a lot in advance.
Lakshman.Hi Easwar,
Now i am able to create a sales order by passing the parameters to "BAPI_BUSPROCESSND_CREATEMULTI" and the parameters i am passing are Process_type in the ORDERADM_H, parner_fct (partner function), partner_no , Quantity and prod_ordered (product name) but after creation of sales order using my report program and if i see the sales order uisng transaction crmd_order (using transaction ID) or crmd_orderadm_h(using headerguid) or crm_order_index, only the PROCESS_TYPE is updated but the remaining parameters which i passed like QUANTITY,PRODUCT NAME,PARTNER NUMBER are not present in the sales order. I am providing the code which i have written for creation of the sales order. Can you please look into it and tell me where i might have went wrong??
*& Report ZCREATEORDER_TEST
REPORT ZCREATEORDER_TEST.
DATA : LV_HEADER_GUID TYPE GUID_32,
WA_HEADER TYPE BAPIBUS20001_HEADER_INS,
ITAB_HEADER TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
ITAB_CREATED_PROCESS TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
ITAB_OBJECTS_TO_SAVE TYPE STANDARD TABLE OF BAPIBUS20001_GUID_DIS,
ITAB_PARTNER TYPE STANDARD TABLE OF BAPIBUS20001_PARTNER_INS,
lt_product_i TYPE STANDARD TABLE OF BAPIBUS20001_ITEM,
wa_product_i type BAPIBUS20001_ITEM,
lt_schedlin_i type standard table of BAPIBUS20001_SCHEDLIN,
wa_schedlin_i type BAPIBUS20001_SCHEDLIN,
ITAB_INPUT_FIELDS TYPE TABLE OF bapibus20001_input_fields,
ls_inputfields TYPE bapibus20001_input_fields,
WA_PARTNER TYPE BAPIBUS20001_PARTNER_INS,
ITAB_RETURN TYPE STANDARD TABLE OF BAPIRET2,
WA_OBJECTS_TO_SAVE LIKE LINE OF ITAB_OBJECTS_TO_SAVE,
"To store the Objects to be saved.
WA_CREATED_PROCESS LIKE LINE OF ITAB_CREATED_PROCESS,
ITAB_SAVED_OBJECTS TYPE STANDARD TABLE OF BAPIBUS20001_OBJECT_ID,
WA_SAVED_OBJECTS LIKE LINE OF ITAB_SAVED_OBJECTS,
GC_X type c.
gc_x = 'x'.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = lv_header_guid.
CLEAR : WA_HEADER.
Passing the respective values from the Header table to internal table.
WA_HEADER-GUID = LV_HEADER_GUID.
WA_HEADER-PROCESS_TYPE = 'ZTA'.
APPEND WA_HEADER TO ITAB_HEADER.
*Appending the values to the ITAB_HEADER.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'ORDERADM_H'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'PROCESS_TYPE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
*ls_inputfields-ref_handle = '0000000000'.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-objectname = 'ORDERADM_H'.
ls_inputfields-fieldname = 'MODE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'ORDERADM_H'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'GUID'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CHANGES MADE
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'LOGICAL_KEY'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'MODE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN_I'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'GUID'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN_I'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'QUANTITY'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN_I'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'MODE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CHANGES MADE
WA_PARTNER-REF_GUID = LV_HEADER_GUID.
WA_PARTNER-REF_KIND = 'A'.
giving the partner function and partner no 000000038 for slod to party
WA_PARTNER-PARTNER_FCT = '00000038'.
WA_PARTNER-PARTNER_NO = '10017'.
APPEND WA_PARTNER TO ITAB_PARTNER.
*"ADDING VALUES for the product
wa_product_i-header = lv_header_guid.
wa_product_i-handle = '0000000001'.
wa_product_i-ordered_prod = '12000014'.
wa_product_i-mode = 'A'.
APPEND wa_product_i TO lt_product_i.
*"ADDING VALUES for quantity
wa_schedlin_i-quantity = 30.
wa_schedlin_i-handle = 1.
APPEND wa_schedlin_i TO lt_schedlin_i.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
*ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'REF_GUID'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'PARTNER_FCT'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'PARTNER_NO'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
HEADER = ITAB_HEADER
ITEM = lt_product_i
RETURN = ITAB_RETURN
PARTNER = ITAB_PARTNER
INPUT_FIELDS = ITAB_INPUT_FIELDS
CREATED_PROCESS = itab_created_process
SCHEDULELINE = lt_schedlin_i.
READ TABLE ITAB_CREATED_PROCESS INTO WA_CREATED_PROCESS WITH KEY GUID = LV_HEADER_GUID BINARY SEARCH.
WA_OBJECTS_TO_SAVE-GUID = WA_CREATED_PROCESS-GUID.
Appending the Guid of the contract to be saved to the internal table
APPEND WA_OBJECTS_TO_SAVE TO ITAB_OBJECTS_TO_SAVE.
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
EXPORTING
update_task_local = space
save_frame_log = GC_X
TABLES
objects_to_save = itab_objects_to_save
saved_objects = itab_saved_objects
return = itab_return.
Calling the Standard BAPI to Commit the transcation.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
I have debugged the above code, all the values are passing are passing to the FM "'BAPI_BUSPROCESSND_CREATEMULTI'" and these passed to the CRM_ORDER_MAINTAIN and then to CRM_ORDER_READ which are called inside the "'BAPI_BUSPROCESSND_CREATEMULTI'". Finally the sales order is created but not able to see all the values that i am passing except PROCESS_TYPE.
Thanks a lot in Advance,
Lakshman. -
Automatic creation of intercompany PO when creating a Sales Order
Hi Experts
Is there a standard way of triggering an intercompany PO when creating a sales order to the final customer (or the other way around, triggering a sales order to the end customer upon creation of an intercompany PO)? Scenario: business has setup a logistics company (company code X), which its purpose is to deliver goods to the final customer (home customers). However, sales orders are created from seperate chain of stores which belong to another company code (company code Y). This chain of stores have one sales organisation (since there is over 1000 stores under a chain). I need a way to represent that a sale originated from a store/plant belonging to company Y to end customer A. Also, I need a billing document (intercompany) from company code X to store/plant beloning to company Y.
Issues: in the intercompany config (assign intern customer numbers to sales org) - is there a way to assign a customer number at site/plant level so that when creating an intercompany billing it can be picked instead of the one assigned to the sales org and where can this be specified in the sales order (remember: in my scenario there are multiple stores/plants that belong to one sales organisation and it is not possible to use one customer number linked to the sales organisation.)
Desired results:
Sales order from store/plant YY belonging to company code Y to end customer A
Intercompany billing from plant XX belonging to company code X to store/plant YY
End customer billing from store/plant YY to end customer A
Thank you in advance for your help.Hello Tsmash
I think you can acheive this with Regular Sales order + Inter Company STO combination.
Maintain customer numbers for each of the Plants from Company Y for the sales area belonging to Company X.
Then do the config for STO in MM using this menu path:
SPRO/Materials Management/Purchasing/Purchase Order/Set up Stock Transport Order
Here, in the activity 'Define Shipping Data for Plants', enter each of the plant-customers and the Sales area belonging to Comany code Y. Carry out other activities in this area appropriately.
Similarly set up Custom ( say Z1) Special Procurement type for Plant YY for stock transfer from XX using this menu path:
SPRO/Production/Material Requirements Planning/Master Data/Define Special Procurement Type:
Here maintain procurement type as F, Special procurement as U and plant as XX. You may need to repeat this config for each of the receiving plants (over 1000 stores under a chain) from co code Y.
In the material master MRP 2 for Plant YY, maintain procurement type as F and Special Procurement as Z1.
Sales order will be received under Co Code Y and sales area belonging to Y form customer A,
Because of the MRP config, a PO (STO) requirement will be raised on Co code X and plant XX. XX will send the goods to YY via a STO delivery using the Shipping data from 'Set up STO' config,
Plant YY will send the goods to A and bill that customer. Co Code X will raise an inter-comany bill on Co code Y.
That's how it should work. Try it and revert with any issues. -
Error in GTS when creating a sales order
Hello All:
Let me first say that I have researched the forums and web for my answer to no avail...there is not a lot of information out there for GTS issues.
When creating a sales order in ECC 600; I am receiving errors...I have looked at SLG1 in order to get more information on these errors. I have validated my config in GQ0 and it appears to be correct. Here is my errors I am receiving:
Legal Control: Item Type Mapping not Maintained
Item Category: ZTAE
Item Category: ZTAQ
Legal Control: Partn. Function Mapping not Maintained
Partner Function: AG
Partner Function: AP
Partner Function: CI
Partner Function: EN
Partner Function: RE
Partner Function: RG
Partner Function: SP
Partner Function: WE
Legal Control: Mapping of Org. Units not Maintained For Fore
Company Code: 1000
Legal Control: Mapping of Org. Units not Maintained For Lega
Plant: 1000
I have looked under the Org Structure for these errors and think my configuration is correct. I have checked under the following:
In SPRO I have done the following Config under Org Structure:
Define Foreign Trade Organizations
Assign Company Code At Feeder System
Define Legal Units
Assign Legal Unit to Foreigne Trade
Assigned Plant at Feeder System
In Spro I have done the following Config under Partner Structure:
Define Partner Functions
Define Groups of Partner Functions
Assign Partner Functions at Feeder system
In SpRO under Compliance Management I have done the following Config under document structure:
Define Doc Types
Assign Doc types at feeder system
Define item categories
Assign item categories at feeder system
It is obvious I am missing something....Please help...it would be greatly appreciated....Hi Dave
Thanks for replying.
For Business Partners the error I am getting in SLG1 is the follwoing:
Sub Object text
Mapping of API to Customs Shipment - Arrival
Program
/SAPSLL/SAPLCORE_APPLOG_SERV
@5C\QError@
The system was unable to determine an FT organiz. for company code 1000
The system was unable to determine a legal unit for plant 1000
No mapping information exists for partner function AG
Another error for Business Partner:
sub object text
Business Partner Distribution
Program
/SAPSLL/SAPLCORE_APPLOG_SERV
@5C\QError@
Please use another function to maintain the SPACE version of the address
For Item Categories
SubObect TextMapping of API to Customs Shipment - Arrival
Program
/SAPSLL/SAPLCORE_APPLOG_SERV
@5C\QError@
No mapping information exists for item type ZTAQ
The system was unable to determine a legal unit for plant 1000
No mapping information exists for partner function AG
Also we are using GTS 7.2 but upgrading to GTS 10 and I am trying to create our testing client for a to test after upgrade
Edited by: Kim Blair on Sep 9, 2011 4:57 PM
Edited by: Kim Blair on Sep 9, 2011 4:58 PM -
Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI
I am having a problem when creating a sale order using BAPI
BAPI_SALESORDER_CREATEFROMDAT2
Problem is that sale order item quantity field is not populating
code is as follows
ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
ORDER_ITEMS_IN-TARGET_QU = 'LB'.
ORDER_ITEMS_IN-TARGET_QTY = 1.Hi,
Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
Regds,
Rudra -
Hello,
our customer plans to use a Non-SAP solution for variant configuration (Camos) in SAP ERP (ECC 6.0) and in SAP CRM 7.0 EHP1 as well.
ERP sales orders (and ERP quotations) should be created in SAP CRM (CRM WebUI).
Is it possible to use variant configuration (with an external variant configuration tool) when creating ERP sales orders and quotations in the SAP CRM WebUI or do we have to implement SAP IPC for this?
Thanks in advance.
Regards,
AEVDear AEV,
I think LORD (lean orders) should work with variant configuration as well. In the note 1236015 there is not restriction listed. However you need lord2 activated in ECC, and ECC system should be on EHP4.
Best regards
Rene -
Hello Experts,
How to create a sales order in CRM, I am using CRM 7.0.
My reqirement is to create a sales order using ORDERS Idoc. I want to test the data before putting into orders.
Thanks,
SumaHi,
1.goto -->crmd_order Trx
2.select order folder
3. Enetr Bp for which u want to create Sales order
4. Items/ Products information adn save it( prcing procedure shud be don before)
u can enetr who is bill to party, ship to party and payer . Other wise by using partner function u can determine it automatically.
Thansk
Leena -
Creating ERP Sales Order from CRM 7.0
Hi Experts,
We are implementing the scenario-Creating ERP Sales Order from CRM. My doubt is:-
Do we need to download the entire product data from ECC via middleware to implement this functionality?
Is it possible that we manually create few products in CRM with same heirarchy and category and avoid middleware data download?
My basic doubt is-what product information is passed to ECC from CRM when we create the ECC Sales Order? If only product id is passed, then we can avoid middleware data download for product from ECC to CRM.
Can anyone please provide me some pointers on this? What should be the approach-download product data from ECC to CRM or manually create product data in CRM?
Thanks and Regards,
RohitI´m trying to figure out the ERP Sales Order Scenario in CRM, i found the following link (sap.help) to customize the ERP sales Order in CRM, it´s a quickly guide supported by SALESPRO but in my case does not work, if somebody knows how to retrive the Order in IC i´ll appreciate.
Here a quick Guide -->
Prerequisites
You can directly create and change an ERP sales transaction in SAP CRM once you have carried out the following:
You are using SAP ERP for your Quotation and Order Management.
You are using SAP CRM.
You have assigned the relevant ERP sales transactions to a profile.
You do this in Customizing for CRM, by choosing Customer Relationship Management Transactions Settings for Sales Transactions Define Profile for ERP Sales Transactions .
You have defined an RFC destination.
You do this in Customizing for CRM, by choosing Customer Relationship Management CRM Middleware and Related Components Communication Setup Define RFC Destinations .
You have defined a business role by copying the standard business role SALESPRO to your own. You make this setting in Customizing for CRM, by choosing Customer Relationship Management Business Roles Define Business Role .
You have defined cross-system copy control of transaction types.
You do this in Customizing for CRM, by choosing Transactions Settings for ERP Transactions Maintained via CRM Cross-System Copy Control for Opportunities and ERP Transactions
I want to see the screens or video regarding with this scenario.
Regards,
Memo -
Trying to create a sales order in CRM with BAPI_BUSPROCESSND_CREATEMULTI.
hi all,
I am trying to create a sales order in CRM using the BAPI BAPI_BUSPROCESSND_CREATEMULTI.
I need the sales order number as the out put. So I am declaring OBJECT_ID as the export parameter.
This is my source code, I donu2019t get an error, but the sales order is not generated and I donu2019t get any output for my export parameter OBJECT_ID.
I am setting the tables HEADER,ITEM ,SALES,PARTNER, ORGANISATION, RETURN and
SCHEDULELINE in BAPI_BUSPROCESSND_CREATEMULTI. But still unable to display the sales order number. Please help me with information
This is my code
***********************************Define the Internal Tables*************************
DATA: IT_HEADER TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS WITH HEADER LINE.
DATA: IT_SALES TYPE STANDARD TABLE OF BAPIBUS20001_SALES WITH HEADER LINE.
DATA: IT_ITEM TYPE STANDARD TABLE OF BAPIBUS20001_ITEM WITH HEADER LINE.
DATA: IT_SCHEDULELINE TYPE STANDARD TABLE OF BAPIBUS20001_SCHEDLIN WITH HEADER LINE.
DATA: IT_PARTNER TYPE STANDARD TABLE OF BAPIBUS20001_PARTNER_INS WITH HEADER LINE.
DATA: IT_ORGANIZATION TYPE STANDARD TABLE OF BAPIBUS20001_ORGMAN_INS WITH HEADER LINE.
**Values for Internal Table IT_HEADER**
IT_HEADER-PROCESS_TYPE = 'YWEB'.
IT_HEADER-DESCRIPTION = 'Web Order'.
IT_HEADER-POSTING_DATE = 'SY-DATUM'.
IT_HEADER-CREATED_BY = 'SY-USER'.
APPEND IT_HEADER TO IT_HEADER.
**Values for Internal Table IT_SALES**
IT_SALES-PO_NUMBER_SOLD = '1'.
APPEND IT_SALES TO IT_SALES.
**Values for Internal Table IT_ITEM**
IT_ITEM-NUMBER_INT = '20'.
IT_ITEM-ORDERED_PROD = '50000180'.
IT_ITEM-ITM_TYPE = 'ZABC'.
APPEND IT_ITEM TO IT_ITEM.
**Values for Internal Table IT_PARTNER**
IT_PARTNER-REF_PARTNER_NO = '100000620'.
IT_PARTNER-REF_PARTNER_FCT = 'CRMH04'.
APPEND IT_PARTNER TO IT_PARTNER.
**Values for Internal Table IT_ORGANIZATION**
IT_ORGANIZATION-SALES_ORG = 'O 50000100'.
IT_ORGANIZATION-DIS_CHANNEL = '30'.
IT_ORGANIZATION-DIVISION = '80'.
APPEND IT_ORGANIZATION TO IT_ORGANIZATION.
**Values for Internal Table IT_SCHEDULELINE**
IT_SCHEDULELINE-QUANTITY = '2.268'.
APPEND IT_SCHEDULELINE TO IT_SCHEDULELINE.
**Call BAPI_BUSPROCESSND_CREATEMULTI for creating a sales 0rder******
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
HEADER = IT_HEADER
ITEM = IT_ITEM
SALES = IT_SALES
PARTNER = IT_PARTNER
ORGANISATION = IT_ORGANIZATION
RETURN = IT_RETURN1
SCHEDULELINE = IT_SCHEDULELINE.
****************CALL COMMIT WORK**********
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = IT_RETURN2.
ENDFUNCTION.
Edited by: jessica sam on Dec 10, 2008 1:45 AMHi am getting the sales order but the item data is not available in sales order. Also should I generate a new guide always for HEADER, ITEM, PARTNER, ORGANIZATION, SCHEDULELINE,u2026u2026for the tables that I use?
I mean do I need to create a new guide each time for all the tables that I use and finally pass only header guide to the bapi 'BAPI_BUSPROCESSND_SAVE'.
I donu2019t know why I am not getting the product data in the saved sales order please help me.
this is my code
***TABLES
DATA: IT_HEADER TYPE TABLE OF BAPIBUS20001_HEADER_INS.
DATA: IT_INPUT_FIELDS_FILL TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS.
DATA: IT_ITEM TYPE TABLE OF BAPIBUS20001_ITEM.
DATA: IT_OBJECTS_TO_SAVE TYPE STANDARD TABLE OF BAPIBUS20001_GUID_DIS WITH HEADER LINE.
***WORK AREA
DATA: WA_INPUT_FIELDS TYPE BAPIBUS20001_INPUT_FIELDS.
DATA: WA_HEADER TYPE BAPIBUS20001_HEADER_INS.
DATA: WA_ITEM TYPE BAPIBUS20001_ITEM.
DATA: IT_EV_GUID_32 TYPE GUID_32.
DATA: IT_EV_GUID_32_1 TYPE GUID_32.
*Create GUID
CALL FUNCTION 'GUID_CREATE'
IMPORTING
EV_GUID_32 = IT_EV_GUID_32.
* Fill the HEADER
WA_HEADER-GUID = IT_EV_GUID_32.
WA_HEADER-PROCESS_TYPE = 'ZWEB'.
WA_HEADER-DESCRIPTION = 'WEB ORDER'.
WA_HEADER-CREATED_BY = 'jiopidn'.
APPEND WA_HEADER TO IT_HEADER.
*For each FIELD of HEADER fill INPUT_FIELDS
WA_INPUT_FIELDS-REF_GUID = IT_EV_GUID_32.
WA_INPUT_FIELDS-REF_KIND = 'A'.
WA_INPUT_FIELDS-OBJECTNAME = 'ORDERADM_H'.
WA_INPUT_FIELDS-LOGICAL_KEY = '1'.
WA_INPUT_FIELDS-CHANGEABLE = ' '.
WA_INPUT_FIELDS-FIELDNAME = 'PROCESS_TYPE'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
WA_INPUT_FIELDS-FIELDNAME = 'GUID'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
WA_INPUT_FIELDS-FIELDNAME = 'DESCRIPTION'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
WA_INPUT_FIELDS-FIELDNAME = 'CREATED_BY'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
*Create your own GUID
CALL FUNCTION 'GUID_CREATE'
IMPORTING
EV_GUID_32 = IT_EV_GUID_32_1.
* Fill the ITEM
WA_ITEM-GUID = IT_EV_GUID_32_1.
WA_ITEM-NUMBER_INT = '10'.
WA_ITEM-ORDERED_PROD = '000000000070000000'.
WA_ITEM-ITM_TYPE = 'ZTAN'.
WA_ITEM-MODE = 'A'.
APPEND WA_ITEM TO IT_ITEM.
*For each FIELD of ITEM fill INPUT_FIELDS fields
WA_INPUT_FIELDS-REF_GUID = IT_EV_GUID_32_1.
WA_INPUT_FIELDS-REF_KIND = 'A'.
WA_INPUT_FIELDS-OBJECTNAME = 'ORDERADM_I'.
WA_INPUT_FIELDS-LOGICAL_KEY = '1'.
WA_INPUT_FIELDS-CHANGEABLE = ' '.
WA_INPUT_FIELDS-FIELDNAME = 'GUID'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
WA_INPUT_FIELDS-FIELDNAME = 'NUMBER_INT'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
WA_INPUT_FIELDS-FIELDNAME = 'ORDERED_PROD'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
WA_INPUT_FIELDS-FIELDNAME = 'ITM_TYPE'.
APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
REFRESH: CREATED_PROCESS.
***** CALL BAPI_BUSPROCESSND_CREATEMULTI
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
HEADER = IT_HEADER
ITEM = IT_ITEM
INPUT_FIELDS = IT_INPUT_FIELDS_FILL
CREATED_PROCESS = CREATED_PROCESS
RETURN = RETURN.
IT_OBJECTS_TO_SAVE-GUID = IT_EV_GUID_32.
IT_OBJECTS_TO_SAVE-OBJECT_TYPE = 'BAPIBUS20001'.
APPEND IT_OBJECTS_TO_SAVE TO IT_OBJECTS_TO_SAVE.
**** CALL 'BAPI_BUSPROCESSND_SAVE
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
EXPORTING
UPDATE_TASK_LOCAL = true
SAVE_FRAME_LOG = true
TABLES
OBJECTS_TO_SAVE = IT_OBJECTS_TO_SAVE
SAVED_OBJECTS = ITAB_SAVED_OBJECTS
RETURN = itab_return.
**** CALL BAPI_TRANSACTION_COMMIT
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = true
IMPORTING
RETURN = RETURN1.
Edited by: jessica sam on Dec 12, 2008 3:50 AM -
Bapi or function module to create a sales order in CRM 5.1 system
Hi experts,
Anyone knows any Bapi or function module to create a Sales order in CRM 5.1 system directly.
Thanks.
regards.
Ruchi.hi ruchi,
sory for the late respond, got a lot works to be done.
based on my experience, you need several more information such as currency, uom for quantity, sales organization, etc.
and honestly, i have never tried to create an order by just using 3 information ( sold to party, item, and quantity ),
but i think it is possible because some of the information can be determined using configuration, but still some information is missing and the order that you create will have an error and you can't do next process of the order unless somebody fix / fill the information needed.
just an idea, perhaps you need some z-tables to put your certain information needed for order creation and the information is maintained for each sold to party ( sold to party is a key of z-tables ) and each time order is created, all information will be query in this tables.
and for this tables may be you can create an offline maintainance scenario using an adobe document. by this way, the sold to party can maintained all his/her/their information by them self.
and by using this scenario, you can still maintain / create the order by programming ( perhaps using function module CRM_ORDER_MAINTAIN or else ).
actually i want to implement in my company but don't have a chance becuase all has been set up and the management will think twice for implementing this scenario.
hopes it hels
cheers -
Function Module to create a Sales Order in CRM
Hi Experts,
I want to create a function module which creates a Sales Order in CRM.
As of now, I'm making use of the function module 'BAPI_BUSPROCESSND_CREATEMULTI'.
I have product ID and Quantity.
Please let me know what all rest of the fields are mandatory to create a Sales Order using this function module.
Thanks in Advance,
lakshman.Depending upon the configuration many things could be mandatory. Assuming no such things in your system, Process type (order type) is required and it is good to give the Sold-To business partner and the Org Details, for the Header information. For the item information, you need the Product and Quantity.
In theory, in CRM, you can create a transaction and "save" it with lot of errors. So, even if you don't give enough information, you will have a transaction with error. You can later fix it the input to fix the errors.
Best way to know is to use your SAPGUI (CRM Online) version crmd_order and find for your implementation.
Easwar Ram
http://www.parxlns.com -
Problem in when creating the sales order
Hi to All,
I am using the function module 'BAPI_SALESORDER_CREATEFROMDAT2' to create a sales order with quotation reference. When
I executing the program the return table shows following issues
1.Document 20000292 doesn't have document category but
2.Sales document was not changed
But , when i used to create the sales order manually( TC : VA01) with reference of '0020000292' it gives the sales order number.
so,kindly suggest me.
Thank youHi,
While using BAPI, you need to give some mandatory fields . So I think document catogary is missing in header structure.
Thanks,
Srikanth.A -
Error on ATP check when Creating a Sales Order
Hello,
I encounter error on ATP check while creating a Sales Order.
The error is when I create Sales Order using material A, with or with out indicating the Plant and Storage Location, the Purchase Order quantity is returned on ATP check, but when I create an SO with out indicating the Plant and Storage Location, no PO quantity was returned. Note that we applied SAP Note # 387482 to automatically determine the Storage Location. I have also checked material maintenance in MM03 of Materials A and Material B and nothing was different, they have the same Availabity check condition.
Is it possible that the SAP note that I applied causes the error?
By the way I have noticed that when I create Material B and manually populate the Plant and Storage Location there is a pricing error(but it returns the PO during ATP check).
Thanks.
NoreenHello,
I encounter error on ATP check while creating a Sales Order.
The error is when I create Sales Order using material A, with or with out indicating the Plant and Storage Location, the Purchase Order quantity is returned on ATP check, but when I create an SO with out indicating the Plant and Storage Location, no PO quantity was returned. Note that we applied SAP Note # 387482 to automatically determine the Storage Location. I have also checked material maintenance in MM03 of Materials A and Material B and nothing was different, they have the same Availabity check condition.
Is it possible that the SAP note that I applied causes the error?
By the way I have noticed that when I create Material B and manually populate the Plant and Storage Location there is a pricing error(but it returns the PO during ATP check).
Thanks.
Noreen -
Free of goods should come automatically back when creates return sales order
Dear sd experts
I Know one thing that free goods wont come back ,, for ex when we create return sales order free goods wont come bz in VTAF copy requirement 302
it means dont copy free goods
Now i went VOV7--- for item category TANN-- i have maintained billing relevance A it means free goods items will come in to billing
now when i am creating return sales order with reference to billing Free goods are not coming
My doubt is suppose if my clinte asks free goods will come automatically when creates returns how to do it ?Hi Ali,
I just checked and understand in the below way:
When I Do the PGI system is posting say 50 USD to COGS. But, when I do the Invoice ( 100 USD is credited to sales account and 100 is debited to discount account) So at the end 100 is getting Nullified. But, when we see P&L account you will COGS of 50 USD.
I checked along with my FI consultant and she confirmed that its posting as per expected way only.
Let me know if you need more details here.
Regards, Sai Krishna. -
Issues in creating the sales order with oe_order_pub.process_order api
Hi All,
I am trying to create a sales order with BOOKED status using oe_order_pub.process_order api, and I am getting response as
<X_RETURN_STATUS>E</X_RETURN_STATUS>
<X_MSG_COUNT>1</X_MSG_COUNT>
<X_MSG_DATA>ONTOE_LOCK_ROW_DELETED</X_MSG_DATA>
Can any one help me in fixing this issue ..!
Thanks,
Vamsi…
Edited by: user11147471 on Jul 9, 2009 2:02 AMWhen using the API, are you trying to create the order as booked using the booked flag or the book action? I would recommend using the action if you are not. To troubleshoot, I would try the API without booking and then use the following article to determine the issue:
Unable To Setup A Credit Card Bank Account For The Customer. CC Information On The Order Is Not Valid (Doc ID 1450936.1)
Maybe you are looking for
-
Change GDM language in Gnome3 and add a Second Language to the List
Hello Everyone, I have always used this order in my language list in Gnome or KDE : Portuguese, French, English. But since the update of Gnome 3.2.1, I have problems defining the language, on my locale.gen I got only those 3 languages activated. But
-
Hi all! I have a 6th gen ipod nano. I wanted to sync it to get some new music onto it, but my computer won't recognize it. I've tried restarting it and resetting it numerous times, both plugged into the computer and not. I've confirmed that both the
-
Trying to link Address Book Contacts with Outlook 2011 - iSync??
Hi There, Would be grateful for some assistance. I've got all my contacts and other things in iCloud - wonderful! I've managed to get all my contacts from iCloud to show up in Address book. I want to sync my address book contacts in Outlook 2011 - af
-
HT1657 Why won't my rented movie play?
I tried renting a movie from iTunes but i just get a black screen with no sound. Help?
-
How to make a field as mandatory in a Ztable
Hi , my requirement is to make a field(Non key) as mandatory in a Z table . Is there any easier way other than coding in table maintence events.