日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

使用ABSL(ABAP Script Language)完成SAP Cloud for Customer里Customer Quote以及行项目的增删改查

發(fā)布時(shí)間:2023/12/19 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用ABSL(ABAP Script Language)完成SAP Cloud for Customer里Customer Quote以及行项目的增删改查 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

The user roles are Studio Administrator, Developer, and Business User.

  • PDI_ADMINISTRATION / Administration
  • PDI_DEVELOPMENT / Development

對于Sales Order creation來說,Buyer Party以及行項(xiàng)目的Product維護(hù)是必須的。

通過TypeCode區(qū)分CustomerQuote是Sales Order還是Sales Quote:

使用ABSL創(chuàng)建Sales Order的代碼:

import ABSL; import AP.CRM.Global;// ABSL example for CustomerQuote// define CustomerQuote root node var elCustomerQuote_Root: elementsof CustomerQuote; var instCustomerQuote;// define CustomerQuote item node var elCustomerQuote_Item: elementsof CustomerQuote.Item; var instCustomerQuote_Item;// CustomerQuote: maintain Business Object type - optional (default value: 30 = Sales Quote set by system; other values: 2059 = Sales Order) elCustomerQuote_Root.TypeCode = "30";// CustomerQuote: maintain description - optional elCustomerQuote_Root.Name.content = "PSM CRM ABSL Test - CallCustomerQuoteExample";// CustomerQuote: maintain external reference - optional elCustomerQuote_Root.BuyerID.content = "PSM CRM ABSL Test - Example_01";// CustomerQuote: create new instance instCustomerQuote = CustomerQuote.Create(elCustomerQuote_Root);// CustomerQuote: maintain buyer party - mandatory // the instance of node Party is created automatically by the system instCustomerQuote.BuyerParty.PartyKey.PartyID.content = "MC9785";// CustomerQuote: maintain item with product// CustomerQuote: set item ID or any other attribute of the node Item in order // to be able to enter a product later on elCustomerQuote_Item.ID = "10";// CustomerQuote: create item instance instCustomerQuote_Item = instCustomerQuote.Item.Create(elCustomerQuote_Item);// set product identifier - mandatory instCustomerQuote_Item.ItemProduct.ProductKey.ProductID.content = "MCF-0001"; // change quantity - optional if ( instCustomerQuote_Item.FirstRequestedItemScheduleLine.IsSet()) { // set product quantity and UOM (will be defaulted by the system if not set) instCustomerQuote_Item.FirstRequestedItemScheduleLine.Quantity.content = 2;instCustomerQuote_Item.FirstRequestedItemScheduleLine.Quantity.unitCode = "EA"; }

讀取CustomerQuote的ABSL代碼:

import ABSL; import AP.CRM.Global;// ABSL example for CustomerQuote// Define variables to query CustomerQuote var qryCustomerQuote_QueryByElements; var selParamsCustomerQuote_QueryByElements; var colQryResult; var instCustomerQuote;// CustomerQuote: define query and parameters to be used for retrieval of data qryCustomerQuote_QueryByElements = CustomerQuote.QueryByElements; selParamsCustomerQuote_QueryByElements = qryCustomerQuote_QueryByElements.CreateSelectionParams();// CustomerQuote: set Business Object type - optional (default value: 30 = Sales Quote set by system; other values: 2059 = Sales Order) selParamsCustomerQuote_QueryByElements.Add(qryCustomerQuote_QueryByElements.TypeCode, "I","EQ","30");// CustomerQuote: fill the query parameter values - in this example search via the external reference selParamsCustomerQuote_QueryByElements.Add(qryCustomerQuote_QueryByElements.BuyerID.content, "I","EQ","PSM CRM ABSL Test - Example_01");// CustomerQuote: execute the query colQryResult = qryCustomerQuote_QueryByElements.Execute(selParamsCustomerQuote_QueryByElements);// CustomerQuote: loop all found instances foreach (instCustomerQuote in colQryResult) { break; // take only first instance in case multiple are found }

修改customer quote的代碼:

import ABSL; import AP.CRM.Global;// ABSL example for CustomerQuote// Define variables to query CustomerQuote var qryCustomerQuote_QueryByElements; var selParamsCustomerQuote_QueryByElements; var colQryResult; var instCustomerQuote; var instCustomerQuote_Item;// CustomerQuote: define query and parameters to be used for retrieval of data qryCustomerQuote_QueryByElements = CustomerQuote.QueryByElements; selParamsCustomerQuote_QueryByElements = qryCustomerQuote_QueryByElements.CreateSelectionParams();// CustomerQuote: set Business Object type - optional (default value: 30 = Sales Quote set by system; other values: 2059 = Sales Order) selParamsCustomerQuote_QueryByElements.Add(qryCustomerQuote_QueryByElements.TypeCode, "I","EQ","30");// CustomerQuote: fill the query parameter values - in this example search via the external reference selParamsCustomerQuote_QueryByElements.Add(qryCustomerQuote_QueryByElements.BuyerID.content, "I","EQ","PSM CRM ABSL Test - Example_01");// CustomerQuote: execute the query colQryResult = qryCustomerQuote_QueryByElements.Execute(selParamsCustomerQuote_QueryByElements);// CustomerQuote: loop all found instances foreach (instCustomerQuote in colQryResult) { break; // take only first instance in case multiple are found }// CustomerQuote: update quantity for item product foreach (instCustomerQuote_Item in instCustomerQuote.Item) {// get item with a certain ID to be changedif (instCustomerQuote_Item.ID.Contains("10")) {break;}; } if ( instCustomerQuote_Item.IsSet()) { // set product quantity and UOM (will be defaulted by the system if not set) instCustomerQuote_Item.FirstRequestedItemScheduleLine.Quantity.content = 5;instCustomerQuote_Item.FirstRequestedItemScheduleLine.Quantity.unitCode = "EA"; }

Item Schedule Lines

The requested delivery date is defaulted automatically when a customer quote is created.

當(dāng)Customer Quote被創(chuàng)建時(shí),requested delivery date被默認(rèn)邏輯填充。

It can be changed using the association RequestedFulfillmentPeriod.

這個(gè)默認(rèn)值可以被RequestedFulfillmentPeriod這個(gè)association修改。

This date is taken over as requested delivery date for the items.

item級別的requested delivery date從訂單抬頭的對應(yīng)字段帶過來。

On item level the requested delivery date can be set using the association FirstRequestedItemScheduleLine.

帶過來的值也可以通過FirstRequestedItemScheduleLine修改。

Price and Tax Calculation Item

When interacting with the Price And Tax Calculation Item node the following specifics have to be considered using the public model.

Prices are derived automatically from the price lists maintained for the products and customers.

通過product和customer主數(shù)據(jù)上維護(hù)的price list,行項(xiàng)目的價(jià)格被自動(dòng)決定出來。

In order to set or get the automatically determined prices the following associations can be used:

  • Item Main Price
  • Item Main Discount
  • Item Main Surcharge
  • Item Main Total
  • Operational Item Price Component

Address

The address of a Party can be accessed via the following associations:

  • AddressSnapshot (read-only)
  • UsedAddress (read/write)

In case address data of a Party node instance is changed via association UsedAddress a document specific address will be created.

我們每次通過association UsedAddress 修改 Party的地址時(shí),一個(gè)新的Document specific address會(huì)被創(chuàng)建。

This means, the address change is exclusively applied to the party instance in the respective transactional document.

只是文檔的party transaction 數(shù)據(jù)的地址被修改了,而party主數(shù)據(jù)地址保持不變。

The master data address of the party remains unchanged.

// ABSL example to create a document-specific address for a party, for example the product recipient: .... if ( this.ProductRecipientParty.UsedAddress.DefaultPostalAddressRepresentation.IsSet( ) ) {/ * For performance reasons DO NOT update every single attribute by using the association path:this.UsedAddress.DefaultPostalAddressRepresentation.CityName = " Document City";this.UsedAddress.DefaultPostalAddressRepresentation.HouseID = "217";.... *///...to improve performance retrieve the address via association once and update afterwards the respective attributes:var elPartyAddress = this.ProductRecipientParty.UsedAddress.DefaultPostalAddressRepresentation;elPartyAddress.CityName = "Document City";elPartyAddress.HouseID = "217";elPartyAddress.StreetName = "Doc Street";elPartyAddress.StreetPostalCode = "27272";} ....

更多Jerry的原創(chuàng)文章,盡在:“汪子熙”:

總結(jié)

以上是生活随笔為你收集整理的使用ABSL(ABAP Script Language)完成SAP Cloud for Customer里Customer Quote以及行项目的增删改查的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 成人免费影院 | 国产又黄又大又粗的视频 | 亚洲中文无码久久 | 日韩高清中文字幕 | 骚虎视频在线观看 | 最近中文字幕在线mv视频在线 | 森泽佳奈中文字幕 | 性生交大全免费看 | 亚洲熟妇毛茸茸 | 国产一级不卡毛片 | av在线操 | 伊人365| 蜜臀久久99精品久久久画质超高清 | 诱惑av| 超碰97在线免费观看 | 久久久久久久极品内射 | 超碰在线观看97 | 91成人精品国产刺激国语对白 | 中文字幕av资源 | 美日韩黄色片 | 久久久久毛片 | 成人做爰的视频 | 性xxxx18 | 人妖ts福利视频一二三区 | 黄色不雅视频 | 黄视频在线观看免费 | 欧美成人免费一级人片100 | 国产精品久久午夜夜伦鲁鲁 | 在线不卡视频 | 一区二区三区四区在线视频 | 香蕉视频A | av网站大全在线观看 | 野花视频在线免费观看 | 国产思思| 艳妇臀荡乳欲伦交换电影 | 亚洲AV不卡无码一区二区三区 | 久久久久国色av免费观看性色 | 激情网五月 | 亚洲伊人精品 | 欧美专区在线播放 | 狠狠久久久 | 99热99在线 | 亚洲不卡在线播放 | 在线观看av网站 | 国产精成人品免费观看 | 精品国产va久久久久久久 | 久久久久久久黄色 | 俄罗斯porn | 五月天av网 | 久久精品久 | 国产影音先锋 | 日韩一级在线 | 亚洲视频不卡 | 欧日韩av| 国产欧美一区二区精品性色 | 一区二区免费视频 | 国产欧美一区二区三区另类精品 | 麻豆av一区二区三区在线观看 | 久久亚洲视频 | 亚洲欧美日韩国产一区二区 | 免费草逼网站 | 在线观看免费视频一区二区 | av黄| 麻豆网 | 激情欧美一区二区三区 | 国产福利片在线观看 | 成人h网站 | 91在线播| av五月天在线 | 欧美日韩视频在线观看一区 | 日韩欧美在线视频免费观看 | 日韩美女啪啪 | 欧洲亚洲一区二区 | 日日噜噜噜夜夜爽爽狠狠视频97 | 日韩专区一区二区三区 | 国产女人高潮时对白 | 最新日韩在线视频 | 美国做爰xxxⅹ性视频 | 国产亚洲精品久久久久久久 | 国产精品国产三级国产a | 白白色视频在线 | 国产乡下妇女做爰视频 | 麻豆va | 中文字幕一区二区视频 | 久久久久久久久久久久久久久久久久久 | 69精品久久久 | 99色网| 免费高清视频在线观看 | 中文视频在线观看 | 青青草成人av | 欧美日韩国产精品成人 | 欧美日韩免费一区二区三区 | 亚洲骚片 | 日本乱偷中文字幕 | 国产毛片在线 | 在线视频毛片 | 国产一区免费 | 美日韩精品视频 | 最新日韩在线 |