/*@(#) cadtoolc.h       20.7.5.1     SAP     96/07/10  */                          
/*--------------------------------------------------------------------*/
/*                                                                    */
/*  SAP AG Walldorf                                                   */
/*  SAP  Systeme, Anwendungen und Produkte in der Datenverarbeitung   */
/*                                                                    */
/*  (C) Copyright SAP AG 1994                                         */
/*                                                                    */
/*--------------------------------------------------------------------*/
/*  File: cadtoolc.h                                                  */
/*--------------------------------------------------------------------*/
/*  header file for CAD dialog interface toolbox                      */
/*--------------------------------------------------------------------*/
/*  Version: 3.0e                                                     */
/*                                                                    */
/*  3.0D                                                              */
/*  B30K004579 050396                                                 */
/*             Funktionsparameter von integer auf long geaendert      */
/*--------------------------------------------------------------------*/

#ifndef _SAP_CADTOOLC_INCLUDED
#define _SAP_CADTOOLC_INCLUDED

/*-------------------------------------------------------------------*/
/******************** Defines    *************************************/
/*-------------------------------------------------------------------*/

#define  FUNCTION_SIZE  36
#define  MESTYP_SIZE    2
#define  MESSAGE_SIZE   120
#define  SETNAM_SIZE    8
#define  ATTNAM_SIZE    11
#define  ATTLEN_SIZE    3
#define  ATTDOKU_SIZE   40
#define  PCODE_SIZE     5 
#define  UCODE_SIZE     2 
#define  VERSION_SIZE   3              
#define  SML_SIZE       40
#define  SML_VAL_SIZE   40

/*-------------------------------------------------------------------*/
/******************** Structures *************************************/
/*-------------------------------------------------------------------*/

typedef struct {
        char     *id;
        char     *objtab;
        char     *objkey1;
        char     *objkey2;
        char     *objkey3;
        char     *objkey4;
        char     *objkey5;
        char     *objkey6;
        char     *objkey7;
        char     *objkey8;
        char     *objkey9;
        char     *objkey10;
        char     *objtext;
        char     *klasstatus;
} SAPOBJ_R3;

typedef struct {
        char    *name;
        char    *feldname;
        char    *din;
        char    *eingabe;
        char    *einheit;
        char    *format;
        char    *schablone;
        char    *selekt;
        char    *param;
        int     laenge;
        int     istlen;
        int     dezimalstellen;
        char    *value;
} SAPSML;

typedef struct {
    	char	*name;
	    char	*bezeichnung;
     char *knz_obligat;
	    char	*knz_ererbt;
	    char	*knz_bewertet;
	    char	*datentyp;
	    char	*knz_einzelwert;
	    char	*knz_intervall;
	    char	*knz_zusaetzl_werte;
	    int  anzahl_stellen;
	    int	 dezimalstellen;
	    char *knz_vorzeichen;
	    char *exponent_bild;
	    char *exponent_darst;
	    char *schablone;
	    char *knz_kleinschr;
	    char *ext_masseinh;
	    char *dinkenbuchst;
	    char *dokumentart;
	    char *dokumentnummer;
	    char *teildokument;
	    char *dokumentversion;
	    char *knz_sicht0;
	    char *knz_sicht1;
	    char *knz_sicht2;
	    char *knz_sicht3;
	    char *knz_sicht4;
	    char *knz_sicht5;
	    char *knz_sicht6;
    	char *knz_sicht7;
	    char *knz_sicht8;
	    char *knz_sicht9;
	    char *kriterium;
	    char *suchbed;
     char *value;
} SAPSML_R3;

typedef struct 
{
	char	*art;
	char	*name;
	char *bezeichnung;
	char *statustext;
	char *knz_standard;
} SAPCLAS_R3;

typedef struct {
	char	*art;
	char	*name;
	char *schlagwort;
	char *status;
	char *datum_von;
	char *datum_bis;
	char *knz_gleiche_kls;
	char *anz_zuordnungen;
	char *knz_dinkls;   
	char *norm_name;
	char *norm_nummer;
	char *norm_bez;
	char *norm_titel1;
	char *norm_titel2;
	char *ausg_datum;
	char *vers_datum;
	char *vers_nummer;
	char *sml_leiste;
	char *dokar;
	char *doknr;
	char *doktl;
	char *dokvr;
} SAPCLAS_S_R3;

typedef struct {
	char	*stufe;
	char	*knz_unter_klas;
	char *vorg_klas;
	char *nach_klas;
	char *sw_vorg_klas;
	char *sw_nach_klas;
} SAPCLAS_H_R3;


typedef struct {
        int     number;
        char    mestyp[MESTYP_SIZE+1];
        char    function[FUNCTION_SIZE+1];
        char    message[MESSAGE_SIZE+1];
} SAPMES;


typedef struct {
        char    setname[SETNAM_SIZE+1];
        char    attname[ATTNAM_SIZE+1];
        char    attlen[ATTLEN_SIZE+1];
        char    attdoku[ATTDOKU_SIZE+1];
} SAPATT;

/*-------------------------------------------------------------------*/
/************** Function prototypes **********************************/
/*-------------------------------------------------------------------*/

int SapCreateTable(int,char*,char*,char*,char*);

#if defined (VAX) && defined (VMS)
/* auf VAX/VMS duerfen identifier max 31 char lang sein */
#define SapCreateFillClasHierarchTableR3 SapCreateFillClasHierarchTblR3
#endif

int SapCreateFillClasHierarchTableR3(int, char*, long, int*);

int SapCreateFillClasTableR3(int, char*, long, int*);
int SapCreateFillPosSmlValueTableR3(int, char*, long);
int SapCreateFillTable(int,char*,char*,char*,char*,char*,long);                      /* B30K004579 050396 */
int SapCreateFillTableMcd(int,char*,int);
int SapCreateSendstr(char**);  
int SapCreateSendstrBomHead(int, char**);
int SapCreateSendstrClasR3(char*,char*,char*,char*,char*,char*,char*,char*,char**);
int SapCreateSendstrClasScopeR3(char*, char*, char*,char*,char*,char*,char**);
int SapCreateSendstrClasSelScopeR3(char*,char*,char*,char*,char*,char*,char*,char*,char**);
int SapCreateSendstrClasSearchR3(int,char*,char*,char*,char*,char*,char*,char*,char**);
int SapCreateSendstrClasSelectR3(char*,char*,char*,char*,char*,char*,char*,char*,char*, char*,char*,char**);
int SapCreateSendstrHelp(char*,char*,char*,char*,char**);
int SapCreateSendstrPosSmlValuesR3(int, char**);
int SapCreateSendstrSml(int,char**);
int SapCreateSendstrMcd(int,char*,char*,char**);     
int SapCreateSendstrMessageR3(char*, int, char**);
int SapCreateSmlTable(int,char*,long);                                              /* B30K004579 050396 */
int SapCreateSmlSelectTable(char*);
int SapCreateHlpTable(int,char*,long);                                              /* B30K004579 050396 */
int SapDeleteSmlSelection();
int SapDescribeInterface(int,char**);
int SapDescribeTable(int,char**);                   
int SapFindHelpTable( char*, char*, char*, char*, char*, char*, char*);
int SapFillHlpTable(int,char*,long);                                                /* B30K004579 050396 */
int SapFillInterface(char*,int);
int SapFillSmlTable(int,char*,long);                                                /* B30K004579 050396 */
int SapGetAttributNameValue(int,int,int,char*,char**);
int SapGetClasDataR3(int, int, SAPCLAS_R3*);
int SapGetClasHierarchDataR3(int, int, SAPCLAS_H_R3*);
int SapGetClasSearchDataR3(int, int, SAPCLAS_S_R3*);
int SapGetMcdDescription(int,char**);
int SapGetMcdValue(char*,int,char**);
int SapGetObjectDataR3(int, int, SAPOBJ_R3*);
int SapGetSmlAttributData(int,char*,int,SAPSML*);
int SapGetSmlAttributDataR3(int,char*,int,SAPSML_R3*);
int SapGetHlpData(int,int,int,SAPSML*);
int SapGetSmlData(int,int,int,SAPSML*);
int SapGetSmlDataR3(int,int,int,SAPSML_R3*);
int SapGetSmlDataValueR3(int,char*,int,int,int,char**);
int SapGetHlpDescription(int,char**);
int SapGetSmlDescription(int,char**);
int SapGetSmlValueDescriptionR3(int,int,char*,int*);
int SapGetTableValue (int,char*,int,char**);
int SapInitToolbox(int);
int SapPrintTable(int,char*);
int SapWriteKonfiguration(int,char*,long,char*);                                    /* B30K004579 050396 */
int SapWriteSmlValue(int,int,char*,int,char*,int);
int SapWriteTableValue(int,char*,char*,int);
int SapModifyTableValue(int,char*,char*,int);
int SapGetErrorMessage(int,SAPMES*);
int SapGetAttributName(int,char*,char*,char*,char*,int,SAPATT*);
int SapSearchAttribut(int,char*,char*,char*,char*,char*,SAPATT*);
int SapWriteMcdValue(int,int,char*);
int SapCreateFillUserTable(int,int,char*,long);                                     /* B30K004579 050396 */
int SapToolboxVersion(char**);
int SapGetMailData(int,int,char*,int,char**);
int SapCreateSendstrMail(int,int,char**);
int SapCreateMailTable(int,char*,long);                                             /* B30K004579 050396 */
int SapWriteMailValue(int,int,char*,int,char*);
int SapDescribeMailTable(int,char**);
int SapFillTable(int,char*,long);                                                   /* B30K004579 050396 */
int SapDeleteTableEntry(int, int);

#endif /* _SAP_CADTOOLC_INCLUDED */
