cancel
Showing results for 
Search instead for 
Did you mean: 

Self Loop in Start Routine

former_member206475
Active Participant
0 Kudos

Dear Users,

I have a Cube with data. There is a new date field added to cube. This date field get value from a DSO based on order number as key.

I have to populate this new date field in cube with the date value coming from DSO. Therefore i want update existing data in cube to have this new date field populated without changing any other data or appending new data.

Can you please suggest what logic i can use? Will a self loop help? and logic?

Accepted Solutions (0)

Answers (3)

Answers (3)

raymond_giuseppi
Active Contributor
0 Kudos

Your translation from 'document number' to 'order' was somewhat misleading, should I suppose the infoobject for doc_number doesn't carry any attributes?

Are you getting a time-out? Select the whole required data from youd DSO : replace first SELECT with some FOR ALL ENTRIES IN source_package in a sorted internal table, then LOOP AT source_package performing some READ TABLE to update requireed field.

For 'legacy' data in the Infocube (no longer able to reload it correctly from source system?) you could consider defining some kind of 'once only' transformation from full cube to itself, execute and remove previous requests from cube.

Regards,
Raymond

former_member206475
Active Participant
0 Kudos

Hello Raymond,

The date field is not an attribute of order. It is separate characteristic. I would have to write a routine for this. Have to modify the source or end package to update this new date field with the order creation date field from dso.

I tried using below routine:

TYPES: BEGIN OF TY_TAB,
DOC_NUMBER TYPE /BIC/ASDEUORDH00-DOC_NUMBER,
CREATEDON TYPE /BIC/ASDEUORDH00-CREATEDON,
END OF TY_TAB.

DATA: ITAB TYPE TABLE OF TY_TAB,
WA_ITAB TYPE TY_TAB,
ORDERDATE TYPE C.

SELECT DOC_NUMBER CREATEDON FROM /BIC/ASDEUORDH00 INTO WA_ITAB
WHERE DOC_NUMBER = <SOURCE_FIELDS>-DOC_NUMBER.
ENDSELECT.

LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.

if <SOURCE_FIELDS>-DOC_NUMBER = WA_ITAB-DOC_NUMBER.

move WA_ITAB-createdon to <source_fields>-CRM_ORDEDT.

ENDIF.
ENDLOOP.

However it goes to dump. And also i do not want the records to be appended in cube. I want the existing records to be same and just the new date field to be updated.

raymond_giuseppi
Active Contributor
0 Kudos

'I have a Cube with data. There is a new date field added to cube. This date field get value from a DSO based on order number as key.'

This date should be an attribute of this 'order' InfoObject, so create a transformation from DSO to order infoobject then add the attribute of order to the cube.

Regards,
Raymond