CRM Service - ERP Q&A https://www.erpqna.com/tag/crm-service/ Trending SAP Career News and Guidelines Wed, 03 Jan 2024 11:52:58 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 https://www.erpqna.com/wp-content/uploads/2021/11/cropped-erpqna-32x32.png CRM Service - ERP Q&A https://www.erpqna.com/tag/crm-service/ 32 32 Influence Resource Related Billing through AVC (Advanced Variant Configuration) https://www.erpqna.com/influence-resource-related-billing-through-avc-advanced-variant-configuration/?utm_source=rss&utm_medium=rss&utm_campaign=influence-resource-related-billing-through-avc-advanced-variant-configuration Thu, 16 Nov 2023 09:11:03 +0000 https://www.erpqna.com/?p=79318 Overview: Resource Related billing is useful when the price for customer-specific services is not defined in a service contract as a fixed price and can’t be determined using standard pricing. One of the examples of such service could be consulting. In resource-related billing, the system creates dynamic items from the expenditure information on the service […]

The post Influence Resource Related Billing through AVC (Advanced Variant Configuration) appeared first on ERP Q&A.

]]>
Overview: Resource Related billing is useful when the price for customer-specific services is not defined in a service contract as a fixed price and can’t be determined using standard pricing. One of the examples of such service could be consulting.

In resource-related billing, the system creates dynamic items from the expenditure information on the service order. Here we will consider scenario of Itemized billing and summarized billing. They are identified with the billing relevance field attribute in the advanced execution order item.

Using AVC material, the billing can be influence through the pricing of the Advanced execution order Item (AEO) as a direct linkage between Price condition and variant characteristics can be established.

The statistical item billing (Summarized) is directly influenced by the variant characteristics whereas the dynamic item billing (Itemized) is indirectly Influenced by the main item variant characteristics.

Value Addition: In order to offer better transparency in billing process, this capability is offered from Service.

Process Flow:

Creation of DIP profile is not part of this blog. At first, the service order needs to be created with AVC material. Once released, the Plant maintenance order needs to be released and confirmation needs to be posted. Next step is to create Debit Memo Request through DP92 transaction and last step is to create Debit memo using the debit memo request.

Majorly below are the 3 steps to achieve this.

  1. Setting material with AVC characteristic.
  2. Set up the pricing for AVC characteristic in Service order.
  3. Setting Item categories for advanced execution order Item, DMR and DM

1. Setting the Material for AVC.

I am considering a scenario where one of the spare parts of an equipment requires troubleshoot. Hence I am taking the characteristic of this Service as Location based, hence the price for the troubleshooting job needs to be calculated based on location.

a) First we need to create some characteristics create the characteristics please use Transaction code CT04.

Similarly create second characteristics YCOND. This is the characteristics which will Influence the pricing condition directly.

As this characteristic needs to directly mapped to the pricing condition, let’s define the variant condition with Variant KEY T code :VK30.

Now We need to create the class and use the class in Material master. T code : CL02, choose class type as Variants(300). Class name ZCONF_AVC.

In the class, Open Characteristic tab and enter two characteristic which were created earlier.

Now we need to add dependencies to influence pricing on characteristics. Hence select the first condition and Click on the” Overwrite values” button.

It takes to the Change characteristic screen. Please choose “Editor “ from the “Extras” in menu bar.

add meaningful condition.

In my example, the price of the service is High if the location of the Service is Onsite.

$SELF.YCOND = ‘HIGH’ if YLOCATION = ‘ONSITE’.

Similarly add another condition for REMOTE.

$SELF.YCOND = ‘LOW’ if YLOCATION = ‘REMOTE’

Now the change the status of the class is “released”, class is ready to be used in Material Master for the desired Material.

Let’s configure the material in material master (MM01) for AVC. The AVC Material Needs to have Configurable material as checked.

In the classification tab of the material insert the variant class which was created in earlier steps.

Enter the Gen Item category group, in my case it is 0002 as in service order item category determination Configuration, this is being considered.

Next Step is to create the variant Profile, unless we assign the Profile to the material, the Service order Item would not get the configuration button on the web ui. T-Code CU41.

Have Chosen the priority as 00 as the highest priority and status needs to be set to “Released”.

2. Set up the pricing for avc characteristic in Service order

Next let’s identify the pricing procedure which needs to be used. Use Tcode OVKK.

In the pricing procedure, identify the condition record which will hold the price of the of the Variant condition needs to be added. For our example it is VA00.

We need to create price condition record for this material using the identified condition VA00. T-code VK11.

3. Setting Item categories for Service order, DMR and DM.

To set up service order Item category, please use below path.

Service-> Transactions-> Basic Settings-> Define Item Category Determination

For mapping between product and plant/task list and WorkCentre-T code: OISD

SPRO->Sales and Distribution->Sales->Sales Documents->Sales Document Item->Define Item Categories.

One item category for summarized billing and one for Itemized billing(Statistical ).

SPRO->Sales and Distribution->Sales->Sales Documents->Sales Document Item-> Assign Item Categories. Here item categories for debit memo request are assigned.

SPRO->Sales and Distribution-> Billing -> Billing Documents-> Copying Control for Billing Documents-> Maintain Copying Control for Billing Documents.

This is the copy control between Debit memo request and Debit memo.

Now, let’s use this product in a service order and explore how these variant characteristics are influencing pricing.

Create a service order with two advanced execution order items and configure those items.

Next item configuration.

Now release the service order to generate plant maintenance order. Once PM order is released (t code: Iw32) next step is to posting of confirmation.

Once the confirmation is posted, technical completion is needed for the PM orders.

Let’s execute the billing using transaction code DP92.

Let’s create the DMR for second item and verify the configuration and price condition.

Next step is to create debit memo for these items using VF01.

Once Debit memo is created, the configuration is captured and accessible.

We can see the respective configurations are present in item level in Debit memo.

Debit memo pricing is influenced by variant item condition. Also the configuration is captured in Debit memo.

Rating: 0 / 5 (0 votes)

The post Influence Resource Related Billing through AVC (Advanced Variant Configuration) appeared first on ERP Q&A.

]]>
Deleting/ Setting the Employee Data to Obsolete in SAP C4C https://www.erpqna.com/deleting-setting-the-employee-data-to-obsolete-in-sap-c4c/?utm_source=rss&utm_medium=rss&utm_campaign=deleting-setting-the-employee-data-to-obsolete-in-sap-c4c Sat, 15 Apr 2023 12:07:08 +0000 https://www.erpqna.com/?p=73846 This content concentrates on Deleting/ Setting the Employee Data to Obsolete. To Delete/ Setting the Employee Data to Obsolete, please follow the below steps: 1. Click on Data Protection and Privacy workcentre, then click on Personal Data Removal workcentre view. 2. Then select “All Employee” from the dropdown query. 3. Enter Employee ID in the […]

The post Deleting/ Setting the Employee Data to Obsolete in SAP C4C appeared first on ERP Q&A.

]]>
This content concentrates on Deleting/ Setting the Employee Data to Obsolete.

To Delete/ Setting the Employee Data to Obsolete, please follow the below steps:

1. Click on Data Protection and Privacy workcentre, then click on Personal Data Removal workcentre view.

2. Then select “All Employee” from the dropdown query.

3. Enter Employee ID in the search bar.

4. Select the checkbox for the Employee.

5. Click on Remove Data.

6. Marked for deletion button is greyed out.

7. Close the tab, Remove Employee Data.

8. Then go to Business Configuration- Implementation Projects- Click on the line First Implementation.

9. After few seconds the Open Activity List button will be Enabled.

10. Click on “All Activities” from the query.

11. Click on the Name field, then type “Data Retention in the search bar” and click on Enter.

12. Click on the hyperlink “Data Retention Rules for Employees”.

13. The screen will open in a Detailed view with list of Countries available. Click on the Country/ Region field, search in the filter with Relevant Country name. i.e.., I have chosen the country as “United States”.

14. Now the current value is 99 in the field Minimum number of Years or Months.

15. Remove the value 99 and change it to 0 in the field Minimum number of Years or Months. Then click on Save button.

16. Now follow the steps from 1 to 5, Now the Marked for deletion button is Enabled and checked. Enable the checkbox and click on the “Delete button”.

17. The Dialog box appears, click on “Yes”.

18. After executed, the Data Removal Run will be created.

19. Click on Data Protection and Privacy workcentre, then click on Common Tasks view and click on “Administer Data Removal Runs” hyperlink.

20. Select the query as “All Removal Runs” from the dropdown.

21. Now you could observe that Status is set to “Obsolete” and Removal failed is marked as “No”. This means the Run is Successful and Employee got deleted from the system.

22. Before deletion the Employee appeared in the listing screen. Click on “Refresh button”.

23. Now the Employee Data is removed.

I hope this blog gives the view of how to delete the Employee from C4C System.

Rating: 0 / 5 (0 votes)

The post Deleting/ Setting the Employee Data to Obsolete in SAP C4C appeared first on ERP Q&A.

]]>
SAP Service Cloud: Service Categories upload in Multiple Languages https://www.erpqna.com/sap-service-cloud-service-categories-upload-in-multiple-languages/?utm_source=rss&utm_medium=rss&utm_campaign=sap-service-cloud-service-categories-upload-in-multiple-languages Wed, 21 Sep 2022 10:21:13 +0000 https://www.erpqna.com/?p=68002 This content concentrates on Service categories creation using Excel file upload and creating it in the system manually. There are some examples given: Create a file using Excel: 1. To upload as a File create a Excel with the columns given as CategoryID, CategoryType, ParentCategoryID, Language1, Name1, Description1, Language2, Name2, Description2. 2. Click on File- […]

The post SAP Service Cloud: Service Categories upload in Multiple Languages appeared first on ERP Q&A.

]]>
This content concentrates on Service categories creation using Excel file upload and creating it in the system manually.

There are some examples given:

Create a file using Excel:

1. To upload as a File create a Excel with the columns given as CategoryID, CategoryType, ParentCategoryID, Language1, Name1, Description1, Language2, Name2, Description2.

2. Click on File- Save as- Select the relevant location to save your file in your PC.

3. Enter the File name- Select the format as CSV UTF-8 (Comma delimited) (*.CSV).

4. Add the values in the file with English and other language. The language 2 used here is Spanish.

Create Service and Incident categories using File upload:

1. Click on Administrator– Service and Social– SLA Setup– Service Categories.

2. All Catalogs will be the default view.

3. Click on New– Catalog from file.

4. Click on Select File button, select the Relevant file, then go to the relevant location of the file and make the toggle button as Yes for Exclude column headers.

5. Click on Upload button to upload the created file.

6. After uploaded, the system throws a message as Catalogue ID ID_9 is created via file upload. Your entries have been saved.

7. Click on Refresh button to check the status of the file.

8. Now the file is uploaded.

9. Select the relevant line and click on Edit button.

10. The screen will open in a detailed view, select the General tab, fill the Catalog Name and Catalog Description.

11. Click on Save button to save the changes.

12. To view the catalog structure created, select the Catalog Structure tab and view it, now you could able to see the Catalog Structure created only for English language.

13. To view the catalog created in other language (Spanish language as Example), login using your User ID and Password, then select the language as Spanish, the same step is applicable for all the languages.

14. Follow step 1 and step 2 under the heading Create Service and Incident categories using File upload.

15. Select the relevant line and add the Catalog Name and Description in Spanish.

16. To check the catalog structure added in Spanish language, select the tab Catalog Structure and you could able to view the catalog in Spanish.

Creation of Service and Incident Categories manually in English Language:

1. Click on Administrator– Service and Social– SLA Setup– Service Categories.

2. All Catalogs will be the default view.

3. Click on New– Service Category Catalog.

4. The detailed screen will appear to enter the Catalog Name and Description.

5. Click on Catalog Structure tab and fill up the Category Name, Description and change the category type if Required.

6. Click on Save button to save the catalog.

Creation of Service and Incident Categories manually in Spanish Language:

1. Click on Administrator– Service and Social– SLA Setup– Service Categories.

2. All Catalogs will be the default view.

3. Select the relevant Category line already created in English and click on Edit button.

4. The detailed screen will appear to enter the Catalog Name and Description.

5. Click on Catalog Structure tab and fill up the Category Name, Description and change the category type if Required.

6. Click on Save button to save the catalog.

Rating: 0 / 5 (0 votes)

The post SAP Service Cloud: Service Categories upload in Multiple Languages appeared first on ERP Q&A.

]]>
CRM Bol programming Debugging Tips and Code Snippet on how to read & populate values https://www.erpqna.com/crm-bol-programming-debugging-tips-and-code-snippet-on-how-to-read-populate-values/?utm_source=rss&utm_medium=rss&utm_campaign=crm-bol-programming-debugging-tips-and-code-snippet-on-how-to-read-populate-values Mon, 17 Feb 2020 09:31:01 +0000 https://www.erpqna.com/?p=26389 This blog explains on how to do basic debugging and write code in CRM. It covers the below topic areas 1. Requirement: Disable a specific UI element field For customer overview screen when user clicks on edit to update the address information Also Read: SAP CRM Certification Preparation Guide Disable a specific field called “Delivery […]

The post CRM Bol programming Debugging Tips and Code Snippet on how to read & populate values appeared first on ERP Q&A.

]]>
This blog explains on how to do basic debugging and write code in CRM. It covers the below topic areas

1. Requirement: Disable a specific UI element field

For customer overview screen when user clicks on edit to update the address information

Also Read: SAP CRM Certification Preparation Guide

Disable a specific field called “Delivery service type” and do not allow to update Phone and email sections as highlighted below.

2. Find the UI component

UI component was BP_ADDR

And View value as BP_ADDR/AccountAddressEF

3. Find Technical object to do code changes

Use transaction obsp_wd_cmpwb to be able to open the component in backend CRM system

Specific fields can be found in

Context_Nodes > Implementation class > Attributes >STRUCT.FIELDNAME

  • GET_XYZ – This is used to get the data of attribute (XYZ) from the BOL Layer and display it on the UI
  • SET_XYZ – This is used to set the data of the attribute from the UI to the BOL layer
  • GET_M_XYZ – This defines the meta data (type) of the attribute
  • GET_I_XYZ – This defines whether the attribute is editable or non-editable i.e., using Get_I method you can make your field as grade out based up on any condition.
  • GET_V_XYZ – This defines the content of drop down values, F4 Help etc i.e., you can retrieve the drop-down values based up on your condition.
  • GET_P_XYZ – This defines the property of attribute whether it’s drop down, text box, F4 help, check box etc. Also, if any follow-up event should trigger the same is mentioned here i.e., you can call specific even handler using P method .
  • There are two more methods which have recently got added from the above two as mentioned below
  • GET_A_XYZ – This is used to hide or display the attribute based on the Switch ID.
  • GET_AC_XYZ – This is used for Field Action Menu Getter
  • Since I need to make the field disabled, I need to make use of the field value GET_M_DELI_SERV_TYPE
  • You can find this method in context node Buildaddress> Attributes> STRUCT.DELI_SERV_TYPE which has a set of predefined methods as seen below

The code which was used to set the value as disabled would be GET_I_XYZ

If the icon does not look green as in the above screenshot choose to redefine or one of then options below to activate the method

Add the source code as below:

METHOD get_i_deli_serv_type.
CALL METHOD super->get_i_deli_serv_type
EXPORTING
iterator    = iterator
RECEIVING
rv_disabled = rv_disabled.

IF zl_bp_addr_accountaddress_impl=>gv_addr_disabled IS NOT INITIAL.
rv_disabled = zl_bp_addr_accountaddress_impl=>gv_addr_disabled.
ENDIF.

ENDMETHOD.

4. Get value of UI field using IF_BOL_BO_PROPERTY_ACCESS

I would like to read the address number value from the UI

To access a specific value coming from the previous or current screen use the BOL property access type as mentioned below where you want to read the value from

In my case I am using ZGO_BOL_PROPERTY of type IF_BOL_BO_PROPERTY_ACCESS defined in class ZL_BP_ADDR_ACCOUNTCOMMNUM_IMPL where I want to read the attribute address number and address GUID which are attributes in that class.

If you check the interface IF_BOL_BO_PROPERTY_ACCESS, it has properties as below:

To be able to use the value stored in the property below code needs to be run

// In ZL_BP_ADDR_ACCOUNTEMAILSE_IMPL DO_PREPARE_OUTPUT

DATA: lo_bo        TYPE REF TO  cl_crm_bol_entity,
lv_addr      TYPE ad_addrnum,
lv_addr_guid TYPE bu_address_guid.

IF zl_bp_addr_accountcommnum_impl=>zgo_bol_property IS NOT INITIAL .
lo_bo ?=  zl_bp_addr_accountcommnum_impl=>zgo_bol_property.
ENDIF.

IF lo_bo IS BOUND .
lo_bo->get_property_as_value(
EXPORTING
iv_attr_name =     'ADDRESS_NUMBER'
IMPORTING
ev_result    =       lv_addr
).

lo_bo->get_property_as_value(
EXPORTING
iv_attr_name =     'ADDRESS_GUID'
IMPORTING
ev_result    =       lv_addr_guid
).

ENDIF .

4.1 Check in debug mode where the value is coming from

You can also navigate to container proxy by using the code as below

ZL_BP_ADDR_ACCOUNTCOMMNUM_IMPL=>ZGO_BOL_PROPERTY

Where ZGO_BOL_PROPERTY is of type IF_BOL_BO_PROPERTY_ACCESS

  1. Go to container_proxy
  2. Go to Data_Ref
  3. Click on data type which opens up
  4. Open the attribute_ref
  5. Find the address number and address value in there

The above would directly come to container proxy

Click on Data_ref

Click on the type below

Click on Attribute ref

Find the values

5. Get value of UI field using me-> context type

For debugging as a starting point use the implementation class and find from Context what specific field value are you looking for. Example I am looking to find the address number field as below

You can use “Me” and navigate inside to find the values

Inside “Me” you can find the context Type which can be Z or standard in my case I defined a ZContext

ztyped_context->builaddress->collection_wrapper->

Get the 3 entities list

Go to the BUILADDRESS

Insider collection wrapper you would find collection reference

Insider collection reference look for below

Look for entity list as above which shows 3 entries as there are 3 BP addresses on the UI

Go to one of the entities and it would have container proxy

Follow the same steps as in 4.1

  1. Go to container_proxy
  2. Go to Data_Ref
  3. Click on data type which opens up
  4. Open the attribute_ref
  5. Find the address number and address value in there

6. Add a default blank row in the CRM UI table

As you can see below default Blank line was added to the email so the user can enter but no default blank line was added for Mobile Number

Now when we add the code as below to method DO_PREPARE_OUTPUT of class ZL_BP_ADDR_ACCOUNTCOMMNUM_IMPL

CALL METHOD super->do_prepare_output
EXPORTING
iv_first_time = iv_first_time.

This would add a default blank line to the component

I found CRM debugging quite difficult initially but was helpful to understand once I understood how to navigate in debug mode.

Rating: 0 / 5 (0 votes)

The post CRM Bol programming Debugging Tips and Code Snippet on how to read & populate values appeared first on ERP Q&A.

]]>
OData Example: Create Update Delete Price Components of Service Order in SAP Business ByDesign https://www.erpqna.com/odata-example-create-update-delete-price-components-of-service-order-in-sap-business-bydesign/?utm_source=rss&utm_medium=rss&utm_campaign=odata-example-create-update-delete-price-components-of-service-order-in-sap-business-bydesign Fri, 24 Jan 2020 08:56:20 +0000 https://www.erpqna.com/?p=25472 SAP Business ByDesign (ByD) provides you with REST/OData access to Service Order Price Components both header and item level components (Price, Discount, Surcharge, Freight …). This blog post provides you with an sample round trip examples of price components (create – read – update – delete) using ByD OData services for service order business object. […]

The post OData Example: Create Update Delete Price Components of Service Order in SAP Business ByDesign appeared first on ERP Q&A.

]]>
SAP Business ByDesign (ByD) provides you with REST/OData access to Service Order Price Components both header and item level components (Price, Discount, Surcharge, Freight …). This blog post provides you with an sample round trip examples of price components (create – read – update – delete) using ByD OData services for service order business object.

In the demo below you see how you can how to create custom OData service and use the service to perform CRUD operation on Sales Order price components.

Example Scenario

In the example we are creating reading updating deleting (CRUD) price components of service order using SAP Business ByDesign Custom OData Services.

Also Read: SAP CRM Certification Preparation Guide

Sample service order header level price components include:

  • Overall Discount
  • Freight
  • Restocking Fee
  • Surcharge

Sample service order item level price components include:

  • Product Discount
  • Price
  • Surcharge (Fixed Value)
  • Surcharge (%)
  • Quality Loss Fee
  • Goodwill (%)
  • Warranty (%)
  • Working Condition (%)

Note: the service order document has pricing in set to Net or Gross pricing procedure, both options with samples are explained in detail.

Expose ByD Service Order Price Components as OData Service

Open work center view Application and User Management – OData Services and create a Custom OData Service for business object Service Order.

Make sure you expose header and item price component properties that enable you to create, filter, read, update and delete all relevant price components data incl. nodes Root,ServiceOrderPriceAndTaxCalculation, ServiceOrderOperationalPriceComponent, ServiceOrderItem, ServiceOrderOperationalItemPriceComponent. In my example I included the following elements to my Custom OData Service “serviceorderpricecomponents“:

  • ID
  • ServiceOrderPriceAndTaxCalculation (header level price components)
  • ServiceOrderOperationalPriceComponent
    • TypeCode
    • DecimalValue
    • CurrencyCode
    • BaseMeasureUnitCode
    • BaseDecimalValue
    • MeasureUnitCode
    • RateBaseQuantityTypeCode
  • ServiceOrderItem (created from the Item association from ServiceOrderPriceAndTaxCalculation )
  • ServiceOrderOperationalItemPriceComponent (created from the OperationalItemPriceComponent association from ServiceOrderItem )
    • TypeCode
    • DecimalValue
    • CurrencyCode
    • BaseMeasureUnitCode
    • BaseDecimalValue
    • MeasureUnitCode
    • RateBaseQuantityTypeCode

Activate your custom OData service and note down the Service URL from the OData Editor. In my example the service URL is

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents

If needed you can retrieve the metadata using the metadata URL

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/$metadata

Note: replace the {{TenantHostname}} with ByD tenant host name, example: my123456.sapbydesign.com

Document Level Price Components

The service order document has pricing in set to Net or Gross pricing procedure, both options with samples are explained in detail.

User can create read update delete both header level price components using the following Type Codes for both Net pricing and Gross pricing procedure, following are the list of type codes you can use to handle different price components.

List of Document / Header level price components in Net Pricing Procedure are listed below.

Price Component Type Code 
Overall Discount  0007
Freight  7PR8 
Restocking Fee  7PRB
Surcharge  0001 
Surcharge 2 0002 
Surcharge 3 0003 
Surcharge 4 0004 
Surcharge 5 0005 

List of Document / Header level price components in Gross Pricing Procedure are listed below.

Price Component Type Code 
Gross Overall Discount 1007
Gross Freight 8PR8
Gross Restocking Fee 8PRB

Create Update and Delete Overall Discount using the Custom OData Service

In the custom OData service select the header level price component relevant fields in co-relation with UI fields of Overall Discount in Total Pricing of Pricing and Invoicing tab of Service Order.

Step 1: Create Overall Discount

Using the http-method POST and entity set ServiceOrderOperationalPriceComponent you can create Overall Discount, make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalPriceComponentCollection

In my example I’m using the JSON body ( the ParentObjectID is the Service Order Object ID)

{		
                "ParentObjectID": "00163E7306A31EE9AE81BA7D941D2543",
                "TypeCode": "0007",
                "DecimalValue": "10",
                "MeasureUnitCode": "P1"
}

and the http-header parameter

  • x-csrf-token=fetch to get the CSRF-token to create the material via POST service call ( note: the x-csrf-token is fetched in the GET service call , for details refer to postman example collection ).
  • Note: Service Order ID should be the valid and existing id in system.

As result ByD returns the following OData response body:

As you can see the Overall Discount is created with relevant information.

Note: Details about x-csrf-token:

  • SAP Business ByDesign System generates a CSRF token and sends it back in the HTTP response header field X-CSRF-Token.
    This happens in a non-modifying request (such as GET) if the header field X-CSRF-Token with the value Fetch is sent along with the non-modifying request.
  • Note: CSRF (Cross Site Request Forgery) token is a random, hard-to-guess string. the server would generate a random string and is stored in the session or by setting a cookie containing the value
  • For example Steps to Follow:
  • Step 1: call the Get service by setting the Header key field “x-csrf-token” with value “fetch”
  • Step 2: in the HTTP response header of above GET service call you read the field value “x-csrf-token”
  • Step 3: in the subsequent POST calls use the x-csrf-token .

Step 2: Update Overall Discount

Using the http-method PUT and entity set ServiceOrderOperationalPriceComponentCollection you can update the Overall Discount, make sure you pass the values for following elements ObjectID, ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalPriceComponentCollection(‘{{ServiceOrderPriceComponentObjectID}}’)

In my example I’m using the JSON body ( the ParentObjectID is the Service Order Object ID)

{
            "ObjectID": "{{ServiceOrderPriceComponentObjectID}}",
            "ParentObjectID": "{{ServiceOrderPriceComponentParentObjectID}}",
                "TypeCode": "0007",
                "DecimalValue": "30",
                "MeasureUnitCode": "P1"
}

As result the service order overall discount gets updated:

Step 3: Delete Overall Discount

Using the http-method DELETE and entity set ServiceOrderOperationalPriceComponentCollection you can delete the Overall Discount, make sure you pass the value of the specific instance id of overall discount which just got updated.

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalPriceComponentCollection(‘00163E7306A31EE9AE81BA7D941D254300163E7306A31EE9AE81EA354CD346AC’)

to delete an instance JSON body is required, you have to pass only the instance id as shown above.

Note: instance to be deleted can be fetched by performing the GET operation and getting the right instance of the overall all discount of service order.

GET before delete is required since after the UPDATE operation the instance id of the overall discount is changed.

Create Update and Delete Freight using the Custom OData Service

User can create document level Freinght in Total Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Freight

Using the http-method POST and entity set ServiceOrderOperationalPriceComponent you can create header level / document level Freight, and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and CurrencyCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalPriceComponentCollection

In my example I’m using the JSON body ( the ParentObjectID is the Service Order Object ID)

{		
                "ParentObjectID": "00163E7306A31EE9AE81BA7D941D2543",
                "TypeCode": "7PR8",
                "DecimalValue": "10",
                "CurrencyCode": "USD"
}

As result ByD returns the following OData response body:

As you can see the document level Freight is created with relevant information.

Note: for Update and Delete of header level Freight please follow same steps as mentioned above in step 2 and step 3 of Overall Discount.

Create Update and Delete Restocking Fee using the Custom OData Service

User can create Restocking Fee in Total Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Restocking Fee

Using the http-method POST and entity set ServiceOrderOperationalPriceComponent you can create Restocking Fee, and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and CurrencyCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalPriceComponentCollection

In my example I’m using the JSON body ( the ParentObjectID is the Service Order Object ID)

{		
                "ParentObjectID": "00163E7306A31EE9AE81BA7D941D2543",
                "TypeCode": "7PRB",
                "DecimalValue": "10",
                "CurrencyCode": "USD"
}

As result ByD returns the following OData response body:

As you can see the Restocking Fee is created with relevant information.

Note: for Update and Delete of Restocking Fee please follow same steps as mentioned above in step 2 and step 3 of Overall Discount.

Create Update and Delete Surcharge using the Custom OData Service

User can create document level Surcharge in Total Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Surcharge

Using the http-method POST and entity set ServiceOrderOperationalPriceComponent you can create Surcharge, and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and CurrencyCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalPriceComponentCollection

In my example I’m using the JSON body ( the ParentObjectID is the Service Order Object ID)

{		
                "ParentObjectID": "00163E7306A31EE9AE81BA7D941D2543",
                "TypeCode": "0001",
                "DecimalValue": "10",
                "CurrencyCode": "USD"
}

As result ByD returns the following OData response body:

As you can see the Restocking Fee is created with relevant information.

Note: for Update and Delete of header level Surcharge please follow same steps as mentioned above in step 2 and step 3 of Overall Discount.

Note: you can create Five different Surcharge at service order header level (in case you have scoped “Additional Surcharge” in business configuration )

you can create additional surcharges by passing the following TypeCode 0002, 0003, 0004 and 0005 in the OData request.

Additional Surcharges in Service Order UI

Item Level Price Components

The service order document has pricing in set to Net or Gross pricing procedure, both options with samples are explained in detail.

User can create read update delete Item level price components using the following Type Codes for both Net pricing and Gross pricing procedure, following are the list of type codes you can use to handle different price components.

List of Item level price components in Net Pricing Procedure are listed below.

Price Component Type Code 
Product Discount 7PR6
List Price  7PR1 
Surcharge  7PR3 
Surcharge (%)  7PR2
Quality Loss Fee  7PRA 
Goodwill (%)  7PRC 
Warranty (%)  7PR9 
Working Condition (%)  7PR7 

List of Item level price components in Gross Pricing Procedure are listed below.

Price Component Type Code 
Gross Product Discount 8PR6
Gross List Price 8PR1
Gross Surcharge 8PR3
 Gross Surcharge (%) 8PR2
Gross Quality Loss Fee 8PRA
Gross Working Condition (%) 8PR7

Create Update and Delete Product Discount using the Custom OData Service

In the custom OData service select the item level price component relevant fields in co-relation with UI fields of Product Discount in Item Pricing of Pricing and Invoicing tab of Service Order.

lete Product Discount using the Custom OData Service
In the custom OData service select the item level price component relevant fields in co-relation with UI fields of Product Discount in Item Pricing of Pricing and Invoicing tab of Service Order.

Step 1: Create Product Discount

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create Product Discount, make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "00163E7306A31EE9AE81BB68D5C9859E",
                "TypeCode": "7PR6",
                "DecimalValue": "10",
                "MeasureUnitCode": "P1"
}

and the http-header parameter

  • x-csrf-token=fetch to get the CSRF-token to create the material via POST service call ( note: the x-csrf-token is fetched in the GET service call , for details refer to postman example collection ).
  • Note: Service Order ID and Item ID (ObjectID) should be the valid and existing id in system.

As result ByD returns the following OData response body:

As you can see the Product Discount is created with relevant information.

Step 2: Update Product Discount

Using the http-method PUT and entity set ServiceOrderOperationalItemPriceComponentCollection you can update the Product Discount, make sure you pass the values for following elements ObjectID, ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection(‘{{ServiceOrderItemPriceComponentObjectID}}’)

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{
            "ObjectID": "{{ServiceOrderItemPriceComponentObjectID}}",
            "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PR6",
                "DecimalValue": "30",
                "MeasureUnitCode": "P1"
}

As result the service order item product discount gets updated:

Step 3: Delete Product Discount

Using the http-method DELETE and entity set ServiceOrderOperationalItemPriceComponentCollection you can delete the Product Discount, make sure you pass the value of the specific instance id of product discount which just got updated.

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection(‘{{ServiceOrderItemPriceComponentObjectID}}’)

to delete an instance JSON body is required, you have to pass only the instance id as shown above.

Note: instance to be deleted can be fetched by performing the GET operation and getting the right instance of the product discount of service order.

GET before delete is required since after the UPDATE operation the instance id of the product discount is changed.

Create Update and Delete Price using the Custom OData Service

User can create item Price in Item Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Price

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create item Price, and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and CurrencyCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PR1",
                "DecimalValue": "100",
                "CurrencyCode": "USD"
}

As result ByD returns the following OData response body:

As you can see the document level Freight is created with relevant information.

Note: for Update and Delete of Item Price please follow same steps as mentioned above in step 2 and step 3 of Product Discount.

Note: Price is determined from price master data by the system during creation of Item in Service Order .

  • Use Case 1: Item Price is determined by system and price is overwritten by the OData service after the above price odata create call.
  • Use Case 2: Item Price is not determined by system and price is created by the OData service after the above price odata create call.

Create Update and Delete Item Surcharge using the Custom OData Service

User can create item level Surcharge in Item Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Item Surcharge (absolute value surcharge)

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create item Surcharge, and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and CurrencyCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PR3",
                "DecimalValue": "10",
                "CurrencyCode": "USD"
}

As result ByD returns the following OData response body:

As you can see the document level Freight is created with relevant information.

Note: for Update and Delete of Item Surcharge please follow same steps as mentioned above in step 2 and step 3 of Product Discount.

Create Update and Delete Item Surcharge(%) using the Custom OData Service

User can create item level Surcharge (%) in Item Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Item Surcharge(%) percentage

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create item Surcharge(%), and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PR2",
                "DecimalValue": "10",
                "MeasureUnitCode": "P1"
}

As result ByD returns the following OData response body:

As you can see the document level Surcharge(%) is created with relevant information.

Note: for Update and Delete of Item Surcharge(%) please follow same steps as mentioned above in step 2 and step 3 of Product Discount.

Create Update and Delete Item Quality Loss Fee using the Custom OData Service

User can create item level Quality Loss Fee in Item Pricing of Pricing and Invoicing tab of ServiceOrder using the OData service by following the steps mentioned below.

Step 1: Create Item Quality Loss Fee

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create item Quality Loss Fee, and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and CurrencyCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PRA",
                "DecimalValue": "10",
                "CurrencyCode": "USD"
}

As result ByD returns the following OData response body:

As you can see the document level Quality Loss Fee is created with relevant information.

Note: for Update and Delete of Item Quality Loss Fee please follow same steps as mentioned above in step 2 and step 3 of Product Discount.

Create Update and Delete Item Goodwill (%) using the Custom OData Service

User can create item level Goodwill (%) in Item Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Item Goodwill (%) percentage

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create item Goodwill (%), and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PRC",
                "DecimalValue": "10",
                "MeasureUnitCode": "P1"
}

As result ByD returns the following OData response body:

As you can see the document level Goodwill(%) is created with relevant information.

Note: for Update and Delete of Item Goodwill(%) please follow same steps as mentioned above in step 2 and step 3 of Product Discount.

Create Update and Delete Item Warranty(%) using the Custom OData Service

User can create item level Warranty (%) in Item Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Item Warranty (%) percentage

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create item Warranyty(%), and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PR9",
                "DecimalValue": "10",
                "MeasureUnitCode": "P1"
}

As result ByD returns the following OData response body:

As you can see the document level Warranty(%) is created with relevant information.

Note: for Update and Delete of Item Warranty(%) please follow same steps as mentioned above in step 2 and step 3 of Product Discount.

Create Update and Delete Item Working Condition(%) using the Custom OData Service

User can create item level Working Condition(%) in Item Pricing of Pricing and Invoicing tab of Service Order using the OData service by following the steps mentioned below.

Step 1: Create Item Working Condition (%) percentage

Using the http-method POST and entity set ServiceOrderOperationalItemPriceComponentCollection you can create item Working Condition (%), and make sure you pass the values for following elements ParentObjectID, TypeCode, DecimalValue and MeasureUnitCode:

https://{{TenantHostname}}/sap/byd/odata/cust/v1/serviceorderpricecomponents/ServiceOrderOperationalItemPriceComponentCollection

In my example I’m using the JSON body ( ParentObjectID is the Item Object ID )

{		
                "ParentObjectID": "{{ServiceOrderItemPriceComponentParentObjectID}}",
                "TypeCode": "7PR7",
                "DecimalValue": "10",
                "MeasureUnitCode": "P1"
}

As result ByD returns the following OData response body:

As you can see the document level Working Condition (%) is created with relevant information.

Note: for Update and Delete of Item Working Condition (%) please follow same steps as mentioned above in step 2 and step 3 of Product Discount.

Note: to Create Read Update and Delete price components in a service order with Gross Pricing Procedure please use the Type Codes mentioned in a table in the beginning of the blog and follow the similar steps mentioned above.

Rating: 0 / 5 (0 votes)

The post OData Example: Create Update Delete Price Components of Service Order in SAP Business ByDesign appeared first on ERP Q&A.

]]>