Hi All,
I want to map two fields of cost center in the transformation and need to delete the leading 0s too.
When I map these fields and write start routine to fetch data in the internal table, I get the following error.
"E:When you use the addition "FOR ALL ENTRIES IN itab", the fields "COSTCENTER" and "SOURCE_PACKAGE-/BIC/JBUSINESS" must have the same type and the same length."
Below is my code:
TYPES : BEGIN OF ST_BUC,
/BIC/JBUSINESS TYPE /BIC/OIJBUSINESS,
END OF ST_BUC.
DATA : ITAB_CCTR TYPE STANDARD TABLE OF /BI0/MCOSTCENTER,
WA_CCTR TYPE /BI0/MCOSTCENTER.
DATA : ITAB_BUC TYPE STANDARD TABLE OF ST_BUC,
WA_BUC TYPE ST_BUC.
IF SOURCE_PACKAGE IS NOT INITIAL.
REFRESH ITAB_CCTR.
REFRESH ITAB_BUC.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING INPUT = WA_BUC
IMPORTING OUTPUT = WA_BUC.
SELECT * FROM /BI0/MCOSTCENTER INTO TABLE ITAB_CCTR
FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE COSTCENTER = SOURCE_PACKAGE-/BIC/JBUSINESS.
SORT ITAB_CCTR BY COSTCENTER. ENDIF.
here, 0costcenter = 10 and jbusiness = 12.
I referred other threads. But couldn't find a solution to my problem.
Please let me know how to fix this issue.