on 03-27-2015 1:54 PM
Hi everybody!
This is the situation:
We have a transformation from a DSO to a CUBE. In the Cube we have the DOC_TYPE, but in the DSO we don't. So we do a lookup in the transformation to get the DOC_TYPE from a second DSO.
Until here we are OK. Then, in the end routine, we try to do the following: If a DOC_TYPE = 'ZNC' or 'ZND', then the ratios NETVAL_INV and INV_QTY must be equal zero for those records.
This is the code we are using:
DATA:
DOC_TYPE type /BI0/OIDOC_TYPE,
INV_QTY TYPE /BI0/OIINV_QTY,
NETVAL_INV TYPE /BI0/OINETVAL_INV,
lv_data type table of _ty_s_TG_1,
wa_data type _ty_s_TG_1.
loop at RESULT_PACKAGE into wa_data where doc_type = 'ZNC' or
doc_type = 'ZND'.
INV_QTY = '0'.
NETVAL_INV = '0'.
modify RESULT_PACKAGE from wa_data.
endloop.
The DOC_TYPE has records, so the lookup is working fine, but the ratios netval_inv and inv_qty have quantities when they should be = '0'.
Hi Ariel,
have a look at Nanda's reply: that's the suggested way to modify internal tables in transformation routines. That's what I'd write, but Nanda anticipated me.
Regards,
Gabriele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA:
DOC_TYPE type /BI0/OIDOC_TYPE,
INV_QTY TYPE /BIC/OIINV_QTY,
NETVAL_INV TYPE /BIC/OINETVAL_INV,
lv_data type table of _ty_s_TG_1,
wa_data type _ty_s_TG_1.
loop at RESULT_PACKAGE into wa_data where doc_type = 'ZNC' or
doc_type = 'ZND'.
<result_fields>- INV_QTY = '0'.
<result_fileds>-NETVAL_INV = '0'.
modify RESULT_PACKAGE from wa_data.
endloop.
Thanks,
Dinesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The code should be as follows:
DATA:
DOC_TYPE type /BI0/OIDOC_TYPE,
INV_QTY TYPE /BI0/OIINV_QTY,
NETVAL_INV TYPE /BI0/OINETVAL_INV,
lv_data type standard table of _ty_s_TG_1,
wa_data type _ty_s_TG_1.
loop at RESULT_PACKAGE into wa_data where doc_type = 'ZNC' or
doc_type = 'ZND'.
wa_data-INV_QTY= '0'.
wa_data-NETVAL_INV = '0'.
modify RESULT_PACKAGE from wa_data.
endloop.
You have missed assigning the value to the work area in your code.
Regards,
Anupama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ariel,
Try to equate the value zero in the work area..
Do this:
DATA:
DOC_TYPE type /BI0/OIDOC_TYPE,
INV_QTY TYPE /BI0/OIINV_QTY,
NETVAL_INV TYPE /BI0/OINETVAL_INV,
lv_data type standard table of _ty_s_TG_1,
wa_data type _ty_s_TG_1.
loop at RESULT_PACKAGE into wa_data where doc_type = 'ZNC' or
doc_type = 'ZND'.
wa_data-INV_QTY = '0'.
wa_data-NETVAL_INV = '0'.
modify RESULT_PACKAGE from wa_data.
endloop.
Just post here for any queries..
Regards,
Loed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share your full code please.
Thanks,
Vivek Ankit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to update it with work area : update required fields with wa_data
ie :
wa_data-inv_qty = '0'.
wa_data-netval_inv = '0'.
Thank-You.
Regards,
VB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aiel,
Please try this code in end routine.
loop at result_package assigning <result_fields> where doc_type = 'ZNC' OR doc_type = 'ZND'.
<result_fields>-INV_QTY = '0'.
<result_fields>-NETVAL_INV = '0'.
endloop.
thank you,
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
above code you are not write the select query form DSO table which and with key fields combinations
please share the total code
-Phani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The lookup code on dso to get the doc type is also a part of end routine or its in start routine.
Can you share the complete code that you have in place.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i think /BI0/OIINV_QTY and /BI0/OINETVAL_INV key have custom Key figures menas it will start -/BIC/XXXXX.
try the below code
DATA:
DOC_TYPE type /BI0/OIDOC_TYPE,
INV_QTY TYPE /BIC/OIINV_QTY,
NETVAL_INV TYPE /BIC/OINETVAL_INV,
lv_data type table of _ty_s_TG_1,
wa_data type _ty_s_TG_1.
loop at RESULT_PACKAGE into wa_data where doc_type = 'ZNC' or
doc_type = 'ZND'.
INV_QTY = '0'.
NETVAL_INV = '0'.
modify RESULT_PACKAGE from wa_data.
endloop.
Thanks,
Phani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.