OUTBOUND INTERFACE:
---------------------------------
> DEVELOP THE PLSQL PACKAGE AND TRANSFER TO THE SERVER.
> OUTBOUND MEANS EXTRACT TABLE DATA TO TEXT,EXCEL,HTML ETC.
> OTHER MEANING DATABASE TABLE TO FLAT FILE.
> REGISTER OUR PROGRAM AS CONCURRENT PROGRAM.
> ATTACH TO REQUEST GROUP.
> SUBMIT THE PROGRAM.
> CHECK THE FLAT FILE.
PATH LOCATION:(AFTER THE SUBMIT THE PROGRAM OUR FILE STORE IN THIS PATH)
CHOOSE ANYONE PATH
c:\temp, c:\temp, D:\oracle\VIS\db\tech_st\11.1.0\plsql\temp, D:\oracle\VIS\db\tech_st\11.1.0\appsutil\outbound\VIS_apps, c:\temp
OUTBOUND CODE:
CREATE OR REPLACE PROCEDURE OUTBOUND_QTY(ERRBUF OUT VARCHAR2,RETCODE OUT VARCHAR2)
IS
QTY UTL_FILE.FILE_TYPE; --DECLARE UTL LOCAL VARIABLE
PATH VARCHAR2(200);
FORMAT VARCHAR2(200);
CURSOR CAGE IS SELECT ITM.SEGMENT1,ITM.DESCRIPTION,QTY.TRANSACTION_QUANTITY,QTY.SUBINVENTORY_CODE FROM MTL_SYSTEM_ITEMS_B ITM,MTL_ONHAND_QUANTITIES QTY
WHERE ITM.ORGANIZATION_ID=QTY.ORGANIZATION_ID
AND ITM.SEGMENT1 LIKE 'SAINT%';
BEGIN
FORMAT := 'QTY_ITEMS.txt';
PATH := 'D:\oracle\VIS\db\tech_st\11.1.0\appsutil\outbound\VIS_apps';
QTY := UTL_FILE.FOPEN(PATH,FORMAT,'W'); --OPEN THE UTL FILE DATA MODE ARE WRITE AND READ
FOR LION IN CAGE LOOP
UTL_FILE.PUT_LINE(QTY,LION.SEGMENT1||' '|| LION.DESCRIPTION||' '||LION.TRANSACTION_QUANTITY||' '||LION.SUBINVENTORY_CODE);
END LOOP;
UTL_FILE.FCLOSE(QTY); --CLOSE THE UTL FILE
END;
/
No comments:
Post a Comment