03-09-2006 4:40 PM
Hi friends,
I am creating sales order along with Variant configuration data. We have 3 level BOM structure.
I am using BAPI_SALESORDER_CREATEFROMDAT2 and filling in ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF ORDER_CFGS_VALUE, ORDER_CFGS_REFINST
tables exactly the same way BAPISDORDER_GETDETAILEDLIST FM returns.
Sales order is being created with no variant configuration information.(Not in the header level atleast)
Can any one help me on this.
Thanks
Seshagiri
03-09-2006 5:07 PM
Hi ,
Variant Config. works differently. You have to assign it after creation.
We have similar issues while doing the variant config. sales orders.
Need More help. Please let me know.
Regards,
Lanka
03-09-2006 5:07 PM
Hi ,
Variant Config. works differently. You have to assign it after creation.
We have similar issues while doing the variant config. sales orders.
Need More help. Please let me know.
Regards,
Lanka
03-09-2006 6:15 PM
Hi,
I have created program which gets sales order info I created with Variant config manually using BAPISDORDER_GETDETAILEDLIST and passing the values using move corresponding into BAPI_SALESORDER_CREATEFROMDAT2.
But, it still doesn't work.
You said some thing Assigning after creation of sales order. Can you give me some more details on it!
Seshagiri
03-09-2006 6:44 PM
Hi,
You have to call the below function for CHAR assignment to a configurable maerial in a sales order.
*--Call Charcterstic config.create/Change function
CALL FUNCTION 'CE_C_PROCESSING'
EXPORTING
INSTANCE = VBAP-CUOBJ
DATE = VBAP-STDAT
OBJECT_ID = WA_OBJECTID "
OBJECT = WA_OBJECT "SDCOM
HEADER_SCREEN = ZINCL_BILD
PLANT = VBAP-WERKS
NO_DIALOG = C_X
OWNER_ID = C_VBPS
TYPE = C_S
BOM_APPLICATION = C_PP01
DISPLAY = C_0
IMPORTING
RETURN_WITH_FUNCTIONKEY = CFCODE
NEW_INSTANCE = Z_INSTANCE
TABLES
APPLICATION_INPUT = LOC_APPL
EXCEPTIONS
INTERNAL_ERROR = 1
INSTANCE_NOT_FOUND = 2
REFERENCE_INSTANCE_NOT_FOUND = 3
INSTANCE_IS_A_CLASSIFICATION = 4
NO_PLANT = 5
NO_QUANTITY = 6
Need More help. Please let me know.
Regards,
Lanka
03-09-2006 6:53 PM
Hi Lanka Murthy,
I am a bit confused. Please clear me.
Can't we create a sales order along with variant config using 'BAPI_SALESORDER_CREATEFROMDAT2'?
If so when should I call 'CE_C_PROCESSING' and how ?
Please expalin me in more detailed.
Seshagiri
03-10-2006 12:08 AM
Hi ,
Are you using BAPI_TRANSACTION_COMMIT function after 'BAPI_SALESORDER_CREATEFROMDAT2'?.
We have faced similar issues then We have adopted as addding config after creating the Sales order by using
CE_C_PROCESS function.
Regards,
Lanka
03-10-2006 8:08 AM
Hi,
Yes I am using BAPI_TRANSACTION_COMMIT after 'BAPI_SALESORDER_CREATEFROMDAT2'.
Seshagiri
09-22-2006 12:48 AM
Can you send me more information about CE_C_PROCESSING to update the Variant Configurator?
Specifically, how to load the table for the parameter APPLICATION_INPUT.
09-04-2007 2:30 PM
Hi Debbie,
Here I am enclosing the details on parameter APPLICATION_INPUT( I am passing value as LOC_APPL).
Definition of LOC_APPL :
DATA : LOC_APPL LIKE CLTABLE OCCURS 0 WITH HEADER LINE.
DATA : LS_APPL LIKE CLTABLE.
*--Populate SDCOM.
SDCOM-POSNR = VBAP-POSNR .
SDCOM-MATNR = VBAP-MATNR.
SDCOM-WERKS = VBAP-WERKS .
SDCOM-MENGE = VBAP-KWMENG * VBAP-UMVKZ / VBAP-UMVKN .
*--Unicode Conversion for SDCOM table
CALL FUNCTION 'CLUC_CONVERT_STRUCTURE'
EXPORTING
I_WORKAREA = SDCOM
I_TABNAME = C_SDCOM
IMPORTING
E_OBJECT = LS_APPL.
LOC_APPL-TNAME = LS_APPL-TNAME.
LOC_APPL-TABLE = LS_APPL-TABLE.
APPEND LOC_APPL.
CLEAR LOC_APPL.
*--Call Charcterstic config.create/Change function
CALL FUNCTION 'CE_C_PROCESSING'
EXPORTING
INSTANCE = VBAP-CUOBJ
DATE = VBAP-STDAT
OBJECT_ID = WA_OBJECTID "
OBJECT = WA_OBJECT "SDCOM
HEADER_SCREEN = ZINCL_BILD
PLANT = VBAP-WERKS
NO_DIALOG = C_X
OWNER_ID = C_VBPS
TYPE = C_S
BOM_APPLICATION = C_PP01
DISPLAY = C_0
IMPORTING
RETURN_WITH_FUNCTIONKEY = CFCODE
NEW_INSTANCE = Z_INSTANCE
TABLES
APPLICATION_INPUT = LOC_APPL
EXCEPTIONS
INTERNAL_ERROR = 1
INSTANCE_NOT_FOUND = 2
REFERENCE_INSTANCE_NOT_FOUND = 3
INSTANCE_IS_A_CLASSIFICATION = 4
NO_PLANT = 5
NO_QUANTITY = 6
NO_CONNECTION_TO_CONFIGURATION = 7
MATERIAL_VARIANT_NOT_ALLOWED = 8
INTERNAL_ERROR_ECM = 9
EOASL_NOT_ALLOWED = 10
MAXASL_NOT_ALLOWED = 11
XC_UNPROCESSED_DATA = 12
XC_FAILURE_PROCESSING_DATA = 13
NO_BOM = 14
OTHERS = 15.
I hope this will resolve your purpose.
Regards,
Lanka
09-19-2007 11:32 AM
Hello Lanka,
After trying in vain to use the BAPI_SALESORDER_CREATEFROMDAT2 to update the Variant Configurations, I have resorted to the method you have suggested above.
However, could you please provide more details on how to get the values for the following parameters?
Exporting
object_id = is it 'MARA' ?
object = is it the Material number ?
header_screen = ?
owner_id = ?
type = ?
bom_application = ?
Thanks and Regards,
Reena
08-11-2007 1:36 PM
Hi,
We are creating sales order using the BAPI_SALESORDER_CREATEFROMDAT2 FM but we also want to update variant configuration values in those sales orders. I'm passing these tables (ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_VALUE) to the FM.'
The sales order is been created but the VC characteristics are not getting updated.
After the FM I am calling the commit also..
Am I missing anything..Please guide me how to update the VC values..
04-23-2014 2:44 PM
For updating Variant configuration (VC) data for Sales order item, we need to populate below tables of standard FM or BAPI (e.g. SD_SALESDOCUMENT_CREATE).
Normally the standard FM or BAPI does not return any error messages in case configuration data is not updated successfully.
· SALES_SCHEDULES_IN: The required date field should be populated with appropriate value (REQ_DATE).
· SALES_ITEMS_IN: Field PO_ITM_NO should be populated with appropriate value.
· SALES_CFGS_REF Table:
1. This table should have 1 record per item.
2. Combination of CONFIG_ID and ROOT_ID should be unique across line items.
POSEX | 000010 |
CONFIG_ID | 000001 |
ROOT_ID | 00000001 |
SCE | 1 |
COMPLETE | T |
CONSISTENT | T |
CBASE_ID_TYPE | G |
· SALES_CFGS_INST:
1. This table should have 1 record per item.
2. Combination of CONFIG_ID and INST_ID should be unique across line items.
CONFIG_ID | 000001 |
INST_ID | 00000001 |
OBJ_TYPE | MARA |
CLASS_TYPE | 300 |
OBJ_KEY | MATNR value |
QUANTITY | Quantity value |
QUANTITY_UNIT | Quantity Unit |
COMPLETE | T |
CONSISTENT | T |
OBJECT_GUID | MATNR value |
PERSIST_ID_TYPE | G |
· SALES_CFGS_VALUE:
1. Combination of CONFIG_ID and INST_ID should be unique across line items.
2. We can have multiple characteristics for a material. In that case appropriate records should be inserted in this table. Note that CONFIG_ID and INST_ID should be same for all the rows you insert in this table for multiple characteristics for a material.
3. The characteristic value should be in SAP internal format.
CONFIG_ID | 000001 |
INST_ID | 00000001 |
CHARC | Material characteristics |
VALUE | Material characteristics value |
· SALES_CFGS_VK:
1. Combination of CONFIG_ID and INST_ID should be unique across line items.
2. We can have multiple characteristics for a material. In that case appropriate records should be inserted in this table. Note that CONFIG_ID and INST_ID should be same for all the rows you insert in this table for multiple characteristics for a material.
CONFIG_ID | 000001 |
INST_ID | 00000001 |
VKEY | Material characteristics |
06-20-2014 9:00 AM
See also the test data for configurable BOM in SAPNote http://service.sap.com/sap/support/notes/900380.