See SSF_PRNT_INV.CALLXMLP.Step02
&MainChunk is/are the final rowset/s generated prior to publishg to XML Publisher.
You'll need to include:
import PSXP_XMLGEN:*;
REM - Use this code to output both XSD and XML files;
REM - for use in the design phase;
If SSF_INVP_AET.SSF_OUTPUT_XML = "X" Or
SSF_INVP_AET.SSF_OUTPUT_XML = "B" Then
&oDS = create PSXP_XMLGEN:RowSetDS();
&MYFILE = GetFile(RTrim(SSF_INVP_AET.JF_FILE_DIR) | SSF_INVP_AET.PROCESS_INSTANCE | "_*" | ".xsd", "N", "UTF8", %FilePath_Absolute);
If &MYFILE.IsOpen Then
&sResult = &oDS.getXSDSchema(&MainChunk);
&MYFILE.WriteLine(&sResult);
&MYFILE.Close();
End-If;
&MYFILE = GetFile(RTrim(SSF_INVP_AET.JF_FILE_DIR) | SSF_INVP_AET.PROCESS_INSTANCE | "_*" | ".xml", "N", "UTF8", %FilePath_Absolute);
If &MYFILE.IsOpen Then
&sResult = &oDS.getXMLData(&MainChunk, "");
&MYFILE.WriteLine(&sResult);
&MYFILE.Close();
End-If;
End-If;
REM - End of design phase code ;
0 comments:
Post a Comment