Reuse of existing packages for saving data?

Hi,
I'm pretty new to APEX so I lack the in-depth know-how how to do certain tasks.
We want to build a simple management application for a customer and reuse as much code as possible to keep the price low. For example, there are procedures in packages which do certain business logic and we don't want (and can't do this) to copy and/or modify all this stuff to fit in APEX. This packages accept some IN-parameters and have some OUT-parameters which indicate if the action was successfull or not.
So lets say we have a (dummy-)procedure
pkg_handleData.p_saveData
with following parameters
- inParam1 IN varchar2,
- outParam1 OUT pls_integer
We want to call this packageprocedure after submitting a form (inParam1 => content of a specific formfield) and we want to define our next step after looking at outParam1.
Is there a way to handle this with APEX - and if yes, how? Is there a tutorial out there which describes "advanced" stuff like this? All I found were basic tutorials for people who just want to view/alter data of a table or forms which rely on procedures (but not packageprocedures).
(After working with APEX for some few days now I have to say APEX is somewhat mighty, I really doubt this isn't possible. :))

You can use conditional branching (PL/SQL Function Returning a boolean), but you have to 'wrap' your existing procedures into a function to use that.
Example:
Funtion p_savedata( inparam ) returning boolean
is
p_out pls_integer;
begin
pkg_handledata( inparam, p_out);
return (p_out > 0);
end;

Similar Messages

  • BPC10 - Data manager package for dimension  data export and import

    Dear BPC Expers,
    Need your help.
    I am trying to set up a data manager package for first time to export dimension - master data from one application and import in another application ( both have same properties) .
    I created a test data manager package from Organize > add package > with  process chain /CPMB/EXPORT_MD_TO_FILE  and Add
    In the advance tab of each task there are some script logic already populated. please find attached the details of the script logic written under each of the tasks like MD_Source, concvert and target .
    I have not done any chnages in the script inside the task .
    But when i run the package , I have selected a dimension 'Entity' but in second prompt ,it ask for a transformation file , and syatem autometically add the file ... \ROOT\WEBFOLDERS\COLPAL\FINANCE\DATAMANAGER\TRANSFORMATIONFILES\Import.xls
    I have not changed anything there
    in the next prmpt , it ask for a output file ..and it won't allow me enter the file name .....i
    Not sure how to proceed further.
    I shall be greatfull if someone guide me from your experiance  how to set up a simple the data manager package for master data export from dimension . Should I update the transformation file in the script for import file and  output file in the advance tab. how and what  transformation file to be created and link to the data manager package for export / import .
    What are the steps to be executed to run the package for exporting master data from dimension and import it another application .
    Thanks in advance for your guidance.
    Thanks and Regards,
    Ramanuj
    =====================================================================================================
    Detals of the task
    Task : APPL_MD-SOURCE
    (DIMENSIONMEMBER, %DIMENSIONMEMBERS%, "Please select dimension", "Please select members", %DIMS%)
    (TRANSFORMATION,%TRANSFORMATION%,"Transformation file:",,,Import.xls)
    (OUTFILE,,"Please enter an output file",Data files (*.txt)|*.txt|All files(*.*)|*.*)
    (RADIOBUTTON,%ADDITIONINFO%,"Add other information(Environment,Model,User,Time)?",1,{"Yes","No"},{"1","0"})
    (%TEMPNO1%,%INCREASENO%)
    (%TEMPNO2%,%INCREASENO%)
    (/CPMB/APPL_MD_SOURCE,SELECTION,%DIMENSIONMEMBERS%)
    (/CPMB/APPL_MD_SOURCE,OUTPUTNO,%TEMPNO1%)
    (/CPMB/EXPORT_MD_CONVERT,INPUTNO,%TEMPNO1%)
    (/CPMB/EXPORT_MD_CONVERT,TRANSFORMATIONFILEPATH,%TRANSFORMATION%)
    (/CPMB/EXPORT_MD_CONVERT,SUSER,%USER%)
    (/CPMB/EXPORT_MD_CONVERT,SAPPSET,%APPSET%)
    (/CPMB/EXPORT_MD_CONVERT,SAPP,%APP%)
    (/CPMB/EXPORT_MD_CONVERT,OUTPUTNO,%TEMPNO2%)
    (/CPMB/FILE_TARGET,INPUTNO,%TEMPNO2%)
    (/CPMB/FILE_TARGET,FULLFILENAME,%FILE%))
    (/CPMB/FILE_TARGET,ADDITIONALINFO,%ADDITIONINFO%))
    Task : EXPORT_MD_CONVERT
    (DIMENSIONMEMBER, %DIMENSIONMEMBERS%, "Please select dimension", "Please select members", %DIMS%)
    (TRANSFORMATION,%TRANSFORMATION%,"Transformation file:",,,Import.xls)
    (OUTFILE,,"Please enter an output file",Data files (*.txt)|*.txt|All files(*.*)|*.*)
    (RADIOBUTTON,%ADDITIONINFO%,"Add other information(Environment,Model,User,Time)?",1,{"Yes","No"},{"1","0"})
    (%TEMPNO1%,%INCREASENO%)
    (%TEMPNO2%,%INCREASENO%)
    (/CPMB/APPL_MD_SOURCE,SELECTION,%DIMENSIONMEMBERS%)
    (/CPMB/APPL_MD_SOURCE,OUTPUTNO,%TEMPNO1%)
    (/CPMB/EXPORT_MD_CONVERT,INPUTNO,%TEMPNO1%)
    (/CPMB/EXPORT_MD_CONVERT,TRANSFORMATIONFILEPATH,%TRANSFORMATION%)
    (/CPMB/EXPORT_MD_CONVERT,SUSER,%USER%)
    (/CPMB/EXPORT_MD_CONVERT,SAPPSET,%APPSET%)
    (/CPMB/EXPORT_MD_CONVERT,SAPP,%APP%)
    (/CPMB/EXPORT_MD_CONVERT,OUTPUTNO,%TEMPNO2%)
    (/CPMB/FILE_TARGET,INPUTNO,%TEMPNO2%)
    (/CPMB/FILE_TARGET,FULLFILENAME,%FILE%))
    (/CPMB/FILE_TARGET,ADDITIONALINFO,%ADDITIONINFO%))
    Task : FILE_TARGET
    (DIMENSIONMEMBER, %DIMENSIONMEMBERS%, "Please select dimension", "Please select members", %DIMS%)
    (TRANSFORMATION,%TRANSFORMATION%,"Transformation file:",,,Import.xls)
    (OUTFILE,,"Please enter an output file",Data files (*.txt)|*.txt|All files(*.*)|*.*)
    (RADIOBUTTON,%ADDITIONINFO%,"Add other information(Environment,Model,User,Time)?",1,{"Yes","No"},{"1","0"})
    (%TEMPNO1%,%INCREASENO%)
    (%TEMPNO2%,%INCREASENO%)
    (/CPMB/APPL_MD_SOURCE,SELECTION,%DIMENSIONMEMBERS%)
    (/CPMB/APPL_MD_SOURCE,OUTPUTNO,%TEMPNO1%)
    (/CPMB/EXPORT_MD_CONVERT,INPUTNO,%TEMPNO1%)
    (/CPMB/EXPORT_MD_CONVERT,TRANSFORMATIONFILEPATH,%TRANSFORMATION%)
    (/CPMB/EXPORT_MD_CONVERT,SUSER,%USER%)
    (/CPMB/EXPORT_MD_CONVERT,SAPPSET,%APPSET%)
    (/CPMB/EXPORT_MD_CONVERT,SAPP,%APP%)
    (/CPMB/EXPORT_MD_CONVERT,OUTPUTNO,%TEMPNO2%)
    (/CPMB/FILE_TARGET,INPUTNO,%TEMPNO2%)
    (/CPMB/FILE_TARGET,FULLFILENAME,%FILE%))
    (/CPMB/FILE_TARGET,ADDITIONALINFO,%ADDITIONINFO%))
    ================================================================================

    1. Perhaps you want to consider a system copy to a "virtual system" for UAT?
    2. Changes in QAS (as with PROD as well) will give you the delta. They should ideally be clean... You need to check the source system.
    Another option is to generate the profiles in the target system. But for that your config has to be sqeaky clean and in sync, including very well maintained and sync'ed Su24 data.
    Cheers,
    Julius

  • Which package for saving a variant of transaction SM30?

    Hello,
    I use SHD0 to create a variant of the transaction SM30. After saving it, I got the dialog to select the package. Z* packages are not allowed, only SAP Packages. Which is the correct package for saving the variant?
    Best regards,
    Alexander

    I create them in SE93.
    Z* Transaction code.  Transaction with variant.
    The transaction is  SM30. 
    The default values are:
    update X or blank for non-edit
    VIEWNAME:  **
    where ** is the name of the table you are maintaining.
    Michelle

  • Working with R packages for Big Data

    Hi ,
    I wonder which R package from it big data an parallel processing family are relevent to work with in ML Studio ?
    It depends on if ML Studio uses Map Reduce during R script ? If yes , RHadoop package seems not useful .
    If using snowfall package for parallel processing will help for high volume datasets . If it will exploit several CPU ?
    Thanks in advance

    Currently, the R scripts are executed on single VM. You can manually set up map-reduce pattern by splitting the data and having multiple Execute R Script modules in parallel in your experiment graph.
    -Roope

  • How to change default number format for saved data in signalexpress

    I cannot find an option for determining format and precision of saved data. By default it is scientific with i think 3 siginificant numbers. How and where to do it?

    Stjepan, it sounds like you're right where I was 2 months ago! Glad to see I'm not the only one struggling w/ SE.
    Here's what I've had to do to control the precision of the data in my ascii file.
    Insert an Amplitudes and Levels step from Analysis>Time Domain Measurements.
    In the A&L settings, deselect Export RMA Value (keep Export DC Value selected).
    Now drag that DC signal from the A&L step into your data view (literally drag and drop this signal  onto the graph). From here you can configure the data view's properties to your likings, I.E, significant digits or digits of precision, floating point, etc.
    I've found that Floating Point,  2 Significant Digits, and uncheck Hide Trailing Zeros to work well (visually speaking).
    Insert your Save to ASCII step after the A&L step, and be sure to save your A&L's DC signal.
    The data will export exactly as it's shown in the display.
    TIP: you can rename your signals from any of the steps. This is handy because it's the renamed channel names that show up in your data headers (much more descriptive when you have multiple channels).
    My apologies if this is all information you already know... 
    Message Edited by OKors on 09-10-2009 10:27 AM
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise

  • Find exact package for saving the workbech request for std SAP object

    Hello friends I have edited a std SAP prog for printing the import PO(got access key from market place).After editing while creating transport request I am not able to find the package to which it should be saved.now the problem is that How to move that program to our quality server.
    the program is
    /1BCDWB/LSF00000063TOP

    Hi achal,
    are you sure you modified a standard SAP object. /1BCDWB/ prefix is common with all quick view reports - they are local and user-specific. You can convert a quickview to query to report. Using a modification key you may add it to the standard - choose a package as you prefer. But better copy the generated query report to customer name space - because it never was and never will be SAP standard. If it is in customer name space, release changes are no problem at all.
    Regards,
    Clemens

  • Best Method for Saving Data to File?

    Hi, 
    We're using labVIEW 2009 to acquire data from our instrument.  In the past we have used the "write to labview measurement file" express configuration tool to save data to a file. However we had some issues with our VI - occasionally we would lose data or column headers somewhat erratically and were never able to sort out the problem. We would like to rewrite our VI with the best possible solution. 
     Here's a summary of what we would like to do:
    Save 30 variables at a rate of roughly 1 Hz. We would like one set of column headers per file so that the data can be easily imported into labVIEW with the variable names intact. We will be collecting data continuously, so we would like to divide the data into 3-4 files per day. Ideally, the program to start new files at the same times from day to day and the filename could be configured to include the date and time/file number.
    I am hoping that users can provide a little feedback about methods that were most successful and reliable. From what I have read there are a few different ways to do this (express VI, tdms, "write to text file"). Any thoughts or relevant examples would be quite useful for us!
    Thanks for your help!

    Meg T wrote:
    Is it correct to say that in your method, the indexing results in building up the data into one large array of data before saving it to the file with the column headers and filenames appended?  If we are writing data at 1Hz for 6 hours of time, will we run into an issue being able to store all the data?
    Yes the indexing will build up one large array.  If this is a problem due to array size and memory, you will have to write more often.  You can write every second, that should not be a problem.  You should still write the column names to the file first, and have the append input set to False (or nothing wired in since the default is false).  This will create a new file with the headers only.  Then the data write has a True wired in so that the append takes place.  If running for 6 hours and gathering data once per second, your array will contain 36,006 rows of data.  I'm not sure if that would cause a memory problem or not.
    Meg T wrote:
     it also seems difficult to incorporate headers into express VI if you are writing the data continuously as a part of a loop with the "append" option.
    If you write the headers before the loop as I have shown, and use append inside the loop, you will not have problems.
    - tbob
    Inventor of the WORM Global

  • OWB Can't Import Existing Package with Collection Data Type as Arguments

    I created a package and compiled it successfully as the follows:
    +++++++++++++++++++++++++++++
    CREATE OR REPLACE PACKAGE PACKAGE_TEST AS
    TYPE Num_LIST IS TABLE of NUMBER INDEX BY BINARY_INTEGER;
    FUNCTION TEST_FUNCTION1 ( arg1 NUMBER, arg2 NUMBER) RETURN NUMBER;
    FUNCTION TEST_FUNCTION2 ( args NUM_LIST) RETURN NUMBER;
    END PACKAGE_TEST;
    CREATE OR REPLACE PACKAGE BODY PACKAGE_TEST AS
    FUNCTION TEST_FUNCTION1 ( arg1 NUMBER, arg2 NUMBER) RETURN NUMBER IS
    ln_sum NUMBER;
    BEGIN
    ln_sum := arg1 + arg2;
         RETURN ln_sum;     
    EXCEPTION
    WHEN OTHERS THEN
    RETURN -10000;     
    END TEST_FUNCTION1;
    FUNCTION TEST_FUNCTION2 ( args NUM_LIST) RETURN NUMBER IS      
         ln_sum NUMBER;
    BEGIN
    ln_sum :=0;
         FOR i IN 1.. args.COUNT LOOP
         ln_sum := ln_sum + args( i );     
         END LOOP;     
         RETURN ln_sum;     
    EXCEPTION
    WHEN OTHERS THEN
    RETURN -10000;     
    END TEST_FUNCTION2;     
    END PACKAGE_TEST;
    ++++++++++++++++++++++++++++++++++++++++
    Then I tried to import the package into OWB (9.2). The problem came: all the package body and
    the specification of TEST_FUNCTION1 were imported, but the package specification of
    TEST_FUNCTION2 couldn't be imported. The IMPORT FILTER gave an error message:
    "TEST_FUNCTION2: Argument Data type is not supported".
    How to resolve this problem? It is very import for our project, since we have to import some
    packages with user_defined collection data types as arguments.
    Thank you.
    Lushu

    Hi Lushu,
    Unfortunately this is indeed not supported and I would not know how to work around this one. The only way I guess that this would work is to not import it, and then use Expressions to call the function with inputs.
    Jean-Pierre

  • Choice of the file for saving data

    I have an appication, I have an sub vi named «Entrées Consignes », Id like save the différentes data which I enter in the list in a file when I click to Modifier Données.I think saving my data but when I open my file , I don't read the good values .
    What I do?
    My second question is, when I enter the differents values in the list, I'd like that when I close this vi and I open again, the same values display instead of zero everywhere.
    Is it possible?
    Thanks a lot for helping me.
    Bye!!
    Attachments:
    Entrées Consignes.vi ‏59 KB

    Les données sont correctement enregistrées, mais pas sous une forme directement lisible avec un éditeur de texte (Word, Excel...). Elle sont codées directement sous forme binaire, et il faut réaliser le décodage inverse pour les retrouver. C'est ce que fait le vi attaché, en demandant la lecture du fichier, et en précisant que les données sont un cluster de 6 nombre flottants en double précision...
    Ce même vi peut d'ailleurs être utilisé pour "recharger" les valeurs des contrôles lors du lancement de votre vi. Mais pour celà, il faut connaître le nom du fichier à relire, et ensuite utiliser des variables locales pour écrire dans les différents contrôles.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Mais_si_il_est_enregistré.zip ‏11 KB

  • Is there and alternativ​e to shift registers for saving data across iterations in a subVI operating inside a loop?

    I am creating a subVI state machine (case structure) which will run inside a while loop which will be executing every 250ms. The reason I wanted to make the state machine case structure into a subVI is because I want to execute 64 of the machines within the same loop. The goal is to monitor certain types of voltage changes on 64 I/O channels on a FP2200 RT module and report periodic details about state changes to a database. My thinking was that by executing each independent machine in the same loop structure, I will only worry about one thread. It seems that the alternative of having one state machine thread per I/O channel is probably more than the RT module can handle. Please correct me if I am wrong on that.
    The issue I'm now having is as I'm creating the state machine, I am finding that I need to keep track of some pieces of data from one loop iteration to the next. This is easy enough to do with shift registers but in order to use them, I have to create additional input nodes to my SubVI as well as output nodes. For example, I want to use a queue to buffer some I/O data but as of now, I have to create this queue outside the loop, pull it into the loop across a shift register, feed it to the subVI, and output it to the out Shift register. It would be better if I didn't have to output this queue because there's no reason for anything to have access to it outside the subVI. It just creates an extra set of wires to look at and makes me worry a bit about maintainability. 
    Is there a better way to approach this problem? 

    You could place a while loop inside your sub vi that has a true constant wired to the stop condition. Then add unitialized shift registers to that while loop to keep data between iterations.
    or you could use a feedback node inside the sub vi

  • Best practice for saving data in SQL server

    Hi all
    Hoping for a little help on this question. 
    If i have a list of fields ex. (name,address,postal,phone etc.). Then i create a webform/task
    to gather some of theese fields (name, postal), then i make another webform/task to gather some other fields (address, phone). 
    What is best practice in the SQL server for storing returning values.
    Is it: 
    1. to make a table with all the fields in the list + taskid. Theese fields could be in
    correct format (number, date etc.). And all answers to all tasks is inserted into this table. 
    2. Make a value table for each field with the correct type + task id. So all name values
    are stored in the "name value table" with the task id.
    How would i select values from a certain task from this kind of setup?
    3. ??
    Best regards
    Bo

    Hi Atul
    Thanks for your reply, can you elaborate a bit further on this, since i am still a little confused. 
    Let me try to explain my scenario at bit more:
    Say instead that it is 50 fields in a table with their own unique ID, maybe an answer table
    would look like this:
    taskid | field_1 | field_2 | field_3 | field 4 | field_n
    So no matter which fields the user fillsout it will can be stored in one table. 
    QUestion is, is this a good way to do it? and how do i select from this table using a join
    As far as i know you cant name columns in a table with just numbers, which would have been
    great, giving the columnnames the field_id.
    OR
    Would you have 50 tables each with a field_id and a value (of correct type) ?
    And could you give me an example of how to bind and select from this kind of structure ?
    Also inserting into 50 tables on a save.... is that the right way to go? :)
    Best regards
    Bo

  • Business Package for Personal Data

    Hi!
    I would like to know what are the Internet Application Component(IAC) to change the following Employee data.
    1. Work Fax number
    2. Work Email
    3. TEX card number
    4. DPC Card Number
    Regards
    Ramesh

    Hi Tim,
    You are right. As Goswami was saying to change that in PZ screens ( I am working with PZ13 screen 200 ) which is having the corresding screen modification that can be done via a view V_T588M_ESS for function group EHU5. Its not possible that way in the webdynpro version I guess.
    Its your way Tim. I don't know how to do this through NWDI. Where can I get that and how can I change this. Please ket me know in detail.
    Thanks,
    Chakri.

  • How can I make triple partition for OSX, Windows 8, and for saving Data

    I read many articles on googles yet I still can't figure out how to.
    The point that I get is when you're installing Windows using bootcamp, before it actually try to install windows, i have to go back to OSX, choose disk utility and create the 3rd partition.
    But after I continue the installation, the windows boot camp partition can't be formatted and worse I can't use the drive to install windows 8.
    Other I read about deleting the recovery partition in order to make it works?
    I don't know .... I tried and I failed many times *sigh*

    1. Boot Camp doesn't support Windows 8, so wait until Apple releases new Boot Camp drivers.
    2. Boot Camp requires only one volume on the hard drive, so you can't create a volume to store data

  • What is the "BW shell creation package for BW system" in TDMS?

    I see for lower version of SAP systems such as 4.6 and BW(e.g.3.0, etc), there is a "shell creation package " for those
    types of systems.
    Could you explain what is that for?
    Thanks!

    1) where to find the info about the copy sequence such as: first shell creation, then initial package or whatever, then ...?
    > TDMS solution operation guide will be helpful, the same is available at SAP service market place. In short the sequence is  -
    first shell (only if the repository is not in sync) then initial package (ex. TDTIM) and then refresh packages (as an when needed)
    2) for HR we do not have shell creation, what we have is "initial package for master data and customizing" , the next step is "ERP initial package for HCM personel dev. PA & PD". Why we do not have shell creation here?
    > For HR as only few objects are transfered the need of a full shell system does not arise. only the object to be transfered are synced.
    3) Will TDMS replace system copy for ERP, BW, CRM completely?
    > Shell will not replace them but we may say that it will supplement it. When you need a complete copy means repository along with application data then you need to go for system copy but if you only need repository to be copied from source to destination then shell is helpful. Also it should be noted that Shell is an TDMS package whereas System copy is a SAP standard tool.
    I hope the above response is helpful.
    Regards,
    Pankaj

  • Saving data from 1d array of cluster of 2 elements: HP 8752 driver

    I'm using the following driver to communicate with my HP 8720C Network Analyzer
    http://sine.ni.com/apps/utf8/niid_web_display.down​load_page?p_id_guid=E3B19B3E9092659CE034080020E748​...
    ...So far I've easily been able to use the "collect and display data" vi, except for saving data. All I want to be able to do is save the data from a single sweep in spreadsheet format. Displaying the data is no problem, which I can then print, however, the output data file is a mess. The VI is rather complicated, and I can't figure out how to save the data in a nice pair of columns of numerical values.
    The VI's output data is in the format of a 1 dimensional array of clusters of 2 elements (ie the x-y values). I would've thought it would be trivial to do this, since this is the standard format for data for the classic X-Y graph. So far, I haven't been able to come up with anything. Any ideas?
    Thanks,
    Spence

    Feed the array of clusters into a for loop with autoindexing enabled (the default). Inside the loop use the Unbundle primitive to extract X and Y for one point. Use Build Array to make a two-element array from X and Y. Wire this array out of the for loop and you will have a two dimensional array with two columns and as many rows as there are elements in the array of points.
    Lynn

Maybe you are looking for

  • How to set Date range for a input parameter in a report

    Hi, I have 2 parameters start and end date. I want users to select the end date only 3 days from which ever start date they select. How to achieve this in parameter validation in SSRS? Thanks, Preetha

  • Decision variant issue in process chain

    Hi, I have a decision variant for my process chain: It should be successful when it is 5th working day of month. If the 5th working day of the month is friday, it should be failed.. Can you please help me to build the formula in Decision variant. Tha

  • HT4890 WHY CANT I SEE MY PHOTOS ON ICLOUD

    why cant i see my photos on icloud?                             

  • Call the RDF from Froms but generate in PDF format

    Hai all, i can call the RDF from Froms but my requirement is after calling the RDF i want to generate it into PDF. Thanks in Adv

  • Duplicate library on iPad

    I just synced my iPad today for the first time. As I was in the the iPod app I noticed that some of the libraries were duplicated. I have 4 copies of each library on the iPad. Its not a big deal but is there a way to fix this?