Dear all,
I need to transfer attribute to characteristic. So I read several threats and created start routine for filling values into internal table and characteristics routine for reading master data from internal table and filling infoobject with attribute value
InfoObject = 0CRM_PROD, attribute = 0CRM_PREF
I'm new to ABAP, please help me
Start routine code has no syntax errors:
===============
TYPES:
BEGIN OF lt_prod,
CRM_PROD TYPE /BI0/PCRM_PROD,
CRM_PRREF TYPE /BI0/PCRM_PROD,
END OF lt_prod.
DATA:
t_prod TYPE HASHED TABLE OF lt_prod
WITH UNIQUE KEY CRM_PROD.
DATA:
fl_prod type lt_prod.
select CRM_PROD
CRM_PRREF
from /BI0/PCRM_PROD
into table t_prod
for all entries in SOURCE_PACKAGE
where CRM_PROD = SOURCE_PACKAGE-CRM_PROD
and objvers = 'A'.
===============
Characteristic routine code has error "Field "FL_PROD" is unknown"
===============
clear fl_prod.
READ TABLE t_prod INTO fl_prod
WITH TABLE KEY CRM_PROD = SOURCE_FIELDS-CRM_PROD.
RESULT = fl_prod-CRM_PREF.
===============
Please help me, where is a mistake? Why internal table fl_prod declared in start routine is not available in characteristic routine?
Thanks in advance
Hi oleg,
maybe you have to insert all declarations into global declaration (in the first part of start routine). If you insert them in global declaration, you can use fl_prod in characteristic routine code and end routine too.
Hope it helps.
Regards.
Simone.
Start routine code has no syntax errors:
===============
TYPES:
BEGIN OF lt_prod,
CRM_PROD TYPE /BIC/OI0CRM_PROD,
CRM_PRREF TYPE /BIC/OI0CRM_PREF,
END OF lt_prod.
DATA: t_prod TYPE Standard TABLE OF lt_prod,
fl_prod type lt_prod.
select CRM_PROD
CRM_PRREF
from /BI0/PCRM_PROD
into table t_prod
for all entries in SOURCE_PACKAGE
where CRM_PROD = SOURCE_PACKAGE-CRM_PROD
and objvers = 'A'.
===============
Characteristic routine code has error "Field "FL_PROD" is unknown"
===============
clear fl_prod.
READ TABLE t_prod INTO fl_prod
WITH KEY CRM_PROD = SOURCE_FIELDS-CRM_PROD.
RESULT = fl_prod-CRM_PREF.
Please use the above code
regards,
Arvind.
Add a comment