You are on page 1of 11

AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

OracleApps Epicenter

Odyssey of an OracleApps Consultant


Home
About The Epicenter
Resources
SEARCH
Contact

Powered Search

Get Updates!

Subscribe to the OracleAppsHub to receive notifications when there are new posts:

Categories

11i
Advance Collection
AOL
API Integration
ASC606
Basic Accounting
Beginner
Beyond Apps
Blogroll
Cash Management
Centrestage
Conversion
Depot Repair
EBS Suite
EDI
Emerging Technologies
Finance
Functional
Fusion
Fusion Application
General Interest
HRMS
Hyperion
Implementations
Integration
InterCompany
JumpStart
Localizations
MDM

1 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

Methodology/Process
Misc
News
OPM
Oracle Application
Oracle Asset
Oracle Cloud *
Oracle Credit Management
Oracle Diagnostics
Oracle E-Business Tax
Oracle eAM
Oracle Footprint
Oracle General Ledger
Oracle ICM
Oracle Legal Entity Configurator
Oracle Manufacturing
Oracle Order Management
Oracle Payable
Oracle Payment Module
Oracle Pricing
Oracle Product
Oracle Property Manager
Oracle Purchasing
Oracle Receivable
Oracle TCA
Oracle Treasury
Personalizations
R12
Release12
Security
SEPA
Service Contracts
Subledger Accounting
Technical
Tool
Uncategorized
Web ADI
XBRL

Archives

September 2017
July 2017
June 2017
May 2017
March 2017
February 2017
November 2016
October 2016
August 2016
July 2016
June 2016
January 2016
November 2015
October 2015
August 2015

2 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

July 2015
June 2015
May 2015
March 2015
January 2015
December 2014
October 2014
August 2014
July 2014
May 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
June 2010
May 2010
April 2010

3 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
October 2006
August 2006

Links

Metalink
Oracle
Oracle Integration Repository

Disclaimer

Disclaimer

Meta:

RSS
Comments RSS

4 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

Valid XHTML
eMail

Ad
Feature Topic

Grab Free Copy

Search

Powered Search

Recent Posts

A Primer For Finance Professionals- Blockchain


ASC 606 and IFRS 15 Revenue Recognition automation
ASC 606 & IFRS 15: Revenue from Contracts with Customers
ASC 606/IFRS 15 & Oracle’s Revenue Management Cloud Service (RMCS)
Revenue Standard : effective dates for reporting using the new accounting standards

Blogroll

David Haimes
Floyd Teter
Steven Chan
Tim Dexter
Trioragroup Blog

Total Page View

News & Views

eProseed to Co-Host Oracle Process, Integration & API CAB in San Francisco – PR.com (press release)
eProseed to co-host Oracle Process, Integration & API CAB in San … – RealWire (press release)
Oracle Corp Shares Nosedive After Earnings And Forward Outlook … – Investing.com
Oracle Is Still A Value Stock: SaaS The Star Performer In Q1; Guidance Disappoints – Seeking Alpha

User Onlines
229 Users

AR Adjustments : API – Sample code

5 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

Posted on September 5th, 2008 by Sanjit Anand | Print This Post |  Email This Post

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try


it today

This is sample code that you can use for creating adjustment.This is tested while integrating with POS -Oracle
Integration.

Pre-requisite Setup
There should be You should take a note, API requires the following receivable activity setup:

GL Account Source must be Activity

API documentation and Mapping

Here are API'S mapping and underline sample code. You can use this for creating adjustment through
API's.

6 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

7 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

You can also download mapping sheet here: Download

Sample Code

1. If you are using Sql*plus or Toad , you set org_context

exec fnd_client_info.set_org_context(org_id);

example

exec fnd_client_info.set_org_context(121);

2. Sample Code, you can check latest version at irep.


DECLARE

up_adj_rec ar_adjustments%rowtype;
up_api_name VARCHAR2(20);
up_api_version NUMBER;
up_called_from VARCHAR2(10);
up_check_amount VARCHAR2(1);
up_chk_approval_limits VARCHAR2(1);
up_commit_flag VARCHAR2(1);
up_init_msg_list VARCHAR2(1);
up_move_deferred_tax VARCHAR2(10);
up_msg_count NUMBER;
up_msg_data VARCHAR2(2000);
up_new_adjust_id ar_adjustments.adjustment_id%type;
up_new_adjust_number ar_adjustments.adjustment_number%type;
up_old_adjust_id ar_adjustments.adjustment_id%type;
up_return_status VARCHAR2(5);
up_validation_level NUMBER;

BEGIN

fnd_global.apps_initialize(1290, 50283, 222);

up_adj_rec := NULL;
up_api_name := NULL;
up_api_version := 1.0;
up_called_from := NULL;
up_check_amount := NULL;
up_chk_approval_limits := NULL;
up_commit_flag := NULL;
up_init_msg_list := FND_API.G_TRUE;
up_move_deferred_tax := 'Y';
up_msg_count := 0;
up_msg_data := NULL;
up_new_adjust_id := NULL;
up_new_adjust_number := NULL;
up_old_adjust_id := NULL;
up_return_status := NULL;
up_validation_level := FND_API.G_VALID_LEVEL_FULL;

/* api- data adjustments mapping record - start */

up_adj_rec.ACCTD_AMOUNT := -300; -- COLUMN A2


up_adj_rec.ADJUSTMENT_ID := NULL;
up_adj_rec.ADJUSTMENT_NUMBER := NULL;
up_adj_rec.ADJUSTMENT_TYPE := 'M';
up_adj_rec.AMOUNT := -300;
up_adj_rec.CREATED_BY := 1290;
up_adj_rec.CREATED_FROM := 'MEDICLAIM WEBCALL-API';
up_adj_rec.CREATION_DATE := to_date('21-JUL-2008', 'DD-MON-YYYY');
up_adj_rec.GL_DATE := to_date('21-JUL-2008', 'DD-MON-YYYY');
up_adj_rec.LAST_UPDATE_DATE := SYSDATE;
up_adj_rec.LAST_UPDATED_BY := 1290;
up_adj_rec.POSTING_CONTROL_ID := -3;
up_adj_rec.SET_OF_BOOKS_ID := 1001;
up_adj_rec.STATUS := 'A';
up_adj_rec.TYPE := 'LINE';
up_adj_rec.PAYMENT_SCHEDULE_ID := 16061;
up_adj_rec.APPLY_DATE := SYSDATE;
up_adj_rec.RECEIVABLES_TRX_ID := 1603; -- this is rec activity

8 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

up_adj_rec.CODE_COMBINATION_ID := 60810; -- pass the CCID


up_adj_rec.CUSTOMER_TRX_ID := 48208; --- Transaction for which adjustment is made
-- up_adj_rec.ADJ_TAX_ACCT_RULE := 33;

/* api- data adjustments mapping record - End */

AR_ADJUST_PUB.Create_Adjustment
(
p_api_name => up_api_name,
p_api_version => up_api_version,
p_init_msg_list => up_init_msg_list,
p_commit_flag => up_commit_flag,
p_validation_level => up_validation_level,
p_msg_count => up_msg_count,
p_msg_data => up_msg_data,
p_return_status => up_return_status,
p_adj_rec => up_adj_rec,
p_chk_approval_limits => up_chk_approval_limits,
p_check_amount => up_check_amount,
p_move_deferred_tax => up_move_deferred_tax,
p_new_adjust_number => up_new_adjust_number,
p_new_adjust_id => up_new_adjust_id,
p_called_from => up_called_from,
p_old_adjust_id => up_old_adjust_id
);

DBMS_OUTPUT.PUT_LINE('New Adjustment Number: ' || up_new_adjust_number);


DBMS_OUTPUT.PUT_LINE('New Adjustment ID: ' || up_new_adjust_id);

IF up_msg_count >=1 THEN


FOR I IN 1..up_msg_count LOOP
dbms_output.put_line(I||'. '||SUBSTR(FND_MSG_PUB.Get(p_encoded => FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;

END;

Once record get successfully created you will get adjustment id.

3. Final Verification

Go to Oracle pull the transaction detials and click the 'Adjust' button.

You can see adjustment created.

Oracle Documentation

9 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

11i Oracle Receivables API User Notes - PDF format


R12 Oracle Receivables API User Notes - PDF format

Similar Post

The world of Oracle API


API’s or Open Interface
E-Business Suite Integration Repository
AR Adjustments : Details,setup, Flow, Accounting and API
AR Adjustments : Details,setup, Flow, Accounting and API (Part -II)
AR Adjustments : API - Sample code

Related Posts

1. Oracle Pricing API


2. Oracle API Availability – Concurrent Program
3. Oracle API Table Definitions Fixed Assets
4. OPM API’s
5. Oracle API Availability – Input/Output

Posted in Oracle Receivable | No Comments » Email This Post | Print This Post

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try


it today
Leave a Comment

Name

10 of 11 25/09/2017 09:23 ‫ﺹ‬


AR Adjustments : API – Sample code | OracleApps Epicenter http://www.oracleappshub.com/accounts-receivable/ar-adjustments-api...

Mail (will not be published)

Website

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

All content present on this website is property of OracleappsHub.com and subject to international copyright
laws.
© 2006-2011 Copyright OracleApps Epicenter.All Rights reserved.

11 of 11 25/09/2017 09:23 ‫ﺹ‬