All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.sdk.s4hana.datamodel.bapi.services.DefaultAccountingManualCostAllocationService Maven / Gradle / Ivy

/*
 * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
 */

package com.sap.cloud.sdk.s4hana.datamodel.bapi.services;

import javax.annotation.Nonnull;
import javax.inject.Named;

import com.google.common.collect.Lists;
import com.sap.cloud.sdk.s4hana.datamodel.bapi.functions.AcctngManCostAllocCheckFunction;
import com.sap.cloud.sdk.s4hana.datamodel.bapi.functions.AcctngManCostAllocPostFunction;
import com.sap.cloud.sdk.s4hana.datamodel.bapi.functions.DefaultAcctngManCostAllocCheckFunction;
import com.sap.cloud.sdk.s4hana.datamodel.bapi.functions.DefaultAcctngManCostAllocPostFunction;
import com.sap.cloud.sdk.s4hana.datamodel.bapi.structures.DocumentHeaderPostCostsRevenuesActualPostings;
import com.sap.cloud.sdk.s4hana.datamodel.bapi.structures.LineItemsManualCostAllocationActualPosting;

/**
 * Accounting Manual Cost Allocation
 * 
 *  Business Object: BUS6036
 * 
* * @see AccountingManualCostAllocationService * */ @Named public class DefaultAccountingManualCostAllocationService implements AccountingManualCostAllocationService { /** * {@inheritDoc} * */ @Override public AcctngManCostAllocCheckFunction check( @Nonnull final DocumentHeaderPostCostsRevenuesActualPostings docHeader, @Nonnull final Iterable docItems) { return new DefaultAcctngManCostAllocCheckFunction(docHeader, docItems); } /** * {@inheritDoc} * */ @Override public AcctngManCostAllocCheckFunction check( @Nonnull final DocumentHeaderPostCostsRevenuesActualPostings docHeader, LineItemsManualCostAllocationActualPosting... docItems) { if (docItems.length< 1) { throw new IllegalArgumentException("Parameter \"docItems\" needs to have at least one value."); } return new DefaultAcctngManCostAllocCheckFunction(docHeader, Lists.newArrayList(docItems)); } /** * {@inheritDoc} * */ @Override public AcctngManCostAllocPostFunction post( @Nonnull final DocumentHeaderPostCostsRevenuesActualPostings docHeader, @Nonnull final Iterable docItems) { return new DefaultAcctngManCostAllocPostFunction(docHeader, docItems); } /** * {@inheritDoc} * */ @Override public AcctngManCostAllocPostFunction post( @Nonnull final DocumentHeaderPostCostsRevenuesActualPostings docHeader, LineItemsManualCostAllocationActualPosting... docItems) { if (docItems.length< 1) { throw new IllegalArgumentException("Parameter \"docItems\" needs to have at least one value."); } return new DefaultAcctngManCostAllocPostFunction(docHeader, Lists.newArrayList(docItems)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy