cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP code for not overwriting existing value while loading to cube.

former_member194898
Active Contributor
0 Kudos
829

Hi,

How to prevent transformation from overwriting existing value in the given field when there's nothing to load ie loaded value is initial or "" WHILE LOADING transactional data from 0figl_O14 to data cube.

I tried to use code like this

but RAISE EXCEPTION TYPE CX_RSOUT_SKIP_RECORD instruction can't be used as it causes not loading entire record.

What can be use instead of that RAISE... instruction ???

Regards, Leszek

View Entire Topic
Former Member
0 Kudos

Hi Leslaw,

Use a continue statment in the else part this helps to skip the loop iteration.

See example below for make it clear how this works.

CONTINUE statement in ABAP is used for terminating the current loop iteration and start the next iteration. This statement can only used with the loops like

  • DO … ENDDO Loops
  • WHILE … ENDWHILE loops
  • LOOP … ENDLOOP loops
  • SELECT … ENDSELECT loops

See the following sample code and its result for better understand.

DO 10 TIMES.

IF SY-INDEX >= 0 AND SY-INDEX <= 6.    CONTINUE.

WRITE: SY-INDEX, ‘ ‘.

ENDIF.

ENDDO.

Its output will be:

7 8 9 10.

Thanks,

Madhu.

former_member194898
Active Contributor
0 Kudos

Thank you for quick response but as far as I understood your answer  it's not that case. Could you please look into my explanation that I wrote to Mr Anish Samuel.