Creating the purchase order report

The purchase order report should be developed in order to integrate system modules and minimize the data duplication and data entry. It will also control the electronic approval process.

Getting ready

You should install the fat client in order to use JD Edwards object library workbench.

How to do it...

This section provides the specification details of the purchase order report. The specification details are linked with the screenshot of the customized report, which has been marked with the step number from the text:

  1. Insert company logo and for the selected document number F4301.DOCO and document type F4301.DCTO and put into data selection, pass the supplier number F4301.AN8 and pass it to F0101.AN8 and print F0101.ALPH supplier name.
  2. Fetch the PO number F4301.DOCO and type F4301.DCTO in the data selection, pass F4301.AN8 to F0101.AN8 and get F0101.ADD1 and ADD2 and CTY1 and ADDZ.
  3. Pass F0101.CTR (add seven spaces on the left side), and print F0005.DL01 where F0005.SY = 00 and F0005.RT = CY.
  4. For the selected PO number and Type F4301.DOCO and F4301.DCTO in the data selection pass F4301.AN8 to F0115.AN8 and print: Concatenate (( F0115.PHTP & : & F0115.PH1) where F0115.RCK7 = 1 and F0115.PHTP = TEL) and ((F0115.PHTP & : & F0115.PH1) where F0115.RCK7 = 1 and F0115.PHTP = FAX).
  5. For the selected PO number and type F4301.DOCO and F4301.DCTO in the data selection pass F4301.AN8 to F0111.AN8, and print F0111.MLNM where F0111.IDLN = 1.
  6. Print the Order Number and order type selected in data selection F4301.DOCO and F4301.DCTO.
  7. For the selected PO number and PO type F4301.DOCO and F4301.DCTO in the data selection, print F4301.OORN and F4301.OCTO.
  8. For the selected PO number and PO type F4301.DOCO and F4301.DCTO in the data selection, print F4311.SBL.
  9. For the selected PO number and PO type F4301.DOCO and F4301.DCTO in the data selection, print F4301.TRDJ.
  10. For the selected PO number and PO type F4301.DOCO and F4301.DCTO in the data selection, pass F4301.OORN& F4301.OCTO to F4301.DOCO& F4301.DCTO, and print F4301.TRDJ.
  11. ***.
  12. Print: "Print Purchase Order".
  13. ***.
  14. The system will prompt us to enter a value for processing option 3 when this report will run.
  15. The system will prompt us to enter a value for processing option 4 when this report will run.
  16. The system will prompt us to enter a value for processing option 5 when this report will run.
  17. The system will prompt us to enter a value for processing option 6 when this report will run.
  18. The system will prompt us to enter a value for processing option 7 when this report will run.
  19. The system will prompt us to enter a value for processing option 8 when this report will run.
  20. Print F0111.NICK where F0111.AN8 = processing option 1.
  21. F0101.ALPH where F0101.AN8 = processing option 2.
  22. Print F0101.ADD1 and ADD2 and CTY1 and ADDZ where F0101.AN8 = processing option 3 and F0101.AN8 = processing option 2. Pass F0101.CTR to F0005.KY (add seven spaces on the left side) and print F0005.DL01 where F0005.SY = 00 and F0005.RT = CY.
  23. ***.
  24. Fetch F0115.AN8 = processing option 4.

    Concatenate ((F0115.PHTP & : & F0115.PH1) where F0115.RCK7 = 1 and F0115.PHTP = TEL) and (F0115.PHTP & : & F0115.PH1) where F0115.RCK7 = 1 and F0115.PHTP = FAX).

  25. For the selected PO number and type F4301.DOCO and F4301.DCTO in the data selection, and print F4301.DEL1&DEL2.
  26. Print F0111.NICK where F0111.AN8 equals to F4301.AN8.
How to do it...

How it works...

The development of this report is based on the preceding specification, the system generates the following code, which can be modified. In the Initialize Section, you will initialize the variable, and the main report coding will be written in the Do Section:

*********************************************************************
GLOBALS: Global Variables
*********************************************************************
rpt_SuppressPrinting, rpt_ChangeOrderNumber, rpt_SelectChangeOrderFlag, rpt_InventoryInterface, rpt_TextYN, rpt_ErrorMessage, rpt_PreviousLineType, rpt_QuantityInPrimaryUnits,
0001 // *************************************************************
0002 // Revision Log
0003 // *************************************************************
0004 // 12/16/2004 - IC8872866 -7439649 - Ship to address incorrect on P
0005 // 05/20/2005 - IC8823626 -7664281 - Fix Media Object Corruption
0021 // *************************************************************
0022 // SAR 7133527 Begin: Added Code For PO Dispatch of Ordes Generated from eReqs
0023 // *************************************************************
0024 //
0025 If RI cPOGenSourceSystem_POGS is equal to "2"
0026 F4333WF.Select
RI mnUniqueKeyIDInternal_UKID = TK Unique Key ID (Internal)
0027 While SV File_IO_Status is equal to CO SUCCESS
0028 F4333WF.Fetch Next
VA evt_mnDispatchOrderNumber_DOCO <- TK Document (Order No, Invoice, etc.)
VA evt_szDispatchOrderType_DCTO <- TK Order Type
VA evt_szDispatchOrderCo_KCOO <- TK Order Company (Order Number)
VA evt_szDispatchOrderSuffix_SFXO <- TK Order Suffix
0029 If SV File_IO_Status is equal to CO SUCCESS
0030 Set User Selection(BC Document (Order No, Invoice, etc.) (F4311) (DOCO), <Equal To>, VA evt_mnDispatchOrderNumber_DOCO, <Or>)
0031 Set User Selection(BC Order Type (F4311) (DCTO), <Equal To>, VA evt_szDispatchOrderType_DCTO, <And>)
0032 Set User Selection(BC Order Company (Order Number) (F4311) (KCOO), <Equal To>, VA evt_szDispatchOrderCo_KCOO, <And>)
0033 Set User Selection(BC Status Code - Last (F4311) (LTTR), <Not Equal To>, "980", <And>)
0034 If VA evt_szDispatchOrderSuffix_SFXO is not equal to <Blank> And VA evt_szDispatchOrderSuffix_SFXO is not equal to <Null>
0035 Set User Selection(BC Order Suffix (F4311) (SFXO), <Equal To>, VA evt_szDispatchOrderSuffix_SFXO, <And>)
0036 End If
0037 VA evt_cUserSelectionSuccess_EV01 = "1"
0038 End If
0039 End While
0040 If VA evt_cUserSelectionSuccess_EV01 is not equal to "1"
0041 Set User Selection(BC Document (Order No, Invoice, etc.) (F4311) (DOCO), <Equal To>, <Zero>, <And>)
0042 Set User Selection(BC Order Type (F4311) (DCTO), <Equal To>, <Blank>, <And>)
0043 Set User Selection(BC Order Company (Order Number) (F4311) (KCOO), <Equal To>, <Blank>, <And>)
0044 Else
0045 // Delete Records from F4332WF if User Selection Successful
0046 F4333WF.Select All
UNDEFINED = UNDEFINED
0047 F4333WF.Delete
RI mnUniqueKeyIDInternal_UKID = TK Unique Key ID (Internal)
0048 End If
0049 Else
0050 // SAR 7133527 End
0051 If RI Documentorderinvoice is not equal to <Null> And RI Documentorderinvoice is not equal to <Blank> And RI Documentorderinvoice is not equal to <Zero>
0052 Set User Selection(BC Document (Order No, Invoice, etc.) (F4, <Equal To>, RI Documentorderinvoice, <And>)
0053 Set User Selection(BC Order Type (F4311), <Equal To>, RI Ordertype, <And>)
0054 Set User Selection(BC KCOO (Order Company (Order Number)) (F4311), <Equal To>, RI Companykeyorderno, <And>)
0055 //
0056 // Do not display lines that were cancelled in entry-Status 980
0057 // SAR 6414845 begin
0058 ! Set User Selection(BC Status Code - Last (F4311) (LTTR), <Less Than>, "980", <And>)
0059 Set User Selection(BC LTTR (Status Code - Last) (F4311), <Not Equal To>, "980", <And>)
0060 // SAR 6414845 end
0061 //
0062 If RI Ordersuffix is not equal to <Blank> And RI Ordersuffix is not equal to <Null>
0063 Set User Selection(BC Order Suffix (F4311), <Equal To>, RI Ordersuffix, <And>)
0064 End If
0065 End If
0066 End If
0067 //
0068 // *************************************************************
0069 // Get fields for EDI to insert into tables
0070 // *************************************************************
0071 //
0072 VA rpt_PreviousLineType = " "
0073 VA rpt_EDER_SendReceiveIndicator = "S"
0074 VA rpt_EDSQ_DetailRecordSequence = "01"
0075 VA rpt_EDTY_DetailRecordType = "D"
0076 VA rpt_EDSQ_DetailSequence2 = "02"
0077 VA rpt_EDLN_EDILineNumber = "1"
0078 //
0079 If PO szEDISelectionvalue2 is not equal to <Blank>
0080 EDI Batch Number, Get Next Number
VA rpt_EDBT_EDIBatchNumber <> BF szEdiBatchNumber
0081 End If
083 // **************************************************************
0084 // Initialize Variables
0085 // *************************************************************
0086 //
0087 VA rpt_STA1_TaxAuthAmount1Total = "0"
0088 VA rpt_STA2_TaxAuthAmount2Total = "0"
0089 VA rpt_STA3_TaxAuthAmount3Total = "0"
0090 VA rpt_STA3_TaxAuthAmount3Total = "0"
0101 // *************************************************************
0102 // Get Audit Information to use to update tables
0103 // *************************************************************
0104 //
0105 Get Audit Information
VA rpt_UserId <- BF szUserName
VA rpt_Date <- BF jdDate
VA rpt_Time <- BF mnTime
VA rpt_WorkStationId <- BF szWorkstation_UserId
0106 VA rpt_ProgramId = "ER43500"
0107 //
0108 If SL CountryCode is not equal to <Blank> And SL CountryCode is not equal to <Null>
0109 R43500 - Plug And Play
SL CountryCode -> BF szCountry
"R43500" -> BF szProgramId
"POPRN" -> BF szFormId
"INI" -> BF szFormAction
PO PrintFromSecondUBE <> BF szSecondUBEStd
VA rpt_szSecondUBELoc_VL11 <> BF szSecondUBELoc
0110 End If
0111 //
0112 // SAR 7182994 Begin - Delete any junk workfiles
0113 If PO PrintFromSecondUBE is equal to "1"
0114 F43UI50D.Delete
VA rpt_WorkStationId = TK Work Station ID
VA rpt_UserId = TK Computer ID
0115 F43UI50H.Delete
VA rpt_WorkStationId = TK Work Station ID
VA rpt_UserId = TK Computer ID
0116 F40UI00T.Delete
VA rpt_WorkStationId = TK Work Station ID
VA rpt_UserId = TK Computer ID
0117 End If
0118 // SAR 7182994 End
0119 //
0120 // Get the purchasing Advanced Pricing flag
0121 ! Get Tag File
! "43" -> BF szSystemCode
! VA rpt_ADVP_AdvPriceFlag <- BF cSystemConstantsCode11
0122 // SAR 5214294 - Retrieve AdvPri Flag and UOM Conv by Branch Flag
0123 F4009 Get Distribution Constants
VA rpt_cUOMByBranch <- BF cUoMConversionByBranch
VA rpt_ADVP_AdvPriceFlag <- BF cAdvancedProcurementPricing
0124 //
0125 //
---------------------------------------------------------------------
EVENT: Do Section
---------------------------------------------------------------------
evt_ForeignDescription_DSC1
evt_ForeignDescription2_DSC2
evt_szEDIDescription_DSC1
evt_szEDIDescription2_DSC2
evt_GeoCodeValid
evt_F4311Updated_EV01
evt_CUS_LineDescription_DL01
evt_CUS_ItemDesc_MSGTEXT
0001 VA rpt_SuppressPrinting = " "
0002 VA rpt_SelectChangeOrderFlag = "0"
0003 VA rpt_cColumnarFooter_EV01 = " "
0004 VA rpt_FormQuotSupp_EV01 = " "
0005 VA rpt_CustSuppItemDes_DSC1 = " "
0006 //
0007 // BEGIN SAR 6101689
0008 // SAR 7389629
0009 ! VA rpt_XPIMulOrderCounter_MATH01 = VA rpt_XPIMulOrderCounter_MATH01+1
0010 // END SAR 6101689
0011 //
0012 // SAR 6357546 BEGIN
0013 VA rpt_EditItemMaster_YN = ""
0014 // SAR 6357546 END
0015 //
0016 // SAR 6705837
0017 VA rpt_AmountForeignExtPrice_FEA = 0
0018 //
0019 // SAR 3084166
0020 If BC Purchasing Taxable (Y/N) (F4311) is equal to "Y"
0021 VA rpt_cTaxTestFlag_FLAG = "0"
0022 End If

Note

The coding that you are doing is called ER (Event Rule) in Oracle JDE.

There's more…

You should set up the following processing option details in order to set up the fetch criteria:

  • Company Address Book Number (AN8)
  • Ship to Address Book Number (AN8)
  • Ship Date
  • Ship Method
  • Partial Shipment
  • Transshipment
  • Insurance to be arranged by
  • Terms and condition of payment

See also

  • Creating the sales invoice report
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset