Learn, Practice, and Improve with SAP P_C4H340_34 Practice Test Questions
- 82 Questions
- Updated on: 3-Mar-2026
- SAP Certified Development Professional - SAP Commerce Cloud Developer
- Valid Worldwide
- 2820+ Prepared
- 4.9/5.0
Stop guessing and start knowing. This SAP P_C4H340_34 practice test pinpoints exactly where your knowledge stands. Identify weak areas, validate strengths, and focus your preparation on topics that truly impact your SAP exam score. Targeted Free SAP Certified Development Professional - SAP Commerce Cloud Developer practice questions helps you walk into the exam confident and fully prepared.
You are creating a business process (mybusinessprocess) that requires an action (actionB) to pass an info String value to another action (actionE) occurring later in the process. What do you need to do to make this possible? Note: There are 2 correct answers to this question.
A. Create a myBusinessProcess item type that extends BusinessProcess and adds an info String property. Use an instance of this type to start the process in your Java code with businessProcessService.startProcess(new myBusinessProcessModel).
B. Create a myBusinessProcess item type that extends BusinessProcess and adds an info String property. Specify myBusinessProcessModel as the processClass argument to the process
C. Create an event myEvent that extends the AbstractProcessEvent and adds an info String property. Register the target action as a listener for this event. Fire the event with eventService.publishEvent (myEvent).
D. In the mybusinessprocess.xml definition file, define an info event and configure actionB as the event's originator and actionE as its target. Trigger the event in the class implementing actionB using businessProcessService.triggerEvent(info).
C. Create an event myEvent that extends the AbstractProcessEvent and adds an info String property. Register the target action as a listener for this event. Fire the event with eventService.publishEvent (myEvent).
Explanation:
Option B is correct because custom process models serve as persistent state containers in SAP Commerce. By creating myBusinessProcess extending BusinessProcess with an info String attribute, you establish shared storage accessible to all actions. When actionB sets this attribute, actionE can later read it directly from the same process instance. The processClass parameter in the process definition XML links your custom model to the process, enabling type-safe data passing.
Option C is correct because events can carry data between decoupled components. Creating myEvent extending AbstractProcessEvent with an info String property allows actionB to publish the data via eventService.publishEvent(). Since actionE is registered as a listener, it receives the complete event object with the String value when triggered.
Why Other Options Are Incorrect:
Option A is incorrect because businessProcessService.startProcess() requires a persisted model instance, not a constructor argument. You must create and save the model using modelService first.
Option D is incorrect because there is no "info event" configuration in process XML with originator/target attributes, and businessProcessService.triggerEvent(info) is not a valid SAP Commerce API.
References:
SAP Commerce Documentation: "Business Processes" section on Process Models
SAP Help Portal: "Event Handling in Business Processes"
Your solution has been live for a significant period of time. Now you need to update project data across multiple environments, but this update should onlybe executed once. What is the recommended approach for updating the project data?
A. Create a class that extends AbstractPatchesSystemSetup and configure any data patches, which can run an import of your ImpEx files during an update.
B. Extract a SQL script of all the changes in a single environment, which a DBA can then run directly against the database for all remaining environments.
C. Create a class that extends AbstractSystemSetup and use the @SystemSetup annotation with TYPE.PROJECT, which can run an import of your ImpEx files during an update.
D. With each deployment, manually import the ImpEx files via the hybris Admin Console or via the ant importimpex target.
Explanation:
The Patches System in SAP Commerce Cloud is specifically designed for "run-once" data updates in live environments. While the standard AbstractSystemSetup (Option C) is intended for initializing or updating the general system state, AbstractPatchesSystemSetup provides a specialized framework for tracking which updates have already been applied to a specific database.
Why Other Options are Incorrect
Option B:
Directly running SQL scripts against the SAP Commerce database is strongly discouraged. It bypasses the Persistence Layer (Jalo/Models), meaning caches are not invalidated, business logic is ignored, and you risk corrupting the data model integrity.
Option C:
A standard AbstractSystemSetup with TYPE.PROJECT is typically used for data that can be re-imported or should be refreshed during every system update. It does not natively provide the "execute only once" tracking logic that the Patches framework offers.
Option D:
Manual imports are prone to human error and are not scalable for managing multiple environments. They fail to meet the requirement of a professional "recommended approach" for a live solution where automation and audit trails are critical.
References
SAP Help Portal: Hooks for System Initialization and Update – Documentation on AbstractPatchesSystemSetup.
Which of the following items are configured via a direct relation to a BaseStore? Note: There are 3 correct answers to this question.
A. A list of Content Catalogs providing the pages, slots, and other CMSItems shown to Customers
B. A list of Product Catalogs providing the product info shown to Customers
C. A list of customers associated with the BaseStore.
D. A list of warehouses that support the delivery
E. A list of points of service that represent local branches
D. A list of warehouses that support the delivery
E. A list of points of service that represent local branches
Explanation:
In the SAP Commerce Cloud type system, the BaseStore acts as the central hub for physical and logical store configuration. The relationship between these items is defined directly in the BaseStore item type.
B (Product Catalogs):
The BaseStore contains a direct attribute productCatalogs (a list of CatalogModel). This defines which products are available for purchase within that specific store context.
D (Warehouses):
The BaseStore has a direct warehouses attribute. This is critical for the Sourcing and Availability logic, as it tells the engine which inventory locations can fulfill orders for that store.
E (Points of Service):
The BaseStore maintains a direct relation to PointOfServiceModel (PoS). This is used to define physical locations, such as brick-and-mortar stores, for "Buy Online, Pick Up In Store" (BOPIS) functionality.
Why Other Options are Incorrect
Option A (Content Catalogs):
This is a common point of confusion. Content Catalogs are actually linked to the CMSSite, not the BaseStore. While a CMSSite points to a BaseStore, the "pages, slots, and CMSItems" belong to the site's configuration.
Option C (Customers):
Customers (Users) are not directly listed on the BaseStore. Instead, a Customer may have a defaultPaymentAddress or defaultDeliveryAddress, and their orders are linked to a BaseStore, but there is no "List of Customers" attribute on the BaseStore model itself.
References
SAP Help Portal: BaseStore Documentation – Details the attributes of the BaseStore item type.
Which features does the Cloud Hot Folders module support? Note: There are 2 correct answers to this question.
A. Direct configuration of Hot Folders in the Cloud Portal
B. Media using external URLs in uploaded ImpEx
C. Zip archives with Impex, media and CSV files
D. Data export into Azure Blob storage.
C. Zip archives with Impex, media and CSV files
Explanation:
The Cloud Hot Folders module is an extension of the traditional Platform Hot Folders, optimized for the SAP Commerce Cloud (CCv2) infrastructure. It is designed to ingest data from Azure Blob Storage rather than a local file system.
B (Media using external URLs):
Cloud Hot Folders support a specialized channel for remote media. By using the url_media prefix or specific converter mappings, you can import ImpEx files that reference external URLs. This allows the system to associate products with images hosted on third-party CDNs or external servers without needing to upload the physical binary files to the hot folder.
C (Zip archives):
A core feature of the cloudhotfolder extension is the Unzip Channel. Unlike standard hot folders that primarily process individual CSVs, Cloud Hot Folders can process a single .zip file containing a mix of ImpEx scripts, CSV data, and media files. The engine automatically extracts the archive and processes the contents based on defined patterns.
Why Other Options are Incorrect
Option A:
While you can view storage credentials and regenerate access keys in the Cloud Portal, you cannot "directly configure" the Hot Folder logic (like mappings or transformation beans) there. Configuration is done via Spring XML files (e.g., cloudhotfolder-spring.xml) and properties in your manifest.json.
Option D:
Cloud Hot Folders are an inbound integration tool. They are designed to pull data from Azure Blob Storage into SAP Commerce. Exporting data out to Azure storage is typically handled by the Integration API, custom CronJobs, or the Azure Cloud Storage extension, but it is not a feature of the Hot Folders module itself.
References
SAP Help Portal: Cloud Hot Folders – Overview of the architecture and supported file patterns.
What must you always specify when you are creating a new Adaptive Search Profile? Note: There are 3 correct answers to this question.
A. Category
B. Index configuration
C. Index type
D. User
E. Catalog version
C. Index type
E. Catalog version
Explanation:
In SAP Commerce Cloud, an Adaptive Search Profile is a set of configurations that determines how search results are boosted, hidden, or promoted. To create a valid profile, the system must know exactly which search index and data set the rules should apply to.
B (Index configuration):
The profile must be linked to a specific Solr Index Configuration (e.g., default or electronics). This tells the system which physical Solr server and core settings to use.
C (Index type):
You must specify the Indexed Type (e.g., Product). This defines the specific item type being searched and ensures the profile can access the correct indexed properties (facets and attributes).
E (Catalog version):
Search profiles are context-aware. You must specify a Catalog Version (e.g., electronicsProductCatalog:Online) because search results and their relevance are scoped to the specific products available in that version.
Why Other Options are Incorrect
Option A (Category):
While you can create a category-aware profile (to have different search rules for "Cameras" vs. "Laptops"), it is not mandatory. You can create a "Global" profile that applies to the entire index without specifying a category.
Option D (User):
Similar to categories, you can define profiles for specific User Groups (personalization), but this is an optional feature. A profile does not "always" require a user assignment to function.
References
SAP Help Portal: Adaptive Search Module – Outlines the mandatory fields for creating a AsSearchProfile.
You are running a transaction that creates an item and updates it twice. If the transaction is committed successfully, how many AfterSaveEvent items will the ServiceLayer create?
A. 1
C. 3
D. 2
Explanation:
In SAP Commerce, when multiple operations are performed on the same item within a single transaction, the ServiceLayer aggregates these operations and generates only one AfterSaveEvent after successful commit
Why Other Options Are Incorrect:
Option C (3) is incorrect because it assumes each database operation generates a separate event. However, the AfterSaveEvent mechanism aggregates operations on the same item within a transaction, firing only one event representing the net effect .
Option D (2) is incorrect because it fails to account for aggregation rules. Even with multiple operations, only a single event is produced .
References:
SAP Commerce Javadoc: AfterSaveEvent class documentation
How many category items will the following ImpEx create?
$prodCat=electronicsProductCatalog
$version=Staged
$catVersion=catalogVersion(catalog(id[default=$prodCat]),version[default=$version])
INSERT_UPDATE Category;code[unique=true];$catVersion[unique=true]
;test_category;electronicsProductCatalog
;test_category;apparelProductCatalog:$version
;test_category;:Online
;test_category;
A. 1
B. 3
C. 4
D. 2
Explanation:
To determine the final count, we must analyze the uniqueness of each row. In this ImpEx, a Category is defined as unique based on the combination of its code AND its $catVersion.
Why Other Options are Incorrect
Option A (1):
This would only be true if the catalogVersion was not marked as [unique=true], causing the system to only look at the code.
Option C (4):
This is a common trap. While there are four data rows, rows 1 and 4 resolve to the identical code and catalogVersion combination. INSERT_UPDATE prevents the creation of a fourth item.
Option D (2):
This ignores the fact that the apparelProductCatalog and the Online version of the electronics catalog are distinct entities from the initial Staged version.
References
SAP Help Portal: ImpEx Syntax – Documentation on how header defaults (default=...) and macros ($...) are processed in data rows.
| Page 1 out of 12 Pages |
Exam-Focused P_C4H340_34 SAP Certified Development Professional - SAP Commerce Cloud Developer Practice Questions
Proven Results
Commerce Cloud development requires both coding skills and platform knowledge. P_C4H340_34 practice exam challenged me on accelerators, customization, and integrations. The developer-level questions were spot-on and prepared me perfectly for the exam.
Michael Thompson, Commerce Cloud Developer | New York, NY