![]() ![]() Define the following attributes:Ĭ_GENERIC_SERVICE_NAME Type: ASR_FORM_SCENARIO_SERVICE Value: ‘ZGS_COUNTRY_VALIDATION’Ĭ_OPER_CHECK_STATE Type: ASR_BACKEND_OPERATION Value: ‘CHECK_COUNTRY’Ĭ_FLD_COUNTRY Type: FIELDNAME Value: ‘LAND1’Ĭ_DTEL_ COUNTRY Type: ASR_FIELD_DATA_ELEMENT_NAME Value: ‘LAND1’ Lastly, for each form field being passed to the BE Service both the field name and field data type need to be defined in the attributes. There could be more than one operation defined in a single backend service. There should also be an attribute which stores the name of the operation being performed. Every BE Service should have an attribute which stores the name of the BE Service. The first item to take care of is defining attributes of the class. The class name in this example is: ZCL_HRASR_COUNTRY_VALIDATION and you can edit the class in transaction SE24 directly. Click on the “Technical Details” tab and find the class name for your implementation: You have not put any logic into theservice. You have now created a definition and implementation for your backend service. Select Continue and save and activate your work. Your screen now looks like:ĭouble-click the “?” under “Value 1” and complete the filter for your service ID: Now we need to give this implementation a unique Service ID by which HCM Process & Forms can call it.ĭouble Click on the “Filter Val.” as shown in the screen shot below:Ĭlick the “Create Filter Combination” button. So for our service key of “ZGS_COUNTRY_VALIDATION “, the entries would be:Ĭontinue and Save your implementation – you will see the following screen: Implementation class: ZCL_HRASR_(service key without prefix for ZGS or ZAS).BAdI Implementation: ZHRASR_(service key without prefix for ZGS or ZAS). ![]() You will then be prompted to supply the properties information for the Badi Implementation and Implementing Class: Select the green check and complete the implementation properties information like the following: When you execute this node, you will get a pop-up window showing all existing “generic services”.Ĭlick the “Create Implementation” icon and you will be prompted with the following: #Sap badi implementation tutorial code#Now we need to “implement” code for the service. At this point you have defined a generic service. I used “ZGS_COUNTRY_VALIDATION” for the Backend Service Key Name. Select “New Entries” at the top and put in your Backend Service Key and Backend Service Name, like: Go into this node and you will see something similar to the following: For a normal “Check and Send” Scenario, you use the Do Operations method of the Backend Service. When you want to call a Backend Service on form load, you use the Initialize Method of the Backend Service. For this position, you wish to also display the position holder name and employee number, you can also use a BE service for that too. For example, you might have a position ID being sent to the form. ![]() However, there are instances when you want to call a Backend Service to be called when the form is loading. This is a common scenario to validate what was entered. Note: You normally want to call a Backend Service when a user presses the “Check and Send” button on your form. This example uses the configuration and form development we was completed in the prior example: “Part 4”. Let’s create one to validate that the form user only selects country code “USA”. This document is part 5 of what builds on my other example: “Part 4: basic HCM Process and Forms scenario (Include a DropDown List for Country Selection)” which can be accessed at: īackend Services are important components of HCM Processes and Forms. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |