How to call Attributes in the routine for transaction data

Dear Pros,
I have a condition that i have an additional Info object to be filled with a value such as
i have plant and material in the transaction data,
Distributional channal --> attribute of 0plant
Zmatentry --> attribute of 0material.
I WANT TO CALL DIST CHANNAL & ZMATENTRY IN RSDS TRANSFORMATION AND USE TO FILL ZCOMPINCH
code is similar to
if SOURCE_FIELDS-DISTR_CHAN eq '01'.
Zcompinch = fill with comp code
  RESULT = SOURCE_FIELDS-COMP_CODE.
or Zcompinch = fill with Zmatentry from attribute of 0material
  ELSE.
  RESULT = SOURCE_FIELDS-/BIC/ZMATENTRY.
  ENDIF.
THANK YOU

Hi,
DATA: BEGIN OF t_batch OCCURS 0,
     material LIKE /BIC/AZIC_O0600-material,
     plant LIKE /BIC/AZIC_O0600-plant,
     stor_loc LIKE /BIC/AZIC_O0600-stor_loc,
     batch LIKE /BIC/AZIC_O0600-batch.
      END OF t_batch.
SELECT MATERIAL PLANT STOR_LOC BATCH FROM /BIC/AZIC_O0600 INTO t_batch for all entries in DATA_PACKAGE
WHERE
material = DATA_PACKAGE-material  and
plant    = DATA_PACKAGE-PLANT     and
stor_loc = DATA_PACKAGE-stor_loc.
ABORT = 0.
"This code is at field level routine.
SORT t_batch by material batch stor_loc.
Read table t_btach with key material = COMM_STRUCTURE-material
                            plant    = COMM_STRUCTURE-plant   
                            stor_loc = COMM_STRUCTURE-stor_loc.
"In the above code I'm reading the data from t_btach table, t_btach is already filled based on DataPackage at Start Routine level.
"In my case it is working fine, so try it take ABAPer help.
If sy-subrc = 0.
  RESULT = t_batch-PLANT.
else.
  RESULT = ''.
endif.
ENDIF.
ENDLOOP.
Thanks
Reddy

Similar Messages

Maybe you are looking for