Defaulting DFF Value

The requirement was to copy the content entered in DFF for each subsequent lines in Inter Org Transfer

Following are the steps followed :

  1. insert into table
  2. default from DFF definition screen
  3. deleted from table

We saved the data entered in the first line’s DFF into a table. We were unable to use Global temporary table. For some unknown reason the data could not be fetched.

And then fetch the data from the table and default it at the DFF definition level.

After saving the data from the table gets deleted.

 

1

1

 

=’declare
begin
BWSSB_FORM_PRSNAZ_PKG.BWSSB_INTER_ORG(”’||${item.mtl_trx_line.attribute1.value}||”’,”’||${item.mtl_trx_line.attribute2.value}||”’,”’||${item.mtl_trx_line.attribute3.value}||”’,”’||${item.mtl_trx_line.attribute4.value}||”’,”’||${item.mtl_trx_line.attribute5.value}||”’,”’||${item.mtl_trx_line.attribute6.value}||”’,”’||${item.mtl_trx_line.attribute7.value}||”’,”’||${item.mtl_trx_line.attribute8.value}||”’);
END’

Defaulting at DFF level

Now go to DFF definition screen and select each segment and pass default value.

1

Default Value : SELECT DISTINCT attribute1 from BWBSSB_TEMP_TBL

If date column is present, in sert into the table as charector for format and use following for defaulting:

SELECT DISTINCT To_DATE(attribute2,’YYYY/MM/DD HH24:MI:SS’) from BWBSSB_TEMP_TBL

Clearing table :

1

 

1

 

Package :

CREATE OR REPLACE package BODY BWSSB_FORM_PRSNAZ_PKG
AS
PROCEDURE BWSSB_INTER_ORG(P_ATTRIBUTE1 VARCHAR2,
P_ATTRIBUTE2 VARCHAR2,
P_ATTRIBUTE3 VARCHAR2,
P_ATTRIBUTE4 VARCHAR2,
P_ATTRIBUTE5 VARCHAR2,
P_ATTRIBUTE6 VARCHAR2,
P_ATTRIBUTE7 VARCHAR2,
P_ATTRIBUTE8 VARCHAR2)
AS
BEGIN
INSERT INTO BWBSSB_TEMP_TBL VALUES(P_ATTRIBUTE1,P_ATTRIBUTE2, P_ATTRIBUTE3,P_ATTRIBUTE4,P_ATTRIBUTE5,P_ATTRIBUTE6,P_ATTRIBUTE7,P_ATTRIBUTE8);
COMMIT;
END BWSSB_INTER_ORG;
PROCEDURE BWSSB_DELETE_TEMP_TABLE
AS
BEGIN
DELETE BWBSSB_TEMP_TBL;
COMMIT;
END BWSSB_DELETE_TEMP_TABLE;
END BWSSB_FORM_PRSNAZ_PKG;

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s