Using public API service, you can create, read, update, and delete condition records for pricing. The service contains entities for condition record, validity of condition record, pricing scale, and condition supplement.
We provide users public API service for sales and purchase. This public API class is: CL_PRCG_CNDNRECORD_API_FACTORY.
Public API for Sales provide 4 method to do CURD of condition records.
· GET_CONDITION_RECORD: This method is used to display condition record as you input the some search criterial. (GET_PRCG_VALIDITIES is a method with same function, we recommend users so not use this one)
· CREATE_CONDITION_RECORD: You can create condition records with validity and its supplement and scales or just create supplement and scales for existed condition records.
· UPDATE_CONDITION_RECORD: Update some changeable fields for condition records.
· DELETE_CONDITION_RECORD: Delete condition records or supplement or scales.
Importing Parameters:
Ø CT_CONDITION_RECORD
Ø CT_CONDITION_VALIDITY
Ø CT_CONDITION_SUPPLEMENT
Ø CT_CONDITION_SCALE
Create example: if you want to create a condition record with validity (maybe also supplement and scale), do the following steps.
1. Prepare the basic input data
Condition Type: PPR0
Condition Table: A305
You can check the key fields of table A305, as below
(you can check the mapping excel for global field name with its technical name in bottom of this guide):
Ø VKORG – Sales Organization
Ø VTWEG – Distribution Channel
Ø KUNNR – Customer
Ø MATNR – Material
2. Input mandatory fields into importing parameter
You can create a new condition record with its validity, supplement and scale.
CT_CONDITION_RECORD (required)
CT_CONDITION_VALIDITY (required)
CT_CONDITION_SUPPLEMENT (optional)
CT_CONDITION_SCALE (optional)
You can also create a supplement or scale for existed condition record.
Validity, supplement and scale for one condition record will be connected by its condition record number. You can create multiple condition records in one time.
Following example, please check the mandatory fields for importing parameters:
CT_CONDITION_RECORD
CT_CONDITION_VALIDITY
CT_CONDITION_SUPPLEMENT
CT_CONDITION_SCALE
3. Execute after input parameters
Create Execute Successful: if you create successfully, you can receive messages, which filled in the following 2 parameters:
Ø ET_MESSAGE
Ø ET_CNDN_RECORD_MAPPING
For example, if you create a condition record with validity, no supplement and scale.
Message format: (PRCG_CNDNRECORD_API (015)) Condition record 0000202628 (temp. No. $$00000001) is created and valid from 20190820 to 99991231.
Importing Parameters:
Ø IS_CNDNRECORD_CRITERIA_HEADER
Ø IT_CNDNRECORD_CRITERIA_ITEM
Ø IS_CNDNRECORD_QUERY_OPTION
Get example: if you want to search condition records, do the following steps:
1. Prepare search criteria you want to input.
IS_CNDNRECORD_CRITERIA_HEADER (optional)
IT_CNDNRECORD_CRITERIA_ITEM (required, you need to input at least one entry)
IS_CNDNRECORD_QUERY_OPTION (optional)
“QUERYOPTIONCOUNTISSET” and “QUERYOPTIONINLINECOUNTISSET” cannot be set at same time.
2. Fill the parameters
You can input search criterial as example, in this example:
I filled CONDITIONTABLE: I EQ 305
3. Execute successfully
If no error raise, you can check export parameters, find the detail information of condition records.
Continue to learn about public API for Sales:
Part 2: Sales -- UPDATE & DELETE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
7 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |