Sunteți pe pagina 1din 8

Start routine syntax error

1 of 8

https://archive.sap.com/discussions/thread/3367906

10/31/2016 5:31 PM

Start routine syntax error

2 of 8

https://archive.sap.com/discussions/thread/3367906

This question is answered

Hi experts,
I don't know if some of you already faced the issue that I am .
I am developping a code in a transformation 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

enterprise_data_warehousing/business_warehouse

amine lamkaissi
May 31, 2013 at 11:23 AM
0 Likes

10/31/2016 5:31 PM

Start routine syntax error

3 of 8

https://archive.sap.com/discussions/thread/3367906

Correct Answer

replied May 31, 2013 at 13:52 PM

Yasemin ULUTURK

Hi Amine,
Maybe you can write the where condition in an if statement such as:
Loop at source_package into wa_source_package.
if wa_source_package-gl_account = wa_tablesource-gl_account and ....
...
endif.
Yasemin...
2

View this answer in context

Helpful Answer by
Hendrik Brandes
M Tibollo

Yasemin ULUTURK
Hendrik Brandes
CH Raman
John Lang

Tibollo

Helpful Answer

Yasemin ULUTURK

replied

May 31, 2013 at 11:32 AM

Hi Amine,
I am not sure but it may be due to gl_account and profit_ctr.

10/31/2016 5:31 PM

Start routine syntax error

4 of 8

https://archive.sap.com/discussions/thread/3367906

I am not sure but it may be due to gl_account and profit_ctr.


Please try as wa_source_package-gl_account instead of gl_account and same
for pprofit_ctr.
I hope it helps
Yasemin..
0

amine lamkaissi

replied
May 31, 2013 at 12:31 PM

Hi Yasemin,
I tried your proposal, now i am getting the following
error:
E:Field specification missing
Thanks.
Amine
0

Correct Answer

Yasemin ULUTURK

replied
May 31, 2013 at 13:52 PM

Hi Amine,
Maybe you can write the where condition in
an if statement such as:
Loop at source_package into
wa_source_package.
if wa_source_package-gl_account =
wa_tablesource-gl_account and ....
...
endif.

10/31/2016 5:31 PM

Start routine syntax error

5 of 8

https://archive.sap.com/discussions/thread/3367906

endif.
Yasemin...
2

Helpful Answer

Hendrik Brandes

replied

May 31, 2013 at 11:35 AM

Hello Amine,
do you have a DATA field "wa_tablesource" defined with field gl_account
defined?
Perhaps, you can send the startroutine code. I think a correct data declaration is
missed.
Second:
use
LOOP AT source_package ASSIGNING <source_fields>
...
ENDLOOP
when working with 7.x startroutines. Performes better and is declared by default.
Kind regards,
Hendrik
0

amine lamkaissi

replied
May 31, 2013 at 12:23 PM

Thanks HendriK for your input.


Actually i am testing a new requirment and i didn't
finish the whole logic yet. You suggest me to use a
field symbol. But how can I manage the other
conditions to be sure that the loop is going to treat

10/31/2016 5:31 PM

Start routine syntax error

6 of 8

https://archive.sap.com/discussions/thread/3367906

field symbol. But how can I manage the other


conditions to be sure that the loop is going to treat
the right data?
Gl Account and Profit Center in my range.
Thanks.
Amine
0

Helpful Answer

Hendrik Brandes

replied
May 31, 2013 at 12:49 PM

Well, it depends on your input and how you


get your data. ;-)
Is GL_ACCOUNT and PROFIT_CTR within
your source_package or can you read them
from another source ( function, method,
variable... )?
If you need to read them from your
source_package, then you should consider
using another algorithm.
For example by using AT
gl_account...ENDAT.
Kind regards,
Hendrik
0

Helpful Answer

M Tibollo

as stated by Hendrik Brandes

replied

May 31, 2013 at 11:47 AM

this is incorrect

10/31/2016 5:31 PM

Start routine syntax error

7 of 8

https://archive.sap.com/discussions/thread/3367906

as stated by Hendrik Brandes

this is incorrect

abaping. you're comparing what with what in your where statement. Reflect on
that.
BR,
M.
0

kalpana korrapati

replied
May 31, 2013 at 12:35 PM

what ever the code u wrote


is correct so can u please
share fields in
source_package if possible
share full code related to
this program.
1

satish singh

May 31, 2013 at 14:13 PM

replied

Hi Amine,
Can you please share what is the type of your structure R_ZPCFROM and what
values are in .
Is it a range.?
1

amine lamkaissi

replied
May 31, 2013 at 16:17 PM

Hi Satish,
Here my decelaration part, in fact it's a range:
DATA : r_zfuncfrom TYPE RANGE OF /bic/pzsplit-

10/31/2016 5:31 PM

Start routine syntax error

8 of 8

https://archive.sap.com/discussions/thread/3367906

Here my decelaration part, in fact it's a range:


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
0

amine lamkaissi

replied

May 31, 2013 at 16:36 PM

Hi again,

Yasemin was right, thanks a lot


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

10/31/2016 5:31 PM

S-ar putea să vă placă și