2012 Jun 21 8:57 PM
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.
2012 Jun 23 6:38 PM
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
2012 Jun 21 9:31 PM
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
2012 Jun 21 11:22 PM
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.
2012 Jun 21 11:30 PM
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
2012 Jun 22 12:56 PM
Hi.
SAP NetWeaver 720 Final Release | Version 7200.1.0.1050
What version are you using?
Thank you.
2012 Jun 22 11:17 PM
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.
2012 Jun 22 11:37 PM
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
2012 Jun 23 10:11 PM
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.
2012 Jun 22 5:18 AM
The document also says "As of Release 7.0, EhP2" a type group is loaded automatically.
2012 Jun 23 6:38 PM
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
2012 Jun 23 10:20 PM
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!
2012 Jun 24 4:35 PM
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