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: 

NULL and SPACE

Former Member
0 Kudos
192

Hello Gurus:

I have had to use BOTH 'null' and 'space' (ofcourse I tried 'initial' too...) when selecting data from PRPS table, otherwise all the required records were not fetched. I had to do this on two different occassions. The first is a SAP provided field and the other is customer's enhancement. I have cut-paste the two code blocks. Any ideas why?

Thanks in advance,

Sard.

***********(1)**************

select posid objnr func_area zzfunct from prps into

corresponding fields of table it_wbs

where func_area is null or

func_area eq space.

************(2)**************

select prps-pspnr prps-posid prps-post1

...

into (wa_test1-pspnr, wa_test1-posid, wa_test1-post1,

...)

from prps

where prps-posid in s_wbs and

... and

( prps-zzmlind is null or prps-zzmlind eq space ).

.

append wa_test1 to it_test1.

clear wa_test1.

endselect.

3 REPLIES 3

former_member183804
Active Contributor
0 Kudos
128

Hello Richard,

the Requirement to check for NULL corresponds to the definition of the database (field) within the DDIC. Check the flag initialize (it has also some documentation).

This flag is intended to be used if the definition of the db table is changed at SAP while the table already is used at customer side.

After deploying the corresponding patch or upgrade such a changed definition may result into the need to convert all entries. For tables with many entries this would result into inacceptable downtime. So such changes are done without the initialiazation/conversion of existing entries.

The tradeoff is the syntax you noticed.

Kind regards

Klaus

0 Kudos
128

Klaus:

Thank you very much. YOU WERE PRECISE, func_area field was changed in the Enterprise version, and I noticed the problem during our upgrade.

Btw, is there a way for me to check the flag initialize for the customer field(zzmlind) added in structure CI_PRPS, without needing the access key to PRPS?

Thanks again for your time and the reply.

0 Kudos
128

No, by doing so, you are changing the definition of PRPS, hence the reason it is asking for access key.

Regards,

Rich Heilman