
com.sap.cloud.sdk.s4hana.datamodel.bapi.structures.AddContractAccountsRecievableAndPayableHeaderLine Maven / Gradle / Ivy
/*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.s4hana.datamodel.bapi.structures;
import javax.annotation.Nullable;
import com.sap.cloud.sdk.result.ElementName;
import lombok.Builder;
import lombok.Data;
/**
* Add. Contract Accounts Recievable and Payable Header Line
*
* Structure: BAPIACCAHD
*
*
*/
@Builder
@Data
public class AddContractAccountsRecievableAndPayableHeaderLine {
/**
* Field name: DOC_NO
*
* Type element: ACPI_DOC_NO
* Domain name: CHAR12
* Internal type: CHAR
* Description: FI CA: External Document Number for Contract AP/AR
* Max length: 12
*
*
*/
@ElementName("DOC_NO")
@Nullable
private String docNo;
/**
* Field name: DOC_TYPE_CA
*
* Type element: ACPI_DOC_TYPE_CA
* Domain name: CHAR2
* Internal type: CHAR
* Description: FI-CA: Doc.Type for Contract Accounts Receivable and Payable
* Max length: 2
*
*
*/
@ElementName("DOC_TYPE_CA")
@Nullable
private String docTypeCa;
/**
* Field name: FIKEY
*
* Type element: ACPI_FIKEY
* Domain name: CHAR12
* Internal type: CHAR
* Description: FI-CA: Reconciliation Key for General Ledger Accounting
* Max length: 12
*
*
*/
@ElementName("FIKEY")
@Nullable
private String fikey;
/**
* Field name: PAYMENT_FORM_REF
*
* Type element: ACPI_PMNT_FORM_REF
* Domain name: CHAR30
* Internal type: CHAR
* Description: FI-CA: Payment Form Reference
* Max length: 30
*
*
*/
@ElementName("PAYMENT_FORM_REF")
@Nullable
private String paymentFormRef;
/**
* Field name: RES_KEY
*
* Type element: ACPI_RES_KEY
* Domain name: CHAR30
* Internal type: CHAR
* Description: FI-CA: Reservation Key
* Max length: 30
*
*
*/
@ElementName("RES_KEY")
@Nullable
private String resKey;
public void validate()
throws IllegalArgumentException
{
if ((docNo!= null)&&(docNo.length()> 12)) {
throw new IllegalArgumentException("Bapi method parameter \"docNo\" contains an invalid structure. Structure attribute \"DOC_NO\" / Function parameter \"docNo\" must have at most 12 characters. The given value is too long.");
}
if ((docTypeCa!= null)&&(docTypeCa.length()> 2)) {
throw new IllegalArgumentException("Bapi method parameter \"docTypeCa\" contains an invalid structure. Structure attribute \"DOC_TYPE_CA\" / Function parameter \"docTypeCa\" must have at most 2 characters. The given value is too long.");
}
if ((fikey!= null)&&(fikey.length()> 12)) {
throw new IllegalArgumentException("Bapi method parameter \"fikey\" contains an invalid structure. Structure attribute \"FIKEY\" / Function parameter \"fikey\" must have at most 12 characters. The given value is too long.");
}
if ((paymentFormRef!= null)&&(paymentFormRef.length()> 30)) {
throw new IllegalArgumentException("Bapi method parameter \"paymentFormRef\" contains an invalid structure. Structure attribute \"PAYMENT_FORM_REF\" / Function parameter \"paymentFormRef\" must have at most 30 characters. The given value is too long.");
}
if ((resKey!= null)&&(resKey.length()> 30)) {
throw new IllegalArgumentException("Bapi method parameter \"resKey\" contains an invalid structure. Structure attribute \"RES_KEY\" / Function parameter \"resKey\" must have at most 30 characters. The given value is too long.");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy