Quantcast
Channel: SCN : All Content - SAP Cloud Applications Studio
Viewing all 1101 articles
Browse latest View live

Changing the label of the extension field according to the log-in user country

$
0
0

Hi everyone,

 

I would like to change the extension field label according to the log-in user country.

 

I added the extension field in the standard BO. And then I write code to get the log-in user country.

I try to write the sap ruby script code in the label of the extension field in the UI designer.

But the following error occurs.

UIInconsistencyError.png

And all of the property editor is read-only mode.

UIInconsistencyError1.png

 

I would like to know if there any other way to change the label occasionally.

 

Thanks,

 

Thu Thu


Mass data run-Custom field update with system date on daily basis

$
0
0

Hi Experts,

 

 

 

I am trying to make a custom field in customer's screen and field will be updated daily automatically with current date of the system. But I am not aware of the process how can I do this and process of mass data run so that field can be updated automatically on daily basis? .

 

 

 

 

Best Regards,

Pragati

Error Collection type is expected

$
0
0

Hello everyone,

 

 

I have a quetsion for my script.

 

I have this error in my sdk : Identifier is typed as 'String'. Collection type is expected sap

 

In CustomerQuote BO I am going to create a script inside Item.Node that check a custom field with all the items

 

when we want to create an order we can have more than one item in product tab

 

1111.PNG

 

 

I want to use foreach function,

 

var itemline = this.ID.RemoveLedaingZero();

foreach ( var a in itemline){

 

}

 

actually in this situation my itemline does not contain values, it just have one value, so I can not use it inside my foreach. ut

 

But I dont know how can I get all the instances of one node.

 

Can anyone help me about this?

 

 

Sin

Raise message in Node Level

$
0
0

Dear Experts,

 

 

I am going to raise a message in the Item.Node of my CustomerQuote BO,

 

I define it as all my others messages, but the differenc is that all of them used in Root node, but this one is in Item.Node

 

 

[Extension] businessobject AP.CRM.Global:  CustomerQuote raises  testAlert {

 

messagetestAlert   ......... : LANGUAGEINDEPENDENT_EXTENDED_Text

....

....

Node Item{

....

}

 

 

But when I want to use this message in my script that has been written under Item Node, I see this error:

 

Identifier 'testAlert' does not exist.


Does anybody know how can I raise a message in node level?


Thanks,

Sin

How-to use Excel for the XML file input?

$
0
0

Hello all,

 

Following our discussion with Gerhard Steinhuber on the very nice tutorial from Horst Schaude , "How to upload mass data via XML File Input" , I am starting this new discussion.

 

In the comments section of this previous cited tutorial, Rufat Gadirov explains how to use a generated XML from Eclipse instead of your XSD file as your source in Excel.

 

However, in spite of all the instructions, I am still facing the same issue in Excel when I try to save my file as XML : "The XML maps in this workbook are not exportable".

 

What I try to do is to create one or more Sales Orders with multiple Items in it from a XML File Input, using excel to enter data.

The part with the File input is working (if I directly upload my file to the webDAV, it creates a sales order instance with multiple items).

 

The only missing part is the Excel data input that I cannot make work. Any help on this matter would be greatly appreciated.

 

Here is my XML file that I try to use as a source in Excel before inputing data from Excel:

 

<?xml version="1.0" encoding="UTF-8"?><p:MySalesOrderUploadedIntegrationInputRequest xmlns:p="http://001365xxx-one-off.sap.com/YUUD0G3OY_" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><MessageHeader>    <CreationDateTime>2015-03-02T12:00:00.000Z</CreationDateTime></MessageHeader>    <List actionCode="01" listCompleteTransmissionIndicator="true" reconciliationPeriodCounterValue="0">        <MySalesOrderUploaded>          <MySalesOrderUploadedID>idvalue0</MySalesOrderUploadedID>          <MyBuyerID schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeID="token">token</MyBuyerID>          <MyDateTime>2015-03-02T12:00:00.000Z</MyDateTime>          <MyName languageCode="EN">MyName</MyName>          <MyBillToParty schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyBillToParty>          <MyDateToBeDelivered>2001-01-01</MyDateToBeDelivered>          <MyEmployeeResponsible schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyEmployeeResponsible>          <MySalesUnit schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MySalesUnit>            <MyItem>                <MyItemID>token</MyItemID>                <MyItemProductID schemeAgencyID="token" schemeID="token">token</MyItemProductID>                <MyItemDescription languageCode="EN">MyItemDescription</MyItemDescription>                <MyProductTypeCode>token</MyProductTypeCode>                <MyRequestedQuantity unitCode="token">0.0</MyRequestedQuantity>                <MyConfirmedQuantity unitCode="token">0.0</MyConfirmedQuantity>                <MyNetAmount currencyCode="token">0.0</MyNetAmount>            </MyItem>        </MySalesOrderUploaded>        <MySalesOrderUploaded>          <MySalesOrderUploadedID>idvalue0</MySalesOrderUploadedID>          <MyBuyerID schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeID="token">token</MyBuyerID>          <MyDateTime>2015-03-02T12:00:00.000Z</MyDateTime>          <MyName languageCode="EN">MyName</MyName>          <MyBillToParty schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyBillToParty>          <MyDateToBeDelivered>2001-01-01</MyDateToBeDelivered>          <MyEmployeeResponsible schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyEmployeeResponsible>          <MySalesUnit schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MySalesUnit>            <MyItem>                <MyItemID>token</MyItemID>                <MyItemProductID schemeAgencyID="token" schemeID="token">token</MyItemProductID>                <MyItemDescription languageCode="EN">MyItemDescription</MyItemDescription>                <MyProductTypeCode>token</MyProductTypeCode>                <MyRequestedQuantity unitCode="token">0.0</MyRequestedQuantity>                <MyConfirmedQuantity unitCode="token">0.0</MyConfirmedQuantity>                <MyNetAmount currencyCode="token">0.0</MyNetAmount>            </MyItem>        </MySalesOrderUploaded>    </List></p:MySalesOrderUploadedIntegrationInputRequest>

 

 

Thank you all for your attention.

Best regards.

Jacques-Antoine Ollier

Getting started with C4C web services.

$
0
0

INTRODUCTION

 

In this document I'll try to explain the basics of the web services usage giving essential information that are valid for all of them. Each webservice has its own peculiarities and if you need more specific details have a look in Web Service APIs in SAP Cloud for Customer 1511 - November 2015.

 

In C4C, you can find the webservice list in: "Application and User Management > Input and Output Management > Service Explorer".

 

This topic is important for developers and analysts that are planning some custom integration or are just looking for another way of query and manipulate information in C4C. You can create the requests using tools like SOAPUI.

 

Basically, I'll explain how to use Query*In and Manage*In webservices and its main concepts.

 

My knowledge is still insufficient and I'm sorry if I wrote something wrong and for my english grammar mistakes =P. I hope you like it and, if necessary, please leave a post to correct me, so we can learn together.

 

 

QUERY*IN

 

When you download a webservice .wsdl file and open its definition, you will find the available methods that can be used, such as FindByElements, FindByIdentification, FindByCommunicationData etc, that vary from which webservice you are using. Despite of it, all of them work exactly the same way, but for different purposes. In this example, I'll use the QueryCustomerIn webservice and its FindByElements method.

 

First of all, lets understand the basic request structure tags.

 

  • Selection by elements:

 

          Each tag SelectionBy<FieldName> filters the query by a field and all of them have the following sub tags:

 

    • InclusionExclusionCode:

   

      • E:  Excluding
      • I:   Including

  

    • IntervalBoundaryTypeCode:

 

      • 1: Equal to
      • 2: Between (excl. upper boundary)
      • 3: Between
      • 4: Between (excl. both boundaries)
      • 5: Between (excl. lower boundary)
      • 6: Less Than
      • 7: Less Than or Equal to
      • 8: Greater Than
      • 9: Greater Than or Equal to

 

    • LowerBoundary<FieldName>


      • Used to specify the initial value.


    • UpperBoundary<FieldName>


      • Used to specify the upper value. It's not mandatory when the IntervalBoundaryTypeCode is '1'.


  • Processing conditions


          This tag is not mandatory. It's used to filter the result size.


    • QueryHitsMaximumNumberValue


      • Number of records that will be send in the response. By default, only 100 records are returned.


    • QueryHitsUnlimitedIndicator


      • If true, it blocks the response if exists more records than the number specified in QueryHitsMaximumNumberValue.


    • LastReturnedObjectID


      • All responses that returns at least one record contains the last returned object ID. I'll show the use of it in the example 6 .



  • Requested elements

 

          This tag is used to filter the response. You can use it to hide response tags you don't need and, consequently, reduce the message size. I'll show the use of it in the example 4. The table below shows a simplified options descriptions.

1Complete StructureThe node element and all its elements, its child node elements and all their elements will be returned.
2Complete NodeThe node element and all its elements will be returned.
3Node with Key ElementsThe node element and its key elements will be returned (not supported by all web service interfaces).
4Excluded NodeThe node element and its child node elements will not be returned.

 

  • Example 1: Query customer with ID 1000012.

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

<soap:Header/>

<soap:Body>

<glob:CustomerByElementsQuery_sync>

<CustomerSelectionByElements>

<SelectionByInternalID>

<InclusionExclusionCode>I</InclusionExclusionCode>

<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000012</LowerBoundaryInternalID>

</SelectionByInternalID>

</CustomerSelectionByElements>

</glob:CustomerByElementsQuery_sync>

</soap:Body>

</soap:Envelope>

 

  • Example 2: Query customers with ID between 1000000 and 1000012.

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

<soap:Header/>

<soap:Body>

<glob:CustomerByElementsQuery_sync>

<CustomerSelectionByElements>

<SelectionByInternalID>

<InclusionExclusionCode>I</InclusionExclusionCode>

<IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>

<UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>

</SelectionByInternalID>

</CustomerSelectionByElements>

</glob:CustomerByElementsQuery_sync>

</soap:Body>

</soap:Envelope>

 

  • Example 3: Query customers with ID between 1000000 and 1000012 excluding 1000011.

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

<soap:Header/>

<soap:Body>

<glob:CustomerByElementsQuery_sync>

<CustomerSelectionByElements>

<SelectionByInternalID>

<InclusionExclusionCode>I</InclusionExclusionCode>

<IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>

<UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>

</SelectionByInternalID>

<SelectionByInternalID>

<InclusionExclusionCode>E</InclusionExclusionCode>

<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000011</LowerBoundaryInternalID>

</SelectionByInternalID>

</CustomerSelectionByElements>

</glob:CustomerByElementsQuery_sync>

</soap:Body>

</soap:Envelope>

 

        * It's possible to use the same selection tag more than once \o/

 

  • Example 4: Query customers with ID between 1000000 and 1000012 excluding 1000011. The response must contain only the customer node with key elements but the address information must exists.

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

<soap:Header/>

<soap:Body>

<glob:CustomerByElementsQuery_sync>

<CustomerSelectionByElements>

<SelectionByInternalID>

<InclusionExclusionCode>I</InclusionExclusionCode>

<IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>

<UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>

</SelectionByInternalID>

<SelectionByInternalID>

<InclusionExclusionCode>E</InclusionExclusionCode>

<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000011</LowerBoundaryInternalID>

</SelectionByInternalID>

</CustomerSelectionByElements>

<RequestedElements customerTransmissionRequestCode="3">

<Customer addressInformationTransmissionRequestCode="1"></Customer>

</RequestedElements>

</glob:CustomerByElementsQuery_sync>

</soap:Body>

</soap:Envelope>

 

  • Example 5: Query customers with ID between 1000000 and 1000012 excluding 1000011. The response must contain only the customer node with key elements but the address information must exists. Only the first customer is needed.

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

<soap:Header/>

<soap:Body>

<glob:CustomerByElementsQuery_sync>

<CustomerSelectionByElements>

<SelectionByInternalID>

<InclusionExclusionCode>I</InclusionExclusionCode>

<IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>

<UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>

</SelectionByInternalID>

<SelectionByInternalID>

<InclusionExclusionCode>E</InclusionExclusionCode>

<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

<LowerBoundaryInternalID>1000011</LowerBoundaryInternalID>

</SelectionByInternalID>

</CustomerSelectionByElements>

<ProcessingConditions>

<QueryHitsMaximumNumberValue>1</QueryHitsMaximumNumberValue>

<QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>

</ProcessingConditions>

<RequestedElements customerTransmissionRequestCode="2">

<Customer addressInformationTransmissionRequestCode="1"/>

</RequestedElements>

</glob:CustomerByElementsQuery_sync>

</soap:Body>

</soap:Envelope>


   * If QueryHitsUnlimitedIndicator is true the request will show an error because I want only one customer but there are more than one for the specified      conditions. If you want all customers in the specified conditions, the processing conditions must be:

 

  <ProcessingConditions>

  <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>

  </ProcessingConditions>

 

          * Be carefull with timeout and response message size =]

 

  • Example 6: Query the next customer from the previous query.

 

All responses contains the following tag, that shows how many records have returned, whether there are more records available and the last record node ID:

 

<ProcessingConditions>

  <ReturnedQueryHitsNumberValue>1</ReturnedQueryHitsNumberValue>

  <MoreHitsAvailableIndicator>true</MoreHitsAvailableIndicator>

  <LastReturnedObjectID>00163E162F981ED5B6FCD7D58739E476</LastReturnedObjectID>

  </ProcessingConditions>

 

Considering this, if you want the next record, in the request, specify the LastReturnedObjectID.

 

<ProcessingConditions>

<QueryHitsMaximumNumberValue>1</QueryHitsMaximumNumberValue>

<QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>

<LastReturnedObjectID>00163E0924E61EE5B49B609769B5146E</LastReturnedObjectID>

</ProcessingConditions>

 

          It's usefull if you wat to "page" the query results.

 

 

 

MANAGE*IN



The Manage*In webservices are used to create and maintain information and they always have the CheckMaintainBundle and MaintainBundle methods. The CheckMaintainBundle method is equal to the MaintainBundle but not persists the data in C4C, so, can be used to simulate the real request. In this document I'll use the ManageCustomerIn webservice for explanation.

 

Important request structure tags/attributes:

 

     Most of the nodes have the following attributes/tags:

 

    • ActionCode:

 

               Attribute to specify the operation. Below, the simplified description is shown:

 

      • 01: Create
      • 02: Change
      • 03: Delete
      • 04: Save (Create if not exists, otherwise, update the record)
      • 05: Remove
      • 06: No action (check)

 

    • CompleteTransmissionIndicators:

 

Attributes to specify if the node is complete or not. If you set it to true, all existing nodes that exists in C4C but aren't in the request will be removed from C4C.

 

    • ObjectNodeSenderTechnicalID:

 

This tag contains a custom ID that represents the node (many nodes have this tag) and is set by the sender. As these webservices accepts many records in the same request (bundle), and considering that if one of them fails then the whole request fails too, this tag is very important to identify which record has failed. The response will return this ID, then you can handle it properly.

 

  • Example 1: Create a customer with address.

 

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1="http://sap.com/xi/AP/Globalization">

<soap:Header/>

<soap:Body>

<glob:CustomerBundleMaintainRequest_sync_V1>

<BasicMessageHeader></BasicMessageHeader>

<Customer actionCode="01" addressInformationListCompleteTransmissionIndicator="true">

<ObjectNodeSenderTechnicalID>SENDER_CUSTOMER_1</ObjectNodeSenderTechnicalID>

<CategoryCode>2</CategoryCode>

<ProspectIndicator>false</ProspectIndicator>

<CustomerIndicator>true</CustomerIndicator>

<LifeCycleStatusCode>2</LifeCycleStatusCode>

<Organisation>

<CompanyLegalFormCode>14</CompanyLegalFormCode>

<FirstLineName>COMPANY NAME</FirstLineName>

</Organisation>

<ContactAllowedCode>1</ContactAllowedCode>

<AddressInformation actionCode="01">

<ObjectNodeSenderTechnicalID>SENDER_ADDRESS_1</ObjectNodeSenderTechnicalID>

<AddressUsage actionCode="01">

<AddressUsageCode>XXDEFAULT</AddressUsageCode>

<DefaultIndicator>true</DefaultIndicator>

</AddressUsage>

<Address actionCode="01">

<CorrespondenceLanguageCode>PT</CorrespondenceLanguageCode>

<PostalAddress>

<CountryCode>BR</CountryCode>

<RegionCode>PR</RegionCode>

<CountyName>BRASIL</CountyName>

<CityName>Curitiba</CityName>

<DistrictName>CENTRO</DistrictName>

<StreetPostalCode>80000-000</StreetPostalCode>

<StreetName>R TEST</StreetName>

<AdditionalStreetSuffixName/>

<HouseID>225</HouseID>

</PostalAddress>

</Address>

</AddressInformation>

</Customer>

</glob:CustomerBundleMaintainRequest_sync_V1>

</soap:Body>

</soap:Envelope>

 

  • Example 2: Adding a new main address, without modifying the customer and its existing address in C4C.

 

* The customer information won't change (actionCode="06")
* The address previously created won't be removed (addressInformationListCompleteTransmissionIndicator="false").

* Now it's mandatory to specify the customer key.

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1="http://sap.com/xi/AP/Globalization">

<soap:Header/>

<soap:Body>

<glob:CustomerBundleMaintainRequest_sync_V1>

<BasicMessageHeader></BasicMessageHeader>

<Customer actionCode="06" addressInformationListCompleteTransmissionIndicator="false">

<InternalID>1000058</InternalID>

<AddressInformation actionCode="01">

<ObjectNodeSenderTechnicalID>SENDER_ADDRESS_2</ObjectNodeSenderTechnicalID>

<AddressUsage actionCode="01">

<AddressUsageCode>XXDEFAULT</AddressUsageCode>

<DefaultIndicator>true</DefaultIndicator>

</AddressUsage>

<Address actionCode="01">

<CountryCode>BR</CountryCode>

<RegionCode>PR</RegionCode>

<CountyName>BRASIL</CountyName>

<CityName>Curitiba</CityName>

<DistrictName>CENTRO</DistrictName>

<StreetPostalCode>80000-000</StreetPostalCode>

<StreetName>R TEST 2</StreetName>

<AdditionalStreetSuffixName/>

<HouseID>225</HouseID>

</Address>

</AddressInformation>

</Customer>

</glob:CustomerBundleMaintainRequest_sync_V1>

</soap:Body>

</soap:Envelope>

 

 

COMMON ERRORS

 

In this section I'll describe common error when using webservices. If someone knows some document that explains it better (what are the types, categories etc), I'd be pleased if you post a comment =)

 

Some of the errors are shown in: "Application and User Management > Input and Output Management > Web Service Message Monitoring".


  • A general error in one of the customers in the request to illustrate the importance of the ObjectNodeSenderTechnicalID. The customer with sender ID 'SENDER_CUSTOMER_1' was rejected, but all the others were ok:

 

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

<env:Header/>

<env:Body>

<n0:CustomerBundleMaintainConfirmation_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:KUV:/1SAI/TAE6F3228CC6D723FF1823E:804">

<Log>

<MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>

<Item>

<TypeID>286(//APBP/R1/)</TypeID>

<CategoryCode>INC.BOI</CategoryCode>

<SeverityCode>3</SeverityCode>

<ReferenceObjectNodeSenderTechnicalID>SENDER_CUSTOMER_1</ReferenceObjectNodeSenderTechnicalID>

<Note>Business partner 1000058 already exists</Note>

</Item>

</Log>

</n0:CustomerBundleMaintainConfirmation_sync_V1>

</env:Body>

</env:Envelope>

 

  • Some error in the xml structure:

 

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

<env:Header/>

<env:Body>

<env:Fault>

<env:Code>

<env:Value>env:Receiver</env:Value>

</env:Code>

<env:Reason>

<env:Text xml:lang="en">Web service processing error; more details in the web service error log on provider side (UTC timestamp 20160512004624; Transaction ID 00163E162F571EE685FB5E7780150450)</env:Text>

</env:Reason>

<env:Detail/>

</env:Fault>

</env:Body>

</env:Envelope>

 

  • Some issue with the user permissions:

 

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

<env:Header/>

<env:Body>

<env:Fault>

<env:Code>

<env:Value>env:Receiver</env:Value>

</env:Code>

<env:Reason>

<env:Text xml:lang="en">Authorization role missing for service "ServiceInterface http://sap.com/xi/A1S/Global ReadSalesPriceListIn &lt;default> &lt;default>", operation "Operation http://sap.com/xi/A1S/Global Read" (UTC timestamp 20160509191431; Transaction ID 00163E19BB2F1EE685C3483BF5E6CB73)</env:Text>

</env:Reason>

<env:Detail/>

</env:Fault>

</env:Body>

</env:Envelope>

 

  • Authentication error.

 

Best regards,


Alexandre Kaminagakura

How to deploy Javascript Library for a CustomPane?

$
0
0

Hello Experts,

 

trying to create a CustomePane (HTML) inside an Embedded Component.

In the CustomPane Properties I can enter text values for  JS Library Name, JS Library URL and JS Type Name.

 

I've created my custom control extending the SAPUI5 CustomPane Object in JavaScript,

but I can't find an answer to how I can deploy my JS Code, so that it gets loaded when I  test the solution.

 

Thanks for any Help.

Packing on Outbound Delivery

$
0
0

What BO or Node of an outbound delivery represents the Packing...

 

I have looked at GoodsTag  but that appears to only be the Label


Not execute before save action in extension(XBO) PDI

$
0
0
  1. At the moment that I release an Outbound Delivery document you can see the system raises a standard error, for example in this case because the logistic area doesn’t have enough stock (but can be another kind of error).
  2. In my customer solution I have ABSL code in the before save action. However, this is being executed even if the system raises a standard error.

out.jpg

 

My need is that the ABSL code shouldn’t be executed at the moment the system raises an error. Only when the document - by standard - will be save because doesn’t have any error.

How to access Header of a SOAP call in SDK?

$
0
0

Dear community,

 

I want to access a SOAP web service from DHL via SDK in ByD. I uploaded and activated the WSDL and XSD files, I created the Communication System and Communication Arrangement and I can add content to the request.

Now the issue is, that the web service has 2 pieces of authentication. The regular username/password for the web service endpoint. This I provide in the Communication Arrangement. But in addition, I need to add 3 entries to the header of the request that will carry additional information about the user.

 

The request would in the end look like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cis="http://dhl.de/webservice/cisbase" xmlns:de="http://de.ws.intraship">
<soapenv:Header>
   <cis:Authentification>
     <cis:user>geschaeftskunden_api</cis:user>
     <cis:signature>Dhl_ep_test1<cis:signature>
     <cis:type>0</cis:type>
   </cis:Authentification>
</soapenv:Header>
<soapenv:Body>
   <de:CreateShipmentDDRequest>
     <ShipmentOrder>
...
   </ShipmentOrder>
</soapenv:Body>
</soapenv:Envelope>

 

My problem is now, how can I add the header fields? The web service definition in the ByD SDK seems to only grant access to the Body, starting with CreateShipmentDDRequest.
Is there any way to access the SOAP header before I send the request? And how would I do that?

 

Any help on this issue would be really appreciated.

 

 

Thanks a lot in advance,

stephan

How To : Mass Data Run for Update Standard Business Object

$
0
0

Hi All,

Mass Data Run feature is only works for custom business object, you can schedule an action for many instances of custom business object using MDR.

But you can not be create MDR on standard BO, however there is always requirement to run a job to update standard object.

 

We have a work around with this we can update standard object periodically.

We will create a MDR on custom business and in action which will run for MDR, we write logic for updating standard object. I am trying to give you details how can you update standard object with MDR.

 

Pre-Requisite: You have created a custom business object with an action and query. In my example I will update Customer BO and have extended a field in customer BO and will update this field via MDR.

BO def.JPG            xbo def.JPG

                Custom BO                                                                                                               Customer XBO

 

MDR will update extended field  "Valid till", for each instance of available customers

 

 

DetailsImages
Right click on custom BO and create MDRMdr1.JPG

Enter name of MDR and select custom action where you will  write action to update customer(std) bo.

mdr2.JPG

In step2, select query this query will use in selecting custom bo instance.

 

for example I have used two fields from query as selection parameter 'FeedbakID' and 'Creation Date'. I will use this query at run time while creating run id for MDR.

mdr3.JPG

In step3, selection option from drop down,

application logs will be deleted by the the retention time.

 

In Step4, Review all details for MDR and click on finish

 

In solution explorer "UpdateCustomer.run" content will be created, activate this and right click and create screens. 3 screens will created( OWL, QAF and View)

mdr4.JPGMDR5.JPG

MDR6_1.JPG

 

 

Write the logic in custom action which you have selected in MDR to update the customer(std bo), I would suggest does not use this action to change custom bo instance.

 

This action is querying Customer BO wtithout any selection so it will returns all available customers in BO and then in loop, each instance will get updated.

MDRLogic.JPG
Now Assigned MDR work center view to Work center, I have already have created screens for custom BO, now I have assigned WoC view to custom WoC.view.JPG
Now all the design activity has completed and our MDR is ready, now login into system and assigned Custom work center to your user or any other business user. Before assigning to business user your solution should be scoped.

Create run Id for MDR, click on New button it will open a new window(QAF).

 

Here you will see two selection parameter has been added, so now we should set query selection parameter in a way so we will only read only one records. In this image with Feedback ID =5 there is only one instance is available. My custom action will run for only this instance, and in action it query all customer instance and update extended field with current system date.

 

Save and Activate this run id.

 

.

runid.JPG
Now schedule this run IDschedulre.JPG
Now here you have option to schedule the batch job, you can set  as recurrence(daily weekly etc), however I will start it immediatelystart immedi.JPG

wait for some time and check for execution details for scheduled run Id.

Once it will be executed maximum severity will become green, in case if it get red then click on log id to check the logs

                 execution.JPG
Now all available customer records has been updated, and added extension field 'Valid till' has updated with current system date.              result.JPG

 

 

We are touching standard BO by querying in custom BO, and from MDR point of view it will execute single instance of custom bo however custom bo action will read all instance from Customer(standard bo), and update the required value. You should check this link Re: Mass data run-Custom field update with system date on daily basis

 

Note: You should not work one  customer BO (std BO) when MDR is in execution, there is possibility you may have locked any customer(std bo) instance and MDR will returns lock errors.

 

There is another very nice blog has written for scheduling MDR every hour, How to create an hourly mass data run in C4C | SCN

 

 

Regards

Sunil

Poll: Did you succeed with XML file inputs in 1605?

$
0
0

Dear SAP Community,

 

I already logged several incidents to SAP, but because I love you, I wanted to share my experience here with XML file input since 1605.

 

And I want you to do the same if you succeeded in developing new XML file input runs for 1605.

 

The issue:

The run is triggered and the light goes green, telling you the process has gone well and that a document with a certain ID has been processed.

But.... nothing happens. Noithing is called and the ABSL is never triggered. Neither After-Modify, Before-SAve or OnSave.

The custom business object used for staging is just never created.

 

This is a common issue as I already got it several times, but it always fixed by itself overnight... It seems weird, but it is true. Lewis had the same issue here : Service Integration Only Working Once

 

However, now I get it for every Test system in 1605 where I tried an XML File Input (three systems total).

And it does not fix itself overnight, it has not been working since the release of 1605. Nothing to do, ABSL is just never triggered. No event happens.

 

And you?

 

Thank you for your attention.

Best regards.

Jacques-Antoine Ollier

Get Employee job of Current User

$
0
0

Dear All,

 

I need your assistant,

 

I want to get the job of employees of current user, I have done like this:

 

var employee  = Employee.Retrieve(Context.GetCurrentIdentityUUID());

var employeejob = employee.CurrentOrganisationalUnitAssignment.Job.NameByValidity.GetFirst();

var job = employeejob.Name.content;

 

But this is not correct, Can anyone help me how to do it?

 

Thanks,

 

Sin

Exposing extension fields in Opportunity Product for Request Pricing

$
0
0

Hi,

 

I need details on how to enhance standard "Request Pricing" scenario by for extension fields created in Opportunity --> Product Tab.

 

The standard "Request Pricing" option works well through SAP PI and pulls the Product Net Price as expected.

 

Current Standard Scenario used is  "Opportunity with Sales Order Pricing in SAP ERP".

 

Now, I need to pull additional price details from ECC to C4C. I have created extension fields to pull Discount Price.

 

In PI, Pricing service response node shows only "Net Price" node for assigning values retrieved from ECC. How can I add our extension field part of this Pricing response structure by enhancing standard scenario?

 

 

Thanks

Sridhar

Anyone help me about the materialFlow?


Error while deploying the solution

$
0
0

Hi Experts,

 

I have created a patch of a solution and when trying to deploy the business configuration , it is throwing the below error:

 

DeploymentError.png

 

If anybody had similar problem and had solution please suggest.

 

Thanks,

Abhishek

Value from a field disappears once Quick Create loads properly in SAP C4C

$
0
0

Hi Experts,

 

We are implementing Copy control fucntionality in standard sales quote, by adding an embedded component and opening QC of custom contract, and we are trying to bring sales quote ID from the sales quotes header to our own created one ID field as shown in screenshots,

 

we created inports and binded ID field to standard outport field,

 

we are facing one problem as in our QC value is coming on load but once QC gets load properly value disappears automatically,

and we are not able to fetch that by debugging also could you please let us know the possible reasons behind it.

 

i am attaching all the possible relevant screenshots :

1. value coming on click of new button

copy control.jpg

 

2. once it loads properly value disappears:-

copy control 1.jpg

 

3. inport in embedded component

copy control 2.PNG

 

4. outport in EC

copy control 3.PNG

5. query

copy control 4.PNG

 

6. QC inport

copy control 5.PNG

 

 

6. standard outport

 

copy control 6.PNG

 

 

Thanks,

Bhupinder

Modify Standard OWL search

$
0
0

Hi Guys,

 

I have requirement to customize Standard OWL Search/Result of Account business object. Could anyone please advise how to proceed.

How can I create our Own query in standard OWL ?

 

Regards

Nitin

Dynamic Layout issue in UI Designer

$
0
0

Hi Guys,

 

I came across one scenario where I would need to design below format in UI, I am not getting the option under layout panes.

Could anyone please help me to design this layout in UI designer .

 

 

Regards

Nitin

Performance best practice with Mass enabled event

$
0
0

Hi,

 

I would like to explain the performance improvement that could be achieved with mass enabled event with the following example scenario:

 

Created Business Object Sales2 with child node Account having cardinality 0 to n, this child node has two elements AcctID and AcctName,

where AcctID is input by the user and AcctName is determined in the AfterModify event automatically.
Data is created via Webservice create request.

 

In the Part1 would explain how Sales2 data is created without mass enabled AfterModify event on node Account, and in
Part2 would explain how Sales2 data is created with mass enabled event.

 

-----------------------------------------------------------------

Part1 : Without mass enabled AfterModify event

-----------------------------------------------------------------

 

1) Created a Business Object named "Sales2":

BO.PNG

2) Created UIs:
OWL: To display data

QAF and OIF : To edit data

 

3) Created AfterModify event without Mass enabling on Account node to determine the AccountName:
AfterModifySingle.PNG

 

ABSL Script: To determine AccountName for the current AcctID

This is done by querying on BusinessPartner passing AcctID to get AccountName:

AfterModifySingleScript.PNG

 

 

4) Created Webservice "ManageSales2In" to create data into the Sales2 Business Object:

Note: Here AcctName is not selected because this would be determined in the AfterModify event
Webservice.png

 

Tested the webservice using SOAP UI:
Request to create Sales2 with OrderID = 2 and with Account node containing AcctID GCBAC20123, GCITC20124 and GCITC20125


WebserviceSingleRequestRuntime.PNG

 

Had placed breakpoint at Sales2->Account->AfterModify event, this event is hit 3 times:

first time: for AcctID GCBAC20123:
AfterModifySingle1.PNG

 

second time: for AcctID GCIT20124:

AfterModifySingle2.PNG

 

third time for AcctID GCITC20125:

AfterModifySingle3.PNG

 

With successfull Webservice response:

WebserviceSingleResponse.PNG

 

5) OWL shows the created data:
OWL2.PNG

6) OIF shows the child items data:
OIF2.PNG

 

