Print cumulative field in table

Hello,
Iu2019m just a beginner with Interactive Forms but maybe there is someone who could help me with the following issue:
In my first form I have to display some columns from the table VBFA (Sales Document Flow) One of the columns (RFWRT-  Reference value) contains the amount.  The cumulative value of this column must also displayed in the form. So Iu2019ll capable to import the table with table type VBFA_T into the form. If I drag the table on the layout I see the contents of the field RFWRT.
But my question is how could I include the cumulative field to the table?  Just describe the steps in more detail how to do this. Here there is a part of the interface code I already have:
DATA: VBFA              TYPE VBFA_T,
      ERROR_STRING      TYPE STRING,
      RETURN            LIKE BAPIRETURN1.
  SELECT *
    INTO WA_VBFA
    FROM VBFA
    WHERE VBELV =
    AND VBTYP_N = 'M'.
    APPEND WA_VBFA TO VBFA.
  ENDSELECT.
Now call the generated function module.
CALL FUNCTION FM_NAME
  EXPORTING
    /1BCDWB/DOCPARAMS  = FP_DOCPARAMS
    VBFA               = VBFA
   IMPORTING
     /1bcdwb/formoutput =
  EXCEPTIONS
    USAGE_ERROR        = 1
    SYSTEM_ERROR       = 2
    INTERNAL_ERROR     = 3
    OTHERS             = 4.
Kind regards,
Richard Meijn

If I open the interface and open the tree "Form Interface" and the "Import" level I see the parameter and the type name.
In my case Parameter name = VBFA and the Type Name = VBFA_T. The table type VBFA_T has a line type VBFA which is a clustered table. I'll could appends the structure with the cumulative field in SE11 but is it possible to do it on a nice way to create a new (Clustered) table ZVBFA with structure VBFA and append the desired field there?
I'm so far I know not able to add a (cumulative) field to a new created table/view because VBFA is a clustered table.
Kind regards,
Richard Meijn

Similar Messages

  • Arithmatic operations on fields in tables

    Hello Members,
    My query might seem pretty basic, but seems uphill to me, as i have no idea how to perform arithmatic operations between fields in tables.
    I have two tables temp1 and temp2. each of these tables have 2 fields : account no. and balance
    the data would resemble the following, in each of the tables:
    6.28899273 0
    6.28899274 0
    6.28899275 0
    6.28899289 625.12
    6.28899292 2666.24
    Can you please give me an idea how to go about doing the following:
    1. Compare the tables temp1 and temp2 for their respective account numbers and balances
    2. Copy the results in a new table temp3, which will have 2 columns :
    account no ( common to temp1 and temp2 )
    deviation: subtracted balance of temp1 and temp2
    regards,
    novice82

    user8635888 wrote:
    Will be great if someone can give me a headstart on the following:
    I have two tables temp1 and temp2 ( tables belonging to 2 different databases ) with two feilds
    account no., ( Common in both tables )
    balance ( float data type ).
    1. I want to compare the balance feilds in temp1 and temp2.
    print out the no. of accounts and percentage of match and mismatch.
    2. output the a/c nos. whose balances dont match into a seperate table..Hello, this might be one approach for you:
    First, identify those accounts that are different, and INSERT them into the table
    INSERT /*+ APPEND */ INTO target_table
    SELECT t1.account_no, t1.balance, t2.balance
      FROM table1 t1
      JOIN table2@db_link t2 ON (t1.account_no = t2.account_no)
    WHERE NVL(t1.balance, -99999999999) != NVL(t2.balance, -99999999999);This assumes that -99999999999 can never be a valid balance.
    Then, you can cycle through this table and print out the mismatches:
    set serveroutput on size 100000 (or set serveroutput on size unlimited)
    BEGIN
      FOR cur_rec IN (SELECT account_no, (t1.balance / CASE t2.balance WHEN 0 THEN NULL END) * 100 percent_mismatch FROM target_table)
        LOOP
          DBMS_OUTPUT.PUT_LINE('Account No: ' || cur_rec.account_no || ', Percent Mismatch: ' || cur_rec.percent_mismatch);
        END LOOP;
    END;
    /If you have a lot of records this may not be a feasible approach, and you'd be better looking at UTL_FILE if you to capture the anomolies in a file.
    And alternative would be to do the whole lot in SQL:
    set pagesize 5000
    set linesize 300
    set colsep ','
    spool /tmp/your_file.csv
    SELECT t1.account_no, t1.balance, t2.balance, (t1.balance / CASE t2.balance WHEN 0 THEN NULL END) * 100 percent_mismatch
      FROM table1 t1
      JOIN table2@db_link t2 ON (t1.account_no = t2.account_no)
    WHERE NVL(t1.balance, -99999999999) != NVL(t2.balance, -99999999999);
    user8635888 wrote:another question, that I have is, how does sql handle the computation, if a value in a particular field is divided by 0 You'll see from the code that if the divisor is zero, I'm substiting NULL, which means that the percent_mismatch will be NULL.

  • Overflow field of table in a form ( in abap using at new ... at end..... )

    Hi everyone I have to print a table in a form. But only when change a field of table i have to print the header... like this
    Field1      Field2     Field3
    A              1            2
    A              3            4
    B              1            1
    C              1            2
    C              3            4
    I have to print
    (header)       A
            1                    2
           3                     4
    (header)       B
            1                    1
    (header)       C
            1                    2
           3                     4
    Is it possible? Thank you...

    HI friend,
    I think these links will be helpful for you.
    Link : [Displaying Contents in Cells|http://help.sap.com/saphelp_nw70/helpdata/en/fa/0c1447d30111d3b568006094192fe3/content.htm]
    Link : [Specifying Table Output|http://help.sap.com/saphelp_nw70/helpdata/en/0b/5da4de2cf511d5b692006094192fe3/content.htm]
    I too studied all the documentation of the class which you have mentioned and its two methods. It should work fine, but you are facing an issue. So try using the methods which they have specified in the above links and see are you arriving to your required solution.
    Revert back to me if you have any queries.
    Thanks,
    Sri Hari

  • How to print a field on the last page of Smartform?

    HI FRIENDS,
    I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
    HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
    SYSF BUT NOT worked.
    Thank you.
    ROGERIO VAZ

    Hi,
    Goto the conditions tab of that window and enable the check box for Only after the end of main window.
    This will surely print your field in the last page.
    try this and get back to me if any issues.
    Regards,
    Anand.

  • How to print a field on the last page of Smartform with more  of 2 pages?

    HI FRIENDS,
    I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
    HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
    SFSY BUT NOT worked.      
    The form has  more of  2 pages.
    Thank you.
    ROGERIO VAZ

    Hi ,
    You dont have to hard code anything to achieve this functionality,
    just create a window and in that window define a text element to print
    that variable.In the conditions tab of that window check the check box
    "only after end of main window".i think you might have used a main window,
    so irrespective of the no of pages the smartform prints,it always displays that
    field in the last page of the smartform.
    regards,
    srikanth.

  • Conditionlly bold fields in table

    I have a field printed in my MS table as: <?GRADE01?>. I need to make the field bold, based on a condition.
    If the value of this: <?/DOCUMENT/REGION/ROWSET1/ROWSET1_ROW/MP1?>
    equals the value stored in this: <?/DOCUMENT/REGION/ROWSET1/ROWSET1_ROW/CUR_MP?> I want to bold the field. Is that possible?

    You should be able to compare.
    Add a conditional format field with the following code next to the Grade form field in the same cell.
    <?if:/DOCUMENT/REGION/ROWSET1/ROWSET1_ROW/MP1= /DOCUMENT/REGION/ROWSET1/ROWSET1_ROW/CUR_MP?><?attribute@incontext:color;'Black'?><?attribute@incontext:font-weight;'bold'?><?end if?>
    Thanks!

  • Printing Currency Fields

    Hi,
    How to Print Currency Fields in Smartforms [in tables node]
    Thanks & Regards,
    Ajith

    hi
    use sth like this
    data: lv_neto type string,
             wa_tabla-to_neto like bseg-dmbrt.
    write wa_tabla-to_neto to lv_neto currency 'CLP'.
    then in ur text of the smartform write &lv_neto&, doing that ur amount will be showed fine.
    Regards

  • Update PRODH field from table T179T

    hi,
    i want to update PRODH field from table T179T into table VBRP. for this we
    need to take selection option also.
    selection option will be :
    ·             Sales Organization (field VBRK-VKORG)
    ·       Billing Date Range (VBRK-FKDAT)
    ·       Distribution Channel (Vbrk-vtweg
    while i have done this for one field by using hard code but like:
    TABLES: VBRP.
    CLEAR VBRP.
    UPDATE VBRP SET PRODH = 'PLC01' WHERE VBELN = '0008300051'.
    SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
    WRITE: VBRP-VBELN,VBRP-PRODH.
    but this is not the right way. please guide me how to solve this.

    TABLES: VBRP.
    CLEAR VBRP.
    UPDATE VBRP SET PRODH = 'PLC01' WHERE VBELN = '0008300051'.
    <b>commit work.</b>
    SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
    WRITE: VBRP-VBELN,VBRP-PRODH.
    use commit work after update statement.
    But this code would make vbrp-vbeln as plc01 only.
    If you want to get the prodh value from t179t, then write a sleect on t179t and then update.
    TABLES: VBRP.
    CLEAR VBRP.
    select single prodh
      from t179t
    where......
    UPDATE VBRP SET PRODH = t179-prodh WHERE VBELN = '0008300051'.
    commit work.
    SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
    WRITE: VBRP-VBELN,VBRP-PRODH.

  • Open T-code on double click of field in table maintenance

    Hi Gurus,
    I have one scenario, I have to show a transaction on double click event on a field of Table Maintence.
    Please guide me in this .
    Is there is any event in Table Maintenance Events to capture double_click of a field.
    Regards,
    Sowmen

    1. In the field attributes of the particular field there is a chechbox  in display tab which says respond to double click, check that.
    2. Assign the fuction code "PICK" for function code F2 in GUI status.
    3.Now whenver you double click the field function code "PICK" gettes triggeed.
    Now you can wrie yyou code based on this function code.
    CASE sy-comm.
    WHEN 'PICK'.
    *If you want the name of the field and the value in that field use the below code.
    GET CURSOR FIELD gv_field VALUE gv_cursor_value.
    *DO your operation based on the field and the value.
    ENDCASE.
    Regards,
    Smithesh

  • How we can Print a field Value in last line of the layout

    Hello:
    I am doing Check printing report ... Accroding to that I am facing a problem to print a Field value in last line of the layout....Anyone Can help to this please.....

    Hello,
    Take a look to the example provided in the note :
    Note.253881.1 How to Create a Report With a Frame Only on the Last Page at a Fixed Position
    Regards

  • Field and Table for PGI status updation

    Hi All,
    I want to know in which field and table the PGI status will get updated.
    i.e. once we do the PGI for a delivery in which table will this PGI status gets updated.
    Thanks in advance for help.
    Harini

    Hi Harini,
    In Table VBUK you 3 different status related fields for  sales documents.
    Over all status field name GBSTK ( here it gives the total status of praticular sales document) here you see options
    A  Not yet processed      ( This means its complete open)
    B  Partially processed     ( This means the sales doc is partially processed)
    C  Completely processed  ( This means the sales doc is completly processed)
    Delivery status  and over all delivery status field name LFSTK and LFGSK respectively, these 2 fields will be same always ( here it gives the total status of praticular sales document) here you see options
    A  Not yet processed      ( This means its completly  open)
    B  Partially processed     ( This means the delivery doc is partially processed)
    C  Completely processed  ( This means the delivery doc is completly processed)
    So overall status can be  different then delivery or overall delivery status.
    If sales document has 100 quantity for 1 material, if delivery is done for 50 quantity.
    Then over all status field name GBSTK will be B  Partially processed and delivery and overall delivery will be C  Completely processed  .
    Regards
    vK

  • Field  and Table name for purchaser

    I want to know the field and table name for purchaser id and purchaser name.
    Plz help me.

    Dear
    Purchaser name are define in Header level data in Purchase Order EKKO & Purchase ID define as a Purchasing Group
    Purchser Name EKKO-ERNAM
    Purchase I D  EKKO-EKGRP
    Regards
    Aamir

  • Where can i get   SALES  ORGANIZATION    FIELD and TABLE

    Can anybody tell me   where can i get   FIELD  and   TABLE  Name   OF  " sales organization    "

    Dear Sandeep,
    u will find VKORG is the Sales Organisation .
    u will find this Field in every related SD Module Table...
    Like ...VBAP,BKPF ..etc..
    Hope it helps...!!!
    Pls reward if Helpful...!!!

  • Storage Location Wise Stock Value field and Table

    Hi ,
    Please let me know the storage location wise stock value field and table.
    Regards
    Suresh

    Hi Suresh,
    As per my understanding it is not possible in a single Table.
    If this is required for customized Z report then use this logic it may gives the correct information.
    In the combination of MARD and MBEW.. From MBEW you can get the value for each Base Unit of Measure then multiply that value with storage location stock.
    It may usefull to u..in the mean time i will try for some other option.
    Please revert if u have any query.
    Regards
    Durga Sana

  • CRMT_BW_DS_ACTIVITY- Field and table origin

    Hi Guys,
                   I am working with this extractor CRMT_BW_DS_ACTIVITY. I am trying to find the origin table and the origin field for each of the fields in this extractor.The sap help document is of no use, for example the first field i look at in the help is ACTIVITY_PARTNER (extract stucture field), the sap help says the origin table is PARTNER and origin field is PARTNER_NO. But in the CRM system there is no table called PARTNER. Can some one shed light on this please.
    Thank you and points for useful replies

    hi,
    add CRMD_ ...
    you can try BWA1 and give datasource name,
    tab 'mapping', add CRMD_ to value in column Segmentname.
    e.g field ACTIVITY_PARTNER, table name is CRMD_PARTNER
    How to find out the tables related to CRM datasources?
    hope this helps.

Maybe you are looking for