Sei sulla pagina 1di 9

Use of a custom source to derive an account based in the first segment of an Items inventory class flexfield A worked example

using a PO Receiving Transaction Introduction This is a preliminary document issued by Oracle Process Manufacturing upport in an attempt to answer the !uestion " #$hen I am setting up an Account %erivation Rule &A%R' in ubledger Accounting & (A) *(A') how can I map an Account or Accounting +lexfield egment to an Item Attribute which is not directly available from the transaction being processed,# A common re!uirement is to map the Inventory -aluation &I.-' Account by Item /ategory) which is not a parameter that is available in the seeded 0 ource0 (ist of -alues1 Please note that in addition to the ubledger Accounting setup screens) in order to make use of the information in this document you will re!uire the necessary privileges to create a P(2 3( Procedure as the 0APP 0 3(4Plus username) and will also need a working knowledge of how the Item and Transaction database tables link together1

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

ource column &p;transaction;id

/R7AT7 OR R7P(A/7 +8./TIO. 9:/;%7(I-7R;TRA. I. .8M<7R' R7T8R. -AR/=AR> is l;inventory;item;id number? l;organi@ation;id number? l;segment varchar>&AB'?

<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;v where inventory;item;idC l;inventory;item;id and organi@ation;idC l;organi@ation;id and 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 to rcv;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 declare l;segment -AR/=AR>&AB'? begin l;segment"C9:/;%7(I-7R;TRA. &>>ADBA>E'? %<M ;O8TP8T1P8T;(I.7&0 7:M7.T 0FFl;segment'? end? 7xample output " 0 7:M7.T .7$0

/ustom

ource +orm

G 7xample Item /ategory setup

H The Receiving Transaction

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

K Account %erivation Rule &A%R'

.otice that the source for the A%R is the function name &i1e1 custom source' created previously and the test is for the functionLs returned value i1e1 M.7$L in this case1

9ournal (ine %efinition &9(%'

Application Accounting %efinition &AA%'

ubledger Accounting Method & (AM'

5B

%etailed

ubledger Report

Miscellaneous Tips 51 Make your test cases as simple as possible1 :et the A%R to return the whole of flexfield in order that you can check the output easily1 >1 Test the function A1 Nnow the data model1 I know of no documentation that will help you1 The best information available is in the source of the view gmf;subledger;rep;v &the e!uivalent of the Release 55i view gl;subr;led;vw'1 +or example) the part of view gmf;subledger;rep;v for a Receiving Transaction is" O +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;id A.% eh1source;document;id C rt1shipment;header;id A.% eh1source;line;id C rt1transaction;id A.% rt1transaction;id C mmt1rcv;transaction;id A.% eh1transaction;source;type;id I. &5) I'

cripts which you may find useful as models elect distinct T*.; O8R/7) transaction;source;type;id) 7.TITP;/O%7) 7-7.T;/(A ;/O%7) 7-7.T;TPP7;/O%7 from gmf;xla;extract;headers order by entity;code) event;class;code? elect distinct T*.; O8R/7)entity;code)7-7.T;/(A ;/O%7) 7-7.T;TPP7;/O%7 from gmf;xla;extract;headers where creation;dateQC0>IJAPRJBD0 order by T*.; O8R/7)entity;code) event;class;code? elect distinct T*.; O8R/7) transaction;source;type;id) 7.TITP;/O%7 ) source;document;id)source;line;id) transaction;id) TRA. A/TIO.;TPP7;I%)7-7.T;/(A ;/O%7) 7-7.T;TPP7;/O%7 from gmf;xla;extract;headers where 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 populated by the OPM (A PreJProcessor1

Potrebbero piacerti anche