on 08-14-2007 9:17 AM
Hi all,
I have a challenge that should be solved quite easily, but I cannot come to a solution.
In an ODS I have the Objects: 0FISCPER3 and 0FISCYEAR. Now I want to report on 0FISCPER. The architecture is as follows:
Source ODS (with 0FISCPER3 and 0FISCYEAR) > RSANWB Process > Target ODS (with 0FISCPER3, 0FISCYEAR and <b>0FISCPER</b>).
How can I fill 0FISCPER in the target ODS?
Many thanks in advance.
bring in a routine in between and write a code
LOOP AT it_source INTO ls_source.
MOVE-CORRESPONDING ls_source TO ls_target.
concatenate ls_souce-fiscyear ls_source-fiscper3 to ls_target-fiscper.
endloop.
if fiscper is not taking 3 chars from fiscper3, append 0s accordingly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradhiba,
Thanks for your quick response! I'm not a technical consultant, so perhaps you can help me out with this... I've put in your code in the RSANWB procesflow. It's now like this:
REPORT RSAN_WB_ROUTINE_TEMP_REPORT .
TYPES: BEGIN OF y_source_fields ,
FISCYEAR TYPE /BI0/OIFISCYEAR ,
FISCPER3 TYPE /BI0/OIFISCPER3 ,
END OF y_source_fields .
TYPES: yt_source_fields TYPE STANDARD TABLE OF y_source_fields .
TYPES: BEGIN OF y_target_fields ,
FISCPER TYPE /BI0/OIFISCPER ,
END OF y_target_fields .
TYPES: yt_target_fields TYPE STANDARD TABLE OF y_target_fields .
*----
Begin of type definitions -
*TYPES: ...
*----
End of type definitions -
FORM compute_data_transformation
USING it_source TYPE yt_source_fields
ir_context TYPE REF TO if_rsan_rt_routine_context
EXPORTING et_target TYPE yt_target_fields .
*----
Begin of transformation code -
LOOP AT it_source INTO ls_source.
MOVE-CORRESPONDING ls_source TO ls_target.
concatenate ls_source-fiscyear ls_source-fiscper3 to ls_target-fiscper.
endloop.
*----
End of transformation code -
ENDFORM.
But I get the following error-message:
Syntax error: The field "LS_SOURCE" is unknown, but there is a field with the similar name "IT_SOURCE". "IT_SOURCE".
Hope you can help me. Thanks in advance
do it this way.
DATA: ls_source TYPE y_source_fields,
ls_target TYPE y_target_fields.
LOOP AT it_source INTO ls_source.
MOVE-CORRESPONDING ls_source TO ls_target.
concatenate ls_source-fiscyear ls_source-fiscper3 to ls_target-fiscper.
APPEND ls_target TO et_target.
endloop.
*assigning points is the way to say thanx in SDN*
Just add a formula instead of a Routine:
CONCATENATE (FISCYEAR, FISCPER3).
That´s it. No Routine, no ABAP. 😉
br,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.