0% found this document useful (0 votes)
97 views5 pages

Jdegt - Insertdata/ Jdegt - Insertdatakeystr: Syntax

This document describes the jdeGT_InsertData and jdeGT_InsertDataKeyStr functions, which insert a record into the Media Object table (F00165) in JD Edwards. The functions insert data using either a data structure or a formatted key string. Example code demonstrates opening the table, selecting existing data, and inserting a new record with text data. The document also defines parameters, return values, data structures, and related functions for inserting, updating, and deleting records in the F00165 table.

Uploaded by

RaveRave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views5 pages

Jdegt - Insertdata/ Jdegt - Insertdatakeystr: Syntax

This document describes the jdeGT_InsertData and jdeGT_InsertDataKeyStr functions, which insert a record into the Media Object table (F00165) in JD Edwards. The functions insert data using either a data structure or a formatted key string. Example code demonstrates opening the table, selecting existing data, and inserting a new record with text data. The document also defines parameters, return values, data structures, and related functions for inserting, updating, and deleting records in the F00165 table.

Uploaded by

RaveRave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

jdeGT_InsertData/

jdeGT_InsertDataKeyStr
Last Modified: B9 | October 2, 2020

This function will insert a record to Media Object table (F00165).

Syntax

JDERTN(JDEDB_RESULT) JDEWINAPI jdeGT_InsertData(


HREQUEST hRequestGT,
PJSTR pszOjbectName,
LPVOID lpMODSKey,
int nSeq,
PJSTR pszGTLang,
LPMODATA lpMOData);

JDERTN(JDEDB_RESULT) JDEWINAPI jdeGT_InsertDataKeyStr (


HREQUEST hRequestGT,
PJSTR pszOjbectName,
PJSTR pszGTKeyStr,
int nSeq,
PJSTR pszGTLang,
LPMODATA lpMOData);

Parameters
Parameter Notes Usage
hRequestGT Input/Required GT table handle to be closed
and released.
pszObjectName Input/Require GT data structure name
lpMODSKey Input/Require GT data structure with data
loaded (use in
jdeGT_SelectData). This
data will be formatted into the
string for TXKY.
pszGTKeyStr Input/Require GT formatted string from GT
data structure (use in
jdeGT_SelectDataKeyStr).
nSeq Input/Require Sequence number for primary
key
pszGTLang Input Language code to be updated
lpMOData Input/Require Data to be updated.

493192512.doc 1
jdeGT_InsertData

Return Value
Return Value Description
JDEDB_PASSED Return value if this API succeeds
JDEDB_FAILED Return value if this API fails

Example
Example #1:

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


HREQUEST hRequestGT = NULL;
HUSER hUser = NULL;
JCHAR szFromDatasource[51] = _J(“Business Data – Adev733o”);
JCHAR szObjectName[11] = _J(“ABGT”);
JCHAR szFormatKey[255] = _J(“1”);
JCHAR szLang[3] = _J(“”);
LPMODATA lpGTData = NULL;
MODATA dsGTNewData = {0};
JCHAR szText[255] = _J(“New Text to be inserted”);

JDBReturn = JDB_InitBhvr(.., &hUser);

JDBReturn = jdeGT_OpenTable (hUser, szFromDatasource, szObjectName, &hRequestGT);


if (JDBReturn == JDEDB_PASSED)
{
JDBReturn = jdeGT_SelectDataKeyStr (hRequest, szObjectName, szFormatKey, szLang,
OBJ_JDEALL);
}

