Sunday, 10 March 2024

DML For Updating Salesperson Name in SalesOrder and AR Invoice in APPS R12

 /*DML For Updating Salesperson even after invoicing and closing SalesOrder in APPS R12*/

UPDATE ont.oe_order_headers_all
SET    salesrep_id =
WHERE  org_id =
AND    order_number = ;

UPDATE ont.oe_order_lines_all
SET    salesrep_id =
WHERE  header_id = ;

UPDATE ar.ra_customer_trx_all
SET    primary_salesrep_id =
WHERE  interface_header_context = 'ORDER ENTRY'
AND    interface_header_attribute1 = '<order_number>'
AND    trx_number = ;

UPDATE ar.ra_cust_trx_line_salesreps_all
SET    salesrep_id = 
WHERE  customer_trx_id = ;
/*RA_CUST_TRX_LINE_SALESREPS_ALL table stores sales credit assignments for invoice lines. If Receivables bases your invoice distributions on sales credits, a mapping exists between the sales credit assignments in this table with the RA_CUST_TRX_LINE_GL_DIST_ALL table.The primary key for this table is CUST_TRX_LINE_SALESREP_ID.*/

UPDATE ont.oe_sales_credits
SET    salesrep_id = 
WHERE  header_id = ; 

/*ONT.OE_SALES_CREDIT_HISTORY*/

No comments:

Post a Comment