Skip to Content
0

Self Loop in Start Routine

Jan 19, 2017 at 12:10 PM

326

avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Raymond Giuseppi
Jan 19, 2017 at 12:25 PM
0

'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

Share
10 |10000 characters needed characters left characters exceeded
syed zabiullah Jan 19, 2017 at 12:50 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Jan 19, 2017 at 01:49 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded