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

Extended Program Check - Warning

Former Member
0 Likes
2,872

Hi SDNers,

I did my program well. but when i am doing Extended program check it shows warning that 'do not use fields, field symbols (itab) globally'. This is the only warning i can not eliminate it. i dont want to hide using "#EC NEEDED.

I have searched almost all the sites, finally i posted here.

Right answers will be highly Appreciated.

Thanks & Regards,

Senthil kumar

11 REPLIES 11
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,634

Where have you declared it, inside a module / endmodule. If so move it out from there.

Please provide more details. The line of code the warning points

Read only

0 Likes
1,634

No Keshav. I did not declared inside a Module/Endmodule.

The Code snippet is below:

TYPES: tt_input_table TYPE STANDARD TABLE OF zsmmpirupd.

DATA: gt_input_table TYPE tt_input_table. "#EC NEEDED

DATA: g_wa_input_table TYPE zsmmpirupd. "#EC NEEDED

PERFORM process_tab USING gt_input_table.

FORM process_tab USING lt_input_table TYPE tt_input_table.

<Program Logics>

ENDFORM.

Hi Raymond,

I did not declare an internal table with header line and also not used field-symbols. The code snippet is above.

Read only

0 Likes
1,634

Hi,

You call the perform with TABLES and not USING.

PERFORM process_tab TABLES gt_input_table.

FORM process_tab TABLES lt_input_table STRUCTURE tt_input_table.
<Program Logics>
ENDFORM.

Thanks,

Sri.

Read only

0 Likes
1,634

Where is a field-symbol here ? We asked you the line of code.

Read only

0 Likes
1,634

Hi,

I did not use field-symbols Keshav. But in the warning message it is showing like that.

you may check in your SAP system.

I have checked almost all the reports in our project and also other projects. I can see the same warning.

Thanks & Regards,

Senthil kumar

Read only

0 Likes
1,634

Hi Sri,

The Logic you have given is not working and also 'TABLES', 'STRUCTURES' in the perform is obsolete.

Thanks & Regards,

Senthil kumar

Read only

0 Likes
1,634

I think it,s because gt_input_table is declared globally and is visible in all areas of the program. if you just call the subroutine like "PERFORM process_tab." then the message will disappear.

Or else if you require to pass iy through routine as coded then provide the EC check as mentioned in SLIN.

or declare a local itab of type tt_input_table & pass it in thr subroutine like


lt[] = gt[].
PERFORM process_tab USING lt.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,634

I suppose you declared an internal table with [header line|http://help.sap.com/abapdocu_70/en/ABENHEADER_LINE_GLOSRY.htm] (Obsolete). If yes use an explicit work area or assign to field-symbols. The warning suggests that there may be confusion between the header line and the internal table.

If this is not the cause, then can you paste part of the code source (definition of itab as well has lines around where the warning is issueds)

Regards,

Raymond

Read only

Former Member
0 Likes
1,634

I avoid this by declaring a global type, then use that for my internal table. Inside each form, I then utilize a local field-symbol, like:

form some_routine.

field-symbols: <lfs_x> type my_global_type.

. . .

SAP SLIN then does not "see" a global usage of the field symbol.

Read only

Former Member
0 Likes
1,634

Hi all,

I've the same issue in my report. I believe that is a new feature of SLIN on SAP EHP5.

The warning is for global field (internal table, work area, etc) or global field-symbol.

It's not about TABLE WITH HEADER LINE or the simple use of global field-symbols. It's for any global field declaration.

Im not so sure, but maybe its a way to induce the abapers to mantain all of the data local, and passing this data through USING/CHANGING parameters on all over the program.

It's a little bit awkward not use ANY global data. Anyhow it's not a Error, but only a Warning of SLIN check.

Sorry for my poor english.

Best regards,

Ademir

Read only

Former Member
0 Likes
1,634

Hi All,

I also facing the same problem when doing an EPC check for my program.How can I overcome it.

Please suggest me.

This is the message appeared for me after doing the EPC check.

Do not use fields, field symbols (OBJ_DATA) globally.

The related code to get the above warning is:

START-OF-SELECTION.


   DATA:obj_data TYPE REF TO lcl_local.

   CREATE OBJECT obj_data.

Thanks In Advance.

Regards,

Chakradhar.