cancel
Showing results for 
Search instead for 
Did you mean: 

Datahub enhancement with new Order(inbound) attribute

former_member623616
Contributor
0 Kudos

Hi All,

we are enhancing Datahub for Order replication from SAP to Hybris. First we want to test it with one Order attribute which is OOTB in both Hybris & SAP systems, to avoid customization in Hybris item types & ECC iDoc.

How i can check all the attributes which are coming from ECC/iDoc into Datahub.

Thanks, Yaten

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member623616
Contributor
0 Kudos

Hi Robin,

we have created new DH extension, and it's depended on saporder-* extensions. As per above scenario, we have defined 2 attributes (oderID and orderComments). orderID would be mapped to E1EDK01-BELNR & orderComments to E1EDP01-E1EDP05-KOTXT. All custom extensions files raw/canonical/target-datahub-extensions.xml are modified as per attributes. Generated Jar files are deployed successfully in DH server and we can see custom types (NonHybrisOrder) in Raw & Canonical form using below url: http://localhost:8080/datahub-webapp/v1/item-classes/raw/item-types http://localhost:8080/datahub-webapp/v1/item-classes/canonical/item-types

when we are sending new Order created in SAP/ECC system, we can see below messages for composition & publication : 839 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawNonHybrisOrder

615 [DEBUG] [c.h.d.s.i.PublicationActionHandler] Creating Target Items for type: 'TargetNonHybrisOrderNotification', and Target System: HybrisCore

Below are log from Datahub and Hybris server console:

hybris console log:

97929767862]] [ImpexDataImportClient] Requesting data from resource http://xx.xxx.xxx.xxx:8080/datahub-webapp/v1/core-publications/2/TargetOrderItemCreationNotification... 97929767862]] [ImpexDataImportClient] Requesting data from resource http://xx.xxx.xxx.xxx:8080/datahub-webapp/v1/core-publications/2/TargetOrderCreationNotification.txt... 97929767862]] [DefaultImportService] Starting import synchronous using cronjob with code=00000Q8X 97929767862]] (00000Q8X) [ImpExImportJob] Starting multi-threaded ImpEx cronjob "ImpEx-Import" (8 threads) orker worker 7/8 782812970 has not started yet and will skip work completely 97929767862]] (00000Q8X) [Importer] Finished 1 pass in 0d 00h:00m:00s:561ms - processed: 2, dumped: 2 (last pass: 0) 97929767862]] (00000Q8X) [Importer] Starting pass 2 portReader] line 3 at main script: dumped unresolved line ValueLine[unresolvable:error finding existing item : column='order' value='1000001208:', ,line 3 at main script,null,HeaderDescriptor[line 2 at main script, insert_update, orderEntry, {}, [namedDeliveryDate, entryNumber, order] ],{1=ValueEntry('337'=null,unresolved=null,ignore=false), 2=ValueEntry(''=null,unresolved=null,ignore=true), 3=ValueEntry('9'=9,unresolved=false,ignore=false), 4=ValueEntry('1000001208:'=null,unresolved=true,reason:cannot resolve value '1000001208:' for attribute 'order',ignore=false)}] portReader] line 6 at main script: dumped unresolved line ValueLine[,line 6 at main script,null,HeaderDescriptor[line 5 at main script, insert_update, order, {}, [@order, versionID, code] ],{1=ValueEntry('336'=null,unresolved=null,ignore=false), 2=ValueEntry('1000001208'=null,unresolved=null,ignore=false), 3=ValueEntry(''=null,unresolved=null,ignore=true), 4=ValueEntry('1000001208'=1000001208,unresolved=false,ignore=false)}] 97929767862]] (00000Q8X) [Importer] Finished 2 pass in 0d 00h:00m:00s:000ms - processed: 2, dumped: 2 (last pass: 2) 97929767862]] (00000Q8X) [Importer] Import aborted after 0d 00h:00m:00s:639ms 97929767862]] (00000Q8X) [ImpExImportJob] Can not resolve any more lines ... Aborting further passes (at pass 2). Finally could not import 2 lines! 97929767862]] [DefaultImportService] Import has caused an error, see logs of cronjob with code=00000Q8X for further details 97929767862]] [ImpexDataImportClient] Returning ERROR to http://xx.xxx.xxx.xxx:8080/datahub-webapp/v1/core-publications/2 97929767862]] [ImpexDataImportClient] Response status from http://xx.xxx.xxx.xxx:8080/datahub-webapp/v1/core-publications/2: 200

former_member623616
Contributor
0 Kudos

Do we need to create/modify any file other than those *-datahub-extensions.xml files of custom extensions?

Thanks, Yaten

former_member224482
Active Contributor
0 Kudos

Send the IDOC to the Data Hub.

On the ERP side, you can use the transaction WE05 to view the content of the IDOC.
On the data hub side, you can view the complete IDOC XML in the tomcat standard output debug log.

To persist those attributes in the raw feed, you will have to define each individual fields you want to keep in your raw model following the same naming pattern as all other IDOC raw fields.

former_member623616
Contributor
0 Kudos

Thanks Robin for the reply.

AOM scenario doesnt support Order replication from SAP/ECC system to Hybris and it only supports Order Confirmation/Delivery/PGI replication from SAP/ECC to Hybris. When we send an new Order from ECC to Hybris it gives below error in Hybris console:

unresolvable : error finding existing item : column='order' value='1000001207'

But i can see many iDoc attributes/fields are being transfer into Datahub as XML in console output.

What should be the approach to replicate those Order related iDoc attributes/fields from Datahub to Hybris.

Thanks, Yaten

former_member224482
Active Contributor
0 Kudos

Please, do not reject answers by changing the question. The original question is "How i can check all the attributes which are coming from ECC/iDoc into Datahub."

The new question is "What should be the approach to replicate those Order related iDoc attributes/fields from Datahub to Hybris."
The best approach is to create extensions. Create the raw, canonical, target modeling and the proper transformations like any other scenario being implemented.