cancel
Showing results for 
Search instead for 
Did you mean: 

why do we use getExtensionData()

Former Member
0 Kudos

Can anybody tell me what we are doing here...

String totalDueStr = (String)headersalesdocument.getExtensionData("ZZTOTAL_DUE");

Why do we use getExtensionData().

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please could you clarify what type "headersalesdocument" is?

There's no value in a code sample without giving us a clue what classes are being used. Some context to your problem is also crucial.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks I got it

MartinDreier
Explorer
0 Kudos

Hi Arshi,

first of all, please do not post copyrighted material to this forum, e.g. SAP owned code. This is laid down in the forum rules.

Regarding your question, the extension data is data transmitted via a function module call from the backend. It's a structure which can contain any information you may need from the backend. The one you mention here is probably from the call to the function module CRM_ISA_BASKET_GET, table parameter HEADER_EXTENSION. You could e.g. fill it in the BADI CRM_ISA_BADI_HEAD, method GETHEAD_FROM_IL, which is called from the function module CRM_ISA_BASKET_GETHEAD. Which data is transmitted there is totally implementation specific, so I cannot give you any more information. I recommend that you check the BADI I mentioned above.

Best regards,

Martin

Former Member
0 Kudos

Headersalesdocument

/*****************************************************************************

Class: HeaderSalesDocument

Copyright (c) 2001, SAP AG, All rights reserved.

Author: SAP AG

Created: 11.4.2001

Version: 1.0

$Revision: #12 $

$Date: 2003/01/02 $

*****************************************************************************/

package com.sapmarkets.isa.businessobject.header;

import java.util.ArrayList;

import java.util.List;

import com.sapmarkets.isa.backend.boi.isacore.ConnectedDocumentData;

import com.sapmarkets.isa.backend.boi.isacore.ShipToData;

import com.sapmarkets.isa.backend.boi.isacore.ShopData;

import com.sapmarkets.isa.backend.boi.isacore.order.HeaderData;

import com.sapmarkets.isa.backend.boi.isacore.order.PartnerListData;

import com.sapmarkets.isa.backend.boi.isacore.order.PaymentData;

import com.sapmarkets.isa.backend.boi.isacore.order.PaymentTypeData;

import com.sapmarkets.isa.backend.boi.isacore.order.TextData;

import com.sapmarkets.isa.businessobject.BusinessObjectBase;

import com.sapmarkets.isa.businessobject.ConnectedDocument;

import com.sapmarkets.isa.businessobject.ShipTo;

import com.sapmarkets.isa.businessobject.Shop;

import com.sapmarkets.isa.businessobject.order.PartnerList;

import com.sapmarkets.isa.businessobject.order.PartnerListEntry;

import com.sapmarkets.isa.businessobject.order.Payment;

import com.sapmarkets.isa.businessobject.order.PaymentType;

import com.sapmarkets.isa.businessobject.order.Text;

import com.sapmarkets.isa.core.TechKey;

/**

  • Common Header Information for all objects of the bo layer that are considered

  • to be sales documents.

*

  • @author SAP AG

  • @version 1.0

*/

public class HeaderSalesDocument extends BusinessObjectBase

implements HeaderData, Cloneable {

/**

  • Constant defining a document that is in the completion status OPEN.

*/

public static final String DOCUMENT_COMPLETION_STATUS_OPEN = "open";

/**

  • Constant defining a document that is in the completion status COMPLETED.

*/

public static final String DOCUMENT_COMPLETION_STATUS_COMPLETED = "completed";

/**

  • Constant defining a document that is in the completion status PARTLY_DELIVERED.

*/

public static final String DOCUMENT_COMPLETION_STATUS_PARTLY_DELIVERED = "partlydelivered";

/**

  • Constant defining a document that is in the completion status CANCELLED.

*/

public static final String DOCUMENT_COMPLETION_STATUS_CANCELLED = "cancelled";

/**

  • Constant defining a document that is in the completion status INPROCESS.

*/

public static final String DOCUMENT_COMPLETION_STATUS_INPROCESS = "inprocess";

/**

  • Constant defining a document that is in the completion status ACCEPTED.

*/

public static final String DOCUMENT_COMPLETION_STATUS_ACCEPTED = "accepted";

/**

  • Constant defining a document that is in the completion status RELEASED.

*/

public static final String DOCUMENT_COMPLETION_STATUS_RELEASED = "released";

/**

  • Constant defining a document that is in the completion status INQUIRYSENT.

*/

public static final String DOCUMENT_COMPLETION_STATUS_INQUIRYSENT = "inquirysent";

/**

  • Constant defining a document that is in the completion status QUOTATION.

*/

public static final String DOCUMENT_COMPLETION_STATUS_QUOTATION = "quotation";

/**

  • Constant defining a document that is in the completion status REJECTED.

*/

public static final String DOCUMENT_COMPLETION_STATUS_REJECTED = "rejected";

/**

  • Constant defining a document that is in the completion status READY TO

  • PICKUP

*/

public static final String DOCUMENT_COMPLETION_STATUS_READY_TO_PICKUP = "readytopick";

private boolean changeable; // Document changeable in general (R/3 documents are not changeable yet)

private String changedAt;

private String createdAt;

private String currency;

private String description;

private String division;

private String disChannel;

protected String documentType;

private String freightValue;

private String grossValue;

private String netValue;

private String netValueWOFreight;

protected PartnerList partnerList = new PartnerList();

private String processType;

private String processTypeDesc;

private String salesDocNumber;

private String purchaseOrderExt;

private String postingDate;

private String salesDocumentsOrigin;

private String salesOrg;

private String salesOffice;

private String reqDeliveryDate;

private Shop shop;

private String shipCond;

private String status;

private String taxValue;

private Text text;

private Text textHistory;

private String validTo;

private ShipTo shipTo;

private boolean purchaseOrderChangeable;

private boolean purchaseOrderExtChangeable;

private boolean quotationExtended;

private boolean salesOrgChangeable;

private boolean salesOfficeChangeable;

private boolean reqDeliveryDateChangeable;

private boolean shipCondChangeable;

private boolean descriptionChangeable;

private String ipcHost;

private String ipcPort;

private String ipcSession;

private String ipcClient;

private TechKey ipcDocumentId;

private Payment payment;

private String statusDelivery;

private ArrayList predecessorList = new ArrayList();

private ArrayList successorList = new ArrayList();

protected boolean isDirty = false; // must header be read from backend ?

/**

  • Drops the state of the object. All reference fields, except partnerList, are

  • set to null, all primitive types are set to the default values they would have

  • after the creation of a new instance. Use this method to reset the state to the

  • state a newly created object would have. The advantage is, that the

  • overhead caused by the normal object creation is omitted.

*/

public void clear() {

changedAt = null;

createdAt = null;

currency = null;

description = null;

division = null;

disChannel = null;

documentType = null;

freightValue = null;

grossValue = null;

netValue = null;

partnerList.clearList();

processType = null;

salesDocNumber = null;

purchaseOrderExt = null;

postingDate = null;

salesDocumentsOrigin = null;

salesOrg = null;

salesOffice = null;

reqDeliveryDate = null;

shop = null;

shipCond = null;

status = null;

statusDelivery = null;

taxValue = null;

text = null;

// techKey = null;

validTo = null;

shipTo = null;

ipcHost = null;

ipcPort = null;

ipcSession = null;

ipcClient = null;

ipcDocumentId = null;

payment = null;

purchaseOrderChangeable = false;

purchaseOrderExtChangeable = false;

quotationExtended = false;

salesOrgChangeable = false;

salesOfficeChangeable = false;

reqDeliveryDateChangeable = false;

shipCondChangeable = false;

descriptionChangeable = false;

changeable = false;

removeExtensionDataValues();

predecessorList.clear();

successorList.clear();

isDirty = true;

}

/**

  • Creates a new <code>Text</code> object casted to the backend enabled

  • <code>TextData</code> interface. This method is normally only used

  • by backend implementations as a factory method to get instances of

  • business objects.

*

  • @return a newly created <code>Text</code> object

*/

public TextData createText() {

return (TextData) new Text();

}

/**

  • Get the host the IPC runs on.

*

  • @return hostname of the host the IPC runs on

*/

public String getIpcHost() {

return ipcHost;

}

/**

  • Sets the host the IPC runs on.

*

  • @param ipcHost the hostname of the ipc host

*/

public void setIpcHost(String ipcHost) {

this.ipcHost = ipcHost;

}

/**

  • Get an identifier for the current IPC session.

*

  • @return identifier for the current IPC session

*/

public String getIpcSession() {

return ipcSession;

}

/**

  • Sets the identifier for the current IPC session.

*

  • @param ipcSession the identifier for the current IPC session to be set

*/

public void setIpcSession(String ipcSession) {

this.ipcSession = ipcSession;

}

/**

  • Get the port number of the IPC server.

*

  • @return the port number of the IPC server

*/

public String getIpcPort() {

return ipcPort;

}

/**

  • Set the port number of the ipc server.

*

  • @param ipcPort the port number of the IPC server to be set

*/

public void setIpcPort(String ipcPort) {

this.ipcPort = ipcPort;

}

/**

  • Get the IPC client.

*

  • @return the IPC client

*/

public String getIpcClient() {

return ipcClient;

}

/**

  • Set the IPC client.

*

  • @param ipcClient the IPC client to be set

*/

public void setIpcClient(String ipcClient) {

this.ipcClient = ipcClient;

}

/**

  • Get the IPC document id.

*

  • @return the IPC document id

*/

public TechKey getIpcDocumentId() {

return ipcDocumentId;

}

/**

  • Set the IPC document id.

*

  • @param ipcDocumentId the IPC document id to be set

*/

public void setIpcDocumentId(TechKey ipcDocumentId) {

this.ipcDocumentId = ipcDocumentId;

}

/**

  • Get the requested delivery date.

*

  • @return the requestet delivery date

*/

public String getReqDeliveryDate() {

return reqDeliveryDate;

}

/**

  • Set the requested delivery date.

*

  • @param reqDeliveryDate the requested delivery date to be set.

*/

public void setReqDeliveryDate(String reqDeliveryDate) {

this.reqDeliveryDate = reqDeliveryDate;

}

/**

  • Get the business partner list

*

  • @return PartnerList list of business partners

*/

public PartnerList getPartnerList() {

return partnerList;

}

/**

  • Set the business partner list

*

  • @param PartnerList new list of business partners

*/

public void setPartnerList(PartnerList partnerList) {

this.partnerList = partnerList;

}

/**

  • Get the business partner list

*

  • @return PartnerListData list of business partners

*/

public PartnerListData getPartnerListData() {

return partnerList;

}

/**

  • Sets the business partner list.

*

  • @param list list of business partners

*/

public void setPartnerListData(PartnerListData list) {

partnerList = (PartnerList) list;

}

/**

  • Get the date, the document was changed the last time.

*

  • @return the date, the document was changed the last time

*/

public String getChangedAt() {

return changedAt;

}

/**

  • Set the date, the document was changed the last time.

*

  • @param changedAt the date, the document was changed the last time

*/

public void setChangedAt(String changedAt){

this.changedAt = changedAt;

}

/**

  • Get the date, the document was created.

*

  • @return date, the document was created

*/

public String getCreatedAt() {

return createdAt;

}

/**

  • Set the date, the document was cerated.

*

  • @param createdAt the date, the document was cerated

*/

public void setCreatedAt(String createdAt){

this.createdAt = createdAt;

}

/**

  • Get the currency used for this document.

*

  • @return the currency used for this document

*/

public String getCurrency(){

return currency;

}

/**

  • Set the currency used for this document.

*

  • @param currency the currency used for this document

*/

public void setCurrency(String currency){

this.currency = currency;

}

/**

  • Get description added on the header level.

*

  • @return description

*/

public String getDescription(){

return description;

}

/**

  • Sets the description on the header level.

*

  • @param description the description

*/

public void setDescription(String description){

this.description = description;

}

/**

  • Get the devision.

*

  • @return the devision

*/

public String getDivision(){

return division;

}

/**

  • Set the devision.

*

  • @param devision the devision to be set

*/

public void setDivision(String division){

this.division = division;

}

/**

  • Get the distribution channel.

*

  • @return distribution channel

*/

public String getDisChannel(){

return disChannel;

}

/**

  • Set the distribution channel.

*

  • @param disChannel the distribution channel to be set

*/

public void setDisChannel(String disChannel){

this.disChannel = disChannel;

}

/**

  • Get the price for the freigth of the order.

*

  • @return the price for the freight of the

*/

public String getFreightValue(){

return freightValue;

}

/**

  • Set the price for the freight of the order.

*

  • @param freightValue the price for the freight

*/

public void setFreightValue(String freightValue){

this.freightValue = freightValue;

}

/**

  • Get the price including all taxes but not the freight.

*

  • @return the value

*/

public String getGrossValue(){

return grossValue;

}

/**

  • Set the price including all taxes but not the freight.

*

  • @param grossValue the price to be set

*/

public void setGrossValue(String grossValue){

this.grossValue = grossValue;

}

/**

  • Get the net price

*

  • @return the price

*/

public String getNetValue(){

return netValue;

}

/**

  • Set the net price

*

  • @param netValue the price to be set

*/

public void setNetValue(String netValue){

this.netValue = netValue;

}

/**

  • Get the net price without freight.

*

  • @return the price

*/

public String getNetValueWOFreight(){

return netValueWOFreight;

}

/**

  • Set the net price without freight.

*

  • @param netValue the price to be set

*/

public void setNetValueWOFreight(String netValueWOFreight){

this.netValueWOFreight = netValueWOFreight;

}

/**

  • Get the process type of the document.

*

  • @return process type

*/

public String getProcessType(){

return processType;

}

/**

  • Set the process type of the document.

*

  • @param processType the process type to be set

*/

public void setProcessType(String processType){

this.processType = processType;

}

/**

  • Get the number of the sales document the header belongs to.

*

  • @return the number of the sales document

*/

public String getSalesDocNumber(){

return salesDocNumber;

}

/**

  • Set the number of the sales document the header belongs to.

*

  • @param salesDocNumber the number of the sales document

*/

public void setSalesDocNumber(String salesDocNumber){

this.salesDocNumber = salesDocNumber;

}

/**

  • Get the external pruchase order number.

*

  • @return the purchase order number

*/

public String getPurchaseOrderExt(){

return purchaseOrderExt;

}

/**

  • Set the external purchase order number.

*

  • @param purchaseOrderExt the number to be set

*/

public void setPurchaseOrderExt(String purchaseOrderExt){

this.purchaseOrderExt = purchaseOrderExt;

}

/**

  • Get the date the order was created from the customer's point of view.

*

  • @return the posting date

*/

public String getPostingDate(){

return postingDate;

}

/**

  • Set the date the order was created from the customer's point of view.

*

  • @param postingData the date to be set

*/

public void setPostingDate(String postingDate){

this.postingDate = postingDate;

}

/**

  • Get the sales organization for the document.

*

  • @return the sales organization

*/

public String getSalesOrg(){

return salesOrg;

}

/**

  • Set the sales organization for the document.

*

  • @param salesOrg the sales organization.

*/

public void setSalesOrg(String salesOrg){

this.salesOrg = salesOrg;

}

/**

  • Get the sales office.

*

  • @return the sales office

*/

public String getSalesOffice(){

return salesOffice;

}

/**

  • Set the sales office.

*

  • @param salesOffice the sales office

*/

public void setSalesOffice(String salesOffice){

this.salesOffice = salesOffice;

}

/**

  • Get the shop the document belongs to.

*

  • @return the shop

*/

public ShopData getShop(){

return (ShopData)shop;

}

/**

  • Set the shop the document belongs to.

*

  • @param shop the shop to be set

*/

public void setShop(ShopData shop){

this.shop = (Shop)shop;

}

/**

  • Get the shipping conditions for the document.

*

  • @return the shipping conditions

*/

public String getShipCond(){

return shipCond;

}

/**

  • Set the shipping conditions for the document.

*

  • @param shipCond the shipping conditions

*/

public void setShipCond(String shipCond){

this.shipCond = shipCond;

}

/**

  • Get the taxes that have to be paid for the document.

*

  • @return the taxes

*/

public String getTaxValue(){

return taxValue;

}

/**

  • Set the taxes that have to be paid for the document.

*

  • @param taxValue the taxes to be set

*/

public void setTaxValue(String taxValue){

this.taxValue = taxValue;

}

/**

  • Get text on the header level of the document.

*

  • @return the text

*/

public TextData getText() {

return text;

}

/**

  • Set the text on the header level of the document.

*

  • @param text the text to be set

*/

public void setText(TextData text) {

this.text = (Text) text;

}

/**

  • Get text history on the header level of the document.

*

  • @return the text history

*/

public TextData getTextHistory() {

return textHistory;

}

/**

  • Set the text history on the header level of the document.

*

  • @param text the text history to be set

*/

public void setTextHistory(TextData text) {

this.textHistory = (Text) text;

}

/**

  • Get the date, the document is valid to.

*

  • @return the date

*/

public String getValidTo(){

return validTo;

}

/**

  • Set the date, the document is valid to.

*

  • @param validTo the date to be set

*/

public void setValidTo(String validTo){

this.validTo = validTo;

}

/**

  • Check whether or not the document is changeable.

*

  • @return <code>true</code> if the document is changeable,

  • otherwise <code>false</code>.

*/

public boolean isChangeable(){

return changeable;

}

/**

  • Set whether or not the document is changeable using a String parameter.

*

  • @param changeable <code>" "</code> or <code>""</code> indicates that the

  • document is changeable, all other values that it is

  • changeable.

*/

public void setChangeable(String changeable){

if (changeable.equals("") || changeable.equals(" ")) {

this.changeable = false;

} else {

this.changeable = true;

}

}

/**

  • Set whether or not the document is changeable.

*

  • @param changeable <code>true</code> indicates that the document is changeable,

  • <code>false</code> indicates that it is not.

*/

public void setChangeable(boolean changeable){

this.changeable = changeable;

}

/**

  • Sets all changeable flags for the different fields of the header in

  • on step.

*

  • @param purchaseOrderChangeable <code>true</code> indicates that the

  • purchase order information is changeable

  • @param purchaseOrderExtChangeable <code>true</code> indicates that the

  • external purchase order information is changeable

  • @param salesOrgChangeable <code>true</code> indicates that the

  • sales organization information is changeable

  • @param salesOfficeChangeable <code>true</code> indicates that the

  • sales office information is changeable

  • @param reqDeliveryDateChangeable <code>true</code> indicates that the

  • requested delivery date is changeable

  • @param shipCondChangeable <code>true</code> indicates that the

  • shipping conditions are changeable

  • @param descriptionChangeable <code>true</code> indicates that the

  • description is changeable

*/

public void setAllValuesChangeable(

boolean purchaseOrderChangeable,

boolean purchaseOrderExtChangeable,

boolean salesOrgChangeable,

boolean salesOfficeChangeable,

boolean reqDeliveryDateChangeable,

boolean shipCondChangeable,

boolean descriptionChangeable) {

this.purchaseOrderChangeable = purchaseOrderChangeable;

this.purchaseOrderExtChangeable = purchaseOrderExtChangeable;

this.salesOrgChangeable = salesOrgChangeable;

this.salesOfficeChangeable = salesOfficeChangeable;

this.reqDeliveryDateChangeable = reqDeliveryDateChangeable;

this.shipCondChangeable = shipCondChangeable;

this.descriptionChangeable = descriptionChangeable;

}

/**

  • Checks whether or not the purchase order information is changeable.

*

  • @return <code>true</code> indicates that the information is changeable,

  • <code>false</code> indicates that the information cannot be changed.

*/

public boolean isPurchaseOrderChangeable() {

return purchaseOrderChangeable;

}

/**

  • Checks whether or not the external purchase order information is changeable.

*

  • @return <code>true</code> indicates that the information is changeable,

  • <code>false</code> indicates that the information cannot be changed.

*/

public boolean isPurchaseOrderExtChangeable() {

return purchaseOrderExtChangeable;

}

/**

  • Checks whether or not the sales organisation is changeable.

*

  • @return <code>true</code> indicates that the information is changeable,

  • <code>false</code> indicates that the information cannot be changed.

*/

public boolean isSalesOrgChangeable() {

return salesOrgChangeable;

}

/**

  • Checks whether or not the sales office is changeable.

*

  • @return <code>true</code> indicates that the information is changeable,

  • <code>false</code> indicates that the information cannot be changed.

*/

public boolean isSalesOfficeChangeable() {

return salesOfficeChangeable;

}

/**

  • Checks whether or not the requested delivery date is changeable.

*

  • @return <code>true</code> indicates that the information is changeable,

  • <code>false</code> indicates that the information cannot be changed.

*/

public boolean isReqDeliveryDateChangeable() {

return reqDeliveryDateChangeable;

}

/**

  • Checks whether or not the description is changeable.

*

  • @return <code>true</code> indicates that the information is changeable,

  • <code>false</code> indicates that the information cannot be changed.

*/

public boolean isDescriptionChangeable() {

return descriptionChangeable;

}

/**

  • Checks whether or not the shipping condition is changeable.

*

  • @return <code>true</code> indicates that the information is changeable,

  • <code>false</code> indicates that the information cannot be changed.

*/

public boolean isShipCondChangeable() {

return shipCondChangeable;

}

/**

  • Get the origin of the sales document.

*

  • @return the origin of the sales document

*/

public String getSalesDocumentsOrigin(){

return salesDocumentsOrigin;

}

/**

  • Set the origin of the sales document.

*

  • @param salesDocOrigin the origin to be set

*/

public void setSalesDocumentsOrigin(String salesDocOrigin){

this.salesDocumentsOrigin = salesDocOrigin;

}

/**

  • Set the dirty flag

*

  • @param isDirty must the header be read from the backend true/false

*/

public void setDirty(boolean isDirty){

this.isDirty = isDirty;

}

/**

  • get the dirty flag

*

  • @return isDirty must the header be read from the backend true/false

*/

public boolean isDirty(){

return isDirty;

}

/**

  • Get OVERALL status. Might be different from DELIVERY status.

*

  • @return one of the possible status values represented by the constants

  • defined in this class with the names <code>DOCUMENT_COMPLETION_*</code>.

*/

public String getStatus() {

return status;

}

/**

  • Set OVERALL status to open

*/

public void setStatusOpen() {

status = DOCUMENT_COMPLETION_STATUS_OPEN;

}

/**

  • Set the status to whatever passed through

*/

public void setStatusOther(String status) {

this.status = status;

}

/**

  • Determines whether or not, the document's status is OPEN.

*

  • @return <code>true</code> if the object is in status OPEN, otherwise

  • <code>false</code>.

*/

public boolean isStatusOpen() {

return (status == DOCUMENT_COMPLETION_STATUS_OPEN);

}

/**

  • Set OVERALL status to completed

*/

public void setStatusCompleted() {

status = DOCUMENT_COMPLETION_STATUS_COMPLETED;

}

/**

  • Determines whether or not, the document's status is COMPLETED.

*

  • @return <code>true</code> if the object is in status COMPLETED, otherwise

  • <code>false</code>.

*/

public boolean isStatusCompleted() {

return (status == DOCUMENT_COMPLETION_STATUS_COMPLETED);

}

/**

  • Set OVERALL status to partly delivered

*/

public void setStatusPartlyDelivered() {

status = DOCUMENT_COMPLETION_STATUS_PARTLY_DELIVERED;

}

/**

  • Determines whether or not, the document's status is DELIVERED.

*

  • @return <code>true</code> if the object is in status DELIVERED, otherwise

  • <code>false</code>.

*/

public boolean isStatusPartlyDelivered() {

return (status == DOCUMENT_COMPLETION_STATUS_PARTLY_DELIVERED);

}

/**

  • Set OVERALL status to accepted

*/

public void setStatusAccepted() {

status = DOCUMENT_COMPLETION_STATUS_ACCEPTED;

}

/**

  • Set OVERALL status to Ready to Pickup

*/

public void setStatusReadyToPickup() {

status = DOCUMENT_COMPLETION_STATUS_READY_TO_PICKUP;

}

/**

  • Determines whether or not, the document's status is ACCEPTED.

*

  • @return <code>true</code> if the object is in status ACCEPTED, otherwise

  • <code>false</code>.

*/

public boolean isStatusAccepted() {

return (status == DOCUMENT_COMPLETION_STATUS_ACCEPTED);

}

/**

  • Set OVERALL status to released

*/

public void setStatusReleased() {

status = DOCUMENT_COMPLETION_STATUS_RELEASED;

}

/**

  • Determines whether or not, the document's status is RELEASED.

*

  • @return <code>true</code> if the object is in status RELEASED, otherwise

  • <code>false</code>.

*/

public boolean isStatusReleased() {

return (status == DOCUMENT_COMPLETION_STATUS_RELEASED);

}

/**

  • set OVERALL status to cancelled

*/

public void setStatusCancelled() {

status = DOCUMENT_COMPLETION_STATUS_CANCELLED;

}

/**

  • Determines whether or not, the document's status is CANCELLED.

*

  • @return <code>true</code> if the object is in status CANCELLED, otherwise

  • <code>false</code>.

*/

public boolean isStatusCancelled() {

return (status == DOCUMENT_COMPLETION_STATUS_CANCELLED);

}

/**

  • set OVERALL status to inquiry sent

*/

public void setStatusInquirySent() {

status = DOCUMENT_COMPLETION_STATUS_INQUIRYSENT;

}

/**

  • Determines whether or not, the document's status is INQUIRYSENT.

*

  • @return <code>true</code> if the object is in status INQUIRYSENT, otherwise

  • <code>false</code>.

*/

public boolean isStatusInquirySent() {

return (status == DOCUMENT_COMPLETION_STATUS_INQUIRYSENT);

}

/**

  • set OVERALL status to quotation

*/

public void setStatusQuotation() {

status = DOCUMENT_COMPLETION_STATUS_QUOTATION;

}

/**

  • Determines whether or not, the document's status is QUOTATION.

*

  • @return <code>true</code> if the object is in status QUOTATION, otherwise

  • <code>false</code>.

*/

public boolean isStatusQuotation() {

return (status == DOCUMENT_COMPLETION_STATUS_QUOTATION);

}

/**

  • set OVERALL status to rejected

*/

public void setStatusRejected() {

status = DOCUMENT_COMPLETION_STATUS_REJECTED;

}

/**

  • Determines whether or not, the document's status is REJECTED.

*

  • @return <code>true</code> if the object is in status REJECTED, otherwise

  • <code>false</code>.

*/

public boolean isStatusRejected() {

return (status == DOCUMENT_COMPLETION_STATUS_REJECTED);

}

/**

  • Get DELIVERY status. Might be different from OVERALL status.

*

  • @return one of the possible status values represented by the constants

  • defined in this class with the names <code>DOCUMENT_COMPLETION_*</code>.

*/

public String getDeliveryStatus(){

return statusDelivery;

}

/**

  • Set the DELIVERY status to open, represented by the constant .

*/

public void setDeliveryStatusOpen() {

statusDelivery = DOCUMENT_COMPLETION_STATUS_OPEN;

}

/**

  • Determines whether or not, the document's delivery status is OPEN.

*

  • @return <code>true</code> if the object is in status OPEN, otherwise

  • <code>false</code>.

*/

public boolean isDeliveryStatusOpen() {

return (statusDelivery == DOCUMENT_COMPLETION_STATUS_OPEN);

}

/**

  • Set DELIVERY status to completed.

*/

public void setDeliveryStatusCompleted() {

statusDelivery = DOCUMENT_COMPLETION_STATUS_COMPLETED;

}

/**

  • Determines whether or not, the document's delivery status is COMPLETED.

*

  • @return <code>true</code> if the object is in status COMPLETED, otherwise

  • <code>false</code>.

*/

public boolean isDeliveryStatusCompleted() {

return (statusDelivery == DOCUMENT_COMPLETION_STATUS_COMPLETED);

}

/**

  • Set DELIVERY status to in process

*/

public void setDeliveryStatusInProcess() {

statusDelivery = DOCUMENT_COMPLETION_STATUS_INPROCESS;

}

/**

  • Set status to in process

*/

public void setStatusInProcess() {

status = DOCUMENT_COMPLETION_STATUS_INPROCESS;

}

/**

  • Set status to in process

*/

public boolean isStatusInProcess() {

return (status == DOCUMENT_COMPLETION_STATUS_INPROCESS);

}

/**

  • Determines whether or not, the document's delivery status is INPROCESS.

*

  • @return <code>true</code> if the object is in status INPROCESS, otherwise

  • <code>false</code>.

*/

public boolean isDeliveryStatusInProcess() {

return (statusDelivery == DOCUMENT_COMPLETION_STATUS_COMPLETED);

}

/**

  • Returns the type of the document, the header belongs to.

*

  • @return the document type using one of the string constants defined in

  • this class: <code>DOCUMENT_TYPE_*</code>.

*/

public String getDocumentType() {

return documentType;

}

/**

  • Sets the document type to ORDER.

*/

public void setDocumentTypeOrder(){

documentType = DOCUMENT_TYPE_ORDER;

}

/**

  • Sets the document type to whatever passed through.

*/

public void setDocumentTypeOther(String documentType){

this.documentType = documentType;

}

/**

  • Sets the document type.

*/

public void setDocumentType(String documentType){

this.documentType = documentType;

}

/**

  • Determines whether or not, the document's type is ORDER.

*

  • @return <code>true</code> if the type is ORDER, otherwise

  • <code>false</code>.

*/

public boolean isDocumentTypeOrder() {

return (documentType == DOCUMENT_TYPE_ORDER);

}

/**

  • Sets the document type to COLLECTIVE ORDER.

*/

public void setDocumentTypeCollectiveOrder(){

documentType = DOCUMENT_TYPE_COLLECTIVE_ORDER;

}

/**

  • Determines whether or not, the document's type is COLLECTIVE ORDER.

*

  • @return <code>true</code> if the type is COLLECTIVE ORDER, otherwise

  • <code>false</code>.

*/

public boolean isDocumentTypeCollectiveOrder() {

return (documentType == DOCUMENT_TYPE_COLLECTIVE_ORDER);

}

/**

  • Sets the document type to ORDERTEMPLATE.

*/

public void setDocumentTypeOrderTemplate(){

documentType = DOCUMENT_TYPE_ORDERTEMPLATE;

}

/**

  • Determines whether or not, the document's type is ORDERTEMPLATE.

*

  • @return <code>true</code> if the type is ORDERTEMPLATE, otherwise

  • <code>false</code>.

*/

public boolean isDocumentTypeOrderTemplate() {

return (documentType == DOCUMENT_TYPE_ORDERTEMPLATE);

}

/**

  • Sets the document type to QUOTATION.

*/

public void setDocumentTypeQuotation(){

documentType = DOCUMENT_TYPE_QUOTATION;

}

/**

  • Determines whether or not, the document's type is QUOTATION.

*

  • @return <code>true</code> if the type is QUOTATION, otherwise

  • <code>false</code>.

*/

public boolean isDocumentTypeQuotation() {

return (documentType == DOCUMENT_TYPE_QUOTATION);

}

/**

  • Sets the default ship to for the header. This ship to is used, if

  • no special information is set at the item level.

*

  • @param shipTo The ship to, to be set

*/

public void setShipTo(ShipTo shipTo) {

this.shipTo = shipTo;

}

/**

  • Sets the default ship to for the header. This ship to is used, if

  • no special information is set at the item level.

*

  • @param shipTo The ship to, to be set

*/

public void setShipTo(ShipToData shipTo) {

this.shipTo = (ShipTo) shipTo;

}

/**

  • Returns the ship to for the header. This ship to is used, if

  • no special information is set at the item level.

*

  • @return The ship to for the header

*/

public ShipTo getShipTo() {

return shipTo;

}

/**

  • Get the ship to information as an backend layer interface.

*

  • @return the ship to information

*/

public ShipToData getShipToData() {

return shipTo;

}

/**

  • Set the ship to information using the backend layer interface.

*

  • @param shipToLine the ship to to be set

*/

public void setShipToData(ShipToData shipToLine) {

this.shipTo = (ShipTo) shipToLine;

}

/**

  • Get the payment information using the backend interface.

*

  • @return payment information

*/

public PaymentData getPaymentData() {

return payment;

}

/**

  • Returns the payment information using the backend interface.

  • If no payment object exists, a new one is created.

*

  • @return payment information

*/

public PaymentData createPaymentData() {

if (payment == null) {

payment = new Payment();

}

return payment;

}

/**

  • Creates a new PaymentTypeData object

  • @return new PaymentTypeData object

*/

public PaymentTypeData createPaymentTypeData(){

return new PaymentType();

}

/**

  • Set the payment information using the backend interface

*

  • @param payment the payment information to be set

*/

public void setPaymentData(PaymentData payment) {

this.payment = (Payment) payment;

}

/**

  • Characterizes an extended QUOTATION.

*/

public void setQuotationExtended() {

quotationExtended = true;

}

/**

  • Determines whether or not, a QUOTATION is extended.

*

  • @return <code>true</code> if the QUOTATION is extended, otherwise

  • <code>false</code>.

*/

public boolean isQuotationExtended() {

return quotationExtended;

}

/**

  • create a <code>ConnectedDocumentData</code> object.

*

*/

public ConnectedDocumentData createConnectedDocumentData() {

return new ConnectedDocument();

}

/**

  • Adds a <code>ConnectedDocument</code> to the predecessor list.

  • A <code>null</code> reference passed to this function will be ignored,

  • in this case nothing will happen.

*

  • @param predecessorData ConnectedDocument to be added to the predecessor list

*/

public void addPredecessor(ConnectedDocumentData predecessorData) {

if (predecessorData != null &&

predecessorData instanceof ConnectedDocument) {

ConnectedDocument predecessor = (ConnectedDocument)predecessorData;

predecessorList.add(predecessor);

}

}

/**

  • Get the predecessor list

*/

public List getPredecessorList() {

return (List)predecessorList;

}

/**

  • Adds a <code>ConnectedDocument</code> to the successor list.

  • A <code>null</code> reference passed to this function will be ignored,

  • in this case nothing will happen.

*

  • @param successorData ConnectedDocument to be added to the successor list

*/

public void addSuccessor(ConnectedDocumentData successorData) {

if (successorData != null &&

successorData instanceof ConnectedDocument) {

ConnectedDocument successor = (ConnectedDocument)successorData;

successorList.add(successor);

}

}

/**

  • Get the successor list

*/

public List getSuccessorList() {

return (List)successorList;

}

/**

  • Returns a string representation of the object.

*

  • @return object as string

*/

public String toString() {

return "HeaderSalesDocument [" +

"changeable=\"" + changeable + "\"" +

", changedAt=\"" + changedAt + "\"" +

", createdAt=\"" + createdAt + "\"" +

", currency=\"" + currency + "\"" +

", description=\"" + description + "\"" +

", division=\"" + division + "\"" +

", disChannel=\"" + disChannel + "\"" +

", freightValue=\"" + freightValue + "\"" +

", grossValue=\"" + grossValue + "\"" +

", netValue=\"" + netValue + "\"" +

", payment=\"" + payment + "\"" +

", processType=\"" + processType + "\"" +

", salesDocNumber=\"" + salesDocNumber + "\"" +

", partnerList=\"" + partnerList.toString() + "\"" +

", purchaseOrderExt=\"" + purchaseOrderExt + "\"" +

", postingDate=\"" + postingDate + "\"" +

", salesDocumentsOrigin=\"" + salesDocumentsOrigin + "\"" +

", salesOrg=\"" + salesOrg + "\"" +

", salesOffice=\"" + salesOffice + "\"" +

", reqDeliveryDate=\"" + reqDeliveryDate + "\"" +

", shop=\"" + shop + "\"" +

", shipCond=\"" + shipCond + "\"" +

", shipTo=\"" + shipTo + "\"" +

", status=\"" + status + "\"" +

", taxValue=\"" + taxValue + "\"" +

", text=\"" + text + "\"" +

", techKey=\"" + techKey + "\"" +

", validTo=\"" + validTo + "\"" +

", purchaseOrderChangeable=\"" + purchaseOrderChangeable + "\"" +

", purchaseOrderExtChangeable=\"" + purchaseOrderExtChangeable + "\"" +

", salesOrgChangeable=\"" + salesOrgChangeable + "\"" +

", salesOfficeChangeable=\"" + salesOfficeChangeable + "\"" +

", reqDeliveryDateChangeable=\"" + reqDeliveryDateChangeable + "\"" +

", shipCondChangeable=\"" + shipCondChangeable + "\"" +

", descriptionChangeable=\"" + descriptionChangeable + "\"" +

", isDirty=\"" + isDirty + "\"" +

"]";

}

/**

  • Performs a shallow copy of this object that behaves like a deep copy.

  • Because of the fact that

  • all fields of this object consist of immutable objects like

  • <code>String</code> and <code>TechKey</code> or primitive types

  • the shallow copy is identical with a deep copy. For the

  • <code>payment</code> property an explicit copy operation is performed

  • because this object is the only mutable one.

*

  • @return shallow (deep-like) copy of this object

*/

public Object clone() {

try {

HeaderSalesDocument myClone = (HeaderSalesDocument) super.clone();

// explicitly clone the payment object

if (payment != null) {

myClone.payment = (Payment) payment.clone();

}

if (partnerList != null) {

myClone.partnerList = (PartnerList) partnerList.clone();

}

if (predecessorList != null) {

myClone.predecessorList = (ArrayList) predecessorList.clone();

}

if (successorList != null) {

myClone.successorList = (ArrayList) successorList.clone();

}

myClone.isDirty = false;

return myClone;

}

catch (CloneNotSupportedException e) {

return null;

}

}

/**

  • Sets the key for the document.

*

  • @param key Key to be set

*/

public void setTechKey(TechKey techKey){

super.setTechKey(techKey);

isDirty = true;

}

/**

  • Returns the descripton of the process type.

  • @return String

*/

public String getProcessTypeDesc() {

return processTypeDesc;

}

/**

  • Sets the descripton of the process type

  • @param processTypeDesc The processTypeDesc to set

*/

public void setProcessTypeDesc(String processTypeDesc) {

this.processTypeDesc = processTypeDesc;

}

/**

  • Returns the partner key for the given partner function.

  • @param partnerFunction

  • @return TechKey

*/

public TechKey getPartnerKey(String partnerFunction) {

if (partnerList != null) {

PartnerListEntry partner = partnerList.getPartner(partnerFunction);

if (partner != null) {

return partner.getPartnerTechKey();

}

}

return null;

}

/**

  • Returns the partner id for the given partner function.

  • @param partnerFunction

  • @return String

*/

public String getPartnerId(String partnerFunction) {

if (partnerList != null) {

PartnerListEntry partner = partnerList.getPartner(partnerFunction);

if (partner != null) {

return partner.getPartnerId();

}

}

return null;

}

}

Vlado
Advisor
Advisor
0 Kudos

This question should have been posted in the [CRM Web Channel forum|;.

Please dont use multiple random selected forums to ask your questions.

Provide enough information.

Don't crosspost.

And, read [the rules|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]...

--

Vladimir Pavlov

SDN Forum Moderator

devendervb
Contributor
0 Kudos

Hi,

Extension data a table parameter in RFM, and it passes some data as required by the application.

eg: EXtension can pass payment values like card name: as CNAME.

in java we can get these values using

ui.getExtensiondata("CNAME");

there may be systactic error.

Hope this helps.

Regards,

Devender