Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in BW Start Routine

Former Member
0 Likes
1,890

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,835

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 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

9 REPLIES 9
Read only

Former Member
0 Likes
1,835

Hello Amine,

try '=' place of in.its may work.

Thanks,

Sam

Read only

0 Likes
1,835

Hi Sam,

Thanks for your answer, but i used in because r_zpcfrom is a range.

Amine

Read only

Former Member
0 Likes
1,836

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.

Read only

0 Likes
1,835

Thanks Sai,

Now i have another error:

E:Field specification missing

Thanks.

Amine

Read only

0 Likes
1,835

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

Read only

0 Likes
1,835

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

Read only

Former Member
0 Likes
1,835

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

Read only

0 Likes
1,835

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

Read only

0 Likes
1,835

Thanks Vivek.

Amine