Enable PDF Generation of Sales Order from Opportunity not working
Hi all,
we are trying to enable the PDF Generation for Sales Order from Opportunity.
We´re working on the ERP-HCI Scenario.
We´ve setup the necessarry configurations (chapter 11.3.11) how described in the document:
https://websmp201.sap-ag.de/~sapidb/012002523100002166322015E/1502_SAP_C4C_ERP_HCI.pdf
1. Create Endpoint in ECC for the WS "SalesDocumentPrintPreviewQuery"
After saving the settings we have an calculated enpoint:
/sap/bc/srt/rfc/sap/salesdocumentprintpreviewquery/{SAP-CLIENT}/salesdocumentprintpreviewquery/salesdocumentprintpreviewquery
2. Create a new Communication Arrangement in C4C for the Scenario "Print Preview of Business Documents in SAP Business Suite"
Question to the following Step:
Go to Advanced Settings and enter the URL you have captured from SOAMANAGER in the Create Endpoint section.
Why we use the host and calculated endpoint from the ECC instead of the HCI settings, and maintain in HCI the target host and endpoint?
The Check Service and Check Connection test was successfull.
Finally if we try the scenario from C4C (Customers > {Select a Customer} > Opportunity > Sales Document > {Click the link}
We got a blank new Window, in the C4C UI we get the error "PDF Document could not be retrieved"
In the ECC > SOA Runtime Error Log i get the following Error!?
What´s wrong with our config?
Thanks in advance,
Fabian
There is nothing impossible in SAP. After all there is a code behind everything that we see in SAP screens and transactions and that code can be changed according to our requirement. That has always been m firm belief.
Like I said get hold of your ABAP programmer and write out the spec and he should be able to do it.
Its news for me that you can generate an automatic PO from a GR so if that is possible then why not this.
Its not been attempted before.
Try creating a new Sales doc type and map it to a delivery and see if it works. Much similar to a cash sale and rush order when both docs get generated immediately. Maybe you need to map your copy control criteria too in a way it can be done.Also maybe you need to create a new field called Immediae sales Order like we have an immediate delivery check box in a sales order so that an automatic sales order can be generated when you save a delivery.
Like I said it needs some coding.
regards
Jude
Similar Messages
-
Mass generation of sales orders from marketing projects
Hi,
I am trying to create sales order from a campaign. I get an error message: Sales orders are only generated when products and quantities are assigned. I have added a quantity in the order template, but from the campaign the is no field available for entering the quantity.
regards CamillaHi Camilla,
In order to generate Sales order please use the BADI : CRM_MKT_MODIFY_ORDER
Details:
Interface - IF_EX_CRM_MKT_MODIFY_ORDER
Method - MODIFY_SALES_ORDER_OBJ
You can write your logic which passes required data to function modules 'CRM_MKT_SLSO_MODIFICIATION' and "CRM_MKTTGGRP_PROC_SLSO_CREATE" correspondingly.
Hope this helps.
Regards,
Anup -
Hi experts ,
I am trying to load the data via api , Its not getting load , can u help me pls ,
DECLARE
l_line_id NUMBER;
l_item_id NUMBER;
l_order_qty NUMBER;
l_msg_index number;
L_data VARCHAR2 (2000);
l_debug_file VARCHAR2 (200);
resultout VARCHAR2 (100);
l_order_uom VARCHAR2 (10);
l_reship_order NUMBER;
itemkey number := 215600;
l_negative_prorate NUMBER;
l_prorate_qty NUMBER;
l_sch_ship_date DATE;
l_debug_level NUMBER := 3;
l_ship_to_org_id NUMBER;
l_attribute1 VARCHAR2 (150);
l_attribute2 VARCHAR2 (150);
l_line_num NUMBER;
l_agreement_id NUMBER;
l_organization_id NUMBER;
l_segment VARCHAR2 (120);
l_child_onhand NUMBER := 0;
l_qty_temp NUMBER := 0;
l_excl_temp NUMBER := 0;
l_prorate_percent NUMBER;
l_onhand NUMBER;
l_error VARCHAR2 (240);
l_error_message VARCHAR2 (240);
l_line_tbl oe_order_pub.line_tbl_type;
l_line_tbl_count NUMBER := 0;
l_temp_count NUMBER := 0;
p_line_tbl_rec oe_order_pub.line_tbl_type;
p_line_id NUMBER;
p_error_flag VARCHAR2 (1000);
p_error_message VARCHAR2 (1000);
l_api_version_number NUMBER := 1;
l_return_status VARCHAR2 (2000);
l_return_status1 VARCHAR2 (2000);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (2000);
-- l_msg_index VARCHAR2 (1000);
l_line_out_tbl oe_order_pub.line_tbl_type;
p_parent_item VARCHAR2 (100) := 'PROPANE';
p_organization_id NUMBER := 321;
l_header_id NUMBER := 152066;
--- Child Cursor Without Exclusion of Soldado
CURSOR c_child_items (
p_parent_item VARCHAR2,
p_organization_id NUMBER
IS
CURSOR c_positive_items (
p_parent_item VARCHAR2,
p_organization_id NUMBER
IS
SELECT inventory_item_id,
segment1,
organization_id,
SUM (onhand - order_qty) onhand,
COUNT ( * ) OVER () total_rows
FROM ( SELECT msi.inventory_item_id,
msi.segment1,
msi.organization_id,
NVL (
SUM(inv_convert.inv_um_convert_new (
moq.inventory_item_id,
5,
moq.transaction_quantity,
moq.transaction_uom_code,
l_order_uom,
NULL,
NULL,
'U'
0
onhand,
(SELECT NVL (SUM (ordered_quantity), 0)
FROM oe_order_lines_all
WHERE header_id = l_header_id
AND flow_status_code NOT IN
('CLOSED', 'SHIPPED')
AND inventory_item_id =
msi.inventory_item_id)
order_qty
FROM mtl_system_items_b msi,
oe_lookups ol,
mtl_onhand_quantities_detail moq
WHERE msi.segment1 = ol.meaning
AND TRIM (SYSDATE) BETWEEN ol.start_date_active
AND NVL (ol.end_date_active,
TRIM (SYSDATE))
AND ol.enabled_flag = 'Y'
AND ol.lookup_type = p_parent_item
AND msi.organization_id = p_organization_id
AND msi.inventory_item_id = moq.inventory_item_id(+)
AND msi.organization_id = moq.organization_id(+)
AND (msi.segment1 LIKE '%SOLDADO%'
OR msi.segment1 LIKE '%T4%')
GROUP BY msi.inventory_item_id,
msi.segment1,
msi.organization_id)
GROUP BY inventory_item_id, segment1, organization_id
HAVING SUM (onhand - order_qty) > 0
ORDER BY segment1;
--- Child Cursor With only Positive Buckets
CURSOR c_positive_onhand (
p_parent_item IN VARCHAR2,
p_organization_id IN NUMBER
IS
BEGIN
IF (l_debug_level > 0)
THEN
l_debug_file := oe_debug_pub.set_debug_mode ('FILE');
oe_debug_pub.initialize;
oe_debug_pub.setdebuglevel (l_debug_level);
oe_msg_pub.initialize;
END IF;
--- Initialization Block
DBMS_OUTPUT.put_line ('Initialization Block');
fnd_global.apps_initialize (fnd_global.user_id,
fnd_global.resp_id,
fnd_global.resp_appl_id);
-- BEGIN
-- MO_GLOBAL.SET_POLICY_CONTEXT ('S', 321);
-- END;
-- fnd_global.apps_initialize (-1, 21623, 660);
--- Get Line ID from workflow
l_line_id := TO_NUMBER (itemkey);
--- To get the line details
BEGIN
SELECT header_id,
ordered_item,
inventory_item_id,
line_number,
order_quantity_uom,
ordered_quantity,
ship_from_org_id,
ship_to_org_id,
schedule_ship_date,
attribute1,
attribute2,
agreement_id
INTO l_header_id,
l_segment,
l_item_id,
l_line_num,
l_order_uom,
l_order_qty,
l_organization_id,
l_ship_to_org_id,
l_sch_ship_date,
l_attribute1,
l_attribute2,
l_agreement_id
FROM oe_order_lines_all
WHERE line_id = l_line_id;
DBMS_OUTPUT.put_line ('To get the line details');
EXCEPTION
WHEN OTHERS
THEN
l_header_id := NULL;
l_segment := NULL;
l_item_id := NULL;
l_order_qty := NULL;
l_organization_id := NULL;
DBMS_OUTPUT.put_line ('Not Avilable for To get the line details');
END;
-- To get the Original sales order Number
BEGIN
SELECT attribute10
INTO l_reship_order
FROM oe_order_headers_all
WHERE header_id = l_header_id;
EXCEPTION
WHEN OTHERS
THEN
l_reship_order := NULL;
END;
--- Check for the Top Level Item Name
IF l_segment IN ('PROPANE', 'BUTANE', 'ISO BUTANE', 'GASOLINE')
THEN
--- To get the total positive onhand quantity for all the child items
BEGIN
SELECT NVL (SUM (trx_qty), 0)
INTO l_onhand
FROM ( SELECT moq.inventory_item_id,
NVL (
SUM(NVL (
inv_convert.inv_um_convert_new (
msi.inventory_item_id,
5,
moq.transaction_quantity,
moq.transaction_uom_code,
l_order_uom,
NULL,
NULL,
'U'
0
- (SELECT NVL (SUM (ordered_quantity), 0)
FROM oe_order_lines_all
WHERE header_id = l_header_id
AND flow_status_code NOT IN
('CLOSED', 'SHIPPED')
AND inventory_item_id =
msi.inventory_item_id),
0
trx_qty
FROM mtl_onhand_quantities_detail moq,
mtl_system_items msi,
oe_lookups ol
WHERE msi.segment1 = ol.meaning
AND TRIM (SYSDATE) BETWEEN ol.start_date_active
AND NVL (
ol.end_date_active,
TRIM (SYSDATE)
AND ol.enabled_flag = 'Y'
AND ol.lookup_type = l_segment
AND msi.organization_id = l_organization_id
AND moq.inventory_item_id = msi.inventory_item_id
AND moq.organization_id = msi.organization_id
AND (msi.segment1 NOT LIKE '%SOLDADO%'
AND msi.segment1 NOT LIKE '%T4%')
GROUP BY msi.inventory_item_id, moq.inventory_item_id)
WHERE trx_qty > 0;
DBMS_OUTPUT.put_line ('l_onhand' || l_onhand);
EXCEPTION
WHEN OTHERS
THEN
l_onhand := 0;
DBMS_OUTPUT.put_line ('Not Avilable for on hand');
END;
-- To check whether this order is a reshipment order
DBMS_OUTPUT.put_line (
'To check whether this order is a reshipment order'
IF l_reship_order IS NOT NULL
THEN
DBMS_OUTPUT.put_line ('1st Else Case reship');
ELSE
DBMS_OUTPUT.put_line ('1st Else Case no reship');
FOR l_positive_items
IN c_positive_items (l_segment, l_organization_id)
LOOP
DBMS_OUTPUT.put_line( 'l_positive_items.onhand'
|| l_positive_items.onhand
|| 'l_excl_temp'
|| l_excl_temp
|| ' l_order_qty'
|| l_order_qty);
IF l_positive_items.onhand > 0 AND l_excl_temp < l_order_qty
THEN
l_line_tbl_count := l_line_tbl_count + 1;
IF (l_order_qty - l_excl_temp) < l_positive_items.onhand
THEN
l_prorate_qty := l_order_qty - l_excl_temp;
ELSE
l_prorate_qty := l_positive_items.onhand;
END IF;
-- Initializing the Sales order Lines Record type
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type'
l_line_tbl (l_line_tbl_count) := oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_positive_items.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity := l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 := l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 := l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id := l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag := 'Y';
l_excl_temp := l_excl_temp + l_prorate_qty;
END IF;
END LOOP;
-- To check if the total onhand is greater than zero
DBMS_OUTPUT.put_line (
'To check if the total onhand is greater than zero'
IF l_onhand > 0
THEN
IF l_order_qty > l_excl_temp
THEN
-- To check whether the onhand is lesser than order qty
DBMS_OUTPUT.put_line (
'To check whether the onhand is lesser than order qty'
IF (l_onhand < (l_order_qty - l_excl_temp))
THEN
-- Loop the cursor with exclusion of soldado logic
DBMS_OUTPUT.put_line (
'Loop the cursor with exclusion of soldado logic'
FOR l_child_item
IN c_child_items (l_segment, l_organization_id)
LOOP
l_prorate_percent := NULL;
l_negative_prorate := 0;
l_temp_count := 0;
l_prorate_qty := 0;
-- Initializing the Sales order Lines Record type
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type2'
l_line_tbl (l_line_tbl_count) :=
oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_child_item.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity :=
l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 := l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 := l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id :=
l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag := 'Y';
END LOOP;
ELSE
-- Loop the cursor of all the positive buckets
FOR l_child_items
IN c_positive_onhand (l_segment, l_organization_id)
LOOP
l_prorate_percent := NULL;
l_child_onhand := 0;
l_prorate_qty := 0;
-- To get the split percentage of the child items
l_prorate_percent :=
ROUND ( (l_child_items.trx_qty / l_onhand) * 100, 5);
-- To check whether the prorate percentage exits
IF l_prorate_percent IS NOT NULL
AND l_prorate_percent > 0
THEN
-- To calculate the prorate quantity
l_line_tbl_count := l_line_tbl_count + 1;
l_prorate_qty :=
ROUND (
(l_order_qty - l_excl_temp)
* (l_prorate_percent / 100),
5
l_qty_temp := l_qty_temp + l_prorate_qty;
-- To calculate the prorate quantity for the last line
IF c_positive_onhand%ROWCOUNT =
l_child_items.total_rows
THEN
l_prorate_qty :=
l_prorate_qty
+ (l_order_qty - (l_qty_temp + l_excl_temp));
END IF;
-- Initializing the line record type to process
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type3'
l_line_tbl (l_line_tbl_count) :=
oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_child_items.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity :=
l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 :=
l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 :=
l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id :=
l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag :=
'Y';
DBMS_OUTPUT.put_line( '3rd insert'
|| 'l_prorate_qty'
|| l_prorate_qty
|| 'l_ship_to_org_id'
|| l_ship_to_org_id
|| 'l_sch_ship_date'
|| l_sch_ship_date
|| 'l_child_items.inventory_item_id'
|| l_child_items.inventory_item_id
|| 'l_agreement_id'
|| l_agreement_id);
END IF;
COMMIT;
END LOOP;
END IF;
END IF;
ELSIF l_order_qty > l_excl_temp
THEN
-- Loop the cursor with exclusion of soldado logic
FOR l_child_item IN c_child_items (l_segment, l_organization_id)
LOOP
l_prorate_percent := 0;
l_prorate_qty := 0;
l_prorate_percent := ROUND (100 / l_child_item.total_rows, 5);
l_prorate_qty :=
ROUND (
( (l_order_qty - l_excl_temp) / l_child_item.total_rows),
5
l_line_tbl_count := l_line_tbl_count + 1;
l_qty_temp := l_qty_temp + l_prorate_qty;
-- To calculate the prorate quantity for the last line
IF c_child_items%ROWCOUNT = l_child_item.total_rows
THEN
l_prorate_qty :=
l_prorate_qty
+ (l_order_qty - (l_qty_temp + l_excl_temp));
END IF;
-- Initializing the line record type to process
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type4'
l_line_tbl (l_line_tbl_count) := oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_child_item.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity := l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 := l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 := l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id := l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag := 'Y';
END LOOP;
END IF;
END IF; -- to check whether any records are initialized
IF l_line_tbl_count > 0
THEN
-- Cancel the Parent Item
DBMS_OUTPUT.put_line ('Cancel the Parent Item');
l_line_tbl (l_line_tbl_count + 1) := oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count + 1).operation :=
oe_globals.g_opr_update;
l_line_tbl (l_line_tbl_count + 1).header_id := l_header_id;
l_line_tbl (l_line_tbl_count + 1).line_id := l_line_id;
l_line_tbl (l_line_tbl_count + 1).ordered_quantity := 0;
l_line_tbl (l_line_tbl_count + 1).attribute10 := l_order_qty;
l_line_tbl (l_line_tbl_count + 1).cancelled_flag := 'Y';
l_line_tbl (l_line_tbl_count + 1).change_reason := 'Not Provided';
DBMS_OUTPUT.put_line( 'Cancellation Process fileds'
|| 'HDR_ID'
|| l_header_id
|| 'LINE'
|| l_line_id
|| 'l_order_qty'
|| l_order_qty);
-- Call the procedure to process the sales order lines
-- process_order_line_api (p_line_tbl_rec => l_line_tbl,
-- p_line_id => l_line_id,
-- p_error_flag => l_error,
-- p_error_message => l_error_message);
IF l_error = 'Y'
THEN
resultout := 'COMPLETE:Y';
ELSE
resultout := 'COMPLETE:N';
END IF;
ELSE
resultout := 'COMPLETE:N';
END IF;
END IF;
BEGIN
fnd_global.apps_initialize (fnd_global.user_id,
fnd_global.resp_id,
fnd_global.resp_appl_id);
-- BEGIN
-- MO_GLOBAL.SET_POLICY_CONTEXT ('S', 321);
-- END;
-- fnd_global.apps_initialize (-1, 21623, 660);
-- Call Process Line API to process sales order lines
DBMS_OUTPUT.put_line ('fianl line to be processd');
BEGIN
oe_order_pub.process_line (p_line_tbl => p_line_tbl_rec,
x_line_out_tbl => l_line_out_tbl,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
COMMIT;
DBMS_OUTPUT.put_line ('API Processed' || l_msg_data);
fnd_file.put_line (fnd_file.LOG, 'Processed - ' || l_msg_data);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Failed With1' || SQLERRM);
END;
-- display error msgs
IF (l_debug_level > 0)
THEN
FOR i IN 1 .. l_msg_count
LOOP
oe_msg_pub.get (p_msg_index => i,
p_encoded => fnd_api.g_false,
p_data => l_data,
p_msg_index_out => l_msg_index);
fnd_file.put_line (fnd_file.LOG, 'message is:' || l_data);
fnd_file.put_line (fnd_file.LOG,
'message index is:' || l_msg_index);
DBMS_OUTPUT.put_line (
'l_data' || l_data || 'l_debug_level' || l_debug_level
END LOOP;
END IF;
IF p_error_flag = 'N'
THEN
FOR i IN 1 .. l_msg_count
LOOP
oe_msg_pub.get (p_msg_index => i,
p_encoded => fnd_api.g_false,
p_data => p_error_message,
p_msg_index_out => l_msg_index);
END LOOP;
ELSE
DBMS_OUTPUT.put_line ('Out Of loop Exit');
END IF;
fnd_file.put_line (fnd_file.LOG, 'p_error_message - ' || SQLERRM);
DBMS_OUTPUT.put_line ('p_error_message' || p_error_message || SQLERRM);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Failed With' || SQLERRM);
fnd_file.put_line (fnd_file.LOG,
'Unexpected Errors Found4 - ' || SQLERRM);
END;
END;
Thanks
ShagulHi experts ,
I am trying to load the data via api , Its not getting load , can u help me pls ,
DECLARE
l_line_id NUMBER;
l_item_id NUMBER;
l_order_qty NUMBER;
l_msg_index number;
L_data VARCHAR2 (2000);
l_debug_file VARCHAR2 (200);
resultout VARCHAR2 (100);
l_order_uom VARCHAR2 (10);
l_reship_order NUMBER;
itemkey number := 215600;
l_negative_prorate NUMBER;
l_prorate_qty NUMBER;
l_sch_ship_date DATE;
l_debug_level NUMBER := 3;
l_ship_to_org_id NUMBER;
l_attribute1 VARCHAR2 (150);
l_attribute2 VARCHAR2 (150);
l_line_num NUMBER;
l_agreement_id NUMBER;
l_organization_id NUMBER;
l_segment VARCHAR2 (120);
l_child_onhand NUMBER := 0;
l_qty_temp NUMBER := 0;
l_excl_temp NUMBER := 0;
l_prorate_percent NUMBER;
l_onhand NUMBER;
l_error VARCHAR2 (240);
l_error_message VARCHAR2 (240);
l_line_tbl oe_order_pub.line_tbl_type;
l_line_tbl_count NUMBER := 0;
l_temp_count NUMBER := 0;
p_line_tbl_rec oe_order_pub.line_tbl_type;
p_line_id NUMBER;
p_error_flag VARCHAR2 (1000);
p_error_message VARCHAR2 (1000);
l_api_version_number NUMBER := 1;
l_return_status VARCHAR2 (2000);
l_return_status1 VARCHAR2 (2000);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (2000);
-- l_msg_index VARCHAR2 (1000);
l_line_out_tbl oe_order_pub.line_tbl_type;
p_parent_item VARCHAR2 (100) := 'PROPANE';
p_organization_id NUMBER := 321;
l_header_id NUMBER := 152066;
--- Child Cursor Without Exclusion of Soldado
CURSOR c_child_items (
p_parent_item VARCHAR2,
p_organization_id NUMBER
IS
CURSOR c_positive_items (
p_parent_item VARCHAR2,
p_organization_id NUMBER
IS
SELECT inventory_item_id,
segment1,
organization_id,
SUM (onhand - order_qty) onhand,
COUNT ( * ) OVER () total_rows
FROM ( SELECT msi.inventory_item_id,
msi.segment1,
msi.organization_id,
NVL (
SUM(inv_convert.inv_um_convert_new (
moq.inventory_item_id,
5,
moq.transaction_quantity,
moq.transaction_uom_code,
l_order_uom,
NULL,
NULL,
'U'
0
onhand,
(SELECT NVL (SUM (ordered_quantity), 0)
FROM oe_order_lines_all
WHERE header_id = l_header_id
AND flow_status_code NOT IN
('CLOSED', 'SHIPPED')
AND inventory_item_id =
msi.inventory_item_id)
order_qty
FROM mtl_system_items_b msi,
oe_lookups ol,
mtl_onhand_quantities_detail moq
WHERE msi.segment1 = ol.meaning
AND TRIM (SYSDATE) BETWEEN ol.start_date_active
AND NVL (ol.end_date_active,
TRIM (SYSDATE))
AND ol.enabled_flag = 'Y'
AND ol.lookup_type = p_parent_item
AND msi.organization_id = p_organization_id
AND msi.inventory_item_id = moq.inventory_item_id(+)
AND msi.organization_id = moq.organization_id(+)
AND (msi.segment1 LIKE '%SOLDADO%'
OR msi.segment1 LIKE '%T4%')
GROUP BY msi.inventory_item_id,
msi.segment1,
msi.organization_id)
GROUP BY inventory_item_id, segment1, organization_id
HAVING SUM (onhand - order_qty) > 0
ORDER BY segment1;
--- Child Cursor With only Positive Buckets
CURSOR c_positive_onhand (
p_parent_item IN VARCHAR2,
p_organization_id IN NUMBER
IS
BEGIN
IF (l_debug_level > 0)
THEN
l_debug_file := oe_debug_pub.set_debug_mode ('FILE');
oe_debug_pub.initialize;
oe_debug_pub.setdebuglevel (l_debug_level);
oe_msg_pub.initialize;
END IF;
--- Initialization Block
DBMS_OUTPUT.put_line ('Initialization Block');
fnd_global.apps_initialize (fnd_global.user_id,
fnd_global.resp_id,
fnd_global.resp_appl_id);
-- BEGIN
-- MO_GLOBAL.SET_POLICY_CONTEXT ('S', 321);
-- END;
-- fnd_global.apps_initialize (-1, 21623, 660);
--- Get Line ID from workflow
l_line_id := TO_NUMBER (itemkey);
--- To get the line details
BEGIN
SELECT header_id,
ordered_item,
inventory_item_id,
line_number,
order_quantity_uom,
ordered_quantity,
ship_from_org_id,
ship_to_org_id,
schedule_ship_date,
attribute1,
attribute2,
agreement_id
INTO l_header_id,
l_segment,
l_item_id,
l_line_num,
l_order_uom,
l_order_qty,
l_organization_id,
l_ship_to_org_id,
l_sch_ship_date,
l_attribute1,
l_attribute2,
l_agreement_id
FROM oe_order_lines_all
WHERE line_id = l_line_id;
DBMS_OUTPUT.put_line ('To get the line details');
EXCEPTION
WHEN OTHERS
THEN
l_header_id := NULL;
l_segment := NULL;
l_item_id := NULL;
l_order_qty := NULL;
l_organization_id := NULL;
DBMS_OUTPUT.put_line ('Not Avilable for To get the line details');
END;
-- To get the Original sales order Number
BEGIN
SELECT attribute10
INTO l_reship_order
FROM oe_order_headers_all
WHERE header_id = l_header_id;
EXCEPTION
WHEN OTHERS
THEN
l_reship_order := NULL;
END;
--- Check for the Top Level Item Name
IF l_segment IN ('PROPANE', 'BUTANE', 'ISO BUTANE', 'GASOLINE')
THEN
--- To get the total positive onhand quantity for all the child items
BEGIN
SELECT NVL (SUM (trx_qty), 0)
INTO l_onhand
FROM ( SELECT moq.inventory_item_id,
NVL (
SUM(NVL (
inv_convert.inv_um_convert_new (
msi.inventory_item_id,
5,
moq.transaction_quantity,
moq.transaction_uom_code,
l_order_uom,
NULL,
NULL,
'U'
0
- (SELECT NVL (SUM (ordered_quantity), 0)
FROM oe_order_lines_all
WHERE header_id = l_header_id
AND flow_status_code NOT IN
('CLOSED', 'SHIPPED')
AND inventory_item_id =
msi.inventory_item_id),
0
trx_qty
FROM mtl_onhand_quantities_detail moq,
mtl_system_items msi,
oe_lookups ol
WHERE msi.segment1 = ol.meaning
AND TRIM (SYSDATE) BETWEEN ol.start_date_active
AND NVL (
ol.end_date_active,
TRIM (SYSDATE)
AND ol.enabled_flag = 'Y'
AND ol.lookup_type = l_segment
AND msi.organization_id = l_organization_id
AND moq.inventory_item_id = msi.inventory_item_id
AND moq.organization_id = msi.organization_id
AND (msi.segment1 NOT LIKE '%SOLDADO%'
AND msi.segment1 NOT LIKE '%T4%')
GROUP BY msi.inventory_item_id, moq.inventory_item_id)
WHERE trx_qty > 0;
DBMS_OUTPUT.put_line ('l_onhand' || l_onhand);
EXCEPTION
WHEN OTHERS
THEN
l_onhand := 0;
DBMS_OUTPUT.put_line ('Not Avilable for on hand');
END;
-- To check whether this order is a reshipment order
DBMS_OUTPUT.put_line (
'To check whether this order is a reshipment order'
IF l_reship_order IS NOT NULL
THEN
DBMS_OUTPUT.put_line ('1st Else Case reship');
ELSE
DBMS_OUTPUT.put_line ('1st Else Case no reship');
FOR l_positive_items
IN c_positive_items (l_segment, l_organization_id)
LOOP
DBMS_OUTPUT.put_line( 'l_positive_items.onhand'
|| l_positive_items.onhand
|| 'l_excl_temp'
|| l_excl_temp
|| ' l_order_qty'
|| l_order_qty);
IF l_positive_items.onhand > 0 AND l_excl_temp < l_order_qty
THEN
l_line_tbl_count := l_line_tbl_count + 1;
IF (l_order_qty - l_excl_temp) < l_positive_items.onhand
THEN
l_prorate_qty := l_order_qty - l_excl_temp;
ELSE
l_prorate_qty := l_positive_items.onhand;
END IF;
-- Initializing the Sales order Lines Record type
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type'
l_line_tbl (l_line_tbl_count) := oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_positive_items.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity := l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 := l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 := l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id := l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag := 'Y';
l_excl_temp := l_excl_temp + l_prorate_qty;
END IF;
END LOOP;
-- To check if the total onhand is greater than zero
DBMS_OUTPUT.put_line (
'To check if the total onhand is greater than zero'
IF l_onhand > 0
THEN
IF l_order_qty > l_excl_temp
THEN
-- To check whether the onhand is lesser than order qty
DBMS_OUTPUT.put_line (
'To check whether the onhand is lesser than order qty'
IF (l_onhand < (l_order_qty - l_excl_temp))
THEN
-- Loop the cursor with exclusion of soldado logic
DBMS_OUTPUT.put_line (
'Loop the cursor with exclusion of soldado logic'
FOR l_child_item
IN c_child_items (l_segment, l_organization_id)
LOOP
l_prorate_percent := NULL;
l_negative_prorate := 0;
l_temp_count := 0;
l_prorate_qty := 0;
-- Initializing the Sales order Lines Record type
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type2'
l_line_tbl (l_line_tbl_count) :=
oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_child_item.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity :=
l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 := l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 := l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id :=
l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag := 'Y';
END LOOP;
ELSE
-- Loop the cursor of all the positive buckets
FOR l_child_items
IN c_positive_onhand (l_segment, l_organization_id)
LOOP
l_prorate_percent := NULL;
l_child_onhand := 0;
l_prorate_qty := 0;
-- To get the split percentage of the child items
l_prorate_percent :=
ROUND ( (l_child_items.trx_qty / l_onhand) * 100, 5);
-- To check whether the prorate percentage exits
IF l_prorate_percent IS NOT NULL
AND l_prorate_percent > 0
THEN
-- To calculate the prorate quantity
l_line_tbl_count := l_line_tbl_count + 1;
l_prorate_qty :=
ROUND (
(l_order_qty - l_excl_temp)
* (l_prorate_percent / 100),
5
l_qty_temp := l_qty_temp + l_prorate_qty;
-- To calculate the prorate quantity for the last line
IF c_positive_onhand%ROWCOUNT =
l_child_items.total_rows
THEN
l_prorate_qty :=
l_prorate_qty
+ (l_order_qty - (l_qty_temp + l_excl_temp));
END IF;
-- Initializing the line record type to process
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type3'
l_line_tbl (l_line_tbl_count) :=
oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_child_items.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity :=
l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 :=
l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 :=
l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id :=
l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag :=
'Y';
DBMS_OUTPUT.put_line( '3rd insert'
|| 'l_prorate_qty'
|| l_prorate_qty
|| 'l_ship_to_org_id'
|| l_ship_to_org_id
|| 'l_sch_ship_date'
|| l_sch_ship_date
|| 'l_child_items.inventory_item_id'
|| l_child_items.inventory_item_id
|| 'l_agreement_id'
|| l_agreement_id);
END IF;
COMMIT;
END LOOP;
END IF;
END IF;
ELSIF l_order_qty > l_excl_temp
THEN
-- Loop the cursor with exclusion of soldado logic
FOR l_child_item IN c_child_items (l_segment, l_organization_id)
LOOP
l_prorate_percent := 0;
l_prorate_qty := 0;
l_prorate_percent := ROUND (100 / l_child_item.total_rows, 5);
l_prorate_qty :=
ROUND (
( (l_order_qty - l_excl_temp) / l_child_item.total_rows),
5
l_line_tbl_count := l_line_tbl_count + 1;
l_qty_temp := l_qty_temp + l_prorate_qty;
-- To calculate the prorate quantity for the last line
IF c_child_items%ROWCOUNT = l_child_item.total_rows
THEN
l_prorate_qty :=
l_prorate_qty
+ (l_order_qty - (l_qty_temp + l_excl_temp));
END IF;
-- Initializing the line record type to process
DBMS_OUTPUT.put_line (
'Initializing the Sales order Lines Record type4'
l_line_tbl (l_line_tbl_count) := oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count).operation :=
oe_globals.g_opr_create;
l_line_tbl (l_line_tbl_count).header_id := l_header_id;
l_line_tbl (l_line_tbl_count).inventory_item_id :=
l_child_item.inventory_item_id;
l_line_tbl (l_line_tbl_count).ship_to_org_id :=
l_ship_to_org_id;
l_line_tbl (l_line_tbl_count).ordered_quantity := l_prorate_qty;
l_line_tbl (l_line_tbl_count).schedule_ship_date :=
l_sch_ship_date;
l_line_tbl (l_line_tbl_count).attribute1 := l_attribute1;
l_line_tbl (l_line_tbl_count).attribute2 := l_attribute2;
l_line_tbl (l_line_tbl_count).attribute9 := l_line_id;
l_line_tbl (l_line_tbl_count).attribute10 :=
ROUND (l_prorate_qty / l_order_qty * 100, 5);
l_line_tbl (l_line_tbl_count).agreement_id := l_agreement_id;
l_line_tbl (l_line_tbl_count).calculate_price_flag := 'Y';
END LOOP;
END IF;
END IF; -- to check whether any records are initialized
IF l_line_tbl_count > 0
THEN
-- Cancel the Parent Item
DBMS_OUTPUT.put_line ('Cancel the Parent Item');
l_line_tbl (l_line_tbl_count + 1) := oe_order_pub.g_miss_line_rec;
l_line_tbl (l_line_tbl_count + 1).operation :=
oe_globals.g_opr_update;
l_line_tbl (l_line_tbl_count + 1).header_id := l_header_id;
l_line_tbl (l_line_tbl_count + 1).line_id := l_line_id;
l_line_tbl (l_line_tbl_count + 1).ordered_quantity := 0;
l_line_tbl (l_line_tbl_count + 1).attribute10 := l_order_qty;
l_line_tbl (l_line_tbl_count + 1).cancelled_flag := 'Y';
l_line_tbl (l_line_tbl_count + 1).change_reason := 'Not Provided';
DBMS_OUTPUT.put_line( 'Cancellation Process fileds'
|| 'HDR_ID'
|| l_header_id
|| 'LINE'
|| l_line_id
|| 'l_order_qty'
|| l_order_qty);
-- Call the procedure to process the sales order lines
-- process_order_line_api (p_line_tbl_rec => l_line_tbl,
-- p_line_id => l_line_id,
-- p_error_flag => l_error,
-- p_error_message => l_error_message);
IF l_error = 'Y'
THEN
resultout := 'COMPLETE:Y';
ELSE
resultout := 'COMPLETE:N';
END IF;
ELSE
resultout := 'COMPLETE:N';
END IF;
END IF;
BEGIN
fnd_global.apps_initialize (fnd_global.user_id,
fnd_global.resp_id,
fnd_global.resp_appl_id);
-- BEGIN
-- MO_GLOBAL.SET_POLICY_CONTEXT ('S', 321);
-- END;
-- fnd_global.apps_initialize (-1, 21623, 660);
-- Call Process Line API to process sales order lines
DBMS_OUTPUT.put_line ('fianl line to be processd');
BEGIN
oe_order_pub.process_line (p_line_tbl => p_line_tbl_rec,
x_line_out_tbl => l_line_out_tbl,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
COMMIT;
DBMS_OUTPUT.put_line ('API Processed' || l_msg_data);
fnd_file.put_line (fnd_file.LOG, 'Processed - ' || l_msg_data);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Failed With1' || SQLERRM);
END;
-- display error msgs
IF (l_debug_level > 0)
THEN
FOR i IN 1 .. l_msg_count
LOOP
oe_msg_pub.get (p_msg_index => i,
p_encoded => fnd_api.g_false,
p_data => l_data,
p_msg_index_out => l_msg_index);
fnd_file.put_line (fnd_file.LOG, 'message is:' || l_data);
fnd_file.put_line (fnd_file.LOG,
'message index is:' || l_msg_index);
DBMS_OUTPUT.put_line (
'l_data' || l_data || 'l_debug_level' || l_debug_level
END LOOP;
END IF;
IF p_error_flag = 'N'
THEN
FOR i IN 1 .. l_msg_count
LOOP
oe_msg_pub.get (p_msg_index => i,
p_encoded => fnd_api.g_false,
p_data => p_error_message,
p_msg_index_out => l_msg_index);
END LOOP;
ELSE
DBMS_OUTPUT.put_line ('Out Of loop Exit');
END IF;
fnd_file.put_line (fnd_file.LOG, 'p_error_message - ' || SQLERRM);
DBMS_OUTPUT.put_line ('p_error_message' || p_error_message || SQLERRM);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Failed With' || SQLERRM);
fnd_file.put_line (fnd_file.LOG,
'Unexpected Errors Found4 - ' || SQLERRM);
END;
END;
Thanks
Shagul -
Sales Order - Output determination not working
Dear Friends,
Greetings!
I have a strange problem,
Order Acknowledgement is to be emailed out automatically on meeting requirement 902 on order save. It goes out to customer (Output: ZBAC: Partner SP: Customer copy different layout), and commissioned agents (Output: ZEC1 to ZEC5, upto 5 partners: C1 to C5, Rep copy layout). Customer copy - ZBAC works fine, but ZEC1-ZEC5 rep copy output does not appear at all.
here is <u>output analysis</u> for ZEC1 and ZEC2:
ZEC1 529 No condition access - if desired, please set in Customizing
ZEC1 562 This output is not defined for Customer 0001010059
ZEC2 529 No condition access - if desired, please set in Customizing
ZEC2 562 This output is not defined for Customer 0001010059
All output types use same <u>access Sequence</u> as below:
1 5 Sales Organization/Order Type 0
2 13 Sales Org. 0
3 7 Order Type 0
Sample <u>Output Procedure</u>, using requirement 902
2 1 ZBAR Ord Conf. - Rep copy 902 >>> Rep copy, I originally thought would be possible to create 5 condition records with partners C1 to C5; but
3 1 ZBAC Ord Conf. - Customer 902 >>> Customer copy
930 1 ZEC1 eMail Partner C1 902 >>> Rep copy should go to partner C1
931 2 ZEC2 eMail Partner C2 902 >>> Rep copy should go to partner C2
932 3 ZEC3 eMail Partner C3 902 >>> Rep copy should go to partner C3
933 4 ZEC4 eMail Partner C4 902 >>> Rep copy should go to partner C4
934 5 ZEC5 eMail Partner C5 902 >>> Rep copy should go to partner C5
<u>VV12 Output record for ZEC1: by Order Type</u>
ZOR Sales Order C1 5 4 EN
ZOR Sales Order C2 5 4 EN
<u>VV12 Output record for ZBAC: by Sales Org</u>
3000 Rochester Operations SP 5 4 EN
>>> C1 and C2, SP Partner does not get description, when I click F4 then SAP throws following message: Possible entries only for mail addresses and PD Org objects Message no. VN341
Appreciate your feedback, let me know if any additional information required.
thank you,
Hetalcheck in NACO transaction is you have assigned access sequence to your ZEC* output ytpes and if you have ticked checkbox "Access to output conditions" - otherwise it will not even try to access condition records.
From help :
Access to output conditions
Indicates whether the system determines the output by searching for valid
condition records.
Procedure
If you want the system to search condition records for the appropriate
output, mark the field.
Note
If you leave the field blank and if you are processing sales, shipping,
or billing documents, the system automatically determines output from
information stored in the customer master record. -
SD- Sales Order - ATP check not working for few item in same sales order
Hi Experts,
Need help we activated ATP check but for few item i could not find confirmation qty after availability check. In same SO out of 4 items for schedule line it confirming qty for 2 item but it's not confirming for remaining 2 items though stock is available. Please guide me how to correst and what need to check.
ManojDear Manoj,
As you know, ATP is a big subject & some times its difficult to point the exact problem.
In your case, I suggest you to execute the function module:BAPI_MATERIAL_AVAILABILITY using Tx:SE37
key in selection criteria , in results check the "ATPQTY"- it will show you how much actual stock is available for use i.e. ATP qtty.
still if you find the availability & system not confirming the qtty, then problem could be in checking rule
Tx:OVZ9 check in relevant combination, whether you are considering RLT or not?
is this case with MTS or MTO
because in Sales order -
for MTS - checking rule "A" & MTO checking rule will be "AE"
Regards,
Reazuddin MD -
Sales order: price condition not working when i change the sold to party
Hi guys,
I've a strange problem by making the following steps:
1. Create a sales order:
By VA01 i create an order by filling the SOLD TO and one material - all OK. The price is calculated correctly.
2. Change SOLD TO:
I change the sold to by filling another payer that has a different price list (PLTYP) - the price is not re-calculated
If i change with another payer with the same price list everything is ok.
Can you tell me what could be the problem?
Many thanksDid you actually change the sold-to party though or just the payer? The sold-to party's price list type controls the price list type value copied into the order header. Even if the payer has a different value, it's not copied to the order header. You can see this behavior in FV45KFKD_VBKD_FUELLEN. If you switch sold-to's then you should get a pop-up that new pricing was carried out; you should also see your new price list type value in the order header and you can use the 'analysis' function at the item level to verify that the correct price was used.
-
Sales orders from one salesorg. to another in same ssystem
Hi Guys,
I got a requirement like we need to convert or recreate sales orders from one sales organization to another sales organization in the same system without having any impact on the existing system.
Any one have idea how to do it and is there any standard program to do this? is there any standard procedure for that>?
Thanks in advance.
Ram sriHi Ramgopal,
I never had this scenario, but the main step would be
Define 2 logical systems: a sender and a receiver
Assign one of them to the client
Set up distribution model
Generate partner profiles
Set up converter (not filter!) /Application Link Enabling (ALE)-> Modelling and Implementing Business Processes-> Converting Data Between Sender and Receiver
Here you can set up conversion rule for your sales org field.
All of this step could be done in transaction SALE.
Regards,
Peter -
Is there a way to create a Quote or Sales Order from a a Service Call?
Hi Forum,
Is there a way to automatically create a Quote or Sales Order from a a Service Call?
Regards,
Manuel RomanHi Manuel Roman,
Service Call is mainly used for after sale support. If you want to have Sales Quote or Order created automatically, you need Sales Opportunity model.
Thanks,
Gordon -
Replication of BP and Sales order from CRM to R/3
Hello everyone,
I have a peculiar condition in my hands.The requirement is to replicate 10 business partners from crm to R/3 ,then the next 4 Business partners need not be replicated and then the next three replicated..How do we do this kind of replication....
One thing more regarding the replication of sales order.When we save a sales order in CRM,is it automatically replicated to R/3 or do we need to release it manually??
If yes,then if we do not want to replicate the sales order from crm to R/3,then what will we do?
Consider that all the middleware settings are configured and working fine..
PuneetHi Bokhal,
Please consider my answer from your recent thread dealing with apparently the same issue :
Hi Bhokal,
For filters in uploads please consider below:
For Filtering the BP-upload, use the Administration Console
(tx. SMOEAC) in the corresponding subscription of the "All Business
Partners (MESG)" publication assigned to the R/3 site.
Some publications (and the replication objects they are based on) are
delivered as type "Simple bulk" which does not give you the opportunity
to assign criteria values for filtering.
You might have to re-create the publication. To do that:
1) First delete the subscriptions "All Business Partners (MESG)" and its
publications & the replication object.
2) Recreate the replication object as type "Simple intelligent".
3) Afterwards you can create a new publication via wizard of type
"Simple intelligent (msg)" assigned to the BDOC-Type BUPA_MAIN. Then,
you will be able to select some "filter criteria".
The reason for deleting the "old" publication is, that you
are not allowed to assign a BDOC-Type to more than one publication.
4) But please keep in mind that there is no realignment supported. So
you should only use fields for filtering, which cannot be changed
afterwards.
This is the "simple" solution for filtering on fields. This
will not provide complex filter criteria.
If you need this, you shall create a filter function in R/3- and/or
CRM-Inbound and -outbound.
If you want to keep the control about the upload trigger, you can add an
additional module in transaction CRMC_BUT_CALL_FU, position > 200000.
BUPA_MWX_BDOC_BPS_FILL_CENTRAL. Within this new module, you can delete
all partners within the complex structure that you don't want to upload.
Hoping that above will be helpful.
Best regards
Christophe Sturzel -
Hello Expert,
I would like to know if is there any possibility to display invoice print (PDF) in sales order (Credit/Debit note) as attachment.
Issue: Customer raise the credit note with the reference of invoice, sometimes user don't explain the reason for credit and don't attach any reference document in sales order(credit request).
Customer requirement: Customer want to display reference invoice print (PDF)in sales order(Credit request) for validator so validator can cross check with invoice and validate the credit note.
Could you suggest the best solution?
I am thinking to give mandatory text box (Text determination)at sales order(Credit request)
VipinHi,
You can enable Document Management System (DMS)
Please refer below links for details:
http://scn.sap.com/thread/459101
http://scn.sap.com/thread/2096563 -
Displaying sales order from other system
Hi Experts,
I have a requirement of displaying sales order from other system. I will be fetching sales orders through a RFC call and displaying it in an ALV. on clicking of the sales order displayed from the ALV, I need to display it from the other system.
How can I go about this?
Please help.
Regards,
Rohanrohan,
you already have answered most part of your question.
- displaying SO from other system through RFC:
create a remote enabled function in that target system. call this FM from your current system. (for RFC calls check this: [RFC help|http://help.sap.com/saphelp_nw04/helpdata/en/22/0425f2488911d189490000e829fbbd/content.htm]
displaying SO by double clicking in ALV:
--ALV's comes with a event USER_COMMAND. in this event you can pass your subroutine and in your subroutine you can do your coding... take help from sdn searches like :About FM ALV user_command Event
hope these helps
Somu -
Migrate all Open Sales Orders From Legacy System (SAP) To SAP System using
Hi Experts,
I've to Migrate all Open Sales Orders From Legacy System (SAP) To SAP System using Business Objects with a new SALES ORDER DOCUMENT NUMBER referencing the older one.
I'll get all the required data with field in an excel file.
Does any standard transaction exist for it ? Or how to go ahead with it ?
Thanks and regards,
Jyoti ShankarHi
If you are checking for CREATE option then Sales Doc Type
For more Info goto SWO1 transaction -> BUS2032 --> DIsplay --> Execute --> There SELECT the method which you want to perform... There you can fine the MANDATORY parameters also....
Or in DISPLAY mode PLACE Cursor on the Required Method and CLick the PARAMETERS button on toolbar...
That will show the MANDATORY parameters...
Reward if helpful....
Message was edited by:
Enter the Dragon -
Uploading open sales orders from sap
hi all,
i need to upload open sales orders from legacy to sap. pls advice what steps need to be followed for the same.
1) how we will we download open sales order from legacy and where..... is it to some flat file or some other option is there . pls tell some options.
2) how we will uload the sales ordes into sap . thru lsmw or is there some other option ?
3) there will be more number of fields in sap than in legacy. i think we need to manully create an excel file and add more fields manually in excel file so that the compulsonry feilds as per sap are present in sap ?
4) how will availability check happen in sap after sales order are t/f from legacy ?
rgds
pamelahi pamela,
1.a. you need to down load in EXCEL in legact format and convert the same in LSMW format and upload it
2.a. LSMW - Functionally, BDC, BAPI - Technically. to my knowledge LSMW is better option.
3.a. first you download to EXCEL file from LEGACY, then align the same to SAP format you can add those fields that are mandatory as per your requriment.
4.a.You are uploading sales orders in SAP which are showing OPEN status from LEGACY before you uploading the sales orders MM consultant would have uploaded its stock through 561 - dont worry on that, even though if stock is not uploaded also not an issue it will confirm at the later date.
5.a. we have used LSMW process for our PREVIOUS ASSIGNMENT, before that we tested BAPI for it some how it was not capturing some fields.
hope all your queries are solved
balajia -
Load Sales Order from Xml file
Hi,
I want to load a sales order from xml file. How can I do so? Where I'll get the xml schema for Sales Order or other documents (delivery,invoice etc)?
Plz reply with code and xml file.When I'm going to load SO from xml file, it's showing an error:
"The connected value 0 was not found in table Uasge of Nota Fiscal".
What is this table for? Which attribute is related with this table?
How can I find out that? -
I want to load a sales order from xml file. How can I do.
Hi,
I want to load a sales order from XML file. How can I do ? how can i create the sales order?
what are the necessary setting for create the sales orders.
with Regards,
Prakesh.Three options come to my mind.
Option 1: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (BAPI) and Program (CREATEFROMDAT2).
Option 2: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (DINP) and Program (RVINVB10).
Option 3: Translate the xml to IDoc so that ORDER04 / ORDER05 Idoc can be used to create Sales order (WEDI transaction).
Maybe you are looking for
-
Verizon is harassing me, how do I get them to stop?????
I'm at my wits end. I've tried everything. This is my last attempt to find some kind of solution before I resort to the expense of a lawyer. Apparently at some point in the mists of the past, a person who worked in my building used my number as an
-
Creative ALchemy home page prompting for username/passw
The Creative ALchemy Home Page http://preview.creativelabs.com/alchemyis suddenly prompting for a username and password. Can this be fixed please?
-
How to insert bulk records in a table
Hi to all, I have one view in which more the 3 lacks records are there and i have to insert that data in a table and used the code in which it taking a lot of time. I checked one case in which 2000 records are there it taking 5 min apprx. to insert i
-
SSAS 2012 Hierarchy with date dependent relationships
Hello, I have a hierachy defined as the following: 1. Business Line 1. Fleet a Car A car can change to a different fleet, and we maintain this history with effective start and end dates. In the DSV, the Fact table joins to the Dimension
-
Can I share contacts too via Family Sharing?
My friend has my old iPhone 4s and she's logged in on my iCloud account. I want to log her in to her own iCloud account and then add her to Family Sharing. I read that we can share contacts and app purchases. But how about our contacts?