E9.2 Extract JDE PDF from JDE Server and copy to File server

Thanks for reply. Trying to clarify with an Example.
Ex: Say R42565 is executed data is written to F4211 etc tables. Also a PDF - Invoice Print is generated as output. This output is currently on JDE server in Work submitted jobs. Our requirement is to copy this Invoice PDF on to a Folder outside JDE ( File Server location) for each Invoice.

We can use BI Publisher to email the PDF to a user. But that's not what is required. We need to save the PDF to a folder.

Let me know if any questions.
 
Hi CoolKl,

Can you check if you are searching for something like this
 
1. Formulate the file name.
2. Go to VJS path ( the PrintQueue path)
3. Use one of the bsfn mentioned in the above post to copy the file to new shared location.
 
Thanks for reply. Trying to clarify with an Example.
Ex: Say R42565 is executed data is written to F4211 etc tables. Also a PDF - Invoice Print is generated as output. This output is currently on JDE server in Work submitted jobs. Our requirement is to copy this Invoice PDF on to a Folder outside JDE ( File Server location) for each Invoice.

We can use BI Publisher to email the PDF to a user. But that's not what is required. We need to save the PDF to a folder.

Let me know if any questions.
Invoice Print (R42565) is usually run for all orders at a certain status. That's one PDF with all the invoices. To approach what you are looking for without BI bursting, you would need to run R42565 for each order/invoice.

I have seen Transform/Bottom Line (whatever it's called now) used to parse the invoice PDFs and attach to SO headers.

Craig
 
Thanks for reply. Trying to clarify with an Example.
Ex: Say R42565 is executed data is written to F4211 etc tables. Also a PDF - Invoice Print is generated as output. This output is currently on JDE server in Work submitted jobs. Our requirement is to copy this Invoice PDF on to a Folder outside JDE ( File Server location) for each Invoice.

We can use BI Publisher to email the PDF to a user. But that's not what is required. We need to save the PDF to a folder.

Let me know if any questions.
With later Tools Releases (I think 9.1.x maybe), BI Publisher can also save a copy of the formatted BI Pub output file to a network folder. I've used this in the past for keeping copies of documents like PO's and it works great. It is defined per environment, and then per Report Definition. You'll need to make sure that your E1 service account has write access to the network folder.
 
@coolk - You can do this easily with LynX Output Manager. Just configure the report to run a command, which will copy the file to the shared folder. You can do this for any report output (PDF, CSV and even log files), including BI Publisher ones.

Link: https://www.aellius.com/lynx-output-manager/
 
Thanks for reply. Trying to clarify with an Example.
Ex: Say R42565 is executed data is written to F4211 etc tables. Also a PDF - Invoice Print is generated as output. This output is currently on JDE server in Work submitted jobs. Our requirement is to copy this Invoice PDF on to a Folder outside JDE ( File Server location) for each Invoice.

We can use BI Publisher to email the PDF to a user. But that's not what is required. We need to save the PDF to a folder.

Let me know if any questions.
You can "archive" the output to a location using BIP settings
 
Thanks for reply. Trying to clarify with an Example.
Ex: Say R42565 is executed data is written to F4211 etc tables. Also a PDF - Invoice Print is generated as output. This output is currently on JDE server in Work submitted jobs. Our requirement is to copy this Invoice PDF on to a Folder outside JDE ( File Server location) for each Invoice.

We can use BI Publisher to email the PDF to a user. But that's not what is required. We need to save the PDF to a folder.

Let me know if any questions.
You can "archive" the output to a location using BIP settings
 
Hi

There are a few ways to do this. I have done it 2 ways, both using ER (sorry)

1) in R42565 itself there is an event called End Report. This is executed after the UBE has finished. I use a combination API GetPrintQueueDirectoryPathName and then B984054 to get the job number and concatenate the name like FNDFUF2 is stored as a string made up of "OBJ_VERS_JOBNBR_PDF"
then use B34A1030 to call a move command (based on the operating system E1 is on. OS on unix its cp) to move from the print queue to where ever else we need it

2) I have a scheduled UBE that reads F986110 (saving of last read JOBNBR each time) referencing a config table of UBE VERS USER, if found it more or less repeats the exact same code above. Grabs the PDF based on the print q and job number etc and then it can be moved or we can email the PDF or CSV out of the print queue

If you want this code, let me know
 
Hi

There are a few ways to do this. I have done it 2 ways, both using ER (sorry)

1) in R42565 itself there is an event called End Report. This is executed after the UBE has finished. I use a combination API GetPrintQueueDirectoryPathName and then B984054 to get the job number and concatenate the name like FNDFUF2 is stored as a string made up of "OBJ_VERS_JOBNBR_PDF"
then use B34A1030 to call a move command (based on the operating system E1 is on. OS on unix its cp) to move from the print queue to where ever else we need it

2) I have a scheduled UBE that reads F986110 (saving of last read JOBNBR each time) referencing a config table of UBE VERS USER, if found it more or less repeats the exact same code above. Grabs the PDF based on the print q and job number etc and then it can be moved or we can email the PDF or CSV out of the print queue

If you want this code, let me know
Hello Johnd,

Could you share the code for the same?

Regards,
Gauri Shinde
 
End Report (future)
UBE: R554111CM
Event: End Report (future)
Event GUID: c606bb92-c827-45f3-ba92-a654b3e8d5b7

----------------------------------------
Event Level Variables
----------------------------------------
evt_szHostName_JOBN [JOBN]
evt_szJobDetails_FNDFUF2 [FNDFUF2]
evt_szDataSource_SRC [SRC]
evt_szInstallDir_DVAL [DVAL]
evt_szFileName_URLPATH [URLPATH]
evt_szEmailIds_VAR1 [VAR1]
evt_szEmailAddressow_EMAL [EMAL]
evt_mnAddressNumber_AN8 [AN8]
evt_mnServerJobNumber_JOBNBR [JOBNBR]
evt_B984054ServerJobNumber [JOBNBR]
evt_EmailTxtCommandString_CMDS [CMDS]
evt_FileAddress_CMDS [CMDS]
evt_PrintQueue_CMDS [CMDS]
evt_FoundationFutUse2_FNDFUF2 [FNDFUF2]
evt_Integer01 [INT01]
evt_cFileExists_EV01 [EV01]
evt_ComputerID [CTID]
evt_GTSAttachmentName_YATTNM [YATTNM]
evt_szExecuteCommand_NFLF [NFLF]
evt_szFTPCSVName_CMDS [CMDS]
evt_EmailSubject_CMDS [CMDS]
evt_ProoforFinal_DL01 [DL01]
evt_EmailFrom_HLNK [HLNK]
evt_AttachmentName_YATTNM [YATTNM]
----------------------------------------
00001 // BEGIN: John Danter 20/06/2017 MPRJ0082.55.05 - Consigned Stock Lodz changes
00002 // Email and FTP UBE CSV file attachment
00003 //
00004 // ===================================
00005 // Filename
00006 // FNDFUF2 is stored as a string made up of "OBJ_VERS_JOBNBR_PDF"
00007 // ===================================
00008 // Print Queue Address
00009
-

GTSGetPDFAddress(B550002.GTSGetPDFAddress)

VA evt_PrintQueue_CMDS [CMDS] <- szCommandString [CMDS]


00010 // OBNM_VERS
00011 ! VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2] = concat([SL ReportName], "_")
00012 ! VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2] = concat([VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2]], [SL VersionName])
00013 VA evt_AttachmentName_YATTNM [YATTNM] = concat([SL ReportName], "_")
00014 VA evt_AttachmentName_YATTNM [YATTNM] = concat([VA evt_AttachmentName_YATTNM [YATTNM]], [SL VersionName])
00015 // Job Number
00016
-

GetAuditInfo(B9800100.GetAuditInfo)

VA evt_ComputerID [CTID] <- szMachineKey [MKEY]


00017
-

GetOneWorldJobNumber(B984054.GetOneWorldJobNumber)

VA evt_ComputerID [CTID] -> szExecutionHostName [EXEHOST]
VA evt_mnServerJobNumber_JOBNBR [JOBNBR] <- mnServerJobNumber [JOBNBR]


00018 ! VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2] = concat([VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2]], "_")
00019 ! VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2] = concat([VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2]], [VA evt_mnServerJobNumber_JOBNBR [JOBNBR]])
00020 ! VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2] = concat([VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2]], "_PDF")
00021 VA evt_AttachmentName_YATTNM [YATTNM] = concat([VA evt_AttachmentName_YATTNM [YATTNM]], "_")
00022 VA evt_AttachmentName_YATTNM [YATTNM] = concat([VA evt_AttachmentName_YATTNM [YATTNM]], [VA evt_mnServerJobNumber_JOBNBR [JOBNBR]])
00023 VA evt_AttachmentName_YATTNM [YATTNM] = concat([VA evt_AttachmentName_YATTNM [YATTNM]], "_PDF")
00024 VA evt_AttachmentName_YATTNM [YATTNM] = rtrim([VA evt_AttachmentName_YATTNM [YATTNM]], <Blank>)
00025 //
00026 // .CSV
00027 ! VA evt_FileAddress_CMDS [CMDS] = concat([VA evt_PrintQueue_CMDS [CMDS]], [VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2]])
00028 VA evt_FileAddress_CMDS [CMDS] = concat([VA evt_PrintQueue_CMDS [CMDS]], [VA evt_AttachmentName_YATTNM [YATTNM]])
00029 VA evt_FileAddress_CMDS [CMDS] = concat([VA evt_FileAddress_CMDS [CMDS]], ".csv")
00030 //
00031 // Subject
00032
-

If SL LoginEnvironment is equal to ("JPD900","PD900")

00033 | VA evt_EmailSubject_CMDS [CMDS] = concat("Weekly Consumption Report ", date_today())


00034
-

Else

00035 | VA evt_EmailSubject_CMDS [CMDS] = concat("Non Prod TEST - Weekly Consumption Report ", date_today())


00036 End If
00037 VA evt_EmailSubject_CMDS [CMDS] = concat([VA evt_EmailSubject_CMDS [CMDS]], <Blank>)
00038 VA evt_EmailSubject_CMDS [CMDS] = concat([VA evt_EmailSubject_CMDS [CMDS]], [RV ProofOrFinal_DL01 [DL01]])
00039 //
00040 // Body text
00041
-

If PO mnSupplierNumber_AN8 [AN8] is greater than "0"

00042 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat("Weekly Consumption Report for Vendor ", [PO mnSupplierNumber_AN8 [AN8]])
00043 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], " Period ending: ")
00044 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], [SL DateToday])
00045 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], <Blank>)
00046 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], [RV ProofOrFinal_DL01 [DL01]])


00047
-

Else

00048 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat("Weekly Consumption Report for Multiple Vendors", <Blank>)
00049 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], " Period ending: ")
00050 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], [SL DateToday])
00051 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], <Blank>)
00052 | VA evt_EmailTxtCommandString_CMDS [CMDS] = concat([VA evt_EmailTxtCommandString_CMDS [CMDS]], [RV ProofOrFinal_DL01 [DL01]])


00053 End If
00054 //
00055 // Attachment name
00056 ! VA evt_GTSAttachmentName_YATTNM [YATTNM] = concat([VA evt_FoundationFutUse2_FNDFUF2 [FNDFUF2]], ".csv")
00057 VA evt_GTSAttachmentName_YATTNM [YATTNM] = concat([VA evt_AttachmentName_YATTNM [YATTNM]], ".csv")
00058 //
00059
-

