on 03-02-2017 11:26 AM - last edited on 02-03-2024 8:33 PM by postmig_api_4
Hello All,
Need your help for the scenario mentioned below.
We are trying to populate data using virtual provider , below the virtual provider we have a transformation. In the target fields 0FISCPER (Fiscal Period) of transformation filed routine is written to concatenate SOURCE_FIELDS-GJAHR(Year) and SOURCE_FIELDS-MONAT(Period) coming from source and assign it to 0FISCPER (Fiscal Period).
Now we need to write a INVERT routine to separate GJAHR and MONAT from 0FISCPER into their respective fields.
I wrote the code but When i try to assign back both GJAHR and MONAT it's not working however if i assign back any one field it's working perfectly.
Code is show below. Please let me know if you have any ideas/methods to assign back both the fields to their respective fields. Method c_r_selset_inbound->unite is working perfectly once but second time it's changing the object type which is causing trouble .
Code:-
***Fill Period Dimension Set
IF me->lo_set_mont IS INITIAL. CALL METHOD i_r_universe_inbound->get_dimension_by_name EXPORTING i_dimname = 'MONAT' RECEIVING r_r_dimension = lr_dimension_pe. CALL METHOD lr_dimension_pe->create_set_from_ranges EXPORTING i_t_ranges = lt_inb_mont[] RECEIVING r_r_set = me->lo_set_mont. ENDIF.
similarly fiscal year is also filled.
*****Inbound selection Data
c_r_selset_inbound = cl_rsmds_set=>get_empty_set( ).
* c_r_selset_inbound = c_r_selset_inbound->unite( me->lo_set_fscy ).
c_r_selset_inbound = c_r_selset_inbound->unite( me->lo_set_mont ).
c_exact = rs_c_true.
HI
check out doc:
READ TABLE i_thx_selection_cs INTO l_sx_selection_cs
WITH KEY chanm = '0FISCYPER'.
l_s_selection-fieldnm = 'GJAHR'. "Source fields name Year
l_s_selection-sign = 'I'.
l_s_selection-option = 'EQ'.
Loop at l_sx_selection_cs-rt_chavl into wa
l_s_selection-low = wa-low(4)
endloop.
APPEND l_s_selection TO c_t_selection.
l_s_selection-fieldnm = 'MONAT'. "Source fields name Year
l_s_selection-sign = 'I'.
l_s_selection-option = 'EQ'.
Loop at l_sx_selection_cs-rt_chavl into wa
l_s_selection-low = wa-low+4(2)
endloop.
APPEND l_s_selection TO c_t_selection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.