Distribution Function - To split Planned/Process orders into 10
Have you used, or tried to use Distribution Function?
It is assigned to the Production version and we assumed that it would divide the Planned order/Process order by the % we have in customizing.
We have created a distribution function DV10 and assigned to our plant. This uses the standard function S30 which has 10, 20, 30, 40, 50, 60, 70, 90, 100 in % dur and % cap fields. So you would think the planned/process order would be divided into 10 parts
Reason u2013 if an order goes over multiple days we want the order to be broken down by day.
Why? So that Deployment, when looking at an ATP report in R3 for multiple materials in 1 location, by day or period of days, can see how much will be available each day
Problem with GLEI (equal distribution) is that if an order starts today at 22:00 then we have equal distribution, we then have 25,000 PAL available today and 25,000 tomorrow, which is not a fair proportion according to the time available. Therefore, we thought that dividing by 10, for example, we would have a more accurate proportion each day
Many thanks for any input, even if "tried and failed :("
Cheers, Paul
Hi Mario,
Thanks for your input. Today we use GLEI which equally splits the same planned or process order into equally daily quantities for ATP purposes. We also have created STRT which drops the Planned/process order quantity onto the first day of the order.
Regarding daily lot sizes this could be an option but I suppose you would then get individual orders, which the business may prefer not to do.
Cheers, Paul
Similar Messages
-
Function Module to Get Process Order Path
Hi All,
I need to show the path for a process order, the process orders and planned order relationated with the main process order. I saw the transaction MD04 but it seems like the path is calculated.
Somebody knows wich tables or funcion module i can use?
Thanks in advance.
Alejandro.hi
check this report which o/p all the production orders and purchase orders related to a Sales order.. this might be some useful to you..
REPORT z_so_info.
TABLES: vbak, vbap, afko, afpo.
*Field catalog
TYPE-POOLS: slis.
DATA: lv_repid TYPE sy-repid VALUE sy-repid,
xfield TYPE slis_t_fieldcat_alv,
afield TYPE slis_fieldcat_alv.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-002.
SELECT-OPTIONS: so_so FOR vbak-vbeln OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
PARAMETERS:
p_kunnr LIKE vbak-kunnr, " sold-to
p_kunwe LIKE vbak-kunnr. " ship-to
SELECTION-SCREEN END OF BLOCK b2.
*Constants
CONSTANTS: c_zor TYPE vbak-auart VALUE 'ZOR',
c_we TYPE vbpa-parvw VALUE 'WE',
c_ag TYPE vbpa-parvw VALUE 'AG'.
c_space TYPE space.
*Ranges
RANGES: ra_parvw FOR vbpa-parvw,
ra_kunnr FOR vbpa-kunnr.
*Tables
DATA: BEGIN OF gt_output OCCURS 0,
vbeln LIKE vbak-vbeln, " sales order number
posnr LIKE vbap-posnr, " SO item number
matnr LIKE vbap-matnr, " material number
sh LIKE vbpa-kunnr, " Ship-to
sp LIKE vbpa-kunnr, " Sold-to
lifnr LIKE ekko-lifnr, " Vendor
bstnk LIKE vbak-bstnk, " PO number
banfn LIKE vbep-banfn, " Purchase requi
po_st TYPE char30, " PO status text
pstyv TYPE vbap-pstyv, " Item catagory
aufnr LIKE afpo-aufnr, " Production Order
prd_stat TYPE string, " Prd order status
END OF gt_output.
DATA: wa_output LIKE gt_output.
FIELD-SYMBOLS: <fs_output> LIKE gt_output.
*Table for sales order and PO
TYPES : BEGIN OF gs_data,
vbeln TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
pstyv TYPE vbap-pstyv,
matnr TYPE vbap-matnr,
END OF gs_data.
DATA: gt_data TYPE STANDARD TABLE OF gs_data,
wa_data TYPE gs_data.
*Table for Production Orders
TYPES: BEGIN OF gs_prd,
aufnr TYPE afpo-aufnr,
posnr TYPE afpo-posnr,
kdauf TYPE afpo-kdauf,
kdpos TYPE afpo-kdpos,
wepos TYPE afpo-wepos, "Goods Receipt Indicator
elikz TYPE afpo-elikz, "Delivery Completed Indicator
objnr TYPE aufk-objnr, "Object number
getri TYPE afko-getri, "Confirmed Order Finish Date
gltri TYPE afko-gltri, "Actual finish date
END OF gs_prd.
DATA: gt_prd TYPE STANDARD TABLE OF gs_prd,
wa_prd TYPE gs_prd.
*Table for partner data
TYPES: BEGIN OF gs_partner,
vbeln TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
parvw TYPE vbpa-parvw,
kunnr TYPE vbpa-kunnr,
END OF gs_partner.
DATA: gt_partner TYPE STANDARD TABLE OF gs_partner,
wa_partner TYPE gs_partner.
TYPES: BEGIN OF gs_po,
ebeln TYPE ekkn-ebeln,
ebelp TYPE ekkn-ebelp,
vbeln TYPE ekkn-vbeln,
vbelp TYPE ekkn-vbelp,
END OF gs_po.
DATA: gt_po TYPE STANDARD TABLE OF gs_po,
wa_po TYPE gs_po.
TYPES: BEGIN OF gs_preq,
vbeln TYPE vbep-vbeln,
posnr TYPE vbep-posnr,
banfn TYPE vbep-banfn,
END OF gs_preq.
DATA: gt_preq TYPE STANDARD TABLE OF gs_preq,
wa_preq TYPE gs_preq.
TYPES: BEGIN OF gs_po_stat,
ebeln TYPE ekko-ebeln,
procstat TYPE ekko-procstat,
lifnr TYPE ekko-lifnr,
END OF gs_po_stat.
DATA: gt_po_stat TYPE STANDARD TABLE OF gs_po_stat,
wa_po_stat TYPE gs_po_stat.
*Field symbols
FIELD-SYMBOLS: <fs> TYPE tj02t-txt04,
<fs_temp> TYPE tj02t-txt04,
<fs_stat> TYPE char30.
START-OF-SELECTION.
PERFORM fr_build_range.
PERFORM fr_get_data.
PERFORM fr_build_fc.
PERFORM fr_output.
*& Form fr_get_data
text
--> p1 text
<-- p2 text
FORM fr_get_data.
*Get SO
SELECT avbeln aposnr apstyv amatnr
FROM vbap AS a
JOIN vbak AS b
ON avbeln = bvbeln
JOIN vbpa AS c
ON bvbeln = cvbeln
INTO TABLE gt_data
WHERE b~vbeln IN so_so
AND b~auart EQ c_zor "Only Sales Orders
AND c~kunnr IN ra_kunnr. "from selection screen
DELETE ADJACENT DUPLICATES FROM gt_data COMPARING vbeln posnr.
*get data of the production order
IF NOT gt_data[] IS INITIAL.
SELECT aaufnr aposnr akdauf akdpos awepos aelikz
b~objnr
FROM afpo AS a
JOIN aufk AS b
ON aaufnr = baufnr
INTO TABLE gt_prd
FOR ALL ENTRIES IN gt_data
WHERE a~kdauf EQ gt_data-vbeln
AND a~kdpos EQ gt_data-posnr.
ENDIF.
*Get partner data
IF NOT gt_data[] IS INITIAL.
SELECT vbeln posnr parvw kunnr
FROM vbpa
INTO TABLE gt_partner
FOR ALL ENTRIES IN gt_data
WHERE vbeln EQ gt_data-vbeln.
ENDIF.
*Get Purchase Order
IF NOT gt_data[] IS INITIAL.
SELECT ebeln ebelp vbeln vbelp
FROM ekkn
INTO TABLE gt_po
FOR ALL ENTRIES IN gt_data
WHERE vbeln EQ gt_data-vbeln
AND vbelp EQ gt_data-posnr.
SELECT vbeln posnr banfn
FROM vbep
INTO TABLE gt_preq
FOR ALL ENTRIES IN gt_data
WHERE vbeln EQ gt_data-vbeln
AND posnr EQ gt_data-posnr.
ENDIF.
IF NOT gt_po[] IS INITIAL.
SELECT aebeln aprocstat a~lifnr
FROM ekko AS a
JOIN ekpo AS b
ON aebeln = bebeln
INTO TABLE gt_po_stat
FOR ALL ENTRIES IN gt_po
WHERE b~ebeln EQ gt_po-ebeln
AND b~ebelp EQ gt_po-ebelp.
ENDIF.
*Move data to output table
LOOP AT gt_data INTO wa_data.
wa_output-vbeln = wa_data-vbeln.
wa_output-posnr = wa_data-posnr.
wa_output-pstyv = wa_data-pstyv.
wa_output-matnr = wa_data-matnr.
READ TABLE gt_po INTO wa_po WITH KEY vbeln = wa_data-vbeln
vbelp = wa_data-posnr.
IF sy-subrc EQ 0.
wa_output-bstnk = wa_po-ebeln.
READ TABLE gt_po_stat INTO wa_po_stat WITH KEY ebeln = wa_po-ebeln.
IF sy-subrc EQ 0.
wa_output-lifnr = wa_po_stat-lifnr.
CASE wa_po_stat-procstat.
WHEN '01'.
wa_output-po_st = 'Version in process'.
WHEN '02'.
wa_output-po_st = 'Active'.
WHEN '03'.
wa_output-po_st = 'In release'.
WHEN '04'.
wa_output-po_st = 'Partially released'.
WHEN '05'.
wa_output-po_st = 'Released Completely'.
WHEN '08'.
wa_output-po_st = 'Rejected'.
ENDCASE.
ENDIF. "inner read subrc
ENDIF. "outer read subrc
READ TABLE gt_preq INTO wa_preq WITH KEY vbeln = wa_data-vbeln
posnr = wa_data-posnr.
IF sy-subrc EQ 0.
wa_output-banfn = wa_preq-banfn.
ENDIF.
READ TABLE gt_prd INTO wa_prd WITH KEY kdauf = wa_data-vbeln
kdpos = wa_data-posnr.
IF sy-subrc EQ 0.
wa_output-aufnr = wa_prd-aufnr.
*get the purchase requisition for production order as well
SELECT SINGLE banfn
FROM ebkn
INTO wa_output-banfn
WHERE aufnr EQ wa_prd-aufnr.
*Get the status of the production order
PERFORM fr_get_prd_stat USING wa_prd-objnr
CHANGING wa_output-prd_stat.
ENDIF. " sy-subrc
READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
parvw = c_we.
IF sy-subrc EQ 0.
wa_output-sh = wa_partner-kunnr.
ENDIF.
READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
parvw = c_ag.
IF sy-subrc EQ 0.
wa_output-sp = wa_partner-kunnr.
ENDIF.
APPEND wa_output TO gt_output.
CLEAR: wa_data, wa_prd,wa_partner,wa_output.
ENDLOOP.
ENDFORM. " fr_get_data
*& Form fr_build_range
text
--> p1 text
<-- p2 text
FORM fr_build_range .
*Range for partner function
MOVE 'I' TO ra_parvw-sign.
MOVE 'EQ' TO ra_parvw-option.
MOVE 'SH' TO ra_parvw-low. " we
APPEND ra_parvw.
CLEAR ra_parvw.
MOVE 'I' TO ra_parvw-sign.
MOVE 'EQ' TO ra_parvw-option.
MOVE 'SP' TO ra_parvw-low. " ag
APPEND ra_parvw.
CLEAR ra_parvw.
*Range for ship-to and sold-to
MOVE 'I' TO ra_kunnr-sign.
MOVE 'EQ' TO ra_kunnr-option.
MOVE p_kunnr TO ra_kunnr-low.
APPEND ra_kunnr.
CLEAR ra_kunnr.
MOVE 'I' TO ra_kunnr-sign.
MOVE 'EQ' TO ra_kunnr-option.
MOVE p_kunwe TO ra_kunnr-low.
APPEND ra_kunnr.
CLEAR ra_kunnr.
ENDFORM. " fr_build_range
*& Form fr_build_fc
text
--> p1 text
<-- p2 text
FORM fr_build_fc .
sales order number
afield-fieldname = 'VBELN'.
afield-seltext_s = 'Sales #'.
afield-ref_tabname = 'VBAK'.
APPEND afield TO xfield. CLEAR afield.
sales ITEM number
afield-fieldname = 'POSNR'.
afield-seltext_s = 'Item #'.
afield-ref_tabname = 'VBAP'.
APPEND afield TO xfield. CLEAR afield.
Material Number
afield-fieldname = 'MATNR'.
afield-seltext_s = 'Material #'.
afield-ref_tabname = 'VBAP'.
afield-outputlen = 10.
APPEND afield TO xfield. CLEAR afield.
*Vendor Number
afield-fieldname = 'LIFNR'.
afield-seltext_s = 'Vendor Num.'.
afield-ref_tabname = 'EKKO'.
APPEND afield TO xfield. CLEAR afield.
ship-to-party
afield-fieldname = 'SH'.
afield-seltext_s = 'Ship-to'.
afield-ref_tabname = 'VBPA'.
APPEND afield TO xfield. CLEAR afield.
sold-to-party
afield-fieldname = 'SP'.
afield-seltext_s = 'Sold-to'.
afield-ref_tabname = 'VBPA'.
APPEND afield TO xfield. CLEAR afield.
*PO number
afield-fieldname = 'BSTNK'.
afield-seltext_s = 'PO NUM'.
afield-ref_tabname = 'EKKO'.
APPEND afield TO xfield. CLEAR afield.
*PO status
afield-fieldname = 'PO_STAT'.
afield-seltext_s = 'Step'.
afield-ref_tabname = 'zbacklog_v2'.
APPEND afield TO xfield. CLEAR afield.
*PO step status
afield-fieldname = 'PO_ST'.
afield-seltext_s = 'PO.Status'.
afield-ref_tabname = 'zbacklog_v2'.
APPEND afield TO xfield. CLEAR afield.
*Purchase requisition
afield-fieldname = 'BANFN'.
afield-seltext_s = 'Pur. Req.'.
afield-ref_tabname = 'VBEP'.
APPEND afield TO xfield. CLEAR afield.
*Item catagory
afield-fieldname = 'PSTYV'.
afield-seltext_s = 'Itm. Catg'.
afield-ref_tabname = 'VBAP'.
APPEND afield TO xfield. CLEAR afield.
*Prodcution Order number
afield-fieldname = 'AUFNR'.
afield-seltext_m = 'Prod.Order'.
afield-ref_tabname = 'AFKO'.
APPEND afield TO xfield. CLEAR afield.
*PRODCUTION status
afield-fieldname = 'PRD_STAT'.
afield-seltext_s = 'Prd. Step'.
afield-ref_tabname = 'zbacklog_v2'.
afield-outputlen = 20.
APPEND afield TO xfield. CLEAR afield.
*PRODUCTION step status
afield-fieldname = 'PRD_ST'.
afield-seltext_s = 'Prd. Status'.
afield-ref_tabname = 'zbacklog_v2'.
APPEND afield TO xfield. CLEAR afield.
ENDFORM. " fr_build_fc
*& Form fr_output
text
--> p1 text
<-- p2 text
FORM fr_output .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
it_fieldcat = xfield[]
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = gt_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " fr_output
*& Form fr_get_prd_stat
text
-->P_WA_PRD_OBJNR text
FORM fr_get_prd_stat USING p_objnr CHANGING p_prd_stat.
DATA: lt_status TYPE STANDARD TABLE OF jstat,
wa_status TYPE jstat,
lv_status TYPE tj02t-txt04,
lv_temp2 TYPE char5,
lv_buff TYPE string.
CALL FUNCTION 'STATUS_READ'
EXPORTING
client = sy-mandt
objnr = p_objnr
only_active = 'X'
TABLES
status = lt_status
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
LOOP AT lt_status INTO wa_status.
IF wa_status-stat(1) EQ 'I'.
SELECT txt04 FROM tj02t
INTO lv_status
WHERE istat EQ wa_status-stat
AND spras EQ 'E'.
ENDSELECT.
lv_temp2 = lv_status.
CONCATENATE lv_temp2 p_prd_stat INTO p_prd_stat
SEPARATED BY ','.
ENDIF.
CLEAR: wa_status, lv_status, lv_temp2.
ENDLOOP.
lv_buff = p_prd_stat.
*Status of Production Order
IF lv_buff CS 'CRTD'.
p_prd_stat = 'Not Active'.
ENDIF.
IF lv_buff CS 'REL'.
IF lv_buff CS 'GMPS'.
p_prd_stat = 'Printed In Prod'.
ELSE.
p_prd_stat = 'Printed'.
ENDIF.
ENDIF.
IF lv_buff CS 'TECO'.
p_prd_stat = 'Technically Compt.'.
ENDIF.
ENDFORM. " fr_get_prd_stat -
BAPI function module to get process orders for certain material
Dear experts ,
kindly , I need my vb application to get all CRD , but not DLV Process orders for Material X.
Into SAP , I use the COIO , then set material to X , then display flag CRTD included , and Exclude DLV.
Question now , What is the function module that does this. what is the table name , and how to set search parameters.
my code will be like this
theFunc = functionCtrl.Add("BAPI_PO_GETDETAIL") ' get po data
theFunc.exports("purchaseorder") = t.Text
returnFunc = theFunc.call
returnParam = theFunc.imports("po_header")
retTab = theFunc.tables("po_items")
For Each rr In retTab.Rows
tt1.Text &= (rr("MATERIAL")) & vbTab
next
Thanks
WaleedHi,
Check if the below helps:
1. BAPI_SALESORDER_GETLIST for VA05
2. BAPI_QUOTATION_GETDETAILBOS for VA25.
Regards,
Vivek -
Batch Splitting in Process order
Dear all,
I created the process order . Now Executing batch Determination for Qt 265 of Component X .
Now in Batch Determination screen of Process order, out of three available batches , I am selecting one batch by doing copying
Now in Process order screen component overview , I am getting spilt qty. as 52 as first line item and 213 as second line item with selected batch number.
Why this splitting is coming , How to avoid this splitting ???Hi,
May be batch selected by you is not available in stock of 265 qty.
Their fore system has taken 52 qty of another batch.
Just check again MMBe available batches
Or accoriding to your sort rule line item 1 batch say A qty available is 53
Then remaining qty has taken 213 qty from your batch B in 2nd line item.
If you want to select batch A & if full stock available then remove 52 Qty from 1st line item in batch determine screen & put 265 QTY in front of your batch of which you want pick full qty.
Regards
SANIL -
Function module to read process order classification
Hi Experts,
I appreciate if any experts come with a function module where we can pass process order number and get its classification details.
Thanks in advance
Regards
BabuHi
Check the following BAPI's:
BAPI_OBJCL_GETDETAIL
BAPI_OBJCL_CHANGE
or use the fun module:
CLAF_CLASSIFICATION_OF_OBJECTS.
Reward points if useful
Regards
Anji -
Unreservation Issue while SO line split using Process Order API
Hi,
We are facing unreservation issue in the parent line after sales order line split for partially reserved line scenario usiing oe_order_pub.process_order API in 11.5.10 instance.
Standard Proces:
Orlder line - 10 quantities
Partially Reserved with 5 Quantities
Splitting the SO line using Process order API
Parent line with 5 quantities - Reserved
Child Line with 5 quantities - Unreserved
Our Issue
Orlder line - 10 quantities
Partially Reserved with 5 Quantities
Splitting the SO line using Process order API
Parent line with 5 quantities - Unreserved
We are not facing this issue when try to split the SO line from the Appllication.
Please find the script below which we are using for this line split scenario. The same script was working fine in our instance and not working after applying patch for Minimum Baseline Patch Requirements for Extended Support on Oracle E-Business Suite 11.5.10 (Note 883202.1).
I tried to find the differences between the APIs before and after patching and found these list of bug fixes in our API in the patched instances.
1.7503298
2.8339692
3.8479339
4.9347399
Please help us in this issue.
DECLARE
p_header_id NUMBER :=836084;-- Sales order header id
p_line_id NUMBER :=2560509;-- sales order line id
p_item_id NUMBER :=405477;--item id in sales order line
p_ord_qty NUMBER :=5;-- Total ordered quantity
p_reserv_qty NUMBER :=2;--partially reserved quantity
ln_counter NUMBER := 0;
lv_return_status VARCHAR2 (1);
lv_msg_data VARCHAR2 (2000);
ln_msg_count NUMBER := 0;
ln_increment NUMBER := 0;
ln_inv_item_id NUMBER;
ln_list_line_id NUMBER;
ln_service_duration NUMBER := 0;
lv_duration_uom VARCHAR2 (10);
lv_duration_uom_desc VARCHAR2 (10);
l_line_tbl oe_order_pub.line_tbl_type := oe_order_pub.g_miss_line_tbl;
lr_header_rec oe_order_pub.header_rec_type;
lr_header_val_rec oe_order_pub.header_val_rec_type;
lt_header_adj_tbl oe_order_pub.header_adj_tbl_type;
lt_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type;
lt_header_price_att_tbl oe_order_pub.header_price_att_tbl_type;
lt_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type;
lt_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type;
lt_header_scredit_tbl oe_order_pub.header_scredit_tbl_type;
lt_header_scredit_val_tbl oe_order_pub.header_scredit_val_tbl_type;
lt_line_tbl oe_order_pub.line_tbl_type;
lt_line_val_tbl oe_order_pub.line_val_tbl_type;
lt_line_adj_tbl oe_order_pub.line_adj_tbl_type;
lt_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type;
lt_line_price_att_tbl oe_order_pub.line_price_att_tbl_type;
lt_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type;
lt_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type;
lt_line_scredit_tbl oe_order_pub.line_scredit_tbl_type;
lt_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type;
lt_lot_serial_tbl oe_order_pub.lot_serial_tbl_type;
lt_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type;
lt_action_request_tbl oe_order_pub.request_tbl_type;
lv_errmsg VARCHAR2(4000);
v_user_id NUMBER:=fnd_profile.value('USER_ID');
v_resp_id NUMBER:=fnd_profile.value('RESP_ID');
v_resp_appl_id NUMBER:=fnd_profile.value('RESP_APPL_ID');
v_security_group_id NUMBER:=fnd_profile.value('SECURITY_GROUP_ID');
v_server_id NUMBER:=fnd_profile.value('SERVER_ID');
v_login_id NUMBER:=fnd_profile.value('LOGIN_ID');
l_file_val Varchar2(200);
BEGIN
--- Apps Initialize
fnd_global.apps_initialize(v_user_id,v_resp_id,v_resp_appl_id,v_security_group_id,v_server_id);
l_line_tbl(1) := oe_order_pub.G_MISS_LINE_REC;
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
l_line_tbl(1).split_action_code := 'SPLIT';
l_line_tbl(1).header_id := p_header_id;
l_line_tbl(1).line_id := p_line_id;
l_line_tbl(1).ordered_quantity := p_reserv_qty ;
l_line_tbl(2) := oe_order_pub.G_MISS_LINE_REC;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
l_line_tbl(2).header_id := p_header_id;
l_line_tbl(2).split_from_line_id := p_line_id;
l_line_tbl(2).inventory_item_id := p_item_id ;
l_line_tbl(2).ordered_quantity := (p_ord_qty-p_reserv_qty) ;
--Debug File creation
oe_debug_pub.debug_on;
oe_debug_pub.initialize;
l_file_val := OE_DEBUG_PUB.Set_Debug_Mode('FILE'); -- add l_file_val Varchar2(200); in declare section
oe_Debug_pub.setdebuglevel(5);
dbms_output.put_line(' Log File : '||l_file_val);
dbms_output.put_line('Log File name '||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE);
-- Start Process Order API for Splitting the line
oe_order_pub.process_order (p_api_version_number => 1.0,
p_init_msg_list => fnd_api.g_true,
p_return_values => fnd_api.g_false,
p_action_commit => fnd_api.g_true,
x_return_status => lv_return_status,
x_msg_count => ln_msg_count,
x_msg_data => lv_msg_data,
p_line_tbl => l_line_tbl,
x_header_rec => lr_header_rec,
x_header_val_rec => lr_header_val_rec,
x_header_adj_tbl => lt_header_adj_tbl,
x_header_adj_val_tbl => lt_header_adj_val_tbl,
x_header_price_att_tbl => lt_header_price_att_tbl,
x_header_adj_att_tbl => lt_header_adj_att_tbl,
x_header_adj_assoc_tbl => lt_header_adj_assoc_tbl,
x_header_scredit_tbl => lt_header_scredit_tbl,
x_header_scredit_val_tbl => lt_header_scredit_val_tbl,
x_line_tbl => lt_line_tbl,
x_line_val_tbl => lt_line_val_tbl,
x_line_adj_tbl => lt_line_adj_tbl,
x_line_adj_val_tbl => lt_line_adj_val_tbl,
x_line_price_att_tbl => lt_line_price_att_tbl,
x_line_adj_att_tbl => lt_line_adj_att_tbl,
x_line_adj_assoc_tbl => lt_line_adj_assoc_tbl,
x_line_scredit_tbl => lt_line_scredit_tbl,
x_line_scredit_val_tbl => lt_line_scredit_val_tbl,
x_lot_serial_tbl => lt_lot_serial_tbl,
x_lot_serial_val_tbl => lt_lot_serial_val_tbl,
x_action_request_tbl => lt_action_request_tbl
IF lv_return_status = fnd_api.g_ret_sts_success
THEN
COMMIT;
DBMS_OUTPUT.put_line('SUCCESS');
ELSE
IF ln_msg_count > 0
THEN
FOR i IN 1 .. ln_msg_count
LOOP
--fnd_file.put_line (fnd_file.log, fnd_msg_pub.get (i, 'F') );
DBMS_OUTPUT.put_line('ERROR'||fnd_msg_pub.get (i, 'F'));
END LOOP;
END IF;
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('EXCEPTION'||' '||SQLERRM);
END;
Thanks,
Kavin
Edited by: 897922 on Nov 17, 2011 11:51 PMSuggest that you first enter the transaction manually via the order entry form and adjustments. Then query the oe_price_adustments table and determine the values you need to send in to get the results you want.
-Bob -
How to Split 1 Order into Multiple Deliveries based on Partner Function ?
Hello,
How can I split one Sales Order into multiple deliveries, based on the partner function "managed by" ?
The requirement is that one order will be created for different "managed by".
If partner function "managed by" is same at line item level in order, than the items having same "managed by" can be combined in one delivery, else delivery will split and multiple deliveries will be created from 1 Order.
Jatin MistryHi,
You need to create a new requirement in tcode VOFM for that, together with your ABAP consultant. This requirement will be used in copy contol.
http://saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf
MdZ -
Planned/process ord creation on sales order creation
Hello Experts,
Is it possible to create planned/process orders on creation of a sales order? The scenario is MTO. Also, if any of you has done this, do let me know an example of where such a requirement comes to use.
Thanks,
Pradeep.Hi
You requirement will fillfull by the planning Strategy 82 - assembly processing.
1. It creates production orders directly once the sales order is saved. (because the KMFA req type is assigned to this strategy)
2. You do not have to run MD50 to create planned orders and then convert to production order for this strategy.
The setting you need to set :
1 In material master , MRP 2 view / the planning Strategy as 82 .
Edited by: raj on Jun 9, 2009 10:23 AM -
Automated TR creation while release the Process Order
I have to split the quantity into smaller units based on the ‘LE quantity’ before TR creation. In transaction LB03, there should be additional line items after the quantity split.
I am using the EXIT ‘EXIT_SAPLLCPP_001’. It is triggering during the transaction run. But it doesn’t serve the purpose.
Can anyone help me to achieve this functionality?Hi,
In Process Order Header Screen Go to ---> Log ---> On Release.Here you will find the detail error behind this problem.Go though it .Resolve it and then try to release the Process Order, and if required get back to us.
Suppose reason may be,
- Missing part
- Missing Capacity
- Batch Determination is required to perform.
- Any User Exit (Other then std. SAP)
Regards,
Dhaval -
Process order should not take part in MRP run
Hello Colleagues
I looking for a way how to exclude not released process orders (we have PP-PI) from MD04 report. Not released process order should not take part in MRP run. I was trying to do it using OPJJ for availability check 02 and checking rule PP but I was not able to get result. Could you please help, probably there are other settings?
Best Regards
EduardHi,
Settings in OPJJ will take effect only when you create or release process orders.
As a work around you can try to exclude process order is
1. Create a Storage location and make it not relevant for MRP-OMIR
2. In Material master for the material in MRP assign storage location MRP as 1 (exclude storage location stock)
3. Create the process order, in the GR tab enter the storage location (not MRP relevant)
In the MRP run it will not take the process order into account.
After releasing change the storage location to the normal sotrage location.
In this process flow, the control is with the storage location.
Check it in your sandbox.
Thanks,
JK -
U00A7ECH Engineering Change with Purchase Order, Process Order and Sales Order
Hello All,
Can someone kindly explain me the integration points of Engineering Change with
1. Purchase Order
2. Process Order
3. Sales Order
I know we can see the Rev Letter in the first two. Is there a 'refresh' function inside the PO, Process Order, Sales Order by which we can get the latest and greatest revision, incase the material rev is updated/changed after the PO, Proc Order, SO is already created. Also if yes,after what status in PO, Process Order or Sales Order we cannot use the 'Refresh' button, and than what needs to be done to fix this situation.
Thanks in advance,
SachinHi,
really, this depends on several factors, especially the valid from date of the ECM and its impact on changes on a BOM (which I suppose is the use case you are looking at? Or just a change on the material revision of the BOM header material?
Interesting for you should also be Order Change Management, although not applicable to process orders as far as I know:
[http://help.sap.com/saphelp_erp60_sp/helpdata/en/41/3699761bc211d2b62b0000e8359890/frameset.htm]
Regards, Ulf. -
Process Order Details like batch number, mfg date flow to a new process ord
Hi Experts,
I have a doubt in Process Order.
I have two stage production.
1. Blending
2. Packing
I create a process order for blending and assign a batch number and manufacturing date for Blending operation.
Release the process order.
Final Confirmation of the process order.
I complete all the process, Goods Reciept is done.
Technically completed the Process Order.
Now my 1st stage Process order is completed and ready for the 2nd stage production i.e., Packing.
Now I create a new process order,
here I am having the problem that I need to enter all the details like batch number, manufacturing date etc..
I want to avoid this in the 2nd process order.
How to do this i.e., carry forwarding the details of the 1st process order into the 2nd process order.
Is there any setting required at the back end?
I was told about Push operation to rectify the above problem. But I am not clear about that.
Can any one clearly explain about that step- by - step.
Thanks in advance,
Regards,
B. Praveen
Praveenclosing thread
-
Commited Date - in process order
Gurus,
I am creating a process order using a BDC recording. While releasing the process order, Material shortage popup is coming and my BDC is failing in production environment.
My issue is eventhough i have enough stock of my component SAP throws me this material shortage popup. On anlysis we found out commited date is calcualted as 31.12.9999 and there is no confirmed quantity in missing parts list.
I had maintained Avaliablity check and checking groups in material master and factory calendar is also valid.
Please help out with this issue and solution to this is highly appreciated.
Thanks,
AravindHi Aravind,
Please check on the following things.
1) Lead times and processing times in Bom & material master whether maintained in R/3
2) Horizons in PP/DS tab in APO material master
3) Any false reservations for components based on other planned/process orders
4) All the stocks of components should not be in blocked storage location
Regards
R. Senthil Mareeswaran. -
Process Order Management in MII 15.0
Hi Experts,
I would like to know is there any new feature added on MII 15.0 to handle Process Order which are downloaded from SAP. In earlier versions of MII we used to store this order in a Custom Database and process from there. Is there any standard functionality available for this on MII 15.0 version?
Thanks in advance
ShajiHi Shaji,
with MII 15.0, you have OEE functionality which provides the process order execution capabilities. please check the help document at
http://help.sap.com/saphelp_mii150sp00/helpdata/en/88/ce8df74a144fdd8065fb5ebdcfe33c/content.htm?frameset=/en/4d/54cbe9071b60c5e10000000a15822d/frameset.htm¤t_toc=/en/57/533f692a9d4efbb9783e9008535f44/plain.htm&node_id=600&show_children=false
Thanks
Rajeev -
Need BAPI for COR1(Create process Order)
Hi Gurus,
I need a BAPI or Function module for create process order (Tcode - COR1)
for which i am passing Plant, storage location,produced material number, quantity to produce,
received material,quantity to recived.
Regards,
Vijay MekalaHi,
is there any other BAPI or function module for COR1...
Regards,
Mekala Vijay
Maybe you are looking for
-
Report using reuse_alv_block and reuse_alv_hiersql_list
Dear all, I have a report were in i need to display two reports for branch wise report and for sales employee wise report.The report is accepted for branchwise were i'm using reuse_alv_hiersal_list_display FM.And as per the business scenario i was fo
-
Question mark in folder flashing. Nothing works, can I conclude my HD is dead?
My computer screen froze the other day and the only thing I could do was to restart it. However, when I did, all I got was a grey screen and a question mark flashing in a folder. I have since then tried everything suggested in these cases. Nothing wo
-
Xml file in dynamic file name in file receiver adapter
Hi, I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i All turned out okay. I have got the file name I require. Except that t
-
Function module to download to excel sheet
what is the function module to download the report into excel sheet??.. Thanks Sri
-
hi i have a SQL alwayson setup of 3 virtual machines. two sql servers and one for cluster quorum. the sql listener Works fine, but the connection login time to the sql server instanse are slow. ive tried both from the sql server it self, from another