CheckForFile(B0500725.CheckForFile)

VA evt_Integer01 [INT01] <- nReturnCode [INT01]
VA evt_FileAddress_CMDS [CMDS] -> szFullFileName [MMFN]


00060
-

If VA evt_Integer01 [INT01] is equal to "1"

00061 | VA evt_cFileExists_EV01 [EV01] = "1"


00062
-

Else

00063 | VA evt_cFileExists_EV01 [EV01] = <Blank>


00064 End If
00065 //
00066 // ===================================
00067 // Email CSV File
00068 // ===================================
00069
-

If PO szEmailAddressCSV_EMAL [EMAL] is greater than <Blank>
00070 |
-

If SL LoginEnvironment is equal to ("JPD900","PD900")

00071 | | VA evt_EmailFrom_HLNK [HLNK] = "[email protected]"


00072 |
-

Else
00073 | |
-

If SL LoginEnvironment is equal to ("JUT900","UT900")

00074 | | | VA evt_EmailFrom_HLNK [HLNK] = "[email protected]"


00075 | |
-

Else
00076 | | |
-

If SL LoginEnvironment is equal to ("JPY900","PY900")

00077 | | | | VA evt_EmailFrom_HLNK [HLNK] = "[email protected]"


00078 | | |
-

Else
00079 | | | |
-

If SL LoginEnvironment is equal to ("DV900","JDV900")

00080 | | | | | VA evt_EmailFrom_HLNK [HLNK] = "[email protected]"


00081 | | | | End If
00082 | | | End If
00083 | | End If
00084 | End If
00085 |
-

EmailMergeLetter(B0500725.EmailMergeLetter)

| VA evt_EmailFrom_HLNK [HLNK] -> szFrom [HLNK]
| PO szEmailAddressCSV_EMAL [EMAL] -> szTo [HLNK]
| VA evt_FileAddress_CMDS [CMDS] -> szSubject [CMDS]
| VA evt_EmailTxtCommandString_CMDS [CMDS] -> szMessageTextChar256 [CMDS]
| VA evt_cFileExists_EV01 [EV01] -> cIncludeAttachmentFlag01 [EV01]
| VA evt_FileAddress_CMDS [CMDS] -> szNameOfAttachmentFile [HLNK]
| VA evt_GTSAttachmentName_YATTNM [YATTNM] -> szAttachmentDisplayText [CMDS]


00086 End If
00087 //
00088 // ===================================
00089 // FTP CSV file
00090 // ===================================
00091
-

If PO cProofOrFinal1_EV01 [EV01] is equal to "1"
And PO szFTPFolderLocation_CMDS [CMDS] is greater than <Blank>
00092 | // Construct complete destination FTP folder and filename address
00093 | VA evt_szFTPCSVName_CMDS [CMDS] = concat([PO szFTPFolderLocation_CMDS [CMDS]], [VA evt_GTSAttachmentName_YATTNM [YATTNM]])
00094 | //
00095 | VA evt_szExecuteCommand_NFLF [NFLF] = concat("cp ", [VA evt_FileAddress_CMDS [CMDS]])
00096 | VA evt_szExecuteCommand_NFLF [NFLF] = concat([VA evt_szExecuteCommand_NFLF [NFLF]], <Blank>)
00097 | VA evt_szExecuteCommand_NFLF [NFLF] = concat([VA evt_szExecuteCommand_NFLF [NFLF]], [VA evt_szFTPCSVName_CMDS [CMDS]])
00098 | //
00099 |
-

ExecuteExternalProgram(B34A1030.ExecuteExternalProgram)

| VA evt_szExecuteCommand_NFLF [NFLF] -> szCommandLine [NFLF]


00100 End If
00101 // BEGIN: John Danter 20/06/2017 MPRJ0082.55.05 - Consigned Stock Lodz changes
 
Back
Top