I'm working on a code that'd need to get a value from sales line to Requisition Worksheet when you run the Calculate plan but I've problem finding the right codeunit and trigger that does the transfer.
I have a sales order that has a line that transfers to the worksheet but without the column, I got the same Field (that I'd need to transfer) on every table the codecoverage goes trough on the process
Any help with this issue?
K.S.
0
Comments
please have a look..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Table 4 Currency 0,22
Table 27 Item 0,04
Table 246 Requisition Line 0,31
Table 330 Currency Exchange Rate 0,20
Table 337 Reservation Entry 0,02
Table 5700 Stockkeeping Unit 0,05
Table 5742 Transfer Route 0,30
Table 99000853 Inventory Profile 0,58
Form 291 Req. Worksheet 0,07
Form 565 Code Coverage 0,79
Report 699 Calculate Plan - Req. Wksh. 0,70
Codeunit 330 ReqJnlManagement 0,08
Codeunit 408 DimensionManagement 0,03
Codeunit 5402 Unit of Measure Management 0,29
Codeunit 5404 Lead-Time Management 0,46
Codeunit 5777 Whse. Validate Source Line 0,13
Codeunit 6500 Item Tracking Management 0,01
Codeunit 7010 Purch. Price Calc. Mgt. 0,30
Codeunit 7600 Calendar Management 0,39
Codeunit 99000808 PlanningRoutingManagement 0,03
Codeunit 99000809 Planning Line Management 0,15
Codeunit 99000831 Reservation Engine Mgt. 0,01
Codeunit 99000832 Sales Line-Reserve 0,02
Codeunit 99000833 Req. Line-Reserve 0,04
Codeunit 99000834 Purch. Line-Reserve 0,02
Codeunit 99000836 Transfer Line-Reserve 0,02
Codeunit 99000838 Prod. Order Comp.-Reserve 0,02
Codeunit 99000841 Item Ledger Entry-Reserve 0,75
Codeunit 99000854 Inventory Profile Offsetting 0,62
Codeunit 99000855 Planning-Get Parameters 0,93
Codeunit 99000856 Planning Transparency 0,61
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
TransferFromUnplannedDemand(VAR UnplannedDemand : Record "Unplanned Demand") - Tigger
I ran the Calculate function with debug on and it did not stop on the marker.
I also checked the coverage and the it does not go through the trigger.
I thought this was easy first too, but it seems the transfer is well hidden somewhere in the code :-k
1.Created field in Unplanned Demand table..
2.Copied Data from Sales Line to Unplanned Demand field via InsertSalesLine function of Get Unplanned Demand CU
3.Copied back data from Unplanned Demand table to Requision Line table via TransferFromUnplannedDemand function in table 246..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
1. I have a column on sales order lines (sales line table)
2. I add Item to the line and some text to the new field
3. there are not enough items so you need to order more of those items and you go to to the req. worksheet
4. I open the req. worksheet and calculate the plan and it adds the sales order lines with the items that needs to be ordered (but without the new field)
I have the field on the temp table, the requisition table, the sales line table
When I use the calculate function it does not use the trigger which uses the table 5520.
You have to write one line code in above 2 functions..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I also tested by adding markes on that function and run the function with debug, the function does not fire :-k
Also the CU 5520 is not shown up on the code coverage.
Yet I get all the lines from the sales orders that has items needed to be ordered.
can you explain the steps and show the code what you did?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Added the table fields, added code and run the test I described on previous post
tables fields
Sales line table 37, added "text field" lenght 30 type text
requisition line table 246, added "text field" lenght 30 type text
unplanned demand table 5520, added "text field" lenght 30 type text
table 246 code added:
codeunit
get unplanned demand codeunit 5520, added following code:
I did the same thing and it is working fine..make sure that you are checking correct Sales line is in which you have added text field value is inserted in requisition line...
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
instead is uses these transfer triggers on the table 246:
TransferFromPurchaseLine(PurchLine)
TransferFromTransLine(TransLine)
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Isn't Unplanned Demand table used with productions? We are not making production orders, we are making sales orders.
Could you confirm that you are doing the same?
When I have Sales order and add item that you'd need more than there is in inventory, it populates table 337 Reservation Entry
with that item and quantity.
Then when you run the requisition worksheet and calculate plan for that item the table 337 gets new line with same "entry no." but with positive quantity.
Me and my co worker have been thinking if the requisition worksheet gets the value from there and not around 5520.
The debugger does not go through Unplanned Demand.