cancel
Showing results for 
Search instead for 
Did you mean: 

Request for help at End Routine Logic at Master Data transformation

former_member228877
Participant
0 Kudos

Hi Friends,

I need to write an End routine at the transformations of Master data 0FUNCT_LOC

Scenario : I need have indicator  weather a particular Functional Location is Main Equipment or not. I have created ZSTATUS attribute for 0FUNCT_LOC and need to mark ‘X’ or A, If following pattern functional locations come at the package

T0*-DSSE-301XMain
T0*-ESPS-873XMain
T0*-HOIS-312XMain
T0*-AIRSAAverage
T0*-DPFA-384AAverage
T0*-DPFA-505AAverage
T0*-ESPS-865AAverage

Below is example of 1st pattern Functional Location that come from ECC which I need to Mark as ‘X’

T0016-DSSE-301

T0019-DSSE-301

T0025-DSSE-301

T0034-DSSE-301

I have written below logic at End Routine of transformation

Could please correct below syntax, ( I gone through SDN and foynd syntax for Pattern is CP, Hence I have written)

  LOOP AT RESULT_PACKAGE assigning <RESULT_FIELDS>
WHERE FUNCT_LOC CP 'T0*-DSSE-301',
'T0*-ESPS-873',
'T0*-HOIS-312'.
<RESULT_FIELDS>/BIC/ZSTATUS ='X'.

WHERE FUNCT_LOC CP 'T0*-AIRS',

'T0*-DPFA-505',

'T0*-ESPS-865'.

<RESULT_FIELDS>/BIC/ZSTATUS ='A'.


ENDLOOP.

Thanks

Sree

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Srikanth,

The code below will solve the problem.

LOOP AT result_package ASSIGNING <result_fields>.
 
IF     ( <result_fields>-funct_loc CP 'T0*-DSSE-301' OR
           <result_fields>
-funct_loc CP 'T0*-ESPS-873' OR
           <result_fields>
-funct_loc CP 'T0*-HOIS-312' ).
    <result_fields>
-/bic/zstatus = 'X'.
 
ELSEIF ( <result_fields>-funct_loc CP 'T0*-AIRS' OR
           <result_fields>
-funct_loc CP
'T0*-DPFA-505' OR
           <result_fields>
-funct_loc CP
'T0*-ESPS-865' ).
   
<result_fields>-/bic/zstatus =
'A'.
 
ENDIF.

ENDLOOP.

Hope it will do the trick for you.

Grtz,

René

Answers (1)

Answers (1)

former_member228877
Participant
0 Kudos

Hi René,

Thanks a lot for your code, Its working..

Best regards

Sree