Summary: Webservice create request invokes AfterModify event 3 times

 

------------------------------------------------------------

Part2: With Mass Enabled AfterModify event

------------------------------------------------------------

 

Deleted the Sales2->Account->AfterModify event created in Step 3) above and made it Mass enabled:

 

1) Mass enabled AfterModify:

AfterModifyMass.PNG

 

2) Tried to create data with webservice:
WebserviceMassRequestRuntime.PNG

3) AfterModify event is hit only once instead of 3 times:

Now all the three Account data with AcctID GCGBAC20123, GCBAC20124 and GCBAC20125 are passed to the AfterModify event togather:
AfterModifyMassScript.PNG

Summary: Webservice create request invokes AfterModify event only once

 

Advantages of having mass enabled event in this case:

1) Rount trip is reduced to once instead of three times, that is AfterModify is called only once instead of 3 times

 

2) Code inside the mass enabled event could be bundled, that is

Query "qryAcct.Execute" inside the mass enabled event is called once instead of three times

 

 

3) Can access all items easily, that is in the same call we can check all the items without additional effort,

example we could check for duplicates for AcctID

 

 

Hence, webservice create operation performance would improve.

Note: This mass enabled event would also be useful for Internal communication, file input etc.

 

 

Thanks, Pradeep.

Viewing all 1101 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>