if (JDBReturn == JDEDB_PASSED)
{
JDBReturn = jdeGT_FetchData(hRequest, lpGTData, FALSE;
if (JDBReturn != JDEDB_PASSED)
{
dsGTNewData.nSeq = 1;
dsGTNewData.nMOType = OBJ_RTFTEXT;
dsGTNewData.pData = szText;
jdeStrcpy(dsGTNewData.szItemName, _J(“New Text”));
jdeGT_InsertDataKeyStr(hRequest, szObjectName, szFormatKey, 1, szLang, &dsGTNewData);
}
else
{
jdeGTFreeMOData(lpGTData, 1);
}
}

jdeGT_CloseTable(hRequestGT);
JDB_FreeBhvr(hUser);

return;

B9 January, 2002 2
jdeGT_InsertData

Example #2:

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


HREQUEST hRequestGT = NULL;
HUSER hUser = NULL;
JCHAR szFromDatasource[51] = _J(“Business Data – Adev733o”);
JCHAR szObjectName[11] = _J(“ABGT”);
DSABGT dsAbGT = {0};
JCHAR szLang[3] = _J(“”);
LPMODATA lpGTData = NULL;
MODATA dsGTNewData = {0};
JCHAR szText[255] = _J(“New Text to be inserted”);

JDBReturn = JDB_InitBhvr(.., &hUser);

ParseNumericString(dsAbGT.mnAddressNumber, _J(“1”));

JDBReturn = jdeGT_OpenTable (hUser, szFromDatasource, szObjectName, &hRequestGT);


if (JDBReturn == JDEDB_PASSED)
{
JDBReturn = jdeGT_SelectData(hRequest, szObjectName, &dsAbGT, szLang, OBJ_JDEALL);
}

if (JDBReturn == JDEDB_PASSED)
{
JDBReturn = jdeGT_FetchData(hRequest, lpGTData, FALSE;
if (JDBReturn != JDEDB_PASSED)
{
dsGTNewData.nSeq = 1;
dsGTNewData.nMOType = OBJ_RTFTEXT;
dsGTNewData.pData = szText;
jdeStrcpy(dsGTNewData.szItemName, _J(“New Text”));
jdeGT_InsertData(hRequest, szObjectName, &dsAbGT, 1, szLang, &dsGTNewData);
}
else
{
jdeGTFreeMOData(lpGTData, 1);
}
}

jdeGT_CloseTable(hRequestGT);
JDB_FreeBhvr(hUser);

return;

Additional Notes
 This API must be invoke after jdeGT_OpenTable() api is used.
 This API is used for multiple access of the table within one function scope.
 MODATA (or LPMODATA) Data Structure definition:

MODATA, *LPMODATA

B9 January, 2002 3
jdeGT_InsertData

Data Type Data Description Note


int nSeq Sequence number from
MOSEQN
MOTYPE nMOType Media Object Type
JCHAR szUser[11] User name
JDEDATE jdDate Date updated
MATH_NUMERIC mnTime Time updated
BOOL bRTFData TRUE = RTF Text
FALSE = Plain Text or others
JCHAR szItemName[GT_ITNM Item name
SIZE]
JCHAR szQueueName[GT_Q
UESIZE]
JCHAR szFileName[GT_FILES
IZE]
PJSTR pData Allocate memory for text and
shortcut media object type.

 MOTYPE definition:

DEFINE TYPE NOTE


OBJ_JDEALL All Media Object Types
OBJ_RTFTEXT Text Media Object
OBJ_JDEIMAGE Image Media Object
OBJ_JDEOLE OLE Media Object
OBJ_MISCJDESHORTCUT Shortcut Media Object
OBJ_MISCIMAGEVENDOR Third party vendor
OBJ_MISCHTML HTML/URL/File Media Object

See Also

Function Name Description


jdeGT_OpenTable Open F00165 and return the table handle
jdeGT_CloseTable Close F00165 and release table handle
jdeGT_SelectData Select data from F00165 table
jdeGT_SelectDataKeyStr Select data from F00165 table with formatted string
(TXKY)
jdeGT_FetchData Retrieve record from F00165
jdeGT_UpdateData Update record to F00165

B9 January, 2002 4
jdeGT_InsertData

jdeGT_UpdateDataKeyStr Update record to F00165 with formatted string (TXKY)


jdeGT_InsertData Insert record to F00165
jdeGT_InsertDataKeyStr Insert record to F00165 with formatted string (TXKY)
jdeGT_DeleteData Delete record from F00165
jdeGT_DeleteDataKeyStr Delete record from F00165 with formatted string
(TXKY)

B9 January, 2002 5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy