Application Development 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: 

Is type-pools still necessary?

Former Member
0 Kudos

Hi.

This SAP link says that don't: http://help.sap.com/abapdocu_731/en/abaptype-pools.htm

But I got an error: "ABAB_POOL" type is unknown.

class abap_bool_test definition.
  public section.
    methods:
      test importing b type abap_bool
           returning value(result) type string.
endclass.

The error doesn't appear if I declare the type pool: type-pools abap.

Regards,

Leandro.

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

Hi,

Check SAP notes for "load on demand" (the name of the new compiler function that make obsolete TYPE-POOLS and a few other statements) in application area "BC-ABA-LA".

Moreover, make sure the load-on-demand is activated (profile parameter abap/compile_mult_pass must have the value "on,demand")

Sandra

11 REPLIES 11

Former Member
0 Kudos

Hi Leandro,

The link you shared has this text - 'It is checked for accurate syntax but otherwise ignored by ABAP Compiler.'

So I guess at-least for syntax purposes it is still valid and is required to be used when using the elements of a type pool.

Regards,

Shravan

Former Member
0 Kudos

I believe that the need for type-pools: is gone in NetWeaver 7.02.  I think I remember Thomas Jung's presentation to an ASUG group in which it was stated that beginning in 7,02, SAP would load the specific types referenced as needed.   But, I'll try to verify that through research.

Former Member
0 Kudos

Hi Leandro,

I did a quick test on my system and found that the line "DATA: test TYPE BOOLEAN." And "DATA: test type ABAP_BOOL" worked with no issues. This is in a report with no type pools defined. What netweaver AS version are you on?

Thanks,

Brian

0 Kudos

Hi.

SAP NetWeaver 720 Final Release | Version 7200.1.0.1050

What version are you using?

Thank you.

0 Kudos

Take a look at SAP note 1615338

https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1615338

Sounds like your on the right version, but its just a bug.

0 Kudos

I think that was an SCM specific note, take a look at this one instead: 1616621 https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1616621

0 Kudos

Thank you, but the links require user/pw in SAP Service Marketplace and I can't create an account there, because I don't have the information needed.

https://websmp104.sap-ag.de/request-user

kesavadas_thekkillath
Active Contributor
0 Kudos

The document also says "As of Release 7.0, EhP2" a type group is loaded automatically.

Sandra_Rossi
Active Contributor
0 Kudos

Hi,

Check SAP notes for "load on demand" (the name of the new compiler function that make obsolete TYPE-POOLS and a few other statements) in application area "BC-ABA-LA".

Moreover, make sure the load-on-demand is activated (profile parameter abap/compile_mult_pass must have the value "on,demand")

Sandra

0 Kudos

So it's just a parameter. Interesting. I'll try to test it next Monday, but will mark this as the correct answer.

Ok. While the compiler ignores type-pools declaration, I think it's interesting to maintain this in the code, for readability. What do you think folks?

Thank you all!

0 Kudos

Hi,

I think using TYPE-POOLS doesn't improve readability. Use it only if you want your code to be "backportable" (either you want to share your code with the community for instance, or if your landscape has older SAP systems).

Note: I have no doubt that the profile parameter is supplied with the correct value; if it's not, maybe the admin has restored the old profile file without merging with new values... but then I guess the default value is also correct, so I don't know, anyway it's strange, and no SAP note seem to correct such an issue, even the ones mentioned by Brian IMHO...

Sandra