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

Syntax error in RPUDRIF1

Former Member
0 Likes
2,523

Hi All,

We have a Z program that we use to pull financial information out in a file format for distribution to a 3rd party system. The program has not been used for 3-4 years and has not been tested during patching at all.

We are looking to rekindle the program but it is currently giving a runtime error when the Z transaction is run.

I have tracked down the error to one include within the main program:

Here is the error I am experiencing - the error here is while syntax checking, but it is exactly the same as the error when running the Z program. This looks to me like a sap standard include that I probably cant fiddle with?

Can anyone offer any advice on how I might initiate a fix on this?

Many thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,490

Hi Iain,

if your Z program includes RPUDRIF1 then you have to define gs_range in your Z program.

In SAP standard include RPUDRIG0_TOP ls_range has been renamed to gs_range.

Additional info. Table p_bukrs has been added to the interface of form CHECK_ORDER. Maybe there might be another issue calling this form.

Regards,

Klaus

Hi All,

We have a Z program that we use to pull financial information out in a file format for distribution to a 3rd party system. The program has not been used for 3-4 years and has not been tested during patching at all.

We are looking to rekindle the program but it is currently giving a runtime error when the Z transaction is run.

I have tracked down the error to one include within the main program:

Here is the error I am experiencing - the error here is while syntax checking, but it is exactly the same as the error when running the Z program. This looks to me like a sap standard include that I probably cant fiddle with?

Can anyone offer any advice on how I might initiate a fix on this?

Many thanks

12 REPLIES 12
Read only

rajkumarnarasimman
Active Contributor
0 Likes
2,490

Hi Lain,

Kindly check the following note.

1955315 - PY-GB: Posted Payr.Cost: Determ. CompCo per ContArea issue


Kindly make sure whether the note is fully implemented.



Regards


Rajkumar Narasimman

Read only

0 Likes
2,490

Thanks Rajkumar, I have forwarded that note to our Basis team to investigate.

Read only

Former Member
0 Likes
2,491

Hi Iain,

if your Z program includes RPUDRIF1 then you have to define gs_range in your Z program.

In SAP standard include RPUDRIG0_TOP ls_range has been renamed to gs_range.

Additional info. Table p_bukrs has been added to the interface of form CHECK_ORDER. Maybe there might be another issue calling this form.

Regards,

Klaus

Read only

0 Likes
2,490

Hi Klaus,

Thank you - I have checked Rajkumar's suggestion and can confirm that note 1955315 has already been implemented.

In my Z program I have the following declarations:

* form routines

   INCLUDE rpudrif0.                    "forms

   INCLUDE rpudrif1.                    "CO related forms

   INCLUDE rpudrif2.                    "forms

   INCLUDE rpudrif3.                    "forms


Do I at this level need to define that gs_range is to be expected?


Many thanks

Read only

0 Likes
2,490

Hi lain,

Can you please include RPUDRIG0_TOP  in your z-program and check whether the same error occurring.

Regards

Rajkumar Narasimman

Read only

0 Likes
2,490

Hi Rajkumar,

I have added as you suggested so now my includes look like this:

* form routines

  INCLUDE RPUDRIG0_TOP.

   INCLUDE rpudrif0.                    "forms

   INCLUDE rpudrif1.                    "CO related forms

   INCLUDE rpudrif2.                    "forms

   INCLUDE rpudrif3.                    "forms

I now have a syntax error of:

The following syntax error occurred in program "ZHR_FSIPY11_SIMS " in include

  "RPUDRIG0_TOP " in

line 6:

""DOC_TYPE" has already been declared"

Many thanks

Read only

0 Likes
2,490

Hi Lain,

  Kindly Check where the DOC_TYPE is declared other than RPUDRIG0_TOP.

  If DOC_TYPE is declared in custom program (Z-program), comment that particular declaration.

  If it is from another standard include, Create the structure gs_range structure in the z-program  and remove the include RPUDRIG0_TOP from Z-program.

Regards

Rajkumar Narasimman

Read only

0 Likes
2,490

Hi Rajkumar,

DOC_TYPE was declared in:

INCLUDE zrpudrig0_top (in my main Z program)


I missed that include originally. I have taken out the rpudrig0_top include now and am back to the error again where GS_RANGE is unknown.


Where would I declare that please?


Many thanks

Read only

0 Likes
2,490

Hi lain,

Comment the DOC_TYPE in Zprogram  zrpudrig0_top and include the RPUDRIG0_TOP program, hope doc_type error wont come..

Regards

Rajkumar Narasimman

Read only

0 Likes
2,490

Hi Iain,

there must be a reason, that you have a Z-copy of RPUDRIG0_TOP in your program. maybe there are some structures enhanced or something like that.

In a first step make all changes from the note in your ZRPUDRIG0_TOP include:

  • Rename structure ls_range to gs_range.
  • Add line

    DATA: gt_bukrs LIKE TABLE OF gs_range.

    after line

    FIELD-SYMBOLS: <fs_data> TYPE STANDARD TABLE.

Don't include RPUDRIG0_TOP in your Z-program.

Regards,

Klaus

Read only

Former Member
0 Likes
2,490

Klaus,

Thank you that has moved me on - we were missing the entire block for defining gs_range (no mention of ls_range!).

My next error is on INCLUDE RPUDRIF1 - Error "The field C_SIGN" is unknown, but there is a field with the similar "ICON_ASSIGN".

Can you offer any assistance on this one?

I am very keen to learn how to resolve these kinds of issues in future - I am having difficulty in understanding how these kind of errors occur. To me the error is saying that we haven't defined a variable called C_SIGN or it doesn't exist in the context of the code it is referred in.

The include is SAP standard so my assumption is that it is something to do with the way I am using the include rather than the include itself.

Any advice is greatly appreciated.

Read only

0 Likes
2,490

Hi Iain,

in include RPUDRIG0_TOP there was a correction instruction from SAP note

0001866259  -  PA-PA-GB: Performance tuning for Posted Cost report

After TABLES: ... PERNR.  a new data definition block was inserted:

* Additional select options  correction ( 28.05.2013 - C5188264 😞

CONSTANTS: c_sign(1)   TYPE c VALUE 'I',

           c_option(2) TYPE c VALUE 'EQ',

           c_pnpkostl(10)  TYPE c VALUE 'PNPKOSTL[]',

           c_pnpkokrs(10)  TYPE c VALUE 'PNPKOKRS[]',

           c_pnpbukrs(10)  TYPE c VALUE 'PNPBUKRS[]'.

DATA: BEGIN OF ls_range, " OCCURS 0,

        sign(1),

        option(2),

        low(10),

        high(10),

      END OF ls_range,

      lv_pnptable TYPE tabname.

FIELD-SYMBOLS: <fs_data> TYPE STANDARD TABLE.


If you have your own Z-copy of this include, you have to copy this new constants and definitions into your Z-copy.

Regards,

Klaus