Assign Values from lpDS Data Structure to dsTextData Here
Enter your own code for the data items that are included in the business function data structure. When you assign values, map the business function data structure items to the text substitution data structure items. These examples are from an existing business function:
jdeStrncpy(dsTextData.szEdiuserid,(const JCHAR *)(lpDs->szEdiuserid), DIM (dsTextData.szEdiuserid)); jdeStrncpy(dsTextData.szEdibatchnumber,(const JCHAR *) (lpDS->szEdibatchnumber), DIM(dsTextData.szEdibatchnumber)); jdeStrncpy(dsTextData.szEditransactnumber,(const JCHAR *) (lpDS->szEditransactnumber), DIM(dsTextData.szEditransactnumber));
The first parameter is the location to where the value is being copied. The second
value is the location from where the value is being copied. In this example,
dsTextData.szEditransactnumber
is located in the text substitution data
structure and pDS->szEditransactnumber
is located in the business function
data structure.
Note: Be conscientious of the commands that
you use for these statements. The commands are based on the data type of the associated data
items. The MathCopy command is for math numeric fields, assignments are for character
fields, Strncpy is for strings, and Memcpy is for dates. If you use the Memcpy command for
dates, the system assigns the characters directly.
The remaining lines in this section ensure that the level break message is functional:
if (lpDSwork->lpBlob->lpTSDSMPL != (LPDSTMPL)NULL) { lpDSwork-> lpBlob->lpTSTEXT=(PJSTR)AllocBuildStrFromDstmplName((LPDSTMPL) lpDSwork->lpBlob->lpTSDSMPL,(JCHAR*)szDsTmpl, (LPVOID)&dsTextData); jdeStrncpy (lpDSwork->lpBlob->szDDItem, (const JCHAR *)(szDDitem), DIM(lpDSwork->lpBlob->szDDItem)); } if(lpDS->cIncludeInterconnect == _J('1'))