Forms source code difference
Hi All,
I had two same forms of different source coding, i need to find out the difference between the source code, is their any utility to find out the source code difference. Iam using forms 5.0
Thanks
Anil,
you can convert the fmb to txt file using file-->administration-->object list report in the form builder.
do the same for both forms. if u have an editor like ultra edit u can compare those two txt files.
regards
Sini
Similar Messages
-
Batch change to forms source code in 10g
Hi,
this may seem like a strange request but here goes. I am currently looking at upgrading my forms from 6i to 10g. I have a couple of hundred forms in all and many of them use the HOST command to create word files on the client. For this to work in 10g I've added webutil. However, I now need to change the code in all of these forms that call the host command to now call CLIENT_HOST. Is there a way that I can do this on mass rather than opening up each form and using the search replace function in the builder. Many thanks DaveHi,
Check this link for
how to write source code in smart forms?
http://****************/Tutorials/Smartforms/GettingStarted/SimpleText.htm
You can write Source Code in smartforms By Choosing Program Lines.
Check this link with Screen Shots
http://****************/Tutorials/Smartforms/PO/page1.htm
Reward All Helpfull Answers
Regards
Fareedas
Edited by: Fareeda Tabassum S on May 21, 2008 3:09 PM -
How to write source code in smart forms?
hi friends,
can anyone can help me in writing sorcecode in smartforms r
any materail link.
if it is helpful points can b rewarded.Thanks in advance.Hi,
Check this link for
how to write source code in smart forms?
http://****************/Tutorials/Smartforms/GettingStarted/SimpleText.htm
You can write Source Code in smartforms By Choosing Program Lines.
Check this link with Screen Shots
http://****************/Tutorials/Smartforms/PO/page1.htm
Reward All Helpfull Answers
Regards
Fareedas
Edited by: Fareeda Tabassum S on May 21, 2008 3:09 PM -
I Need Help to Access The Source Code From A Form to Know the Calculation Formula
Hi,
I Need Help to Access The Source Code From A Form to Know the Calculation Formula. The application is a windows form application that is linked to SQL Server 2008. In one of the application forms it generates an invoice and does some calculations. I just
need to know where behind that form is the code that's doing the calculations to generate the invoice, I just need to get into the formula that's doing these calculations.
Thank you so much.Hi,
Thanks for the reply. This is a view and [AmountDue] is supposed to be [CurrentDueAmount] + [PastDueAmount] - [PaidAmount]. The view is not calculating [PaidAmount] right . Below is the complete code of the view. Do you see anything wrong in the code ?
Thanks.
SELECT [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
[iff].[FacilityFeeID], [LoanID] = NULL, [isi].[PortfolioID], [isi].[Portfolio],
[PaymentType] = [isis_fee].[SectionType], [Name]
= [iff].[Name], [ReceivedAmount], [dates].[CurrentDueAmount],
[PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
0) > 0 THEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0)
WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply reset to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN 0 ELSE [pastdue].[PastDueFeeAmount]
+ ISNULL([ReceivedAmount], 0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[pastdue].[PastDueFeeAmount] < 0 THEN 0 ELSE
[pastdue].[PastDueFeeAmount] END, [PaidAmount] = CASE WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN - ([pastdue].[PastDueFeeAmount]
+ ISNULL([ReceivedAmount], 0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[pastdue].[PastDueFeeAmount] < 0 THEN - [pastdue].[PastDueFeeAmount]
ELSE 0 END, [AmountDue] = [unpaid].[UnpaidFeeAmount], [ID] = [iff].[FacilityFeeID]
FROM [dbo].[INV_SubInvoice] isi JOIN
[dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
= [ii].[ID] JOIN
[dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
JOIN
[dbo].[INV_FacilityFee] iff ON [if].[ID] = [iff].[INV_FacilityID]
JOIN
(SELECT [sis_fee].[ID],
[sis_fee].[SectionTypeCode], [SectionType] = [st_fee].[Name], [sis_fee].[INV_FacilityFeeID]
FROM
[dbo].[INV_SubInvoiceSection] sis_fee JOIN
[dbo].[INV_SectionType] st_fee ON [sis_fee].[SectionTypeCode] = [st_fee].[Code]
WHERE [INV_FacilityFeeID]
IS NOT NULL AND [StatusCode] = 'BILL') isis_fee ON [iff].[ID] = [isis_fee].[INV_FacilityFeeID] JOIN
(SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedFeeAmount]),
[ReceivedAmount] = SUM([iffa].[ReceivedFeeAmount])
FROM
[dbo].[INV_FacilityFeeAccrual] iffa
GROUP BY [iffa].[SectionID])
dates ON [isis_fee].[ID] = [dates].[SectionID] LEFT JOIN
(SELECT *
FROM
[dbo].[INV_FacilityFeeAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND
[dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
LEFT JOIN
(SELECT [SectionID],
[PastDueFeeAmount] = SUM([PastDueFeeAmount])
FROM
[dbo].[INV_FacilityFeeAccrual]
GROUP BY [SectionID]) pastdue
ON [dates].[SectionID] = [pastdue].[SectionID]
UNION
SELECT [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
[FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio],
[PaymentType] = [isis_loan].[SectionType], [Name]
= [il].[Name], [ReceivedAmount], [CurrentDueAmount], [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount],
0) WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
END,
[PaidAmount] = CASE WHEN [isis_loan].[SectionTypeCode]
= 'LOAN_PRIN' THEN 0 ELSE CASE WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN - [PastDueAmount]
ELSE 0 END END,
[AmountDue] = CASE WHEN [isis_loan].[SectionTypeCode]
= 'LOAN_PRIN' THEN [CurrentDueAmount] ELSE [unpaid].[AmountDue] END, [ID] = [il].[LoanID]
FROM [dbo].[INV_SubInvoice] isi JOIN
[dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
= [ii].[ID] JOIN
[dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
JOIN
[dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
JOIN
(SELECT [sis_loan].[ID],
[sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
FROM
[dbo].[INV_SubInvoiceSection] sis_loan JOIN
[dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
WHERE [INV_LoanID]
IS NOT NULL AND [StatusCode] = 'BILL') isis_loan ON [il].[ID] = [isis_loan].[INV_LoanID] JOIN
(SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[ExpectedPrincipalAmount]),
[ReceivedAmount] = SUM([ReceivedPrincipalAmount])
FROM
[dbo].[INV_LoanPrincipalAmortization] iffa
GROUP BY [iffa].[SectionID]
UNION
SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]),
[ReceivedAmount] = SUM([ReceivedInterestAmount])
FROM
[dbo].[INV_LoanCashInterestAccrual] iffa
GROUP BY [iffa].[SectionID]
UNION
SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]),
[ReceivedAmount] = SUM([ReceivedInterestAmount])
FROM
[dbo].[INV_LoanPIKInterestAccrual] iffa
GROUP BY [iffa].[SectionID])
dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
(SELECT [AmountDue]
= [UnpaidPrincipalAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanPrincipalAmortization]
UNION
SELECT [AmountDue]
= [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanCashInterestAccrual]
UNION
SELECT [AmountDue]
= [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND
[dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
LEFT JOIN
(SELECT [PastDueAmount]
= SUM([PastDuePrincipalAmount]), [SectionID]
FROM
[dbo].[INV_LoanPrincipalAmortization]
GROUP BY [SectionID]
UNION
SELECT [PastDueAmount]
= SUM([PastDueInterestAmount]), [SectionID]
FROM
[dbo].[INV_LoanCashInterestAccrual]
GROUP BY [SectionID]
UNION
SELECT [PastDueAmount]
= SUM([PastDueInterestAmount]), [SectionID]
FROM
[dbo].[INV_LoanPIKInterestAccrual]
GROUP BY [SectionID]) pastdue
ON [dates].[SectionID] = [pastdue].[SectionID]
UNION
SELECT [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
[FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio],
[PaymentType] = 'PIK Interest Applied', [Name]
= [il].[Name], [ReceivedAmount], [CurrentDueAmount] = - [dates].[CurrentDueAmount],
[PastDueAmount] = - CASE WHEN ISNULL([ReceivedAmount],
0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
END, [PaidAmount] = - CASE WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN - [PastDueAmount]
ELSE 0 END, [AmountDue] = - [AmountDue], [ID] = [il].[LoanID]
FROM [dbo].[INV_SubInvoice] isi JOIN
[dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
= [ii].[ID] JOIN
[dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
JOIN
[dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
JOIN
(SELECT [sis_loan].[ID],
[sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
FROM
[dbo].[INV_SubInvoiceSection] sis_loan JOIN
[dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
WHERE [INV_LoanID]
IS NOT NULL AND [StatusCode] = 'BILL' AND [sis_loan].[SectionTypeCode] = 'LOAN_INT_PIK') isis_loan ON
[il].[ID] = [isis_loan].[INV_LoanID] JOIN
(SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]),
[ReceivedAmount] = SUM([ReceivedInterestAmount])
FROM
[dbo].[INV_LoanPIKInterestAccrual] iffa
GROUP BY [iffa].[SectionID])
dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
(SELECT [AmountDue]
= [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND
[dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
LEFT JOIN
(SELECT [PastDueAmount]
= SUM([PastDueInterestAmount]), [SectionID]
FROM
[dbo].[INV_LoanPIKInterestAccrual]
GROUP BY [SectionID]) pastdue
ON [dates].[SectionID] = [pastdue].[SectionID] -
Fill in a PDF Form from source code.
Hello:
I have a PDF form made with LiveCycle. This form read the data from a xml file. I'm trying to fill it programatically but i don't know how. I'd like to know if there is some way to do this action, from source code or with a command line.
Thanks a lot.iText is an API which has the PDF edit capabilities.
Read this link : http://www.itextpdf.com/
If you have Adobe LiveCycle Forms ES/ES2 solution component, you need not go for iText; Instead, you can invoke the LC APIs through C#.net and merge the XML data into the PDF.
If you would go with option#2, let me know. I will share you my ideas.
Nith -
Retreiving all SQL source codes from forms
Hi,
Does anyone know how to retrieve source codes ( trigers,
procedures, etc.) from forms to put into a txt file ? I know I
can use the export option from the PL/SQL editor for individual
triger or procedure, but is there a way to retrieve all SQLs
from the form just at one time ?
Your help is very appreciated.
Thanks
JessicaU can get a document of the Form in a text file. This will
contain all Objects properties, Triggers etc.To do this:
1. Open the Form Builder and the Form u want to document.
2. File - Administration - Object List Report.
Hope this helps. -
Differences between two form source's
Is it possible to show the code differences between two fmb's using PVCS ? Or is there some other method of doing this?
Using Object list report in Oracle forms 6i , you can create a txt version of the form and compare these using a diff, but this is not an accurate method.I am using the FormsTool V1.0 from the previously mentioned http://www.orcl-toolbox.com This is a great tool for doing diffs on Forms and Reports. It has saved me several times in the past. Never had the need for the replace functionality but I am sure it is just a matter of time.
Also great for doing impact analysis when someone wants to change something and wants to know how many forms/reports are impacted.
Well worth having a copy for the $200 cost. No I do not work for orcl-toolbox ;-)
Bob.
Message was edited by:
Bob C -
I don't if i post it in the correct forum.
I am trying to find a way to break up a sources code so that it can be interpreted in the form of methods,fields,constructors so that i can exact out the information, like how Netbeans extract the information.
Any one can help ?This could mean one of two things:
1) Format source so that it is easy to parse as you described.
That is easy. Just prepend comments like /*CONSTRUCTOR*/ and have your parser look for those.
2) Parse ANY source file.
Well.. obviously the compiler knows the difference, which should make it obvious that you can devise a set of rules that does so (like, if the method name is the same as the class name, it is counted as a constructor... if it is prepended with a primitive type or class name it is obviously a variable and not a method, etc.). But that is going to be a world class pain in the neck.
This is assuming that you want to break up the actual source using a parser. If you are happy just getting the method signatures and so forth you can use reflection.
Why in the world would you need to do this?
Drake -
Report for downloading the source code of a Program
Hi.
Need a code to download the source code of a Program in a text file and all the includes of that program in a separate coressponding files. <b>This should be with scan and read report statements.It should be with classe CL_GUI_FRONTEND_SERVICES but not with function modules.</b>
Thanks in advance.
Regards,
AshaHi Asha
Use the below program for your purpose.
Report: ZKBPROGS *
Function : Up/Download ABAP reports complete with texts *
Change Log : *
July 5, 1999 *
- Combined existing programs that did the upload and download into*
- one program. *
- Changed format that the reports are saved in to be compatible *
with Wolfgang Morgenthaler's upload/download program(YSTRASN00 *
at www.antarcon.de). Major differences between this program and*
Wolfgang's are:
- this program does not update TRDIR with the *
TRDIR entries that are in the program uploaded. Instead, *
current users stats are used. *
- this program allows selection of reports from a list or *
a single report can be tuped in and uploaded *
- this program also updates TADIR so that a development class*
is assigned to the program *
- this program checks to see if the program already has a *
TRDIR entry, and if it does, warns the user *
- this program will save/restore the program documenation too*
REPORT ZKBPROGS
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Declare Database Objects *
tables:
DOKIL,
TRDIR.
Constants*
CONSTANTS:
MC_TRDIR_IDENTIFIER(72) TYPE C VALUE '%&%& RDIR',
MC_REPORT_IDENTIFIER(72) TYPE C VALUE '%&%& REPO',
MC_TEXT_IDENTIFIER(72) TYPE C VALUE '%&%& TEXP',
MC_THEAD_IDENTIFIER(72) TYPE C VALUE '%&%& HEAD',
MC_DOC_IDENTIFIER(72) TYPE C VALUE '%&%& DOKL',
MC_TRDIR_SHORT(4) TYPE C VALUE 'RDIR',
MC_REPORT_SHORT(4) TYPE C VALUE 'REPO',
MC_TEXT_SHORT(4) TYPE C VALUE 'TEXP',
MC_THEAD_SHORT(4) TYPE C VALUE 'HEAD',
MC_DOC_SHORT(4) TYPE C VALUE 'DOKP'.
Declare Module level data structures *
DATA: BEGIN OF MTAB_PROGRAM_SOURCE OCCURS 0,
LINE(72) TYPE C,
END OF MTAB_PROGRAM_SOURCE.
DATA: MTAB_PROGRAM_TRDIR LIKE TRDIR OCCURS 0 WITH HEADER LINE.
DATA: MTAB_PROGRAM_TEXTS LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
DATA: MSTR_THEAD LIKE THEAD.
DATA: BEGIN OF MTAB_PROGRAM_FILE OCCURS 0,
LINE(275) TYPE C,
END OF MTAB_PROGRAM_FILE.
DATA: BEGIN OF MTAB_DIRECTORY OCCURS 0,
NAME LIKE TRDIR-NAME,
DESC(72) TYPE C,
SAVENAME LIKE RLGRAP-FILENAME,
END OF MTAB_DIRECTORY.
DATA: BEGIN OF MTAB_PROGRAM_DOCUMENTATION OCCURS 0,
LINE(255) TYPE C,
END OF MTAB_PROGRAM_DOCUMENTATION.
Selection Screen *
*-- Options for upload/download of programs
SELECTION-SCREEN BEGIN OF BLOCK FRM_OPTIONS WITH FRAME TITLE TEXT-UDL.
PARAMETERS:
RB_DOWN RADIOBUTTON GROUP UDL DEFAULT 'X'. " Download reports
SELECTION-SCREEN BEGIN OF BLOCK FRM_TRDIR WITH FRAME TITLE TEXT-DIR.
SELECT-OPTIONS:
S_NAME FOR TRDIR-NAME, " Program Name
S_SUBC FOR TRDIR-SUBC " Program Type
DEFAULT 'F' OPTION EQ SIGN E," Exclude Functions by default
S_CNAM FOR TRDIR-CNAM " Created by
DEFAULT SY-UNAME,
S_UNAM FOR TRDIR-UNAM, " Last Changed by
S_CDAT FOR TRDIR-CDAT, " Creation date
S_UDAT FOR TRDIR-UDAT. " Last update date
SELECTION-SCREEN END OF BLOCK FRM_TRDIR.
*-- Options for uploading programs
PARAMETERS:
RB_UP RADIOBUTTON GROUP UDL. " Upload reports
SELECTION-SCREEN BEGIN OF BLOCK FRM_UPLOAD WITH FRAME TITLE TEXT-UPL.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(29) TEXT-SNG.
PARAMETERS:
RB_FILE RADIOBUTTON GROUP HOW DEFAULT 'X'.
SELECTION-SCREEN COMMENT 33(42) TEXT-FNA.
SELECTION-SCREEN END OF LINE.
PARAMETERS:
RB_LIST RADIOBUTTON GROUP HOW.
SELECTION-SCREEN END OF BLOCK FRM_UPLOAD.
SELECTION-SCREEN END OF BLOCK FRM_OPTIONS.
*-- Options for up/downloading programs
SELECTION-SCREEN BEGIN OF BLOCK FRM_FILEN WITH FRAME TITLE TEXT-FIL.
PARAMETERS:
RB_DOS RADIOBUTTON GROUP FIL DEFAULT 'X', " Save to local
RB_UNIX RADIOBUTTON GROUP FIL, " Save to UNIX
P_PATH LIKE RLGRAP-FILENAME " Path to save files to
DEFAULT 'c:\temp\'.
SELECTION-SCREEN END OF BLOCK FRM_FILEN.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-LOW.
CALL FUNCTION 'F4_PROGRAM'
EXPORTING
OBJECT = S_NAME-LOW
SUPPRESS_SELECTION = 'X'
IMPORTING
RESULT = S_NAME-LOW
EXCEPTIONS
OTHERS = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-HIGH.
CALL FUNCTION 'F4_PROGRAM'
EXPORTING
OBJECT = S_NAME-HIGH
SUPPRESS_SELECTION = 'X'
IMPORTING
RESULT = S_NAME-HIGH
EXCEPTIONS
OTHERS = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-LOW.
PERFORM GET_NAME USING 'S_UNAM-LOW'
CHANGING S_UNAM-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-HIGH.
PERFORM GET_NAME USING 'S_UNAM-HIGH'
CHANGING S_UNAM-HIGH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-LOW.
PERFORM GET_NAME USING 'S_CNAM-LOW'
CHANGING S_CNAM-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-HIGH.
PERFORM GET_NAME USING 'S_CNAM-HIGH'
CHANGING S_CNAM-HIGH.
TOP-OF-PAGE.
IF RB_LIST = 'X'.
FORMAT COLOR COL_HEADING.
NEW-LINE.
WRITE: AT 3 TEXT-H01,
AT 15 TEXT-H03.
FORMAT COLOR OFF.
ENDIF.
AT LINE-SELECTION.
CHECK RB_LIST = 'X'. " only do in list mode
READ LINE SY-CUROW FIELD VALUE MTAB_DIRECTORY-SAVENAME.
*-- Read file into an internal table
PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
USING MTAB_DIRECTORY-SAVENAME.
*-- Split table into TADIR entry, report lines, and report text
PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
CHANGING TRDIR
MSTR_THEAD.
*-- Save all of the data
PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
USING TRDIR
MSTR_THEAD.
Start of processing *
START-OF-SELECTION.
FORMAT COLOR COL_NORMAL.
IF RB_DOWN = 'X'.
PERFORM DOWNLOAD_REPORTS.
ELSEIF RB_UP = 'X'.
PERFORM UPLOAD_REPORTS.
ENDIF.
END-OF-SELECTION.
IF RB_DOWN = 'X'.
CONCATENATE P_PATH
'directory.txt'
INTO P_PATH.
PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_DIRECTORY
USING P_PATH.
ENDIF.
FORM UPLOAD_REPORTS *
FORM UPLOAD_REPORTS.
*-- Can upload a reports entered in selection criteria or
*-- select from a list. List can be from index.txt in same directory
*-- (created by the download) or by reading the first line of each file
*-- in the directory.
IF RB_FILE = 'X'. " Upload single program from a file
*-- Read file into an internal table
PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
USING P_PATH.
*-- Split table into TADIR entry, report lines, and report text
PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
CHANGING TRDIR
MSTR_THEAD.
*-- Save all of the data
PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
USING TRDIR
MSTR_THEAD.
ELSEIF RB_LIST = 'X'. " Show list for user to choose from
*-- get list of report names/descriptions from directory text
CONCATENATE P_PATH
'directory.txt'
INTO P_PATH.
PERFORM READ_REPORT_FROM_DISK TABLES MTAB_DIRECTORY
USING P_PATH.
SORT MTAB_DIRECTORY.
*-- Write out list of report names/descriptions
LOOP AT MTAB_DIRECTORY.
WRITE:
/ MTAB_DIRECTORY-NAME UNDER TEXT-H01,
MTAB_DIRECTORY-DESC UNDER TEXT-H03,
MTAB_DIRECTORY-SAVENAME.
ENDLOOP.
*-- Process user selections for reports to upload.
ENDIF.
ENDFORM. " upload_reports
FORM DOWNLOAD_REPORTS *
From the user selections, get all programs that meet the *
criteria, and save them in ftab_program_directory. *
Also save the report to disk. *
FORM DOWNLOAD_REPORTS.
DATA:
LC_FULL_FILENAME LIKE RLGRAP-FILENAME.
*-- The table is put into an internal table because the program will
*-- abend if multiple transfers to a dataset occur within a SELECT/
*-- ENDSELCT (tested on 3.1H)
SELECT * FROM TRDIR
INTO TABLE MTAB_PROGRAM_TRDIR
WHERE NAME IN S_NAME
AND SUBC IN S_SUBC
AND CNAM IN S_CNAM
AND UNAM IN S_UNAM
AND CDAT IN S_CDAT
AND UDAT IN S_UDAT.
LOOP AT MTAB_PROGRAM_TRDIR.
*-- Clear out text and source code tables
CLEAR:
MTAB_PROGRAM_FILE,
MTAB_PROGRAM_SOURCE,
MTAB_PROGRAM_TEXTS,
MTAB_PROGRAM_DOCUMENTATION.
REFRESH:
MTAB_PROGRAM_FILE,
MTAB_PROGRAM_SOURCE,
MTAB_PROGRAM_TEXTS,
MTAB_PROGRAM_DOCUMENTATION.
*-- Get the report
READ REPORT MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_SOURCE.
*-- Get the text for the report
READ TEXTPOOL MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_TEXTS.
*-- Get the documentation for the report
CLEAR DOKIL.
SELECT * UP TO 1 ROWS FROM DOKIL
WHERE ID = 'RE'
AND OBJECT = MTAB_PROGRAM_TRDIR-NAME
AND LANGU = SY-LANGU
AND TYP = 'E'
ORDER BY VERSION DESCENDING.
ENDSELECT.
*-- Documentation exists for this object
IF SY-SUBRC = 0.
CALL FUNCTION 'DOCU_READ'
EXPORTING
ID = DOKIL-ID
LANGU = DOKIL-LANGU
OBJECT = DOKIL-OBJECT
TYP = DOKIL-TYP
VERSION = DOKIL-VERSION
IMPORTING
HEAD = MSTR_THEAD
TABLES
LINE = MTAB_PROGRAM_DOCUMENTATION
EXCEPTIONS
OTHERS = 1.
ENDIF.
*-- Put the report code and texts into a single file
*-- Put the identifier line in so that the start of the TRDIR line
*-- is marked
CONCATENATE MC_TRDIR_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the TRDIR line
MTAB_PROGRAM_FILE-LINE = MTAB_PROGRAM_TRDIR.
APPEND MTAB_PROGRAM_FILE.
*-- Put the identifier line in so that the start of the report code
*-- is marked
CONCATENATE MC_REPORT_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the report code
LOOP AT MTAB_PROGRAM_SOURCE.
MTAB_PROGRAM_FILE = MTAB_PROGRAM_SOURCE.
APPEND MTAB_PROGRAM_FILE.
ENDLOOP.
*-- Put the identifier line in so that the start of the report text
*-- is marked
CONCATENATE MC_TEXT_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the report texts
LOOP AT MTAB_PROGRAM_TEXTS.
MTAB_PROGRAM_FILE = MTAB_PROGRAM_TEXTS.
APPEND MTAB_PROGRAM_FILE.
ENDLOOP.
*-- Put the identifier line in so that the start of the THEAD record
*-- is marked
CONCATENATE MC_THEAD_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
MTAB_PROGRAM_FILE = MSTR_THEAD.
APPEND MTAB_PROGRAM_FILE.
*-- Put the identifier line in so that the start of the report
*-- documentation is marked
CONCATENATE MC_DOC_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the report documentation
LOOP AT MTAB_PROGRAM_DOCUMENTATION.
MTAB_PROGRAM_FILE = MTAB_PROGRAM_DOCUMENTATION.
APPEND MTAB_PROGRAM_FILE.
ENDLOOP.
*-- Make the fully pathed filename that report will be saved to
CONCATENATE P_PATH
MTAB_PROGRAM_TRDIR-NAME
'.txt'
INTO LC_FULL_FILENAME.
PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_PROGRAM_FILE
USING LC_FULL_FILENAME.
*-- Write out message with Program Name/Description
READ TABLE MTAB_PROGRAM_TEXTS WITH KEY ID = 'R'.
IF SY-SUBRC = 0.
MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
MTAB_DIRECTORY-DESC = MTAB_PROGRAM_TEXTS-ENTRY.
MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
APPEND MTAB_DIRECTORY.
WRITE: / MTAB_PROGRAM_TRDIR-NAME,
MTAB_PROGRAM_TEXTS-ENTRY(65) COLOR COL_HEADING.
ELSE.
MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
MTAB_DIRECTORY-DESC = 'No description available'.
MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
APPEND MTAB_DIRECTORY.
WRITE: / MTAB_PROGRAM_TRDIR-NAME.
ENDIF.
ENDLOOP.
ENDFORM. " BUILD_PROGRAM_DIRECTORY
FORM SAVE_TABLE_TO_FILE *
--> FTAB_TABLE *
--> F_FILENAME *
FORM SAVE_TABLE_TO_FILE TABLES FTAB_TABLE
USING F_FILENAME.
IF RB_DOS = 'X'. " Save file to presentation server
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = F_FILENAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = FTAB_TABLE
EXCEPTIONS
OTHERS = 4.
IF SY-SUBRC NE 0.
WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
F_FILENAME COLOR COL_NEGATIVE.
ENDIF.
ELSE. " Save file to application server
OPEN DATASET F_FILENAME FOR OUTPUT IN TEXT MODE.
IF SY-SUBRC = 0.
LOOP AT FTAB_TABLE.
TRANSFER FTAB_TABLE TO F_FILENAME.
IF SY-SUBRC NE 0.
WRITE: / 'Error writing record to file;' COLOR COL_NEGATIVE,
F_FILENAME COLOR COL_NEGATIVE.
ENDIF.
ENDLOOP.
ELSE.
WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
F_FILENAME COLOR COL_NEGATIVE.
ENDIF.
ENDIF. " End RB_DOS
ENDFORM. " SAVE_PROGRAM
FORM READ_REPORT_FROM_DISK *
Read report into internal table. Can read from local or *
remote computer *
FORM READ_REPORT_FROM_DISK TABLES FTAB_TABLE
USING F_FILENAME.
DATA:
LC_MESSAGE(128) TYPE C.
CLEAR FTAB_TABLE.
REFRESH FTAB_TABLE.
IF RB_DOS = 'X'.
TRANSLATE F_FILENAME USING '/\'. " correct slash for Dos PC file
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = F_FILENAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = FTAB_TABLE
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
IF SY-SUBRC >< 0.
WRITE: / 'Error reading file from local PC' COLOR COL_NEGATIVE.
ENDIF.
ELSEIF RB_UNIX = 'X'.
TRANSLATE F_FILENAME USING '\/'. " correct slash for unix
OPEN DATASET F_FILENAME FOR INPUT MESSAGE LC_MESSAGE IN TEXT MODE.
IF SY-SUBRC = 0.
DO.
READ DATASET F_FILENAME INTO FTAB_TABLE.
IF SY-SUBRC = 0.
APPEND FTAB_TABLE.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET F_FILENAME.
ELSE.
WRITE: / 'Error reading file from remote computer'
COLOR COL_NEGATIVE,
/ LC_MESSAGE,
/ F_FILENAME.
SY-SUBRC = 4.
ENDIF.
ENDIF.
ENDFORM. " READ_REPORT_FROM_DISK
FORM SPLIT_INCOMING_FILE *
--> FTAB_PROGRAM_FILE *
--> FTAB_PROGRAM_SOURCE *
--> ` *
--> FTAB_PROGRAM_TEXTS *
FORM SPLIT_INCOMING_FILE TABLES FTAB_PROGRAM_FILE
STRUCTURE MTAB_PROGRAM_FILE
FTAB_PROGRAM_SOURCE
STRUCTURE MTAB_PROGRAM_SOURCE
FTAB_PROGRAM_TEXTS
STRUCTURE MTAB_PROGRAM_TEXTS
FTAB_PROGRAM_DOCUMENTATION
STRUCTURE MTAB_PROGRAM_DOCUMENTATION
CHANGING FSTR_TRDIR
FSTR_THEAD.
DATA:
LC_DATATYPE(4) TYPE C, " Type of data, REPO, TEXP, RDIR
LC_PROGRAM_FILE LIKE MTAB_PROGRAM_FILE.
LOOP AT FTAB_PROGRAM_FILE.
LC_PROGRAM_FILE = FTAB_PROGRAM_FILE.
CASE LC_PROGRAM_FILE(9).
WHEN MC_TRDIR_IDENTIFIER.
LC_DATATYPE = MC_TRDIR_SHORT.
WHEN MC_REPORT_IDENTIFIER.
LC_DATATYPE = MC_REPORT_SHORT.
WHEN MC_TEXT_IDENTIFIER.
LC_DATATYPE = MC_TEXT_SHORT.
WHEN MC_DOC_IDENTIFIER.
LC_DATATYPE = MC_DOC_SHORT.
WHEN MC_THEAD_IDENTIFIER.
LC_DATATYPE = MC_THEAD_SHORT.
WHEN OTHERS. " Actual contents of report, trdir, or text
CASE LC_DATATYPE.
WHEN MC_TRDIR_SHORT.
FSTR_TRDIR = FTAB_PROGRAM_FILE.
WHEN MC_REPORT_SHORT.
FTAB_PROGRAM_SOURCE = FTAB_PROGRAM_FILE.
APPEND FTAB_PROGRAM_SOURCE.
WHEN MC_TEXT_SHORT.
FTAB_PROGRAM_TEXTS = FTAB_PROGRAM_FILE.
APPEND FTAB_PROGRAM_TEXTS.
WHEN MC_THEAD_SHORT.
FSTR_THEAD = FTAB_PROGRAM_FILE.
WHEN MC_DOC_SHORT.
FTAB_PROGRAM_DOCUMENTATION = FTAB_PROGRAM_FILE.
APPEND FTAB_PROGRAM_DOCUMENTATION.
ENDCASE.
ENDCASE.
ENDLOOP.
ENDFORM. " SPLIT_INCOMING_FILE
FORM INSERT_NEW_REPORT*
--> FTAB_PROGRAM_SOURCE *
--> FTAB_PROGRAM_TEXTS *
--> F_TRDIR *
FORM INSERT_NEW_REPORT TABLES FTAB_PROGRAM_SOURCE
STRUCTURE MTAB_PROGRAM_SOURCE
FTAB_PROGRAM_TEXTS
STRUCTURE MTAB_PROGRAM_TEXTS
FTAB_PROGRAM_DOCUMENTATION
STRUCTURE MTAB_PROGRAM_DOCUMENTATION
USING FSTR_TRDIR LIKE TRDIR
FSTR_THEAD LIKE MSTR_THEAD.
DATA:
LC_OBJ_NAME LIKE E071-OBJ_NAME,
LC_LINE2(40) TYPE C,
LC_ANSWER(1) TYPE C.
*-- read trdir to see if the report already exists, if it does, prompt
*-- user to overwrite or abort.
SELECT SINGLE * FROM TRDIR WHERE NAME = FSTR_TRDIR-NAME.
IF SY-SUBRC = 0. " Already exists
CONCATENATE 'want to overwrite report'
FSTR_TRDIR-NAME
INTO LC_LINE2 SEPARATED BY SPACE.
CONCATENATE LC_LINE2
INTO LC_LINE2.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
DEFAULTOPTION = 'N'
TEXTLINE1 = 'The selected report already exists, do you'
TEXTLINE2 = LC_LINE2
TITEL = 'Report already exists'
CANCEL_DISPLAY = SPACE
IMPORTING
ANSWER = LC_ANSWER
EXCEPTIONS
OTHERS = 1.
ELSE.
LC_ANSWER = 'J'.
ENDIF.
IF LC_ANSWER = 'J'.
*-- Create the TADIR entry. (TRDIR entry created by INSERT REPORT)
LC_OBJ_NAME = TRDIR-NAME.
CALL FUNCTION 'TR_TADIR_POPUP_ENTRY_E071'
EXPORTING
WI_E071_PGMID = 'R3TR'
WI_E071_OBJECT = 'PROG'
WI_E071_OBJ_NAME = LC_OBJ_NAME
WI_TADIR_DEVCLASS = '$TMP'
EXCEPTIONS
EXIT = 3
OTHERS = 4.
IF SY-SUBRC = 0.
*-- Create Report
INSERT REPORT FSTR_TRDIR-NAME FROM FTAB_PROGRAM_SOURCE.
*-- Create Texts
INSERT TEXTPOOL FSTR_TRDIR-NAME FROM FTAB_PROGRAM_TEXTS
LANGUAGE SY-LANGU.
*-- Save Documentation
CALL FUNCTION 'DOCU_UPDATE'
EXPORTING
HEAD = FSTR_THEAD
STATE = 'A'
TYP = 'E'
VERSION = '1'
TABLES
LINE = FTAB_PROGRAM_DOCUMENTATION
EXCEPTIONS
OTHERS = 1.
ELSE.
WRITE: / 'Error updating the TADIR entry' COLOR COL_NEGATIVE,
'Program' COLOR COL_NEGATIVE INTENSIFIED OFF,
FSTR_TRDIR-NAME, 'was not loaded into SAP.'
COLOR COL_NEGATIVE INTENSIFIED OFF.
ENDIF.
ELSE.
WRITE: / FSTR_TRDIR-NAME COLOR COL_NEGATIVE,
'was not uploaded into SAP. Action cancelled by user'
COLOR COL_NEGATIVE INTENSIFIED OFF.
ENDIF.
ENDFORM. " INSERT_NEW_REPORT
FORM GET_NAME *
--> VALUE(F_FIELD) *
--> F_NAME *
FORM GET_NAME USING VALUE(F_FIELD)
CHANGING F_NAME.
DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
LC_PROG LIKE D020S-PROG,
LC_DNUM LIKE D020S-DNUM.
TRANSLATE F_FIELD TO UPPER CASE.
refresh ltab_fields.
LTAB_FIELDS-FIELDNAME = F_FIELD.
append ltab_fields.
LC_PROG = SY-REPID .
LC_DNUM = SY-DYNNR .
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = LC_PROG
DYNUMB = LC_DNUM
TABLES
dynpfields = ltab_fields
EXCEPTIONS
OTHERS = 01.
read table ltab_fields index 1.
IF SY-SUBRC EQ 0.
F_NAME = LTAB_FIELDS-FIELDVALUE.
refresh ltab_fields.
ENDIF.
CALL FUNCTION 'F4_USER'
EXPORTING
OBJECT = F_NAME
IMPORTING
RESULT = F_NAME.
ENDFORM. " GET_NAME
Regards,
Sree -
Java Source Code to UML Class Diagram
Can anyone tell me exactly which kinds of relationships may be identified for a UML CLass diagram, directly from 'static' source code..
Note that I am developing my own case tool which will convert from java to uml..
At the moment, I have only managed to get Inheritance and Association relationships..
Where Association is identified by looking at the types of all variables belonging to a class (excluding method variables etc) and if the type of the variable is non-primitive, than I have deduced it is an association relationship with that class.
Would this be the right approach?
Secondly I have noticed in JBuilder, it models dependency relationships by getting all the Imports at the top of the java source file, is this right?? also I have read that a dependency can be modelled by the variable types in operation arguments (paremeterS ?)..
I would also appreciate if someone could clarify the difference betweeen Composition and Aggregation for me and explain if it is possible to identify the two relationships directly from java source code..
Last but not least, what about multiplicity ? am I right in thinking that an instance variable is 0-1, an array declaration is seen as 0-n (fixed number) and a Vector/ data collection.. is seen as 0 - * (any number)..
Thanks for any help,
Regards
Tony.although this post is way old it could do with a decent answer.
some guidance can be taken from JSR26: UML Mapping for EJB
find it a www.jcp.org
also this research paper on consistency of reverse engineering between uml tools
http://citeseer.nj.nec.com/545406.html
Where Association is identified by looking at the types of all variables belonging >to a class (excluding method variables etc) and if the type of the variable is >non-primitive, than I have deduced it is an association relationship with that >class.
Would this be the right approach?Yes. You could also say that if it is a java.* type then it would also be an attribute.
Secondly I have noticed in JBuilder, it models dependency relationships by getting >all the Imports at the top of the java source file, is this right?? also I have >read that a dependency can be modelled by the variable types in operation >arguments (paremeterS ?)..JBuilder would be consistent with JSR26, and that's how i intend to implement in ArgoUml.
I would also appreciate if someone could clarify the difference betweeen >Composition and Aggregation for me and explain if it is possible to identify the >two relationships directly from java source code..Composition is a stronger form of ownership. the composed class is owned only by 1 class. Its lifetime is strongly linked to its owner - ie. it is not created before its owner and it is destroyed before its owner is.
eg. leg of a table.
Agregation is weak ownership. the owned class may be owned by several classes.
eg. a company is owned by many shareholders.
Last but not least, what about multiplicity ? am I right in thinking that an >instance variable is 0-1, an array declaration is seen as 0-n (fixed number) and a >Vector/ data collection.. is seen as 0 - * (any number)..sound right.
Alex -
Sample PL/SQL Portlet Source Code for Oracle Portal 9ias
Hi, I'm a newbie of Oracle Portal technology, and I have a problem:
I would create a PL/SQL portlet that realizes the following functions:
1) Retrieve the username of the portal user logged from WWCTX_API.GET_USER function.
2) Insert into an oracle db table two values about two hidden fields in the HTML FORM of the portlet.
3) Realize the insert commit through the click on the submit button on the Html form of the portlet. I would redirect by the same button to an other page url also.
I've never developed in Portal, and may be useful if someone could post me the source code of the SHOW MODE SECTION in the PROCEDURE SHOW of a SAMPLE PL/SQL PORTLET that realizes the upper functions.
Thanks a lot....Hi
Here's the code from Helloworld_Portlet example:
procedure show
p_portlet_record wwpro_api_provider.portlet_runtime_record
is
l_portlet wwpro_api_provider.portlet_record;
begin
if (not is_runnable(
p_provider_id => p_portlet_record.provider_id
,p_reference_path => p_portlet_record.reference_path)
) then
raise wwpro_api_provider.PORTLET_SECURITY_EXCEPTION;
end if;
Retrieve the portlet information.
l_portlet := get_portlet_info(
p_provider_id => p_portlet_record.provider_id
,p_language => p_portlet_record.language
if (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW) then
if (p_portlet_record.has_title_region) then
Draw the portlet header and specify what links are available
from that header (i.e. details, customize, help, and about).
The has_title property is set at the page region level.
wwui_api_portlet.draw_portlet_header
p_provider_id => p_portlet_record.provider_id
,p_portlet_id => p_portlet_record.portlet_id
,p_title => l_portlet.title
,p_has_details => true
,p_has_edit => true
,p_has_help => true
,p_has_about => true
,p_referencepath => p_portlet_record.reference_path
,p_back_url => p_portlet_record.page_url
end if;
Draw the portlet borders.
The has_border property is set at the page region level.
wwui_api_portlet.open_portlet(p_portlet_record.has_border);
Display the content of the portlet in the show mode.
Use the wwui_api_portlet.portlet_text() API when
generating the content of the portlet so that the
output uses the portlet CSS.
htp.p(wwui_api_portlet.portlet_text(
p_string => 'Hello World - Mode Show'
,p_level => 1
if (p_portlet_record.has_border) then
wwui_api_portlet.close_portlet;
end if;
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_ABOUT) then
Display the about page for the portlet.
htp.p('Hello World - Mode Show About');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT) then
Display the edit page for the portlet.
htp.p('Hello World - Mode Show Edit');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_HELP) then
Display the help page for the portlet.
htp.p('Hello World - Mode Show Help');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT_DEFAULTS) then
Display the edit defaults page for the portlet.
htp.p('Hello World - Mode Edit Defaults');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_DETAILS) then
Display the details page for the portlet.
htp.p('Hello World - Mode Show Details');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_PREVIEW) then
Display the preview page for the portlet.
htp.p('Hello World - Mode Show Preview');
end if;
end show;
I think you need to add this:
You can get the values of your html-form with this command:
v_hidden_1 varchar2(256);
v_hidden_2 varchar2(256);
v_hidden_1 := wwpro_api_parameters.get_value('name_of_hidden_1_in_html_form','p');
v_hidden_2 := wwpro_api_parameters.get_value('name_of_hidden_2_in_html_form','p');
You can get the actual URL with this command:
v_url := p_portlet_record.page_url;
Hope that helps.
Regards,
Mark -
Sample source code (fmb)
I am new in oracle development. I need sample code for oracle 10g forms builder.
I notice that This is the thing which is not even in the knowledge of Google.
I am wondering that why oracle forms's source code is not available on web. while if we talk about other tools like .net or php! thousands of sample codes are available for almost all kind of the requirements to do a job.
I shall be very thankful if someone provide me some sample codes (fmb, rdf etc)
ThanksHi
Oh yes i do agree with cris u can also search for video samples it's available specially for beginners,but pls notice one thing that PHP is an Open Source like Java and yes .net is also very common it only needs trust & a little light of hope that u can get it :)
Well for me i can provide u with such sites of Oracle as tutorials besides the sites that InoL & Chris had provided like
iSelfSchooling ....
Oracle PL/SQL – Forms samples for François Degrelle
Forms samples for Andreas Weiden ....
For the tutorials
Oracle Forms Developer ....
A Tutorial on Oracle9i Forms and Reports
Pls have a look here for Oracle Forms 11g Release 1 (11.1.1) Documentation ... & Oracle Forms 10g(10.1.2) Documentation.
Hope this helps...
Regards,
Amatu Allah. -
Need sample source code for calling stored procedure in Oracle
Hi.
I try to call stored procedure in oracle using JCA JDBC.
Anybody have sample source code for that ?
Regards, Arnold.Thank you very much for a very quick reply. It worked, but I have an extended problem for which I would like to have a solution. Thank you very much in advance for your help. The problem is described below.
I have the Procedure defined as below in the SFCS1 package body
Procedure Company_Selection(O_Cursor IN OUT T_Cursor)
BEGIN
Open O_Cursor FOR
SELECT CompanyId, CompanyName
FROM Company
WHERE CompanyProvince IN ('AL','AK');
END Company_Selection;
In the Oracle Forms, I have a datablock based on the above stored procedure. When I execute the form and from the menu if I click on Execute Query the data block gets filled up with data (The datablock is configured to display 10 items as a tabular form).
At this point in time, I want to automate the process of displaying the data, hence I created a button and from there I want to call this stored procedure. So, in the button trigger I have the following statements
DECLARE
A SFCS1.T_Cursor;
BEGIN
SFCS1.Company_Selection(A);
go_Block ('Block36');
The cursor goes to the corresponding block, but does not display any data. Can you tell me how to get the data displayed. In the future versions, I'm planning to put variables in the WHERE clause. -
hi
I am fairly new to designing GUI in JAVA . My applicaiton involves a big form with alot of choice list[ around 7 choice list ] which r populated using queries from database and also when an item is selected from the choice list , a query is ran which would refresh the screen with the result of the query ., this query would be based on the items selected in the choice lists.
I tried implementing it, i was able to populate my choice list with the things i need from the DB using the query . but when i just select anything from the choice list, it would throw me a :
java.lang.NullPointerException
I am suprised cause, when i select from one choice list, i wouldnt get this error. Also i have not written any event .
please help .. really important .... or just suggest me some source code which i can study and learn !!! please ....
Thanks in advancegot to http://www.trash.net/~ffischer/admin
As the GUI is done with swing you will find lots
of examples.
I think the DBComboBox wil lgive you some hints...
..all source is there as well. -
Sample source code for demo application
Can you please kindly provide me source code of the demo application, i need both oracle form which is converted in to adf and also converted adf code it using Forms2adf, it will be a great help to making a decison for oracle form migration
Thank youHi,
I think this thread accurately lists the available options for evaluation of the forms 2 adf migration.
How can i test forms2adf generator?
Regards,
Ruud
Maybe you are looking for
-
SBS 2011 Remote Web Workplace issues not enough memory???
Hi, Were having problems with the RWW website on our SBS 2011 server, users are able to logon, but the connect buttons of the computers are not working, if we click on them nothing happes, no error message, nothing. When a users logs on we see 5 erro
-
Material Confirmation date in future though the material is in stock
Dear Gurus, Please tell me why the system is giving the material confirmation date in future though the matl is available in stock. System creating two schedule lines one for 15/10 (15 oct) and the second one with the confirmation of quantity on 22/
-
Dynamic PL/SQL block vs dynamic SQL SELECT
Hi there, I have a question regarding the optimal way to code a dynamic SELECT INTO statement. Below are the 2 posiibilities I know of: _1. Dynamically executing the SELECT statement and making use of the INTO clause of the EXECUTE IMMEDIATE statemen
-
So in AS2 to add button functionality to a movie clip, you'd type: myButton_mc.onPress=function(){ gotoAndPlay("something"); How is this accomplished in AS3 WITHOUT using external .as files, classes, etc? It seems like all the tutorials/books I read,
-
Oracle Business Process Analysis Suite 10g (10.1.3.3)
Hello, I have some problems with Oracle_BPA_Suite_10.1.3.3. I have installed the 90 days trial version and started to work with it. I wanted to use this product for a while to see how it works, to test it and see the tools included in the suite. I ha