The simple answer is no.
What you
could do is generate an include file containing preprocessor definitions for all tables in the database. You would then only need to adjust the propath to point to the correct include.
Code:
OUTPUT TO "config1/tables.i".
FOR EACH _file WHERE _hidden = FALSE NO-LOCK:
PUT UNFORMATTED "&GLOBAL-DEFINE DB-HAS-TABLE-" + _file._file-name SKIP.
END.
OUTPUT CLOSE.
You then add the correct config to your propath:
Code:
PROPATH = PROPATH + ",config1". /* or config2 or whatever */
You then include the file in your .p and check if the preprocessor is defined:
Code:
{ tables.i }
&IF DEFINED( DB-HAS-TABLE-XXX ) &THEN
/* insert code here */
&ENDIF
Add the correct config to your propath before compiling for that config.
Another alternative could be to have an additional dummy database that does contain the table definitions missing from the main database but without data.
The real alternative is to use dynamic stuff.
Code:
DEF VAR hb AS HANDLE.
CREATE BUFFER hb FOR TABLE "xxx" NO-ERROR.
IF VALID-HANDLE( hb ) THEN DO:
/* insert [B]dynamic[/B] code here */
END.