Hi cdtj ,
I have tried to extend the chg table and the below are steps that i have followed but some where i'm not doing correct. please advise.
1. Created a custom table
Custom Table : zChgPrpBOSG
------------------------------
OBJECT zChgPrpBOSG {
ATTRIBUTES zChgPrpBOSG {
Chgid SREL chg;
prp1 STRING 400;
prp2 STRING 400;
last_mod_dt DATE { ON_CI SET NOW; };
last_mod_by SREL cnt { ON_CI SET USER;
ON_NEW DEFAULT USER; };
};
FACTORY zChgPrpBOSG {
STANDARD_LISTS {
MLIST OFF;
RLIST OFF;
};
REL_ATTR id;
};
};
2. Created a .maj and .spl file as follows
.maj file is created and placed in site/mods/majic folder
------------------------------------------------------------
OBJECT chg {
ATTRIBUTES Change_Request {
zBosgPrp BREL zChgPrpBOSG chg DYNAMIC {UI_INFO "dtlTextbox";};
};
TRIGGERS {
POST_VALIDATE z_BOSG_Prp() 1201 FILTER( EVENT("INSERT UPDATE"));
};
};
.spl file is created and placed in site/mods/majic folder
----------------------------------------------------------
chg::z_BOSG_Prp(...) {
send_wait(0, top_object(), "call_attr", "api", "insert_object", (uuid)"", "zChgPrpBOSG", NULL, 0,
"chg",id );
}
zBosgPrp is a BREL attribute and zChgPrpBOSG is a a custom table.
3. Htmpl tab form
tab htmpl file
-------------------------------
<PDM_MACRO name=dtlStartRow>
<PDM_MACRO name=dtlTextbox hdr="Properties 1" attr="zBosgPrp.prp1">
<PDM_MACRO name=dtlTextbox hdr="Properties 1" attr="zBosgPrp.prp2">
<PDM_MACRO NAME=dtlEndTable>
Thank you,