Submit vs Submit All in Quiz

Hi,
When i use submit button i am able to access cpQuizInfoAnswerChoice variable in the next slide. But if i use Subimit All and click on next, variable cpQuizInfoAnswerChoice is empty in the next slide. How can i access selected answer if i use submit all?
Thanks,
Krishna

Neither the system variables cpQuizInfoAnswerChoice nor cpQuizInfoLastSlidePointsscored are populated in that situation, already did see that. Reason is probably that total score is calculated whenever the user decides to click the Submit All button, because only then the answers are taken into account. Tried it out: the total score (cpQuizInfoPointsscored) is calculated each time you click Submit All, but when you didn't answer all questions it can be changed, which is not the case with the normal quiz flow. Go back to a question and change it, when clicking Submit All again, the score will be recalculated. I agree that it is a pity that the first two variables that I mentioned are not populated anymore, or at least you cannot access them. With the new Quiz features there are some other system variables that should be available or at least be accessible IMO. If you could enter a feature request, any support for my own requests is welcome.
Lilybiri

Similar Messages

  • HT200241 Can Apple Configurator deploy and modify Apple TV iOS 6.0 settings? For instance, what if I wanted to submit a 'reset all settings' command, but not a 'factory restore'?

    Can Apple Configurator deploy and modify Apple TV iOS 6.0 settings? For instance, what if I wanted to submit a 'reset all settings' command, but not a 'factory restore'?

    Did you follow the instructions here:
    http://support.apple.com/kb/HT4367
    Pay attention to differences in power connection depending on whether or not you have AppleTV2 or AppleTV 3.
    Also some microUSB leads don't seem to work - try another if you can. Disconnect superfluous USB device/hubs too if possible.
    AC

  • Submit button for hot spot quiz

    the hot spot quiz functionality is not very intuitive.  is there a way to proceed to the next slide after the user hits "submit?"   also, is there a way to only allow one hotspot selection that once the user makes a selection he/she cannot keeping placing selections all over the page? thanks.

    Hello Lilybiri,
    Thank you for offering to help find a solution for my Hot Spot Quiz issues.  If you would like to (or have the time to) help me here's what I am trying to accomplish:
    We need some Hot Spot quizzes which require the user to click on one, or sometimes one of several, hot spots on an image object.  I have already encountered the Captivate 4 hot spot quiz limitation of having to click on all of a group of hot spots in order for the answer to be correct when we want the user to click on just one of any of the correct hot spots.  I have developed a customer specific header and footer bar template for each slide, with the footer bar containing navigational buttons for beginning/previous/next/end functionality, have disabled this navigation in the question slides as we don't want this available to the user during the quizzing.  Instead, we want to advance to the next question slide if the user clicks the correct hot spot, or produce a text caption (with a continue button to advance to the next question slide) accompanied by an arrow animation indicating the correct hot spot to click (which would require executing an advanced action).  The user gets one attempt to answer the question correctly.  Each question slide will have a text caption with the question for the user to answer.  Because of the limitations I've encountered with Captivate 4 hot spot quizzing I've been considering creating custom question slides just as you suggested.  Unfortunately, we have a very tight deadline to meet and a lot of content to pour into this project, so I need solutions that are as simple and quick to develop as possible.  It seems that sometimes Captivate does not allow for this to happen and I've been discovering that it's been increasingly frustrating to use.  Any assistance you could lend me would be greatly appreciated and I thank you for your time.
    Sincerely,
    Roland

  • Submit button in Cap 7 quiz does not advance learner to next quiz slide

    I created a 5 question MC quiz in Cap 7. When I take the quiz in the preview mode, I am able to advance to the next slide by clicking on the submit button. Well, when I click on the submit button, a pop up appears that says: Correct - click anywhere or press 'y' to continue. Once I click anywhere, *then* I am taken to the next question.
    However, when I take the quiz in a web browser, I cannot advance to the next slide, even when I answer the question correctly. I click the submit button. The same pop up appears as in the preview mode: Correct - click anywhere or press 'y' to continue. So, I click anywhere but nothing happens. The slide does not advance.
    I've created a few quizzes before in Cap 7 using the same settings so I was stumped when the quiz didn't work this time. Maybe I accidentally changed a setting??

    The jump to slide works great. Yes, the user goes right back to the quiz after remediation. The user can then change her answer and click submit. However, she can not advance forward. Sigh.
    I am a freelancer who inherited the template from the former freelancer. I was told to use her template to create the trainings. So I am. I was supposed to use all the settings she used, too. That's why the Required is set to: User must answer every question'
    I can try your idea and the Requirements in the settings.
    What's odd, though, is that I've developed a Quiz using these same exact settings and it worked perfectly. That's why it's odd that the Quiz is no longer working correctly.
    Okay, let me try to change the Required settings.
    By the way, the submit button works fine in the Preview mode, just not the Web Browser mode.

  • Submit data of all tab in panelTabbed

    Hi all,
    I have a problem with af:panelTabbed. When I click the submit button, there is only data of current select tab were submit to the server.
    I wonder that, we can submit all data in all tab of panelTabbed to the server or not?
    Do you have any idea about it?
    Thanks a lot!

    Hi "in the line of fire",
    In my situation, I can't using AM. So, we can have other way to do that?
    Thanks so much!

  • CP 8.01 - Hiding the Submit button when returning to Quiz slide

    Hi,
    After answering a quiz and returning to the same slide later on, the submit button is still present but disabled. I would like for it to be removed/hidden entirely since IMO, I do not think that you have to display it once you have answered the question. Is there a way to do this?
    David

    Captivate provides no way to do this. You cannot hide the Submit button another object either.

  • Please help me on a form i push the submit button and all i get is a page with the following code wh

    <?php
    //--------------------------Set these paramaters--------------------------
    // Subject of email sent to you.
    $subject = 'Results from Contact form';
    // Your email address. This is where the form information will be sent.
    $emailadd = '[email protected]';
    // Where to redirect after form is processed.
    $url = 'http://www.karenwebster.info/confirmation.html';
    // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
    $req = '1';
    // --------------------------Do not edit below this line--------------------------
    $text = "Results from form:\n\n";
    $space = ' ';
    $line = '
    foreach ($_POST as $key => $value)
    if ($req == '1')
    if ($value == '')
    {echo "$key is empty";die;}
    $j = strlen($key);
    if ($j >= 20)
    {echo "Name of form element $key cannot be longer than 20 characters";die;}
    $j = 20 - $j;
    for ($i = 1; $i <= $j; $i++)
    {$space .= ' ';}
    $value = str_replace('\n', "$line", $value);
    $conc = "{$key}:$space{$value}$line";
    $text .= $conc;
    $space = ' ';
    mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    ?>
    where do i put this and what am imissing

    I don't know why but after about an hour the tool bar you rferred to came on its self jsut as the support solution and you have advised and it is now working, but the toolbar just disappears and that is why I could not find the link or correct store link. Weird! But thanks, Gordon

  • How to make submit form submit xml differently

    Hello,
    The acrobat built in submit form button which submits xml expects the receiving server to be able to read the XML unlimited. Unfortunately I can't do this with Lotus Domino server 6.5.
    I am looking for a way to save the XML data to a file and upload it to a website as if the user had saved and uploaded it themselves, but automated using some javascript on a button. Is this possible? Any examples/help/pushes in the right direction greatly appreciated.

    Looks like my problem was just the TARGET=_blank> stuff. I change the code to the following:
    DECLARE
    l_url VARCHAR2(200);
    begin
    l_url:=
    '/portal/page?_pageid=154,107011&_dad=portal&_schema=PORTAL';
    PORTAL.wwa_app_module.set_target(l_url,'CALL');
    exception
    WHEN OTHERS then
    htp.p(SQLERRM);
    end;
    That works fine and instead of putting it in place of the INSERT button code I left that alone and put it in the "After form processing" pl/sql code. Now it works pretty well. The only thing left to fix is that it loses all my current Page Parameter values when forwarding the url like that.
    David

  • How to open new window when i press submit button/submit button.

    Hi,
    When i press a button, I need to capture an item value in current from and I need to pass that value to another form. The child form should open in the new form.
    For that Iam using the java script, But when i use the java script my page is not able to re-size, scroll bars address bar and menu bars are missing. if any one did this kind of requirment please share with me how to solve this issue.
    Thanks

    Re: How to show Popup window in OAF on click of a button
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • Quiz - Submit Not Working

    I have Captivate v1.01.1418. I have created several quizzes.
    When created the quizzes worked perfectly. I'm getting ready to
    publish to Breeze and reviewing the quizzes one last time and now
    the Submit button will not allow the user to move to the next
    slide. If the user selects the Next button, they can continue but
    the answer is not registered.
    I have Quiz Manager enabled to output to Breeze. I'm
    reporting interactions and scores. I'm allowing them to move
    backward, review quiz and score, and show progress. No default
    message is set. I'm allowing the user one to go to next slide if
    passing grade and allowing one attempt if failing grade and going
    to next slide. This is all under Quiz Manager.
    My quizzes are single answer, most multiple choice. There are
    some matching or Yes/No. If correct, I have them Go to next slide.
    If wrong answer, I'm allowing three attempts and Go to next slide.
    I have all buttons displaying, Clear, Back, Next and Submit. My
    Objective ID for each question is the same. My Interaction ID is
    unique for each slide.
    I'm in desparate need of assistance. I have created multiple
    quizzes that contain a total of 285 questions. At time of creation,
    each quiz was working properly. Please help.
    Thank you,
    Joan

    For others who may not know, Adobe support desk assisted and
    advised that since I had 3 attempts per question, the user is
    unable to advance to the next slide until they either answered the
    question correctly or made 3 attempts. There is not a way to allow
    them to submit their answer, go back to review to modify their
    answer before ending the quiz.

  • Can I remove the Submit button?

    When I first created quizzes, I accepted the defaults, and found you have to click Submit each time you answer a question. You actually need a submit button if you go that route.
    I found the "Submit All" option in Quiz Preferences, and selected it. When I tested the quiz, I answered questions and clicked Next to proceed to the next screen. Submit All does exactly what I need it to do - at the end of the quiz it asks me if I want to submit all, and I click yes. Then my score displays. At no time do I need a Submit button in any of the quiz slides.
    However, every slide in the quiz now has a "Submit All" button - this option changes the button from "Submit" to "Submit All." When you click it, you get an error telling you the test is incomplete.
    I don't need it and it's confusing, so I'd like to remove it.  But I can't delete it from the quiz slide or the Master Slide - I can only move it. There is no right click option to get rid of it. The only thing I have found I can do is gray it out by changing its attributes.
    Is there some way I can get rid of it?
    Thanks!

    I don't think you can remove it completely, but a couple of options you could look at are:
    - change it to a transparent button, set the opacity to 0% and delete the text. You can then move the invisible button somewhere were users are unlikely to click it.
    - Or just drag the button off the slide so it doesn't appear when the project runs.

  • SET/GET not working when I submit one program into Main program.

    Hi All,
    I am using set/get parameter as follows but somewht it is not working.. Please help.
      IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
        set parameter id 'AJN' field lf_jobname.
        set parameter id 'AJC' field gf_jobcount.
      ENDIF.
      SUBMIT   zace_interface
        USER   sy-uname
        VIA    JOB lf_jobname
        NUMBER gf_jobcount
        WITH   SELECTION-TABLE lt_seltab
      TO     SAP-SPOOL
        AND    RETURN.
    in the zace_interface program I have another submit program
        submit zrsbdcsub and return
                        user 'ZACE_INTERFACE'
                        with mappe eq lf_group
                        with von eq sy-datum
                        with bis eq sy-datum
                        with fehler eq space
                        with logall eq co_true.
    ad inside this submit im using
                  get parameter id 'AJN' field v_jobname.
                  get parameter id 'AJC' field v_jobcount.
    but i am not able to get the values into v_jobname & v_jobcount.
    Can you please help me in this regard. how i will get the values in v_jobname & v_jobcount.
    Thanking you in advance
    Regards,
    Prashant

    Hi..,
    any way u r executing the programs in the same session but between diff. internal sessions u can use the IMPORT and EXPORT options ( ABAP MEMORY )
    or do one thing...
    <b>In the first program Copy these fields into a file in the <b>application server</b>,, and in the Second submit program u retrieve these variable values from the Application server file into these two variables!!</b>
    just now i have solved one of the issues of this Kind by using an Application server file.
    In the first program..
    IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
    OPEN dataset 'FILE' for output in text mode encoding default.
    transfer lf_jobname to 'FILE'.
    transfer gf_jobcount to 'FILE'.
    CLOSE dataset 'FILE'.
    ENDIF.
    and instead of using the GET parameters in the second program ..
    OPEN dataset 'FILE' for input in text mode encoding default.
    read dataset 'FILE' into v_jobname.
    read dataset 'FILE' into v_jobcount.
    CLOSE dataset 'FILE'.
    This has solved my problem !!!!! hope this helps u also!!
    regards,
    sai ramesh

  • Form doesn't submit [was: Please Help!]

    I am new to web development and am obviously just not seeing what I'm missing. I re-built our company's website in January (mostly because of over-charging by our webmaster). It is an exceptionally basic .html sight but it works for us. I have learned a great deal about coding the basics and have been slowly going back through my orginal pages and cleaning up the code. While I was doing that I noticed that one of the pages our customers use are from our old website. I am trying to create a form that I will be able to manipulate that has the look and feel of our current site. Maybe you can take a look and explain to me why when I fill in all the required fields and hit the "submit" button nothing happens.
    http://http://langsauction.com/Staging/bid_form_test.html
    Our server has a cgi folder that has not been touched or moved so I am guessing I just haven't figured out where to add the code I need for this to work.
    I have checked the code from our old page:
    http://https://langs11.securesites.net/bids/index.php/
    Other than it being a .php I can't see what I missed.....
    When the information is submitted from the "old" page it is stored on our server and I receive an email notification, I click the link in my email and am directed to a printable page with all of our customer's information. I would like the same thing to happen with my new page.
    I really appreciate any help you can give me!
    Christina
    Subject line edited by moderator to indicate nature of problem

    You have been huge help already....I am taking your advise and walking away for this evening.....if you could look into this I would be eternally greatful!!
    <?php
    * Things to NOTE
    * Is it ok to have month values as numbers in this format 01, 02, 03, ... 11... etc..
    require_once 'https://langsauction.com/bids/Crypt_Blowfish-1.0.1/Blowfish.php';
    include('https://langsauction.com/bids/functions.php');
    include('https://langsauction.com/bids/db.php');
    $b = new Crypt_Blowfish('5az1bc1dDa1cv1TVa1wQa12xXx');
    # for new crypt method
    $key = "5az1bc1dDa1cv1TVa1wQa12xXx";
    $error_fields = array();
    $errors = array();
    # passed to function month_display and will print out relevant values
    $***_month = array("01" => "January", "02" => "February", "03" => "March", "04" => "April", "05" => "May", "06" => "June", "07" => "July", "08" => "August", "09" => "September", "10" => "October", "11" => "November", "12" => "December");
    $***_fields = array("last_name" => "Last Name", "first_name" => "First Name", "address1" => "Address 1", "city" => "City", "state" => "State / Province", "zip" => "Zip / Postal Code", "county" => "County", "country" => "Country", "phone" => "Telephone", "email" => "Email", "cc_type" => "Credit Card Type", "cc_name" => "Names As It Appears On Card");
    # keeps track of which fields had errors so
    # it's html row can be highlighted
    $error_fields = array();
    * Credit Card Validation Solution, PHP Edition,
    * Usage Example.
    * @package    CreditCardValidationSolution
    * @author     Daniel Convissor <[email protected]>
    * @copyright  The Analysis and Solutions Company, 2002-2003
    * @version    $Name: rel-5-12 $ $Id: ccvs_example.php,v 1.15 2003/08/06 05:51:57 danielc Exp $
    * @link       http://www.ccvs.info/
    * Require the main file.
    require('../Documents/Langsauction/www/langsauction.com/bids/ccvs.inc.php');
    $Form = new CreditCardValidationSolution;
    * Example of to encrypt and decrypt
    $encrypted = $b->encrypt('test');
    $decrypted = $b->decrypt($encrypted);
    echo " encr - $encrypted - decryp $decrypted";
    #echoÊ"Encrypted:Ê" .Êbin2hex($encrypted)Ê.Ê"\n";
    # existing code
    if (isset($_POST['submit'])) {
        dbConnect('langsa');
    * Need to Still
    * run all fields through POST VARS
    * and sanitize data
    * use reg match from metrochai validation
    # check user has checked Conditions of Sale
    if($_POST['agree'] != 'yes') {
        array_push($errors, '>>Please read and accept the Conditions of Sale by selecting the checkbox');
    foreach ($***_fields as $field => $field_name) {
        if($_POST[$field] == '') {
          array_push($error_fields, $field);
          array_push($errors, '>>The "'. $field_name . '" Field is empty. Please enter information for that field');
    * Check that if a user enters a value in the Lot No. field, that all other fields in that row also have values
    for($x = 1; $x < 16; $x++) {
         if( $_POST['lot' . $x] != '' && ( $_POST['lot_desc' . $x] == '' ||  $_POST['lot_max' . $x] == '' ||  $_POST['lot_max_bid' . $x] == '' ) ) {
          $lot = 'lot' . $x;
          $lot_name = 'Lot No. ' . $_POST['lot' . $x];
          array_push($error_fields, $lot );
          array_push($errors, '>>Please fill in the additional values for  "'. $lot_name . '" in STEP 3');
         * Put the names of the card types you accept in here.
         * To handle all card types, skip this step and put ''
         * in the Accepted argument.
        $Accepted = '';
        $Month = $_POST['exp_dat_mon'];
        $Year  = $_POST['exp_dat_yea'];
        # adding trim to remove any spaces at beginnning or end
        # in order to keep live server from breaking on mysql syntax
        $_POST['cc_num'] = trim($_POST['cc_num']);
    # check if Credit Card Number is empty
    if (empty($_POST['cc_num']) ) {
                # if CC Num is blank along with other relevant fields
                $Form->CCVSNumber = '4002417016240182';
                $Month = '';
                $Year  = '';
                array_push($errors, '>>The "Credit Card Number" Field Is Blank. Please enter information for that field');
    # if Credit Card Number is not empty then check integrity of numbers   
    elseif ( !$Form->validateCreditCard($_POST['cc_num'], 'en', $Accepted, 'Y', $Month, $Year) ) {
             array_push($errors, $Form->CCVSError);
             array_push($error_fields, 'cc_num');                
    $count_errors = count($errors);
    if($count_errors == 0) {
    # form appears to be good so process data
    # encrypt credit card info
    # PEAR Blowfish Object Call
    #$cc_num = $b->encrypt($_POST['cc_num']);
    $cc_num = encrypt($_POST['cc_num'], $key); //encrypts the data using the key
    //echo "$encrypted<hr>";
    #sanitize data
        $email = strip_invalid_chars($_POST[email], 'email');
         $last_name = strip_invalid_chars($_POST[last_name]);
         $first_name = strip_invalid_chars($_POST[first_name]);
         $address1 = strip_invalid_chars($_POST[address1]);
         $address2 = strip_invalid_chars($_POST[address2]);
        $city = strip_invalid_chars($_POST[city]);
        $state = strip_invalid_chars($_POST[state]);
        $zip = strip_invalid_chars($_POST[zip]);
        $county = strip_invalid_chars($_POST[county]);
        $country = strip_invalid_chars($_POST[country]);
        $phone = strip_invalid_chars($_POST[phone], 'insecure');
        $cc_type = strip_invalid_chars($_POST[cc_type]);
        $cc_name = strip_invalid_chars($_POST[cc_name]);
        $exp_dat_yea = strip_invalid_chars($_POST[exp_dat_yea]); 
        $exp_dat_mon = strip_invalid_chars($_POST[exp_dat_mon]);
        $sql = "INSERT INTO cc_form SET
                  last_name= '$last_name',
                  first_name = '$first_name',
                  address1 = '$address1',
                  address2 = '$address2',
                  city = '$city',
                  state = '$state',
                  zip = '$zip',
                  county = '$county',
                  country = '$country',
                   phone = '$phone',
                  email = '$email',
                  cc_type = '$cc_type',
                  cc_num = '$cc_num',
                  exp_dat_mon = '$exp_dat_mon',
                   exp_dat_yea = '$exp_dat_yea',
                  cc_name = '$cc_name',
                  date = NOW()";
              $insert_cc_data = mysql_query($sql) or die(mysql_error()) ;
              # get id for lots table
              # to keep track of each user's lots
              $id = mysql_insert_id();
             * Insert Lots
            foreach ($_POST as $key => $val) {
                # sanitize data in all fields in loops
                if (preg_match("/lot([0-9]+)/", $key,  $matches)) {
                #echo "-- $matches[0]";
                if($_POST['lot'.$matches[1]] != '') {
            $val_lot = strip_invalid_chars($_POST['lot'.$matches[1]]);
            $val_lot_desc = strip_invalid_chars($_POST['lot_desc'.$matches[1]]);
            $val_lot_max = strip_invalid_chars($_POST['lot_max'.$matches[1]]);       
            // looks like strip_invalid_chars with type 'all' was stripping out '.' and perhaps the comma from
            // the javascript that formatted the number eg: 1,204.02
            // will now set type 'insecure' for strip_invalid_chars, which should leave '.' and , commas intact
            // for now will leave the lot_max_bid field as a varchar and have the javascript do the formatting
            // NOTE if the user's browser does not have javascript enabled
            // then currency will not be formatted into the database
            // would need to check entries for a '.' and if not found then use php currency formatting function
            $val_lot_max_bid = strip_invalid_chars($_POST['lot_max_bid'.$matches[1]], 'insecure');
            if(!preg_match("/./", $val_lot_max_bid)) {
                //$val_lot_max_bid = number_format($val_lot_max_bid, 2, '.', ',');
                        #echo $val_lot . "<br />";
                        #echo $val_lot_desc  . "<br />";
                        #echo $val_lot_max . "<br />";
                        #echo $val_lot_max_bid . "<br />";
                    $query_lots = "INSERT
                             INTO
                                    lots
                                    (lot_nu,
                                     lot_desc,
                                     lot_max,
                                     lot_max_bid,
                                     user_id,
                                     date
                                    values(
                                    '" . $val_lot . "',
                                    '" . $val_lot_desc . "',
                                    '" . $val_lot_max . "',
                                    '" . $val_lot_max_bid . "',
                                    '$id',
                                    NOW()
                #v_dump($matches[1]);
                $insert_lots = mysql_query($query_lots) or die(mysql_error());
               } # end of if isset
         * Make Sure Duplicate Entries Don't Occur
         * When User Hits Refresh Here
    ?>
        <html>
      <head>
        <title>Lang's Bids</title> 
    <script type="text/javascript" src="../Documents/Langsauction/www/langsauction.com/bids/site.js"></script>
    <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">      
      </head>
    <body>
        <center>
        <table width="750">
            <tr>
                <td valign="center"><img src="https://langs11.securesites.net/bids/images/Bid-Banner.jpg">
                <br />
        <font size="-1" face="Verdana, Arial, Helvetica"><p><ul>Your Absentee Bid Information Was Received. Thank You.</ul></p>
        <p><ul><a href="javascript:window.close()">Close Window</a></ul></p></font>
                   </td>
               </tr>
        </table>
        </center>
        </body>
        </html>
    <?php
       * Send Email
      $today = date("F j, Y, g:i a");
      //$to = "[email protected]";
      //$to = "[email protected]";
      //$to = "[email protected]";
      // current email address to use!
      $to = "[email protected]";
      //$to = "[email protected]";
      $from = "[email protected]";
      $subject = "A Lang's Absentee Bid Has Been Submitted - " .$today. "";
      $message = "A Lang's Absentee Bid Has Been Submitted on " .$today. "\n\n Visit the Admin Area to view this entry:\n\nhttps://langs1.securesites.net/lang_cc/index.php";
      $headers = "From: $from\r\n";
      $send = mail($to, $subject, $message, $headers);
      exit;
    } # end of submit
        ?>
    <html>
      <head>
        <title>Lang's Bids</title>
             <LINK REL="StyleSheet" HREF="../Documents/Langsauction/www/langsauction.com/bids/bids.css" TYPE="text/css">
    <SCRIPT LANGUAGE="JavaScript">
    <!--http://javascript.internet.com/forms/currency-format.html-->
    <!-- Begin
    function formatCurrency(num) {
    num = num.toString().replace(/\$|\,/g,'');
    if(isNaN(num))
    num = "0";
    sign = (num == (num = Math.abs(num)));
    num = Math.floor(num*100+0.50000000001);
    cents = num%100;
    num = Math.floor(num/100).toString();
    if(cents<10)
    cents = "0" + cents;
    for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
    num = num.substring(0,num.length-(4*i+3))+','+
    num.substring(num.length-(4*i+3));
    //return (((sign)?'':'-') + '$' + num + '.' + cents);
    return (((sign)?'':'-') +  num + '.' + cents);
    //  End -->
    </script>
    <style type="text/css">
      .disclaimer {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: 14px;
        color: #000;
        margin: 0px;
        padding: 0px;
      .heading {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: 30px;
        color: #6A0000;
      .buttons {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: 54px;
      .footer {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: 16px;
        line-height: 1px;
        font-style: italic;
      .tabletitles {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: 14px;
      </style>
      </head>
      <!-- body -->
    <body>
    <form  name=currencyform method="post" action="<?=$_SERVER['../Documents/Langsauction/www/langsauction.com/bids/PHP_SELF']?>#for m_start">
    <center>
    <table width="750" border="0" cellpadding="0" cellspacing="5" class="text">
        <tr>
            <td colspan="2" align="center"><img src="Auction Banner.jpg" width="960" height="255" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="left">
        <br>
        <center>
        <font face="arial" size="3">
        <span class="heading">Absentee and Phone Bid Form </span><br>
        </font>
        </center>
        <div align="center"><br>
          <span class="disclaimer">IMPORTANT: Please read CONDITIONS OF SALE before filling out form.<br><br>
            <strong>Absentee Bidding:</strong> Please complete this form to absentee bid on any lots (catalog item numbers) in this auction. Absentee bids are executed on your behalf by our staff in competition with bids from other bidders. In the event two identical absentee bids are received, the bid first received will be accepted. In the event your maximum bid ties with a bid from the phone, the normal policy is to go one increment higher on your behalf to break the tie in your favor. If you want us to do so, PLEASE INDICATE +1 ON THE FORM, IF NOT, PLEASE INDICATE MAX. <br><br>
            <strong>Phone Bidding:</strong> If you want to bid on the phone, through a member of Lang’s staff during the auction, please indicate so on this form along with the numbers of the lots you intend to bid on. Be sure to indicate the phone numbers where Lang’s can call you when it’s time for you to bid. We will make every effort to execute all absentee and phone bids. However, if there is an error or omission, Lang’s will not be held liable. <br><br>We require a good faith deposit equal to 20% of the maximum total bid (bank check, money order or VISA/Master Card).
            An 18% buyer’s premium will be added to all successful bids. A 3% discount (resulting in 15%) is given for cash or check payments.
      <br><br>
      <strong>Invoices will be emailed at the close of the auction on Sunday night to the email address provided.</strong><br> Please check your Spam folder or contact Lang’s office if you do not receive your invoice.<br><br>
            ~MAKE CHECKS PAYABLE TO LANG’S ~ Payment is due in full within ten days following the auction.
            Failure to pay within ten days following the auction will jeopardize future absentee & phone bidding privileges.
            </span><br><br>
          <hr width="100%" size="3" />
        </div>
        <p></p>
            </td>
        </tr>
        <tr>
          <td colspan="2">
          <a name="form_start">
            <br />
            <?php
            $error_count = count($errors);
            if($error_count > 0) {
              echo "<font face=\"arial\" color=\"red\" size=\"2\">";
              echo "The Following Errors Occured:<br /><br />";
            #  $errors = $_GET['errors'];
              foreach ($errors as $error_item) {
                  echo "$error_item<br />";
              echo "</font>";
            } # end of if error_count
              ?>     
          </td>
        </tr>
           <tr>
            <td colspan="2"></td></tr>
        <tr <?php if(in_array('first_name', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>First Name     </p>
            </td>
            <td align="left" width="550">
                <input name="first_name" type="text" value="<?=$_POST['first_name']?>"  maxlength="100" size="25" />
                <font color="orangered"><b>*</b></font>
            </td>
        </tr>
        <tr <?php if(in_array('last_name', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left" <?php if(in_array('last_name', $error_fields)) { echo "class=\"signupform\"";}?>>
                <p>Last Name     </p>
            </td>
            <td align="left">
                <input name="last_name" type="text" value="<?=$_POST['last_name']?>" maxlength="100" size="25" />
                <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr>
            <td align="left" <?php if(in_array('address1', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
                <p>Address 1     </p>
            </td>
            <td align="left">
                <input name="address1" type="text" value="<?=$_POST['address1']?>" maxlength="100" size="25" />
                <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr>
            <td align="left">
                <p>Address 2     </p>
            </td>
            <td align="left">
                <input name="address2" type="text" value="<?=$_POST['address2']?>"     maxlength="100" size="25" />
            </td>
        </tr>
        <tr valign="top" <?php if(in_array('city', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>City     </p>
            </td>
            <td align="left">
                 <input name="city" type="text" value="<?=$_POST['city']?>"  maxlength="100" size="25" />
            <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr valign="top" <?php if(in_array('state', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>State / Province     </p>
            </td>
            <td align="left">
      <!--     
    <select name="state" class="text">    
      <option value="<?php echo isset($_POST['state']) ? $_POST['state'] : ""; ?>"><?php echo isset($_POST['state'])  ? $_POST['state'] : "Select State"; ?></option>   
    <?php echo QAstatelist($vars['state']); ?>"
                                        </select>
    -->
            <input name="state" type="text" value="<?=$_POST['state']?>"  maxlength="100" size="25" />
            <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr valign="top" <?php if(in_array('zip', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>Zip / Postal Code     </p>
            </td>
            <td align="left">
                 <input name="zip" type="text" value="<?=$_POST['zip']?>"  maxlength="100" size="25" />
                <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <!-- adding Country -->
         <tr valign="top" <?php if(in_array('country', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>Country     </p>
            </td>
            <td align="left">
                 <input name="country" type="text" value="<?=$_POST['country']?>"  maxlength="100" size="25" />
            <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
         <tr valign="top" <?php if(in_array('phone', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>Telephone     </p>
            </td>
            <td align="left">
                 <input name="phone" type="text" value="<?=$_POST['phone']?>"  maxlength="100" size="25" />
            <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr valign="top" <?php if(in_array('email', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>eMail     </p>
            </td>
            <td align="left">
                 <input name="email" type="text" value="<?=$_POST['email']?>"   maxlength="100" size="25" />
            <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
          <tr valign="top" <?php if(in_array('cc_type', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>Credit Card Type     </p>
            </td>
            <td align="left">
        <select name="cc_type" size="1">
             <option value="<?=$_POST['cc_type']?>"><?php echo isset($_POST['cc_type']) ? $_POST['cc_type'] : "Select Type"; ?></option>   
             <option value="Visa">Visa</option>
             <option value="MasterCard">MasterCard</option>
        </select>
            <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr <?php if(in_array('cc_num', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>Credit Card Number     <br /></p>
            </td>
            <td align="left">
                <input name="cc_num" type="text" value="<?=$_POST['cc_num']?>" maxlength="100" size="25" />
                <font color="orangered" size="+1"><tt><b>*</b></tt><br /><font face="arial" size="1" color="#FF0000"><b>(numbers only, no dashes please)</b></font></font>
            </td>
        </tr>
         <tr <?php if(in_array('exp_dat_mon', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?><?php if(in_array('exp_dat_yea', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>Expiration Date     </p>
            </td>
            <td align="left">
               <select name="exp_dat_mon" size="1">
                 <?php if(!isset($_POST['exp_dat_mon'])) { echo "<option value=\"\">Select Month</option>";}?>
             <?php echo month_display($***_month, $_POST['exp_dat_mon']); ?>"
           </select>
            <select name="exp_dat_yea" size="1">
                 <option value="<?=$_POST['exp_dat_yea']?>"><?=$_POST['exp_dat_yea']?></option>
                 <option value="2008">2008</option>
                 <option value="2009">2009</option>
                 <option value="2010">2010</option>
                 <option value="2011">2011</option>
                 <option value="2012">2012</option>
                 <option value="2013">2013</option>
                 <option value="2014">2014</option>
                 <option value="2015">2015</option>
                 <option value="2016">2016</option>
                 <option value="2017">2017</option>
                 <option value="2018">2018</option>
                 <option value="2019">2019</option>
                 <option value="2020">2020</option>
                 <option value="2021">2021</option>
                 <option value="2022">2022</option>
           </select>
            <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr <?php if(in_array('cc_name', $error_fields)) { echo "bgcolor=\"FFCCCC\"";}?>>
            <td align="left">
                <p>Names As It      <br />
            Appears On Card     </p>
            </td>
            <td align="left">
                <input name="cc_name" type="text" value="<?=$_POST['cc_name']?>"  maxlength="100" size="25" />
                <font color="orangered" size="+1"><tt><b>*</b></tt></font>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <table width="640">
            <tr><td colspan="4"><hr noshade="noshade" /></td></tr>
            <tr><td colspan="4"><font face="arial" size="3" color="#FF0000">STEP 3</FONT></td></tr>
                           <tr>
                <td align="left" valign="top" class="tabletitles">LOT No.</td>
                <td align="left" valign="top" class="tabletitles">DESCRIPTION</td>
                <td align="left" valign="top" class="tabletitles">MAX, +1 or PHONE</td>
                <td align="left" valign="top" class="tabletitles">BID AMOUNT</td>
                        </tr>
              <?php
              for($x = 1; $x < 16; $x++) {
              ?>
                   <tr>
                <td>
                <input name="lot<?=$x?>" type="text" value="<?=$_POST['lot' . $x]?>"  maxlength="90" size="15" />
                </td>
                <td>
                <input name="lot_desc<?=$x?>" type="text" value="<?=$_POST['lot_desc' . $x]?>" maxlength="100" size="50" />
                </td>
                <td>
                <input name="lot_max<?=$x?>" type="text" value="<?=$_POST['lot_max' . $x]?>" maxlength="90" size="30" />
                </td>
                <td>
                <input type=text name="lot_max_bid<?=$x?>" maxlength="90" size="30" value="<?=$_POST['lot_max_bid' . $x]?>" onBlur="this.value=formatCurrency(this.value);">
        <!-- old input field without javascript currency formatter
                    <input name="lot_max_bid<?=$x?>" type="text" value="<?=$_POST['lot_max_bid' . $x]?>"  />
        -->
                </td>
                </tr>
              <?php
              ?>
            </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
             <p><br /><br /><p>
                 <input type="checkbox" name="agree" value="yes" <?php if($_POST['agree'] == 'yes') { echo "checked";}?>> <b>I have read and accept the <a href="http://langsauction.com/CONDITIONS OF SALE.pdf" target="_blank"><font color="#FF0000">Conditions of Sale (required)</b></a>
             </p>
             <br />
            </td>
        </tr>
        <tr>
            <td align="right" colspan="2">
                <hr noshade="noshade" />
                <input type="reset" value="Reset" />
                <input type="submit" name="submit" value="Submit " />
            </td>
        </tr>
    </table>
    </center>
    </form>
    <br>
    <hr width="100%" size="3" /><br>
    <p align="center" class="footer">Lang's Auction, Inc. &#8226; 663 Pleasant Valley Road &#8226; Waterville, NY 13480 </p>
    <p align="center" class="footer">Phone: 315-841-4623 &#8226; Fax: 315-841-8934 &#8226; <a href="mailto:[email protected]">[email protected]</a></p>
        <br />
        <hr width="75%" size="3" />
        <p align="center" class="footer">     </p>
    <div align="center"><i>&copy; 2012 Lang's Auction, Inc. All rights reserved.</i></div>
        </p>
      <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-17131030-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </body>
    </html>
    <!--- table bottom of main body content -->

  • Form won't submit, newbie, probably being an idiot

    Probbally being an absolute idiot as completely new to web design, but really stuck, all help hugely appreciated...
    form on http://www.refuseboredom.com/EasterHolidays.html, form is validating itself but doesnt post??
    its supposed to be going to a FormMail.pl which is in the base directory, hosting with godaddy who accept perl scripts and say the script can be put anywhere on the server,
    Don't know what i'm missing!!
    Form Code:
    <div id ="form" >
          <form action="FormMail.pl" method="post" name="form1" target="_top" id="bookingform">
         <input type=hidden name="redirect" value="http://www.refuseboredom.com/thankyou.html" />
         <h2>BOOK HERE</h2>
         <input type=hidden name="recipient" value="[email protected]">
           <div>
            <span id="sprytextfield1">
            <label for="FirstName">Parent/Guardian First Name:</label>
            <input type="text" name="FirstName" id="FirstName" tabindex="1" />
            <span class="textfieldRequiredMsg">A value is required.</span></span>
            </div>
    <span id="sprytextfield2">
    <label for="LastName">Parent/Guardian Surname:</label>
    <input type="text" name="LastName" id="LastName" tabindex="2" />
    <span class="textfieldRequiredMsg">A value is required.</span></span>
         <div>
          <span id="sprytextfield3">
          <label for="Address1">Address 1st line:</label>
          <input type="text" name="Address1" id="Address1" tabindex="3" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          </div>
          <div>
          <span id="sprytextfield4">
          <label for="Address2">Address 2nd Line:</label>
          <input type="text" name="Address2" id="Address2" tabindex="4" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          </div>
          <div>
          <span id="sprytextfield5">
          <label for="City">City: </label>
          <input type="text" name="City" id="City" tabindex="5" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          </div>
          <div>
          <span id="sprytextfield6">
          <label for="Postcode">Postcode:</label>
          <input type="text" name="Postcode" id="Postcode" tabindex="6" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          </div>
          <div>
          <span id="sprytextfield7">
          <label for="Phone">Prefered Contact number:</label>
          <input type="text" name="Phone" id="Phone" tabindex="7" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          </div>
          <div>
          <span id="sprytextfield8">
          <label for="Email">Email Address</label>
          <input type="text" name="Email" id="Email" tabindex="8" />
          <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">Not a Valid E-mail Address</span></span>
          </div>
          <div id="select1">
          <label for="Quantity"> Number of children you would like to book for:</label>
          <select name="Quantity" id="Quantity" tabindex="9" class="Quantity" >
            <option>1</option>
            <option>2</option>
            <option>3</option>
          </select>
          </div>
          <div id="Child1Div">
          <span id="sprytextfield9">
          <label for="Child1">Child's Name:</label>
          <input type="text" name="Child1" id="Child1" tabindex="10" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          <span id="spryselect2">
          <label for="Child1Age">Child's Age:</label>
          <select name="Child1Age" id="Child1Age" tabindex="11">
            <option value="10">10</option>
            <option value="11">11</option>
            <option value="12">12</option>
            <option value="13">13</option>
            <option value="14">14</option>
            <option value="15">15</option>
          </select>
          <span class="selectRequiredMsg">Please select an item.</span></span>
          </div>
      <div id="Child2Div">
        <span id="sprytextfield10">
          <label for="child2">Child's name:</label>
          <input type="text" name="child2" id="child2" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          <span id="spryselect3">
          <label for="Child2Age">Child's Age:</label>
          <select name="Child2Age" id="Child2Age">
          <option>10</option>
            <option value="10">10</option>
            <option value="11">11</option>
            <option value="12">12</option>
            <option value="13">13</option>
            <option value="14">14</option>
            <option value="15">15</option>
          </select>
          <span class="selectRequiredMsg">Please select an item.</span></span>
    </div>
       <div id="Child3Div">
          <span id="sprytextfield11">
          <label for="Child3">Child's Name:</label>
          <input type="text" name="Child3" id="Child3" />
          <span class="textfieldRequiredMsg">A value is required.</span></span>
          <span id="spryselect4">
          <label for="Child3Age">Child's Age:</label>
          <select name="Child3Age" id="Child3Age">
            <option value="10">10</option>
            <option value="11">11</option>
            <option value="12">12</option>
            <option value="13">13</option>
            <option value="14">14</option>
            <option value="15">15</option>
          </select>
          <span class="selectRequiredMsg">Please select an item.</span></span>
        </div>
        <div>
          <span id="spryselect5">
          <label for="Type">Holiday Dates:</label>
          <select name="Type" id="Type" tabindex="12">
            <option value="Easter2week">2 Week Easter Holiday: April 2nd -  April 13th</option>
            <option value="April2nd1week">First Week: April 2nd - April 6th</option>
            <option value="April9th1week">Second Week: April 9th - April 13th</option>
            <option value="Easterspecial">Easter Special: 2 weeks</option>
          </select>
          <span class="selectRequiredMsg">Please select an item.</span></span>
              </div>
          <div id="Notes">
          <label for="Notes">Please use this area to let us know of any special requirements including medical and dietary needs that we may need to be aware of, if your child is applying with a friend please let us know here as well so we can try and make sure their on the same team: </label><br />
          <textarea name="Notes" id="Notes" cols="45" rows="5" tabindex="13"></textarea>
          </div>
          <input name="submit"  type="submit" id="submit" tabindex="14" value="Book Now" />
          </form>
          </div>
    FormMail.pl Code:
    #!/usr/bin/perl
    # FormMail                        Version 1.93                               #
    # Copyright 1995-2009 Matt Wright [email protected]                    #
    # Created 1995-06-09              Last Modified 2009-07-14                   #
    # Matt's Script Archive, Inc.:    http://www.scriptarchive.com/              #
    # COPYRIGHT NOTICE                                                           #
    # Copyright 1995-2009 Matthew M. Wright  All Rights Reserved.                #
    # FormMail may be used and modified free of charge by anyone so long as this #
    # copyright notice and the comments above remain intact.  By using this      #
    # code you agree to indemnify Matthew M. Wright from any liability that      #
    # might arise from its use.                                                  #
    # Selling the code for this program without prior written consent is         #
    # expressly forbidden.  In other words, please ask first before you try and  #
    # make money off of my program.                                              #
    # Obtain permission before redistributing this software over the Internet or #
    # in any other medium. In all cases copyright and header must remain intact. #
    # ACCESS CONTROL FIX: Peter D. Thompson Yezek                                #
    # XSS + REDIRECT FIX: Francesco Ongaro, Giovanni Pellerano & Antonio Parata  #
    #   v1.93             http://www.ush.it/team/ush/hack-formmail_192/adv.txt   #
    # Define Variables                                                           #
    #      Detailed Information Found In README File.                            #
    # $mailprog defines the location of your sendmail program on your unix       #
    # system. The flags -i and -t should be passed to sendmail in order to       #
    # have it ignore single dots on a line and to read message for recipients    #
    $mailprog = 'smtp.europe.secureserver.net -i -t';
    # @referers allows forms to be located only on servers which are defined     #
    # in this field.  This is a security fix to prevent others from using your   #
    # FormMail script on their web site.                                         #
    @referers = ('refuseboredom.com');
    # @recipients defines the e-mail addresses or domain names that e-mail can   #
    # be sent to.  This must be filled in correctly to prevent SPAM and allow    #
    # valid addresses to receive e-mail.  Read the documentation to find out how #
    # this variable works!!!  It is EXTREMELY IMPORTANT.                         #
    @recipients = ('^admin\@refuseboredom\.com');
    # ACCESS CONTROL FIX: Peter D. Thompson Yezek                                #
    # @valid_ENV allows the sysadmin to define what environment variables can    #
    # be reported via the env_report directive.  This was implemented to fix     #
    # the problem reported at http://www.securityfocus.com/bid/1187              #
    @valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');
    # Done                                                                       #
    # Check Referring URL
    &check_url;
    # Retrieve Date
    &get_date;
    # Parse Form Contents
    &parse_form;
    # Check Required Fields
    &check_required;
    # Send E-Mail
    &send_mail;
    # Return HTML Page or Redirect User
    &return_html;
    # NOTE rev1.91: This function is no longer intended to stop abuse, that      #
    #    functionality is now embedded in the checks made on @recipients and the #
    #    recipient form field.                                                   #
    sub check_url {
        # Localize the check_referer flag which determines if user is valid.     #
        local($check_referer) = 0;
        # If a referring URL was specified, for each valid referer, make sure    #
        # that a valid referring URL was passed to FormMail.                     #
        if ($ENV{'HTTP_REFERER'}) {
            foreach $referer (@referers) {
                if ($ENV{'HTTP_REFERER'} =~ m|https?://([^/]*)$referer|i) {
                    $check_referer = 1;
                    last;
        else {
            $check_referer = 1;
        # If the HTTP_REFERER was invalid, send back an error.                   #
        if ($check_referer != 1) { &error('bad_referer') }
    sub get_date {
        # Define arrays for the day of the week and month of the year.           #
        @days   = ('Sunday','Monday','Tuesday','Wednesday',
                   'Thursday','Friday','Saturday');
        @months = ('January','February','March','April','May','June','July',
                   'August','September','October','November','December');
        # Get the current time and format the hour, minutes and seconds.  Add    #
        # 1900 to the year to get the full 4 digit year.                         #
        ($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
        $time = sprintf("%02d:%02d:%02d",$hour,$min,$sec);
        $year += 1900;
        # Format the date.                                                       #
        $date = "$days[$wday], $months[$mon] $mday, $year at $time";
    sub parse_form {
        # Define the configuration associative array.                            #
        %Config = ('recipient','',          'subject','',
                   'email','',              'realname','',
                   'redirect','',           'bgcolor','',
                   'background','',         'link_color','',
                   'vlink_color','',        'text_color','',
                   'alink_color','',        'title','',
                   'sort','',               'print_config','',
                   'required','',           'env_report','',
                   'return_link_title','',  'return_link_url','',
                   'print_blank_fields','', 'missing_fields_redirect','');
        # Determine the form's REQUEST_METHOD (GET or POST) and split the form   #
        # fields up into their name-value pairs.  If the REQUEST_METHOD was      #
        # not GET or POST, send an error.                                        #
        if ($ENV{'REQUEST_METHOD'} eq 'GET') {
            # Split the name-value pairs
            @pairs = split(/&/, $ENV{'QUERY_STRING'});
        elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
            # Get the input
            read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
            # Split the name-value pairs
            @pairs = split(/&/, $buffer);
        else {
            &error('request_method');
        # For each name-value pair:                                              #
        foreach $pair (@pairs) {
            # Split the pair up into individual variables.                       #
            local($name, $value) = split(/=/, $pair);
            # Decode the form encoding on the name and value variables.          #
            # v1.92: remove null bytes                                           #
            $name =~ tr/+/ /;
            $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
            $name =~ tr/\0//d;
            $value =~ tr/+/ /;
            $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
            $value =~ tr/\0//d;
            # If the field name has been specified in the %Config array, it will #
            # return a 1 for defined($Config{$name}}) and we should associate    #
            # this value with the appropriate configuration variable.  If this   #
            # is not a configuration form field, put it into the associative     #
            # array %Form, appending the value with a ', ' if there is already a #
            # value present.  We also save the order of the form fields in the   #
            # @Field_Order array so we can use this order for the generic sort.  #
            if (defined($Config{$name})) {
                $Config{$name} = $value;
            else {
                if ($Form{$name} ne '') {
                    $Form{$name} = "$Form{$name}, $value";
                else {
                    push(@Field_Order,$name);
                    $Form{$name} = $value;
        # The next six lines remove any extra spaces or new lines from the       #
        # configuration variables, which may have been caused if your editor     #
        # wraps lines after a certain length or if you used spaces between field #
        # names or environment variables.                                        #
        $Config{'required'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
        $Config{'required'} =~ s/(\s+)?\n+(\s+)?//g;
        $Config{'env_report'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
        $Config{'env_report'} =~ s/(\s+)?\n+(\s+)?//g;
        $Config{'print_config'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
        $Config{'print_config'} =~ s/(\s+)?\n+(\s+)?//g;
        # Split the configuration variables into individual field names.         #
        @Required = split(/,/,$Config{'required'});
        @Env_Report = split(/,/,$Config{'env_report'});
        @Print_Config = split(/,/,$Config{'print_config'});
        # ACCESS CONTROL FIX: Only allow ENV variables in @valid_ENV in          #
        # @Env_Report for security reasons.                                      #
        foreach $env_item (@Env_Report) {
            foreach $valid_item (@valid_ENV) {
                if ( $env_item eq $valid_item ) { push(@temp_array, $env_item) }
        @Env_Report = @temp_array;
    sub check_required {
        # Localize the variables used in this subroutine.                        #
        local($require, @error);
        # The following insures that there were no newlines in any fields which  #
        # will be used in the header.                                            #
        if ($Config{'subject'} =~ /(\n|\r)/m || $Config{'email'} =~ /(\n|\r)/m ||
            $Config{'realname'} =~ /(\n|\r)/m || $Config{'recipient'} =~ /(\n|\r)/m) {
            &error('invalid_headers');
        # Fix XSS + HTTP Header Injection for v1.93
        foreach $lfield ('redirect', 'return_link_url') {
            # Strip new lines
            $Config{$lfield} =~ s/(\n|\r)//mg;
            # Only allow certain handlers to avoid javascript:/data: tricks
            if ($Config{$lfield} !~ /^\s*\// &&
                $Config{$lfield} !~ /^\s*(http|https|ftp):\/\//) {
                $Config{$lfield} = '';
        if (!$Config{'recipient'}) {
            if (!defined(%Form)) { &error('bad_referer') }
            else                 { &error('no_recipient') }
        else {
            # This block of code requires that the recipient address end with    #
            # a valid domain or e-mail address as defined in @recipients.        #
            foreach $send_to (split(/,/,$Config{'recipient'})) {
                foreach $recipient (@recipients) {
                    if ($send_to =~ /$recipient$/i) {
                        push(@send_to,$send_to); last;
            if ($#send_to < 0) { &error('no_recipient') }
            $Config{'recipient'} = join(',',@send_to);
        # For each require field defined in the form:                            #
        foreach $require (@Required) {
            # If the required field is the email field, the syntax of the email  #
            # address if checked to make sure it passes a valid syntax.          #
            if ($require eq 'email' && !&check_email($Config{$require})) {
                push(@error,$require);
            # Otherwise, if the required field is a configuration field and it   #
            # has no value or has been filled in with a space, send an error.    #
            elsif (defined($Config{$require})) {
                if ($Config{$require} eq '') { push(@error,$require); }
            # If it is a regular form field which has not been filled in or      #
            # filled in with a space, flag it as an error field.                 #
            elsif (!defined($Form{$require}) || $Form{$require} eq '') {
                push(@error,$require);
        # If any error fields have been found, send error message to the user.   #
        if (@error) { &error('missing_fields', @error) }
    sub return_html {
        # Local variables used in this subroutine initialized.                   #
        local($key,$sort_order,$sorted_field);
        # Now that we have finished using form values for any e-mail related     #
        # reasons, we will convert all of the form fields and config values      #
        # to remove any cross-site scripting security holes.                     #
        local($field);
        foreach $field (keys %Config) {
            $safeConfig{$field} = &clean_html($Config{$field});
        foreach $field (keys %Form) {
            $Form{$field} = &clean_html($Form{$field});
        # If redirect option is used, print the redirectional location header.   #
        if ($Config{'redirect'}) {
            print "Location: $safeConfig{'redirect'}\n\n";
        # Otherwise, begin printing the response page.                           #
        else {
            # Print HTTP header and opening HTML tags.                           #
            print "Content-type: text/html\n\n";
            print "<html>\n <head>\n";
            # Print out title of page                                            #
            if ($Config{'title'}) { print "<title>$safeConfig{'title'}</title>\n" }
            else                  { print "<title>Thank You</title>\n"        }
            print " </head>\n <body";
            # Get Body Tag Attributes                                            #
            &body_attributes;
            # Close Body Tag                                                     #
            print ">\n  <center>\n";
            # Print custom or generic title.                                     #
            if ($Config{'title'}) { print "<h1>$safeConfig{'title'}</h1>\n" }
            else { print "<h1>Thank You For Filling Out This Form</h1>\n" }
            print "</center>\n";
            print "Below is what you submitted to $safeConfig{'recipient'} on ";
            print "$date<p><hr size=1 width=75\%><p>\n";
            # If a sort order is specified, sort the form fields based on that.  #
            if ($Config{'sort'} =~ /^order:.*,.*/) {
                # Set the temporary $sort_order variable to the sorting order,   #
                # remove extraneous line breaks and spaces, remove the order:    #
                # directive and split the sort fields into an array.             #
                $sort_order = $Config{'sort'};
                $sort_order =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
                $sort_order =~ s/(\s+)?\n+(\s+)?//g;
                $sort_order =~ s/order://;
                @sorted_fields = split(/,/, $sort_order);
                # For each sorted field, if it has a value or the print blank    #
                # fields option is turned on print the form field and value.     #
                foreach $sorted_field (@sorted_fields) {
                    local $sfname = &clean_html($sorted_field);
                    if ($Config{'print_blank_fields'} || $Form{$sorted_field} ne '') {
                        print "<b>$sfname:</b> $Form{$sorted_field}<p>\n";
            # Otherwise, use the order the fields were sent, or alphabetic.      #
            else {
                # Sort alphabetically if requested.
                if ($Config{'sort'} eq 'alphabetic') {
                    @Field_Order = sort @Field_Order;
                # For each form field, if it has a value or the print blank      #
                # fields option is turned on print the form field and value.     #
                foreach $field (@Field_Order) {
                    local $fname = &clean_html($field);
                    if ($Config{'print_blank_fields'} || $Form{$field} ne '') {
                        print "<b>$fname:</b> $Form{$field}<p>\n";
            print "<p><hr size=1 width=75%><p>\n";
            # Check for a Return Link and print one if found.                    #
            if ($Config{'return_link_url'} && $Config{'return_link_title'}) {
                print "<ul>\n";
                print "<li><a href=\"$safeConfig{'return_link_url'}\">$safeConfig{'return_link_title'}</a>\n";
                print "</ul>\n";
            # Print the page footer.                                             #
            print <<"(END HTML FOOTER)";
            <hr size=1 width=75%><p>
            <center><font size=-1><a href="http://www.scriptarchive.com/formmail.html">FormMail</a> V1.93 &copy; 1995 - 2009  Matt Wright<br>
    A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive, Inc.</a></font></center>
            </body>
           </html>
    (END HTML FOOTER)
    sub send_mail {
        # Localize variables used in this subroutine.                            #
        local($print_config,$key,$sort_order,$sorted_field,$env_report);
        # Open The Mail Program
        open(MAIL,"|$mailprog");
        print MAIL "To: $Config{'recipient'}\n";
        print MAIL "From: $Config{'email'} ($Config{'realname'})\n";
        # Check for Message Subject
        if ($Config{'subject'}) { print MAIL "Subject: $Config{'subject'}\n\n" }
        else                    { print MAIL "Subject: WWW Form Submission\n\n" }
        print MAIL "Below is the result of your feedback form.  It was submitted by\n";
        print MAIL "$Config{'realname'} ($Config{'email'}) on $date\n";
        print MAIL "-" x 75 . "\n\n";
        if (@Print_Config) {
            foreach $print_config (@Print_Config) {
                if ($Config{$print_config}) {
                    print MAIL "$print_config: $Config{$print_config}\n\n";
        # If a sort order is specified, sort the form fields based on that.      #
        if ($Config{'sort'} =~ /^order:.*,.*/) {
            # Remove extraneous line breaks and spaces, remove the order:        #
            # directive and split the sort fields into an array.                 #
            local $sort_order = $Config{'sort'};
            $sort_order =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
            $sort_order =~ s/(\s+)?\n+(\s+)?//g;
            $sort_order =~ s/order://;
            @sorted_fields = split(/,/, $sort_order);
            # For each sorted field, if it has a value or the print blank        #
            # fields option is turned on print the form field and value.         #
            foreach $sorted_field (@sorted_fields) {
                if ($Config{'print_blank_fields'} || $Form{$sorted_field} ne '') {
                    print MAIL "$sorted_field: $Form{$sorted_field}\n\n";
        # Otherwise, print fields in order they were sent or alphabetically.     #
        else {
            # Sort alphabetically if specified:                                  #
            if ($Config{'sort'} eq 'alphabetic') {
                @Field_Order = sort @Field_Order;
            # For each form field, if it has a value or the print blank          #
            # fields option is turned on print the form field and value.         #
            foreach $field (@Field_Order) {
                if ($Config{'print_blank_fields'} || $Form{$field} ne '') {
                    print MAIL "$field: $Form{$field}\n\n";
        print MAIL "-" x 75 . "\n\n";
        # Send any specified Environment Variables to recipient.                 #
        foreach $env_report (@Env_Report) {
            if ($ENV{$env_report}) {
                print MAIL "$env_report: $ENV{$env_report}\n";
        close (MAIL);
    sub check_email {
        # Initialize local email variable with input to subroutine.              #
        $email = $_[0];
        # If the e-mail address contains:                                        #
        if ($email =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ ||
            # the e-mail address contains an invalid syntax.  Or, if the         #
            # syntax does not match the following regular expression pattern     #
            # it fails basic syntax verification.                                #
            $email !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z0-9]+)(\]?)$/) {
            # Basic syntax requires:  one or more characters before the @ sign,  #
            # followed by an optional '[', then any number of letters, numbers,  #
            # dashes or periods (valid domain/IP characters) ending in a period  #
            # and then 2 or 3 letters (for domain suffixes) or 1 to 3 numbers    #
            # (for IP addresses).  An ending bracket is also allowed as it is    #
            # valid syntax to have an email address like: user@[255.255.255.0]   #
            # Return a false value, since the e-mail address did not pass valid  #
            # syntax.                                                            #
            return 0;
        else {
            # Return a true value, e-mail verification passed.                   #
            return 1;
    # This was added into v1.91 to further secure the recipients array.  Now, by #
    # default it will assume that valid recipients include only users with       #
    # usernames A-Z, a-z, 0-9, _ and - that match your domain exactly.  If this  #
    # is not what you want, you should read more detailed instructions regarding #
    # the configuration of the @recipients variable in the documentation.        #
    sub fill_recipients {
        local(@domains) = @_;
        local($domain,@return_recips);
        foreach $domain (@domains) {
            if ($domain =~ /^\d+\.\d+\.\d+\.\d+$/) {
                $domain =~ s/\./\\\./g;
                push(@return_recips,'^[\w\-\.]+\@\[' . $domain . '\]');
            else {
                $domain =~ s/\./\\\./g;
                $domain =~ s/\-/\\\-/g;
                push(@return_recips,'^[\w\-\.]+\@' . $domain);
        return @return_recips;
    # This function will convert <, >, & and " to their HTML equivalents.        #
    sub clean_html {
        local $value = $_[0];
        $value =~ s/\&/\&amp;/g;
        $value =~ s/</\&lt;/g;
        $value =~ s/>/\&gt;/g;
        $value =~ s/"/\&quot;/g;
        return $value;
    sub body_attributes {
        # Check for Background Color
        if ($Config{'bgcolor'}) { print " bgcolor=\"$safeConfig{'bgcolor'}\"" }
        # Check for Background Image
        if ($Config{'background'}) { print " background=\"$safeConfig{'background'}\"" }
        # Check for Link Color
        if ($Config{'link_color'}) { print " link=\"$safeConfig{'link_color'}\"" }
        # Check for Visited Link Color
        if ($Config{'vlink_color'}) { print " vlink=\"$safeConfig{'vlink_color'}\"" }
        # Check for Active Link Color
        if ($Config{'alink_color'}) { print " alink=\"$safeConfig{'alink_color'}\"" }
        # Check for Body Text Color
        if ($Config{'text_color'}) { print " text=\"$safeConfig{'text_color'}\"" }
    sub error {
        # Localize variables and assign subroutine input.                        #
        local($error,@error_fields) = @_;
        local($host,$missing_field,$missing_field_list);
        if ($error eq 'bad_referer') {
            if ($ENV{'HTTP_REFERER'} =~ m|^https?://([\w\.]+)|i) {
                $host = $1;
                my $referer = &clean_html($ENV{'HTTP_REFERER'});
                print <<"(END ERROR HTML)";
    Content-type: text/html
    <html>
    <head>
      <title>Bad Referrer - Access Denied</title>
    </head>
    <body bgcolor=#FFFFFF text=#000000>
      <center>
       <table border=0 width=600 bgcolor=#9C9C9C>
        <tr><th><font size=+2>Bad Referrer - Access Denied</font></th></tr>
       </table>
       <table border=0 width=600 bgcolor=#CFCFCF>
        <tr><td>The form attempting to use
         <a href="http://www.scriptarchive.com/formmail.html">FormMail</a>
         resides at <tt>$referer</tt>, which is not allowed to access
         this cgi script.<p>
         If you are attempting to configure FormMail to run with this form, you need
         to add the following to \@referers, explained in detail in the
         <a href="http://www.scriptarchive.com/readme/formmail.html">README</a> file.<p>
         Add <tt>'$host'</tt> to your <tt><b>\@referers</b></tt> array.<hr size=1>
         <center><font size=-1>
          <a href="http://www.scriptarchive.com/formmail.html">FormMail</a> V1.93 &copy; 1995 - 2009  Matt Wright<br>
          A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive, Inc.</a>
         </font></center>
        </td></tr>
       </table>
      </center>
    </body>
    </html>
    (END ERROR HTML)
            else {
                print <<"(END ERROR HTML)";
    Content-type: text/html
    <html>
    <head>
      <title>FormMail v1.93</title>
    </head>
    <body bgcolor=#FFFFFF text=#000000>
      <center>
       <table border=0 width=600 bgcolor=#9C9C9C>
        <tr><th><font size=+2>FormMail</font></th></tr>
       </table>
       <table border=0 width=600 bgcolor=#CFCFCF>
        <tr><th><tt><font size=+1>Copyright 1995 - 2009 Matt Wright<br>
            Version 1.93 - Released June 25, 2009<br>
            A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive,
            Inc.</a></font></tt></th></tr>
       </table>
      </center>
    </body>
    </html>
    (END ERROR HTML)
        elsif ($error eq 'request_method') {
                print <<"(END ERROR HTML)";
    Content-type: text/html
    <html>
    <head>
      <title>Error: Request Method</title>
    </head>
    <body bgcolor=#FFFFFF text=#000000>
      <center>
       <table border=0 width=600 bgcolor=#9C9C9C>
        <tr><th><font size=+2>Error: Request Method</font></th></tr>
       </table>
       <table border=0 width=600 bgcolor=#CFCFCF>
        <tr><td>The Request Method of the Form you submitted did not match
         either <tt>GET</tt> or <tt>POST</tt>.  Please check the form and make sure the
         <tt>method=</tt> statement is in upper case and matches <tt>GET</tt> or <tt>POST</tt>.<p>
         <center><font size=-1>
          <a href="http://www.scriptarchive.com/formmail.html">FormMail</a> V1.93 &copy; 1995 - 2009  Matt Wright<br>
          A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive, Inc.</a>
         </font></center>
        </td></tr>
       </table>
      </center>
    </body>
    </html>
    (END ERROR HTML)
        elsif ($error eq 'no_recipient') {
                print <<"(END ERROR HTML)";
    Content-type: text/html
    <html>
    <head>
      <title>Error: Bad/No Recipient</title>
    </head>
    <body bgcolor=#FFFFFF text=#000000>
      <center>
       <table border=0 width=600 bgcolor=#9C9C9C>
        <tr><th><font size=+2>Error: Bad/No Recipient</font></th></tr>
       </table>
       <table border=0 width=600 bgcolor=#CFCFCF>
        <tr><td>There was no recipient or an invalid recipient specified in the data sent to FormMail.  Please
         make sure you have filled in the <tt>recipient</tt> form field with an e-mail
         address that has been configured in <tt>\@recipients</tt>.  More information on filling in <tt>recipient</tt> form fields and variables can be
         found in the <a href="http://www.scriptarchive.com/readme/formmail.html">README</a> file.<hr size=1>
         <center><font size=-1>
          <a href="http://www.scriptarchive.com/formmail.html">FormMail</a> V1.93 &copy; 1995 - 2009  Matt Wright<br>
          A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive, Inc.</a>
         </font></center>
        </td></tr>
       </table>
      </center>
    </body>
    </html>
    (END ERROR HTML)
        elsif ($error eq 'invalid_headers') {
                print <<"(END ERROR HTML)";
    Content-type: text/html
    <html>
    <head>
      <title>Error: Bad Header Fields</title>
    </head>
    <body bgcolor=#FFFFFF text=#000000>
      <center>
       <table border=0 width=600 bgcolor=#9C9C9C>
        <tr><th><font size=+2>Error: Bad Header Fields</font></th></tr>
       </table>
       <table border=0 width=600 bgcolor=#CFCFCF>
        <tr><td>The header fields, which include <tt>recipient</tt>, <tt>email</tt>, <tt>realname</tt> and <tt>subject</tt> were
         filled in with invalid values. You may not include any newline characters in these parameters.
         More information on filling in these form fields and variables can be
         found in the <a href="http://www.scriptarchive.com/readme/formmail.html">README</a> file.<hr size=1>
         <center><font size=-1>
          <a href="http://www.scriptarchive.com/formmail.html">FormMail</a> V1.93 &copy; 1995 - 2009  Matt Wright<br>
          A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive, Inc.</a>
         </font></center>
        </td></tr>
       </table>
      </center>
    </body>
    </html>
    (END ERROR HTML)
        elsif ($error eq 'missing_fields') {
            if ($Config{'missing_fields_redirect'}) {
                print "Location: " . &clean_html($Config{'missing_fields_redirect'}) . "\n\n";
            else {
                foreach $missing_field (@error_fields) {
                    $missing_field_list .= "<li>" . &clean_html($missing_field) . "\n";
                print <<"(END ERROR HTML)";
    Content-type: text/html
    <html>
    <head>
      <title>Error: Blank Fields</title>
    </head>
      <center>
       <table border=0 width=600 bgcolor=#9C9C9C>
        <tr><th><font size=+2>Error: Blank Fields</font></th></tr>
       </table>
       <table border=0 width=600 bgcolor=#CFCFCF>
        <tr><td>The following fields were left blank in your submission form:<p>
         <ul>
    $missing_field_list
         </ul><br>
         These fields must be filled in before you can successfully submit the form.<p>
         Please use your browser's back button to return to the form and try again.<hr size=1>
         <center><font size=-1>
          <a href="http://www.scriptarchive.com/formmail.html">FormMail</a> V1.93 &copy; 1995 - 2009  Matt Wright<br>
          A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive, Inc.</a>
         </font></center>
        </td></tr>
       </table>
      </center>
    </body>
    </html>
    (END ERROR HTML)
        exit;

    I haven't used  Matt Wright's scripts in this century, but I'm pretty sure that Perl still needs to go into your CGI bin and the permissions level (chmod) must be set to 755 or possibly 777 for the script to read, write & execute.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Submit report and export to memory

    Hi
    I am using this code to submit report
    submit ZM005REP
    WITH S_BLEND IN R2
    WITH S_GROUP IN R3
    WITH S_WERKS IN r1
    exporting list to memory and return.
    I am using LIST_FROM_MEMORY to read the list.
    I want to further use the values from this list for calculations , but when I saw the list its just an array of strings.
    I want to read the opening bal field which is returned in this list.
    Any advice on this ?
    Thanks,
    Shital

    Hi,
    DATA  BEGIN OF itab_list OCCURS 0.
            INCLUDE STRUCTURE abaplist.
    DATA  END OF itab_list.
    DATA: BEGIN OF vlist OCCURS 0,
            filler1(01)   TYPE c,
            field1(06)    TYPE c,
            filler(08)    TYPE c,
            field2(10)    TYPE c,
            filler3(01)   TYPE c,
            field3(10)    TYPE c,
            filler4(01)   TYPE c,
            field4(3)     TYPE c,
            filler5(02)   TYPE c,
            field5(15)    TYPE c,
            filler6(02)   TYPE c,
            field6(30)    TYPE c,
            filler7(43)   TYPE c,
            field7(10)    TYPE c,
          END OF vlist.
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = vlist
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    Then you can use the ITAB_LIST for caliculation which is having all the values.
    Thanks
    Sudheer

Maybe you are looking for