Header Level Discount - Price_Request API
Hello All,
There is a requirement from our customer states that they need discounts on header level, which should be displayed in the invoice as a separate line.
We decided to develop custom programs to do this.
There are modifiers defined for discounts, and i have insert a line into ra_interface_lines_all with the discount amount.
Is there any api available to calculate discount amount.
I went through price_request api. Can anybody provide me a code template for this.
Thanks and regards,
Kannan
Seem like many people have similar issues with no answers! one such thread
https://forums.oracle.com/thread/2262229
Thanks,
Similar Messages
-
U201C Header level discount problem u201C
Hi,
The case is like this.
I have a quotation as follows :
Item a unit price kd 10 qty 6 total price 60kd
Item b unit price kd 5 qty 5 total price 25 kd
Total = KD 85
Special discount KD 21.25( 25%)
Final total = KD 63.75
For the above quote if I have to make a PO in sap at present the following thing happens :
Unit price for item is given as 10 and 5 respectively.
Header level discount is given as kd 21.25 ( 25%)
When the po is saved and printed
The discount gets calculated in the item level so now my unit prices will be 7.5 and 3.75 respectively.
Total after discount matches with the quote thatu2019s fine.
But the unit price should not be discounted at item level .
As per the quote Discount is applicable to the total. Even in sap the discount should be applicable to the final total not distributed on the item.
ThanksHi,
Pl check the discount condition in M/06 under Grouping condition is flagged( Ticked) which results in discount value is distributing among the line item of The PO. -
Discount value not updating at contract header level
Dear Friends
I am facing problem of updating discount value at contract header level. The scenario is u2026. my client used to provide certain service to their customer. For that they maintain quantity contract & bill them as per billing plan. When customer avail three or more services they get 10% extra discount. Now the problem is after continue for some days if some customer wants to drop one item we are cancelling the line item by assigning proper cancellation procedure but the system is not reversing the 10% discount.
Example u2013
Contract valid for 1st Jan 2009 to 31st Dec 2010(Value for each service = 10)
(Total no of item-3)
(Discount-10%)
Here bill value for each month is 10x3-(30x0.10) =27
At the month of march 2009 customer decided to drop for one item so hence forth the bill value should be 10x2=20
But the system is calculating 10x2-(20x0.10)=18
We need to update the value at contract header level only to satisfy some CRM functionality.
Please suggest how to solve this issueHi,
If that is item condition then you can not change it at header level
check in M/06 make it at header level in change which can be made tab
Regards
Kailas Ugale -
Discounts at sales order header level
Hi,
Is it possible to create discounts at header level,
if it is possible what are the setups & procedure to follow
and if there is any doc pls share it to [email protected]
Thanks in Advance
RaghuYes.
When you define the modifier, set the level to header.
See http://oracleebusinesssuite.wordpress.com/2007/09/12/how-to-setup-manual-modifier-for-special-charges/ -
Freight Charges at Header Level using API oe_order_pub
Hello,
I am trying to process Header Level Freight Charges using oe_order_pub.process_order api. Please advice me as it is not entering charges. Here is my code. Thanks for your time and appreicate your help.
====
declare
l_header_rec Oe_Order_Pub.header_rec_type;
l_header_adj oe_order_pub.Header_Adj_Rec_Type;
l_header_scredit_tbl Oe_Order_Pub.header_scredit_tbl_type;
l_header_adj_tbl Oe_Order_Pub.header_adj_val_tbl_type;
l_action_request_tbl Oe_Order_Pub.request_tbl_type;
l_line_tbl Oe_Order_Pub.line_tbl_type;
l_line_adj_tbl Oe_Order_Pub.line_adj_tbl_type;
l_line_scredit_tbl Oe_Order_Pub.line_scredit_rec_type;
/*Out Parameters for Order API*/
l_header_rec_out Oe_Order_Pub.header_rec_type;
l_header_val_rec_out Oe_Order_Pub.header_val_rec_type;
l_header_adj_tbl_out Oe_Order_Pub.header_adj_tbl_type;
l_header_adj_val_tbl_out Oe_Order_Pub.header_adj_val_tbl_type;
l_header_price_att_tbl_out Oe_Order_Pub.header_price_att_tbl_type;
l_header_adj_att_tbl_out Oe_Order_Pub.header_adj_att_tbl_type;
l_header_adj_assoc_tbl_out Oe_Order_Pub.header_adj_assoc_tbl_type;
l_header_scredit_tbl_out Oe_Order_Pub.header_scredit_tbl_type;
l_header_scredit_val_tbl_out Oe_Order_Pub.header_scredit_val_tbl_type;
l_line_tbl_out Oe_Order_Pub.line_tbl_type;
l_line_val_tbl_out Oe_Order_Pub.line_val_tbl_type;
l_line_adj_tbl_out Oe_Order_Pub.line_adj_tbl_type;
l_line_adj_val_tbl_out Oe_Order_Pub.line_adj_val_tbl_type;
l_line_price_att_tbl_out Oe_Order_Pub.line_price_att_tbl_type;
l_line_adj_att_tbl_out Oe_Order_Pub.line_adj_att_tbl_type;
l_line_adj_assoc_tbl_out Oe_Order_Pub.line_adj_assoc_tbl_type;
l_line_scredit_tbl_out Oe_Order_Pub.line_scredit_tbl_type;
l_line_scredit_val_tbl_out Oe_Order_Pub.line_scredit_val_tbl_type;
l_lot_serial_tbl_out Oe_Order_Pub.lot_serial_tbl_type;
l_lot_serial_val_tbl_out Oe_Order_Pub.lot_serial_val_tbl_type;
l_action_request_tbl_out Oe_Order_Pub.request_tbl_type;
/*Local Variables*/
l_ret_stat VARCHAR2 (1);
l_msg_cnt NUMBER;
l_msg_data VARCHAR2 (2000);
x_return_status VARCHAR2 (1) := '';
l_order_type VARCHAR2(80);
l_order_type_id NUMBER;
l_accounting_rule_id NUMBER;
l_invoicing_rule_id NUMBER;
l_price_list_id NUMBER;
l_header_id NUMBER;
l_customer_id NUMBER;
l_order_number NUMBER;
l_line_xml XMLTYPE;
icount NUMBER;
l_item_id NUMBER;
l_count NUMBER;
p_status varchar2(10);
p_header_id number;
p_error varchar2(1000);
l_created_by number:=9930;
BEGIN
DBMS_APPLICATION_INFO.set_client_info ('104');
Fnd_Global.apps_initialize (9930,50257,660);
---Initialise In Parameters
l_header_rec := Oe_Order_Pub.g_miss_header_rec;
l_action_request_tbl (1) := Oe_Order_Pub.g_miss_request_rec;
l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
/*required Fields for Header Record*/
l_header_rec.orig_sys_document_ref :=8089;
l_header_rec.order_type_id := 1245;
l_header_rec.sold_to_org_id := 16273647;
l_header_rec.order_number := 8094; -- Currenlty commented, eventuall we need to use this as this needs be to unique.
l_header_rec.attribute1 := 8088; -- Currenlty capturing Order Number in ATT1
l_header_rec.price_list_id := 150022; -- l_price_list_id;
l_header_rec.payment_term_id := 1040;
l_header_rec.operation := Oe_Globals.g_opr_create; --'CREATE';
l_header_rec.flow_status_code := 'ENTERED';
--l_header_adj := Oe_Order_Pub.G_MISS_HEADER_ADJ_TBL;
l_header_adj.header_id := 9584924;
l_header_adj.automatic_flag :='N';
l_header_adj.list_header_id :=154010;
l_header_adj.list_line_id :=150071;
l_header_adj.list_line_type_code :='FREIGHT_CHARGE';
l_header_adj.change_reason_code :='MANUAL';
l_header_adj.change_reason_text :='TEST';
l_header_adj.updated_flag :='Y';
l_header_adj.applied_flag :='Y';
l_header_adj.operand :=10;
l_header_adj.arithmetic_operator:='LUMPSUMP';
l_header_adj.charge_type_code :='FREIGHT';
l_header_adj.modifier_level_code :='ORDER';
icount :=1;
-- FOR icount IN 1 .. l_line_tbl.COUNT LOOP
---Initialising Line table records
l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
/*required Fields for Line Record*/
l_line_tbl (icount).inventory_item_id := 71161;
l_line_tbl (icount).operation := Oe_Globals.g_opr_create;
l_line_tbl (icount).ordered_quantity := 3;
l_line_tbl (icount).unit_selling_price := 5;
l_line_tbl (icount).unit_list_price :=5;
l_line_tbl (icount).calculate_price_flag :='P';
---Reset message
Oe_Msg_Pub.initialize;
---Call API to Create Sales order with 2 lines in Entered Status
--dbms_output.put_line(l_header_rec.order_number||'-'||l_order_number);
apps.Oe_Order_Pub.process_order
(p_api_version_number => 1.0
,p_header_rec => l_header_rec
,p_line_tbl => l_line_tbl
,p_action_request_tbl => l_action_request_tbl
,x_header_rec => l_header_rec_out
,x_header_val_rec => l_header_val_rec_out
,x_header_adj_tbl => l_header_adj_tbl_out
,x_header_adj_val_tbl => l_header_adj_val_tbl_out
,x_header_price_att_tbl => l_header_price_att_tbl_out
,x_header_adj_att_tbl => l_header_adj_att_tbl_out
,x_header_adj_assoc_tbl => l_header_adj_assoc_tbl_out
,x_header_scredit_tbl => l_header_scredit_tbl_out
,x_header_scredit_val_tbl => l_header_scredit_val_tbl_out
,x_line_tbl => l_line_tbl_out
,x_line_val_tbl => l_line_val_tbl_out
,x_line_adj_tbl => l_line_adj_tbl_out
,x_line_adj_val_tbl => l_line_adj_val_tbl_out
,x_line_price_att_tbl => l_line_price_att_tbl_out
,x_line_adj_att_tbl => l_line_adj_att_tbl_out
,x_line_adj_assoc_tbl => l_line_adj_assoc_tbl_out
,x_line_scredit_tbl => l_line_scredit_tbl_out
,x_line_scredit_val_tbl => l_line_scredit_val_tbl_out
,x_lot_serial_tbl => l_lot_serial_tbl_out
,x_lot_serial_val_tbl => l_lot_serial_val_tbl_out
,x_action_request_tbl => l_action_request_tbl_out
,x_return_status => l_ret_stat
,x_msg_count => l_msg_cnt
,x_msg_data => l_msg_data
-- COMMIT;
DBMS_OUTPUT.PUT_LINE ('Return Status is ' || l_ret_stat);
DBMS_OUTPUT.PUT_LINE ( 'Order Number in ARB Org is '
|| l_header_rec_out.order_number||'-'||
l_header_rec_out.header_id
p_status := l_ret_stat;
p_header_id := l_header_rec_out.header_id;
-- p_error := ltrim(rtrim(l_msg_data));
Xx_Xmldb_Pkg.xx_insert_errors
('With or w/o Error After API'
,p_error
,p_header_id
,p_status
,SYSDATE
,l_created_by
/*Check Errors */
IF l_ret_stat <> 'S' THEN
p_status :='FAILURE';
IF l_msg_cnt > 0
THEN
FOR i IN 1 .. l_msg_cnt
LOOP
l_msg_data := Oe_Msg_Pub.get (p_msg_index => i
,p_encoded => 'F');
-- p_error := ltrim(rtrim(l_msg_data));
DBMS_OUTPUT.PUT_LINE ('Errors ...' || l_msg_data);
Xx_Xmldb_Pkg.xx_insert_errors
('Error After API'
,p_error
,p_header_id
,p_status
,SYSDATE
,l_created_by
END LOOP;
END IF;
END IF;
IF l_ret_stat = Fnd_Api.g_ret_sts_success
THEN
l_header_rec := Oe_Order_Pub.g_miss_header_rec;
l_action_request_tbl (1) := Oe_Order_Pub.g_miss_request_rec;
l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
---Book Order
l_action_request_tbl (1).request_type := Oe_Globals.g_book_order;
l_action_request_tbl (1).entity_code := Oe_Globals.g_entity_header;
l_action_request_tbl (1).entity_id := l_header_rec_out.header_id;
---Book the order
/* Oe_Msg_Pub.initialize;
---API Call to Book the Order
Oe_Order_Book_Util.complete_book_eligible
(1.0
,Fnd_Api.g_false
,l_header_rec_out.header_id
,l_ret_stat
,l_msg_cnt
,l_msg_data
-- COMMIT;
IF l_ret_stat <> 'S' THEN
p_status :='FAILURE';
IF l_msg_cnt > 0
THEN
FOR i IN 1 .. l_msg_cnt
LOOP
l_msg_data :=
Oe_Msg_Pub.get (p_msg_index => i
,p_encoded => 'F');
DBMS_OUTPUT.PUT_LINE (l_msg_data);
Xx_Xmldb_Pkg.xx_insert_errors ('Load XML Order Data, After api error .'
,l_msg_data
,null
,NULL
,SYSDATE
,1124
END LOOP;
END IF;
END IF;
IF l_ret_stat = Fnd_Api.g_ret_sts_success
THEN
x_return_status := l_action_request_tbl (1).return_status;
END IF;
ELSE
DBMS_OUTPUT.PUT_LINE ('Failure');
p_status :='FAILURE';
END IF;
end;
/Hi,
Can you pls try by passing this parameter value too.
l_header_adj.adjusted_amount := 5;
Thanks,
Praveen -
Header Level Cash Discount For VBRK-VBELN, Where Can I get?
Hi Experts,
I know the # of VBELN of VF03 (VBRK), now, I need to pull the data of,
<b>1- Header Level Cash Discount - Condition Value and
2 - Header Level Cash Discount - Amount i.e.
% Value.</b>
Normally, I know the procedure is,
(The relationship is )
KONV-KNUMV = VBRK-KNUMV
For all the columns the field KONV-KWERT can be used
But, its ITEM level, where as I am looking for Header Level?
So, Where Can I get the VBRK-KNUMV Header level,
1- Cash Discount Condition Value data? and
2- Cash Discount Amount data i.e. %
Thank you,
Message was edited by:
SrikharThanQ Sheshu,
No, there is no entry in KONV-KNUMH for KSHCL type of Discounts i.e. SKTV. THere r entries i.e. record #s for Pricing matters! I dont know Y?
So, It seems to b, I hv to use the follwoing code,
at new knumv
SUM (of types KONV-KSHCL = SKTV)
endat.
Or Do u hv any other clue? like, other tables searching?
anyways, thanq -
Hi Experts,
I am looking to pull the data of,
<b>VF03-----> Header Level Cash Discount - Amount i.e. say, 3%</b>
So, Where Can I get the Header level,
Cash Discount Amount data e.g. 3%
Thank you,.
-
Hi Experts,
The VF03(Display Billing Doc)--> Cash Discount(Header Level ) - Amount, say, 3%, In which table, it stores?
Path is, VF03>Menu>GO TO>HEADER->Pricing Conditions Header>(Condition Type)SKTV> Amount, say, 3%------->Where it stores?
Thanq.Hi,
I dont have SAP in front of me.
Simply go to ST05
Activate Trace then execute your givrn path and then Deactivate trace.
Display Trace and see from where it is fetching.
Reward if useful! -
Dear Friends
1 In a Contract or PO, we give some discount (2%) at HEADER level and maybe some discount at the item level (5%). The effective discount will be 7% or 5%.
2 How the Freight cost and other miscellaneous costs are taken into consideration while calculating the MAP of a raw material (as seen in mm03, accounting 1 view).
For example, we buy 10 pcs @ $10 and pay $50 for freight and $20 as miscellaneous cost. The moving average price of the stock will be $17 [(1005020)/10] or $ 10.
Regards
Sanjeev1 In a Contract or PO, we give some discount (2%) at HEADER level and maybe some discount at the item level (5%). The effective discount will be 7% or 5%.
The effective cost will be 7% if your discount based on the quantity but if it absolute amount then that 2% will be propotionated to all the items
2 How the Freight cost and other miscellaneous costs are taken into consideration while calculating the MAP of a raw material (as seen in mm03, accounting 1 view).
For example, we buy 10 pcs @ $10 and pay $50 for freight and $20 as miscellaneous cost. The moving average price of the stock will be $17 (1005020)/10 or $ 10.
Freight cost will not be a part of your MAP becuase it is posting to accrual account but the $20 misc cost can be if the condition is not defined as accrual condition then only.
If you want to add the freight also a part of the mateiral then define the condition like surcharge without accrual. -
Discount at header level not getting printed when tax exempted.
29.09.2008
Hi friends,
I have incorporated Header discount in my Sales Order. Since there are no deliveries, invoices are printed against Sales Orders. The invoice output shows the discount if the tax classification of the customer is 1 (Liable for taxation). But strangely if the customer is exempted from tax, the discount entered at the header level is not printed on the output even though i can see the discount computed in the invoice.
Please suggest how i can sort this problem out.
Regards,
Udaynath.Thanks Khaled,
but it does not work bcos as the item category group LUMF takes the price for the component (and the header price is not displayed), then if I set up the price ref. mat. of the components to be the header, the total value of the order will be zero (since price of the header material is zero).
Any other idea?
I was thinking in creating a rule to apply the discount of the header condition at the sub-item conditions, but I am not sure whether this can be done.
Regards
Julian -
Purchase Order Total Amount at Header level and Report Execution
Dear Experts,
Here by i am facing problem with Purchase Order Total amount.
I have local Pricing Procedure for price stipulations (like discounts, Freight, packaging). the calculation at item level is correct. tax calculation is done by tax code. The total PO Price is including all items in PO and tax amount. But at header level conditions net value is showing only gross price.
How to pick up total price including tax amount at header level conditions?
Please provide me solution on it ?Dear Experts,
Here by i am facing problem with Purchase Order Total amount.
I have local Pricing Procedure for price stipulations (like discounts, Freight, packaging). the calculation at item level is correct. tax calculation is done by tax code. The total PO Price is including all items in PO and tax amount. But at header level conditions net value is showing only gross price.
How to pick up total price including tax amount at header level conditions?
Please provide me solution on it ?
Edited by: Kiran Mujumdar on Feb 23, 2009 7:08 PM -
Total Computing not happening on Sub line, line and header level
Hi All,
Iam using below code to compute the contract total, but below api is not populating any values at sub line, line as well on header level.
Can someone please suggest me whether I am using the correct API or not and also if this is correct one why it is not populating total in service contracts form.
{DECLARE
l_input_details OKS_QP_PKG.INPUT_DETAILS;
l_output_details OKS_QP_PKG.PRICE_DETAILS;
l_modif_details QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
l_pb_details OKS_QP_PKG.G_PRICE_BREAK_TBL_TYPE;
l_return_status VARCHAR2(20);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
l_status_tbl oks_qp_int_pvt.Pricing_Status_tbl;
l_final_status_tbl oks_qp_int_pvt.Pricing_Status_tbl;
l_count NUMBER;
BEGIN
l_input_details.intent := 'LP';
-- l_input_details.lse_id := 1;
l_input_details.chr_id :='245003';
l_input_details.line_id := '301498277568510712147018743801056692954';
l_input_details.subline_id := '301498277568522801405214890092803754714';
oks_qp_int_pvt.compute_price
p_api_version => 1.0,
p_init_msg_list => 'T',
p_detail_rec => l_input_details,
x_price_details => l_output_details,
x_modifier_details => l_modif_details,
x_price_break_details => l_pb_details,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
dbms_output.put_line(l_return_status);
END;
Best Regards
Ragni GuptaI've never used this API, but you could use the following code to display any error message. (add declaration for l_msg_index_out NUMBER)
IF l_return_status != 'S'
THEN
FOR i IN 1..l_msg_count
LOOP
fnd_msg_pub.get (p_msg_index => -1,
p_encoded => 'F' ,
p_data => l_msg_data,
p_msg_index_out=> l_msg_index_out);
dbms_output.put_line(i||'.'||SUBSTR(l_msg_data,1,255));
END LOOP;
END IF;HTH
Alka -
Message Mapping Issue on header level
HI all,
I am doing File to IDOC scenario where I am having issue wiht mapping :
Flat File
Row -0Unbound
FieldA1..1
FieldB1..1
IDOC
--Segment
---Field1
---Field2
Segment1
Field11
FieldA is Order number.. IDOCs will generate up on order numbers change... FieldB is discount... If Discount is avaliable in any of the order number then I need to Pass YES orelse NO... Segment is a header segment where I need to pass whether discount is YES or NO... Suppose there are 5 rows of same order with discount in 4 row then I need to pass YES if discount doesnt avaliable in all 5 rows then NO..
Row
--FieldA<123>
--FieldB<>
</Row>
Row
--FieldA<123>
--FieldB<>
</Row>
Row
--FieldA<123>
--FieldB<10>
</Row>
Row
--FieldA<222>
--FieldB<>
</Row>
Row
--FieldA<222>
--FieldB<>
</Row>
IDOC
--Segment
---Field1<123>
---Field2<YES>
Segment1
Field11
</IDOC>
IDOC
--Segment
---Field1<222>
---Field2<NO>
Segment1
Field11
</IDOC>
Any inputs how to get value on header level? I tried but I am able to get only first value..not drilling down to each value depending on order number?
Thanks
Rajeev.Hi Prakasu,
Its working but there is one issue:
If one fo the discount value is 99.00 then I need to pass NO.. How can I achieve this? I used the UDF but it is taking only the highest value which is 99.00 but even if it is 99.00 I need to pass NO..
Suppose if first row discount is 99.00 and second row its 2,00 then I need to pass YES as it has 2,00 in the second row..
Row
--FieldA<123>
--FieldB
</Row>
Row
--FieldA<123>
--FieldB<99>
</Row>
Row
--FieldA<123>
--FieldB<>
</Row>
Row
--FieldA<222>
--FieldB<8>
</Row>
Row
--FieldA<222>
--FieldB
</Row>
IDOC
--Segment
---Field1<123>
---Field2<NO>
Segment1
Field11
</IDOC>
IDOC
--Segment
---Field1<222>
---Field2<YES>
Segment1
Field11
</IDOC>
First row value is 99 and Null it has to give NO as if discount has 99 then it should pass NO.. in the second order first row is 8 and second row is null.. it should give YES but it is giving NO becuase if is taking only the last value in the Context change..
Any inputs how to achieve this?
Thanks
Rajeev.
Edited by: rajeev raj on Nov 23, 2009 2:52 PM -
OTC . How is freight calculated in OM header level
Hi
We have this business scenario where Freight is calculated at order header.
But we were checking the API for that
WSH_INTERFACE_GRP.Create_Update_Freight_Costs
This is done at Delivery or Delivery detail level.
So CANT we have freight costs at order header level???
Basically i have say 3 labels created for an order i need to generate freight for these 3 labels. Please not 3 labels DOES NOT correspond to 3 lines.
So can i create Freight lines for these 3 labels for that order header Id.
And also another question is for RETURN orders we wont have any deliveries then how are freight cost calculated
Regards
GibinFUNCTION ZSAVE_NOTES_SAVE.
*"*"Local interface:
*" IMPORTING
*" VALUE(OBJECT_ID) TYPE CRMT_OBJECT_ID
*" VALUE(OBJECT_TYPE) TYPE CRMT_SUBOBJECT_CATEGORY
*" REFERENCE(HEADER) TYPE THEAD OPTIONAL
*" REFERENCE(TEXT) TYPE TDTXTLINES
*" TABLES
*" LINES STRUCTURE TLINE
TYPES : BEGIN OF STRUC,
GUID TYPE CRMD_ORDERADM_H-GUID,
END OF STRUC.
DATA : WA_STRUC TYPE STRUC,
IT_STRUC LIKE TABLE OF WA_STRUC.
TYPES : BEGIN OF STRUC1,
TDOBJECT TYPE STXH-TDOBJECT,
TDNAME TYPE STXH-TDNAME,
TDID TYPE STXH-TDID,
TDSPRAS TYPE STXH-TDSPRAS,
TDTITLE TYPE STXH-TDTITLE,
TDLINE TYPE STXH-TDTXTLINES,
END OF STRUC1.
DATA : WA_STRUC1 TYPE STRUC1,
IT_STRUC1 LIKE TABLE OF WA_STRUC1.
SELECT SINGLE GUID FROM CRMD_ORDERADM_H INTO WA_STRUC WHERE
OBJECT_ID = OBJECT_ID AND OBJECT_TYPE = OBJECT_TYPE.
SELECT SINGLE TDOBJECT TDNAME TDID TDSPRAS TDTITLE TDTXTLINES FROM STXH
INTO WA_STRUC1 WHERE TDNAME = WA_STRUC-GUID.
APPEND WA_STRUC1 TO IT_STRUC1.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = HEADER
INSERT = ' I '
SAVEMODE_DIRECT = ' X '
OWNER_SPECIFIED = ' SAPUSER '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER = HEADER
TABLES
LINES = LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
Have alook at the follolwing threads
Probelem with SAVE_TEXT
SAVE_TEXT FUNCTION MODULE
save_text?
there are many more examples. -
Order management header level updation process for iStore order.
Hi all,
I worked on OM header level updation process for iStore order.only card holder name,expiration date updated using OE_ORDER_PUB.process_order but Credit card number,card type not updated for istore order in OM.so please help to me.
CODE:
SET SERVEROUTPUT ON;
DECLARE
v_api_version_number NUMBER := 1;
v_return_status VARCHAR2 (2000);
v_msg_count NUMBER;
v_msg_data VARCHAR2 (2000);
-- IN Variables --
v_header_rec oe_order_pub.header_rec_type;
v_line_tbl oe_order_pub.line_tbl_type;
v_action_request_tbl oe_order_pub.request_tbl_type;
v_line_adj_tbl oe_order_pub.line_adj_tbl_type;
-- OUT Variables --
v_header_rec_out oe_order_pub.header_rec_type;
v_header_val_rec_out oe_order_pub.header_val_rec_type;
v_header_adj_tbl_out oe_order_pub.header_adj_tbl_type;
v_header_adj_val_tbl_out oe_order_pub.header_adj_val_tbl_type;
v_header_price_att_tbl_out oe_order_pub.header_price_att_tbl_type;
v_header_adj_att_tbl_out oe_order_pub.header_adj_att_tbl_type;
v_header_adj_assoc_tbl_out oe_order_pub.header_adj_assoc_tbl_type;
v_header_scredit_tbl_out oe_order_pub.header_scredit_tbl_type;
v_header_scredit_val_tbl_out oe_order_pub.header_scredit_val_tbl_type;
v_line_tbl_out oe_order_pub.line_tbl_type;
v_line_val_tbl_out oe_order_pub.line_val_tbl_type;
v_line_adj_tbl_out oe_order_pub.line_adj_tbl_type;
v_line_adj_val_tbl_out oe_order_pub.line_adj_val_tbl_type;
v_line_price_att_tbl_out oe_order_pub.line_price_att_tbl_type;
v_line_adj_att_tbl_out oe_order_pub.line_adj_att_tbl_type;
v_line_adj_assoc_tbl_out oe_order_pub.line_adj_assoc_tbl_type;
v_line_scredit_tbl_out oe_order_pub.line_scredit_tbl_type;
v_line_scredit_val_tbl_out oe_order_pub.line_scredit_val_tbl_type;
v_lot_serial_tbl_out oe_order_pub.lot_serial_tbl_type;
v_lot_serial_val_tbl_out oe_order_pub.lot_serial_val_tbl_type;
v_action_request_tbl_out oe_order_pub.request_tbl_type;
v_msg_index NUMBER;
v_data VARCHAR2 (2000);
v_loop_count NUMBER;
v_debug_file VARCHAR2 (200);
b_return_status VARCHAR2 (200);
b_msg_count NUMBER;
b_msg_data VARCHAR2 (2000);
BEGIN
DBMS_OUTPUT.PUT_LINE('Starting of script');
-- Setting the Enviroment --
mo_global.init('ONT');
fnd_global.apps_initialize ( user_id => 1013438
,resp_id => 21623
,resp_appl_id => 660);
mo_global.set_policy_context('S',204);
-- Header Record --
v_header_rec := oe_order_pub.g_miss_header_rec;
v_header_rec.request_date := SYSDATE;
v_header_rec.header_id := 251413;
v_header_rec.credit_card_holder_name :='esakki';
v_header_rec.credit_card_number := 'XXXXXXXXXXXX3510';
v_header_rec.credit_card_expiration_date := to_date('01-JAN-2014','dd-mon-yyyy');
v_header_rec.credit_card_code := 'MASTERCARD';
v_header_rec.payment_type_code := 'CREDIT_CARD';
v_header_rec.sold_to_org_id := 131747;
v_header_rec.sold_from_org_id := 204;
v_header_rec.ordered_date := SYSDATE;
v_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
v_action_request_tbl (1) := oe_order_pub.g_miss_request_rec;
-- Line Record --
v_line_tbl (1) := oe_order_pub.g_miss_line_rec;
DBMS_OUTPUT.PUT_LINE('Starting of API');
-- Calling the API to update the header details of an existing Order --
OE_ORDER_PUB.PROCESS_ORDER (
p_org_id =>204
,p_operating_unit => NULL
p_api_version_number => v_api_version_number
,p_init_msg_list => fnd_api.g_false
,p_return_values => fnd_api.g_false
,p_action_commit => fnd_api.g_false
, p_header_rec => v_header_rec
, p_line_tbl => v_line_tbl
, p_action_request_tbl => v_action_request_tbl
, p_line_adj_tbl => v_line_adj_tbl
-- OUT variables
, x_header_rec => v_header_rec_out
, x_header_val_rec => v_header_val_rec_out
, x_header_adj_tbl => v_header_adj_tbl_out
, x_header_adj_val_tbl => v_header_adj_val_tbl_out
, x_header_price_att_tbl => v_header_price_att_tbl_out
, x_header_adj_att_tbl => v_header_adj_att_tbl_out
, x_header_adj_assoc_tbl => v_header_adj_assoc_tbl_out
, x_header_scredit_tbl => v_header_scredit_tbl_out
, x_header_scredit_val_tbl => v_header_scredit_val_tbl_out
, x_line_tbl => v_line_tbl_out
, x_line_val_tbl => v_line_val_tbl_out
, x_line_adj_tbl => v_line_adj_tbl_out
, x_line_adj_val_tbl => v_line_adj_val_tbl_out
, x_line_price_att_tbl => v_line_price_att_tbl_out
, x_line_adj_att_tbl => v_line_adj_att_tbl_out
, x_line_adj_assoc_tbl => v_line_adj_assoc_tbl_out
, x_line_scredit_tbl => v_line_scredit_tbl_out
, x_line_scredit_val_tbl => v_line_scredit_val_tbl_out
, x_lot_serial_tbl => v_lot_serial_tbl_out
, x_lot_serial_val_tbl => v_lot_serial_val_tbl_out
, x_action_request_tbl => v_action_request_tbl_out
, x_return_status => v_return_status
, x_msg_count => v_msg_count
, x_msg_data => v_msg_data
DBMS_OUTPUT.PUT_LINE('Completion of API');
IF v_return_status = fnd_api.g_ret_sts_success THEN
COMMIT;
DBMS_OUTPUT.put_line ('Order Header Updation Success : '||v_header_rec_out.header_id);
ELSE
DBMS_OUTPUT.put_line ('Order Header Updation failed:'||v_msg_data);
ROLLBACK;
FOR i IN 1 .. v_msg_count
LOOP
v_msg_data := oe_msg_pub.get( p_msg_index => i, p_encoded => 'F');
dbms_output.put_line( i|| ') '|| v_msg_data);
END LOOP;
END IF;
END;
OUTPUT:
Starting of script
Starting of API
Completion of API
Order Header Updation Success : 251413
Thanks,
saranForgot to mention :Soruce is Oracle EBS
Maybe you are looking for
-
PayloadSwapBean in recevier file adapter
Hi Experts, Mine is SOAP to File scenario. i'm getting attachemnts in SOAP channel, i'm using the payloadSwapBean to swap the main doc with this attachemnt in my receiver file adapter and the attachemnt content should go to the file. but i'm getting
-
Deregister mbean MessageBrokerServlet error in WAS 6.1.0.17
I installed LCDS 2.6 (lcds_war.war) in WAS 6.1.0.17. I am getting the following error when i start lcds_war, Deregister the mbean because of uncaught init() exception thrown by servlet MessageBrokerServlet: javax.servlet.UnavailableException: org/apa
-
I'm trying to print a document from safari and the print command is at the bottom of the page and I can't move it up. The print command shortcut doesn't work and I would like to know how I can print this document.
-
I have a 2GHz Mac Book Pro with 2 GB or ram. I use this quite a lot when shooting and editing with my Panasonic P2 (HPX2000). Usually, I log and transfer DV, DVC Pro and DVC Pro 50 files with no issues. The other day, I shot a concert in 720P and whe
-
Hi all, I have to implement a custom text component for a project im working on. I was hoping someone could give me some direction on how to implement the text storage. I wont need more than the regular 256 ascii characters and text sizes could reach