on 03-31-2014 12:25 PM
Hi,
In PPDS, is it possible to generate one planned order against two or more sales ordeer requirement with correct account assignment to the output node of the planned order? Lot sizing procedure is not the thing I am loking for.
I want to select manually sales orders and then create single planned order against those selected sales order in PPDS.
The total quantity of the created planned order will be the sum of the selected sales order requirements with correct account assignments against each individual requirement. Is there any way to do this?
Does MOP (Multiple output planning) works with PDS (Production data structures). If yes, how?
Thanks in advane.
Warm Regards,
Surajit Das
Hi Surajit,
MOP works with PDS.
You can use heuristic
Heuristic SAP_MOP_002 Manual Creation of MOP Order
these are code samples I used for the heuristic execution.
METHOD /sapapo/if_ex_eog_addin1~add_multiple_outputs.
CLEAR cv_open_requirement.
IF is_rq_node-real_quantity > is_masterin_supply-devquantity.
cv_open_requirement = is_rq_node-real_quantity -
is_masterin_supply-devquantity .
ENDIF.
CHECK it_man_demands IS NOT INITIAL.
* manual MOP
DATA: ls_allocation LIKE LINE OF ct_allocation,
ls_man_demand LIKE LINE OF it_man_demands,
ls_output LIKE LINE OF it_outputs,
ls_added_output LIKE LINE OF ct_added_outputs,
ls_objkey TYPE /sapapo/mc01_objkey_type,
lv_posno TYPE rspos.
FIELD-SYMBOLS: <added_output> LIKE LINE OF ct_added_outputs,
<added_outputs_cvals> LIKE LINE OF
ct_added_outputs_cvals.
ct_added_outputs = it_man_demands.
ct_added_outputs_cvals = it_man_demands_cvals.
lv_posno = 0.
* get max posno
LOOP AT it_outputs INTO ls_output.
IF lv_posno < ls_output-position_no.
lv_posno = ls_output-position_no.
ENDIF.
ENDLOOP.
LOOP AT it_inputs INTO ls_output.
IF lv_posno < ls_output-position_no.
lv_posno = ls_output-position_no.
ENDIF.
ENDLOOP.
READ TABLE it_outputs INTO ls_output
WITH KEY is_master = 'X'.
CHECK sy-subrc = 0.
LOOP AT ct_added_outputs ASSIGNING <added_output>.
ls_added_output = <added_output>.
<added_output>-orderid = iv_orderid.
<added_output>-category = 'AI'.
<added_output>-category_type = 1.
<added_output>-actid = ls_output-actid.
lv_posno = lv_posno + 1.
<added_output>-position_no = lv_posno.
<added_output>-line_no = space.
<added_output>-is_input_node = space.
<added_output>-real_quantity = <added_output>-real_quantity =
<added_output>-original_quantity = ABS( ls_added_output-real_quantity ).
CLEAR <added_output>-conf_quantity.
* fill allocation for manual MOP
ls_allocation-to_orderid = ls_added_output-orderid.
ls_allocation-to_position_no = ls_added_output-position_no.
ls_allocation-to_line_no = ls_added_output-line_no.
ls_allocation-peg_amount = ABS( ls_added_output-real_quantity ).
ls_allocation-from_orderid = <added_output>-orderid.
ls_allocation-from_position_no = <added_output>-position_no.
ls_allocation-from_line_no = space.
* pegging_type
* method
* rel_type
* eog_rc
APPEND ls_allocation TO ct_allocation.
* adjust chars
LOOP AT ct_added_outputs_cvals ASSIGNING <added_outputs_cvals>
WHERE object_id = ls_added_output-orderid
AND position_no = ls_added_output-position_no.
<added_outputs_cvals>-object_id = <added_output>-orderid.
<added_outputs_cvals>-position_no = <added_output>-position_no.
<added_outputs_cvals>-line_no = space.
ENDLOOP.
ls_objkey-objectid = <added_output>-orderid.
ENDLOOP.
ENDMETHOD.
"/sapapo/if_ex_eog_addin1~add_multiple_outputs
METHOD /sapapo/if_ex_eog_addin1~get_master_in_pds.
READ TABLE it_inputs INTO es_masterinput INDEX 1.
ENDMETHOD.
METHOD /sapapo/if_ex_eog_addin1~is_eog_ppm.
IF is_source-name CS 'FH7_CR_STRIP'.
* IF is_source-name CS 'FH7_CR_1'.
cv_is_eog_ppm = 'X'.
ENDIF.
ENDMETHOD.
METHOD /sapapo/if_ex_eog_addin1~receipts_controls.
* only upstream!
* downstream the demand shall receive the created planned order!
CHECK iv_eog_context = 'U'.
cv_use_altacc = 'X'.
ENDMETHOD.
BR Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.