
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.
This purchase part guide is continued from the guide of sales part:
Part 2: Sales -- UPDATE & DELETE
Public API for Purchasing 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, do the following steps.
1. Prepare the basic input data
Condition Type: PPR0
Condition Table: A016
You can check the key fields of table A305, as below:
Ø EVRTN – Purchasing Document
Ø EVRTP – Purchasing Document Item
2. Input mandatory fields into importing parament.
· 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.
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: (note: this create no commit, if you want to save data, need add commit code)
Ø ET_MESSAGE
Ø ET_CNDN_RECORD_MAPPING
Message format: (PRCG_CNDNRECORD_API (015)) Condition record 0000202633 (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)
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 016
3. Execute successfully
If no error raise, you can check export parameters, find the detail information of condition records:
Part 4: Purchase -- 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 |
---|---|
9 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |