Download - OPM Custom Source

Transcript

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 1/9

Use of a custom source to derive an account based in the firstsegment of an Item’s inventory class flexfield

A worked example using a PO Receiving Transaction

Introduction

This is a preliminary document issued by Oracle Process Manufacturingupport in an attempt to answer the !uestion " #$hen I am setting up anAccount %erivation Rule &A%R' in ubledger Accounting &(A) *(A') how

can I map an Account or Accounting +lexfield egment to an ItemAttribute which is not directly available from the transaction being

processed,#

A common re!uirement is to map the Inventory -aluation &I.-' Accountby Item /ategory) which is not a parameter that is available in the seeded

0ource0 (ist of -alues1

Please note that in addition to the ubledger Accounting setup screens) inorder to make use of the information in this document you will re!uire thenecessary privileges to create a P(23( Procedure as the 0APP0 3(4Plus

username) and will also need a working knowledge of how the Item andTransaction database tables link together1

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 2/9

5' $rite the function needed to 6oin to the /ustom ource column

/R7AT7 OR R7P(A/7 +8./TIO. 9:/;%7(I-7R;TRA. &p;transaction;idI. .8M<7R' R7T8R. -AR/=AR> is

l;inventory;item;id number?l;organi@ation;id number?l;segment varchar>&B'?

<7:I.  select inventory;item;id)organi@ation;id into l;inventory;item;id)

l;organi@ation;id  from mtl;material;transactions  where transaction;idCp;transaction;id  ?

select segment5 into l;segment from mtl;item;categories;vwhere

inventory;item;idC l;inventory;item;idand organi@ation;idC l;organi@ation;idand category;set;nameC0Inv1Items0?

R7T8R. l;segment?

7.% 9:/;%7(I-7R;TRA.?

.1< in this case) you could also the value source;line;id;column to go torcv;transactions table i1e1 to the transaction;id column on that table1

>' Test the function in 3(4Plus using a known value of Transaction Id

et serveroutput on

declarel;segment -AR/=AR>&B'?beginl;segment"C9:/;%7(I-7R;TRA.&>>DB>E'?

%<M;O8TP8T1P8T;(I.7&07:M7.T 0FFl;segment'?end?

7xample output " 07:M7.T .7$0

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 3/9

/ustom ource +orm

G 7xample Item /ategory setup

 

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 4/9

H The Receiving Transaction

Transaction id C >>DB>E for receipt of 9:/;R7/7IPT >JAPRJ>BBD

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 5/9

K Account %erivation Rule &A%R'

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 6/9

.otice that the source for the A%R is the function name &i1e1 customsource' created previously and the test is for the functionLs returned value

i1e1 .7$L in this case1

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 7/9

9ournal (ine %efinition &9(%'

E Application Accounting %efinition &AA%'

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 8/9

D ubledger Accounting Method &(AM'

5B %etailed ubledger Report

8/13/2019 OPM Custom Source

http://slidepdf.com/reader/full/opm-custom-source 9/9

Miscellaneous Tips

51 Make your test cases as simple as possible1 :et the A%R to returnthe whole of flexfield in order that you can check the output easily1

>1 Test the function

1 Nnow the data model1 I know of no documentation that will helpyou1 The best information available is in the source of the viewgmf;subledger;rep;v &the e!uivalent of the Release 55i viewgl;subr;led;vw'1

+or example) the part of view gmf;subledger;rep;v for a ReceivingTransaction is"

+ROM gmf;xla;extract;headers eh)  rcv;transactions rt)

  mtl;material;transactions mmt)  mtl;transaction;lot;numbers mtln)

  rcv;shipment;headers rsh)  rcv;shipment;lines rsl)  po;headers;all poh)  po;vendors pv

$=7R7 eh1transaction;id C mmt1transaction;idA.% eh1source;document;id C rt1shipment;header;idA.% eh1source;line;id C rt1transaction;idA.% rt1transaction;id C mmt1rcv;transaction;id

A.% eh1transaction;source;type;id I. &5) '

 

cripts which you may find useful as models

elect distinct T*.;O8R/7) transaction;source;type;id) 7.TIT;/O%7)7-7.T;/(A;/O%7) 7-7.T;TP7;/O%7

from gmf;xla;extract;headersorder by entity;code) event;class;code?

elect distinct T*.;O8R/7)entity;code)7-7.T;/(A;/O%7)

7-7.T;TP7;/O%7from gmf;xla;extract;headers where creation;dateQC0>JAPRJBD0order by T*.;O8R/7)entity;code) event;class;code?

elect distinct T*.;O8R/7) transaction;source;type;id)7.TIT;/O%7 )

source;document;id)source;line;id) transaction;id)TRA.A/TIO.;TP7;I%)7-7.T;/(A;/O%7) 7-7.T;TP7;/O%7from gmf;xla;extract;headerswhere txn;source C0P8R0 and creation;dateQC0B>JAPRJBE0

and event;class;codeC0%7(I-7R0 order by entity;code) event;class;code?

.1< the basic table here is gmf;xla;extract;headers) which is populatedby the OPM (A PreJProcessor1