cancel
Showing results for 
Search instead for 
Did you mean: 

Start Routine from 3.5 Update Rule to 7 Transformation.

Former Member
0 Kudos

Hi, I am in a migration from a 3.5 Update Rule(DSO->DSO) to a 7 Transformation, and im having problems with the Start Routine, i have not ABAP skills, so i dont know what sentences i have to change because Routines on 7 are OO.

DATA: BEGIN OF t_x OCCURS 0.
        INCLUDE STRUCTURE /bic/cs8z022.
    DATA: END OF t_x.

data: begin of it_y occurs 0,
      /bic/z446 like /BIC/AZ02200-/bic/z446,
      /BIC/Z122 like /BIC/AZ02200-/BIC/Z122,
      /BIC/Z140 like /BIC/AZ2200-/BIC/Z140,
      end of it_y.


  select DISTINCT /bic/z446 /BIC/Z122 /BIC/Z140 into
  table it_y
   from /BIC/AZ2200.

  LOOP AT it_y.
      MOVE: it_y-/bic/z122 TO t_x-/bic/z122,
                  it_y-/bic/z140 TO t_x-/bic/z140,
                  it_y-/bic/z446 to t_x-/bic/z446.
      APPEND t_x.
  ENDLOOP.

  REFRESH DATA_PACKAGE.
  DATA_PACKAGE[] = t_x[].

Thanks in Advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Raj, is that the correct link?

It sends me to the BIs Purpose and Features.

Thanks.

Former Member
0 Kudos

DATA: BEGIN OF t_x.

INCLUDE STRUCTURE /bic/cs8z022.

DATA: END OF t_x.

data: begin of it_y,

/bic/z446 like /BIC/AZ02200-/bic/z446,

/BIC/Z122 like /BIC/AZ02200-/BIC/Z122,

/BIC/Z140 like /BIC/AZ2200-/BIC/Z140,

end of it_y.

select DISTINCT /bic/z446 /BIC/Z122 /BIC/Z140 into

table it_y

from /BIC/AZ2200.

LOOP AT it_y.

MOVE: it_y-/bic/z122 TO t_x-/bic/z122,

it_y-/bic/z140 TO t_x-/bic/z140,

it_y-/bic/z446 to t_x-/bic/z446.

APPEND t_x.

ENDLOOP.

REFRESH SOURCE_PACKAGE.

SOURCE_PACKAGE[] = t_x[].

Former Member
0 Kudos

Hi Raj

I used your code, but Routine threw me this error.

E:"IT_X" is not an internal table - the "OCCURS n" specification is

missing.

Thanks in Advance

Former Member
0 Kudos

I maked some changes triyng to solve my problem.

-


$$ begin of 2nd part global - insert your code only below this line *

DATA: BEGIN OF t_x OCURRS 0.

INCLUDE STRUCTURE /bic/cs8z022.

DATA: END OF t_x.

DATA: BEGIN OF wa_x.

INCLUDE STRUCTURE /bic/cs8z022.

DATA: END OF wa_x.

data: begin of it_y occurs 0,

/bic/z446 like /BIC/AZ02200-/bic/z446,

/BIC/Z122 like /BIC/AZ02200-/BIC/Z122,

/BIC/Z140 like /BIC/AZ2200-/BIC/Z140,

end of it_y.

data: begin of wa_y,

/bic/z446 like /BIC/AZ02200-/bic/z446,

/BIC/Z122 like /BIC/AZ02200-/BIC/Z122,

/BIC/Z140 like /BIC/AZ2200-/BIC/Z140,

end of wa_y.

$$ end of 2nd part global - insert your code only before this line *

$$ begin of routine - insert your code only below this line -

select DISTINCT /bic/z446 /BIC/Z122 /BIC/Z140 into

table it_y

from /BIC/AZ2200.

LOOP AT it_y into wa_y.

clear wa_x.

MOVE: wa_y-/bic/z122 TO wa_x-/bic/z122,

wa_y-/bic/z140 TO wa_x-/bic/z140,

wa_y-/bic/z446 to wa_x-/bic/z446.

APPEND wa_x to t_x.

ENDLOOP.

REFRESH SOURCE_PACKAGE.

SOURCE_PACKAGE[ ] = t_x[ ].

$$ end of routine - insert your code only before this line -

-


And now the Routine throws this error

E:"SOURCE_PACKAGE" and "T_X" are not mutually convertible. In

Unicode programs, "SOURCE_PACKAGE" must have the same structure layout

as "T_X", independent of the length of a Unicode character.

Any idea?

Former Member
0 Kudos

it_x was not even in the code.

how do u get that error?

Former Member
0 Kudos

Sorry Raj this is the error

E:"IT_Y" is not an internal table - the "OCCURS n" specification is

missing.