on 06-02-2015 12:40 PM
Hello,
We have completely archived data of a DSO1 to Near Line Storage and we want to do a look-up the archived data of this DSO1 in a transformation from DSO2 to Infocube1.
We tried to achieve this in 2 ways :
1) using 'Read from DataStore' feature in transformation.
- This works fine when we use the 'Read from DataStore' feature for single field in the transformation rule and get the output (archived data).
2) using field 'Routine' in transformation.
- this does not work when trying to lookup using the ABAP Code.
The reason we want to do the lookup in the routine is, so that.
- we can do the lookup to this DSO in NLS in Start/End routine and further use this lookup data within the Start/End routine in other internal tables for further calculations.
Any inputs will be highly appreciated.
Thanks.
Hi Krupali:
You have to archive enable any start or end routine when doing a lookup against data that has been archived to NLS. The SELECT....FOR ALL ENTRIES.... statement will need to be replaced with the following API call:
TRY.
CALL METHOD
cl_rsda_infoprov_query=>select
EXPORTING
i_infoprov = c_infoprov
i_t_entries = lt_lookup_keys
i_t_entry_fields = lt_lookup_conditions
CHANGING
c_t_data = pt_lookup_data.
CATCH cx_rsda_input_invalid
cx_rsda_access_error.
ENDTRY.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi J H,
Thanks for the reply.
With reference to SAP Note 1536550 -Enhancement LOOKUP API: Separate NLS lookup for DSO/CUBE,
we have used the below code :
TRY .
CALL METHOD lv_class_var->select
EXPORTING
i_infoprov = 'ZPP_BOM'
i_t_entries = SOURCE_PACKAGE
i_t_entry_fields = lt_entryfields
I_T_FIELD_SELECTIONS = lt_field_selections
i_storage_selection =
cl_rsda_infoprov_query=>c_storage_selection-all
CHANGING
c_t_data = lt_zpp_bom1.
CATCH cx_rsda_input_invalid.
CATCH cx_rsda_access_error.
CATCH cx_rsda_action_refused.
ENDTRY.
However, while loading the data, we are getting the below error in DTP :
"Exception in Substep Start Routine"
Record (0) for segment (0001) has no reference to a source record
Dereferencing the NULL reference
An exception was raised
Error in substep
Data package processing terminated
Would like to know if you have used this API successfuly.
Regards,
Krupali
Hello J H,
As Jaydip has already updated, this worked for our scenario.
Thanks for the inputs.
Closing the thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi J H,
Just one more clarification.
In your sample code,
ls_lookup_condition-fieldname = 'EMPL_ID'
ls_lookup_condition-option = 'EQ'
ls_lookup_condition-component_name = 'EMPL_ID'.
In our case, it works fine for 2 fields where 'fieldname' and 'component_name' are the same.
However, it does not, for the 3rd field which we try to lookup, where 'fieldname' and 'component_name' are different.
i.e.For example,
* for Plant (here 'fieldname' and 'component_name' are the same)
wa_entry_fields-fieldname = 'PLANT'.
wa_entry_fields-option = 'EQ'.
wa_entry_fields-component_name = 'PLANT'.
APPEND wa_entry_fields TO lt_entry_fields.
* for createdon ( 'fieldname' and 'component_name' are the different)
wa_entry_fields-fieldname = 'CREATEDON'.
wa_entry_fields-option = '='.
wa_entry_fields-component_name = 'PSTNG_DATE'.
APPEND wa_entry_fields TO lt_entry_fields.
*for Shift ( 'fieldname' and 'component_name' are the same)
wa_entry_fields-fieldname = '/BIC/ZSHIFT'.
wa_entry_fields-option = 'EQ'.
wa_entry_fields-component_name = '/BIC/ZSHIFT'.
APPEND wa_entry_fields TO lt_entry_fields.
Have you faced any such issue ?
Regards,
Krupali
Hi Naik,
Assume you using NLS, when you execute your load, you need looking for something values to archive more information, i'm right?
Please share what is your ods keys and your routine.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Once you archive data in NLS, it will not be in tables, so i am not sure how you are looking up data in routine? it will not be advisable as we archive data only because we don´t need it further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.