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

Includes hclpaydata , hgbpaydata.

Former Member
0 Likes
491

hi abappers,

i have in my code two includes "rpc2rgg0" and "rpc2rkk0" inside which there are two more includes "hclpaydata" and "hgbpaydata" respectively. There are three variables "cumul_tab_filter" , "cumul_tab_all", "payresult_addcu" which are declared in the include "hgbpaydata" and once again the same variables are declared in the include "rpc2rkk0", this gives a syntax error. all these includes are sap std and i am using this within my program. is there any way i can work my way around this problem.

main program

rpc2rgg0

hgbpaydata.

DATA: cumul_tab_filter TYPE PAYGB_RESULT .

DATA: cumul_tab_all TYPE PAYGB_RESULT .

DATA: payresult_addcu TYPE PAYGB_RESULT .

rpc2rkk0

hcapaydata

DATA: cumul_tab_filter TYPE PAYCA_RESULT .

DATA: cumul_tab_all TYPE PAYCA_RESULT .

DATA: payresult_addcu TYPE PAYCA_RESULT .

the above code gives the syntax error.

plz can anybody hlp me out?

1 ACCEPTED SOLUTION
Read only

claus_wallacher
Product and Topic Expert
Product and Topic Expert
0 Likes
460

Hi Narendiran,

you get the syntax error since these variable are declared twice within your program (but you probably know that already).

To get around this issue you need to break up your program in different pieces that don't share the same memory. You can think about creating 2 functions (one that includes the part you need from RPC2RGG0 and one that includes the part from RPC2RKK0) and call these functions from your main program.

Of course without knowing any details of your program, I don't know if you can break it up into these different pieces.

Regards,

Claus

1 REPLY 1
Read only

claus_wallacher
Product and Topic Expert
Product and Topic Expert
0 Likes
461

Hi Narendiran,

you get the syntax error since these variable are declared twice within your program (but you probably know that already).

To get around this issue you need to break up your program in different pieces that don't share the same memory. You can think about creating 2 functions (one that includes the part you need from RPC2RGG0 and one that includes the part from RPC2RKK0) and call these functions from your main program.

Of course without knowing any details of your program, I don't know if you can break it up into these different pieces.

Regards,

Claus