2013 May 31 10:04 AM
Hi experts,
I don't know if some of you have already worked in BW.
I am developping a code in my start routine, and I am getting the follwing error:
The weird part, i don't have any field named Data.I am using an And statement in my code as following:
When I disable this piece of code, i get no syntax errors anymore.
Can someone tell me what's wrong and how to bypass the issue?
Thanks.
Amine
2013 May 31 10:37 AM
Hi,
write the code as
loop at source_package into wa_source_package where gl_account = wa_tablesource-gl_account.
if wa_source_package-profit_ctr in r_zpcfrom.
write your code.
endif.
endloop.
Hi,
write the code as
loop at source_package into wa_source_package where gl_account = wa_tablesource-gl_account.
if wa_source_package-profit_ctr in r_zpcfrom.
write your code.
endif.
endloop.
2013 May 31 10:12 AM
2013 May 31 11:24 AM
Hi Sam,
Thanks for your answer, but i used in because r_zpcfrom is a range.
Amine
2013 May 31 10:37 AM
Hi,
write the code as
loop at source_package into wa_source_package where gl_account = wa_tablesource-gl_account.
if wa_source_package-profit_ctr in r_zpcfrom.
write your code.
endif.
endloop.
2013 May 31 11:30 AM
Thanks Sai,
Now i have another error:
E:Field specification missing
Thanks.
Amine
2013 May 31 12:20 PM
Hi Amine,
The issue is with the logic and not the Start Routine.
U'r 1st syntax requires a range of values after ' IN ' with r_zpcfrom. Please check that r_zpcfrom is an internal table and has some data, then there should'nt be any problem. Below pseudo code i tried and it worked as u see S_CARRID is an internal table which has some values
If you still face the issue, please revert.
Thanks
Vivek
2013 May 31 3:16 PM
Hi Vivek,
Here my declaration part:
DATA : r_zfuncfrom TYPE RANGE OF /bic/pzsplit-/bic/zfuncfrom,
r_zpcfrom TYPE RANGE OF /bic/pzsplit-/bic/zpcfrom,
r_zfuncfrom_line LIKE LINE OF r_zfuncfrom,
r_zpcfrom_line LIKE LINE OF r_zpcfrom.
r_zfuncfrom_line-sign = 'I'.
r_zfuncfrom_line-option = 'BT'.
r_zpcfrom_line-sign = 'I'.
r_zpcfrom_line-option = 'BT'.
Amine
2013 May 31 3:35 PM
Hi again,
The follwoing logic worked fine, but i am afraid about performance, what do you think?
LOOP AT source_package INTO wa_source_package.
IF wa_source_package-gl_account = wa_tablesource-/bic/zsplit
AND wa_source_package-profit_ctr IN r_zpcfrom.
*Treatments
ENDIF.
ENDLOOP.
Anyway to enhance it?
Thanks.
Amine
2013 May 31 4:02 PM
The above logic looks fine with performance perspective. Heads up.
The approach is whenever there is more data involved, Instead of bulk SELECT statement, more of processing in the internal tables is done just like above.
Thanks
Vivek
2013 May 31 4:16 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |