B3401360 - Process MPS Messages question


Well Known Member
Good day all!

I am working on some functionality where I need to get and some work on the generated Work order created from an MRP message processed by the R3411. In order to get the WO, I am doing the following:

1. Create a MRP/MPS record in the F3411 - DONE
2. Modify the R3411 to do an update the F4801 record for the processed 'W' Line Type item
a. At the end of the "Do Section" (after the "Process Messages" bsfn)
b. add logic to find WO from the information entered into the F3411 record
2. Run the R3411 against the newly created F3411 record
a. After the B3401360 Process Messages Business function completes successfully
b. get the created F4801 record and process accordingly
3. No F4801 record is created when the "Process Messages" Function completes.
4. The F4801 record is created shortly after from what appears to be an asynchronous business function

I am trying to figure out how the B3401360 - Process MPS Messages business function works. Internally, it will call the B4200310, Sales Order Entry business function. But, it appears as thought the B4200310 runs ASYNCHRONOUSLY as it does not finish fully before the calling B3401360 does.

Specifically, what I am looking for is the B3401360 to create the Work Order (F4801 record) from the 'W' line type but since it is not created immediately, I am left with a dilemma, when and how can I get the F4801 record without having to do a table trigger?

Any ideas or suggestions?
trying to understand what you are trying to do here...

So you are trying to have the planning module automatically create a work order message, and process that message to create the work order, if the user processes a sales order with a W line type?
Essentially: We have an ST/OT document being created. On the ST/OT is a "W" line type. When the ST/OT is created, the Sales Order MBF will detect the "W" line type and create the associated WO.

What I am trying to do is bypass the MRP message review process and do some custom logic to manage a special case scenario. To do so I am doing the following:
1. Create the F3411 Record manually
2. Run a modified R3411 against the F3411 Record created
3. The mod is as follows:
a. At the end of the R3411 "DO Section"
b. Test to ensure that the B3401360 "Process Messages" bsfn completed successfully
c. Use the updated F3411 Record to find the ST order type and associated number
d. Find the WO in the F4801 table using the using the Related Order Number/Type as key
e. Apply any and all custom logic as necessary

But, as stated above, the B3401360 completes successfully but the associated WO is not generated immediately, but it does show up eventually (have not done any timing to see exactly when). I have never seen a business function act this way.
I feel really dumb now.

I was doing these functions before the END DOC. Can't process against CACHED values.

Sorry for being stupid guys, apologies.

Points to you for 'fessing' up. We all do that sort of thing at some point.