Total Item Value Field in PR

Dear Experts ,
I need to know in which table where  the Total Value Item field is in  ... because i want to use it in SQVI
Note : I searched for it in EBAN and EBKN but i didn't find it .. i think it is not stored in the table and just being calculated (Price * Quantity) in the run time .
Thanks

Hi ,
I think you can find the logical table for that structure table. And you can use that logical table in query.
Regards,
Zubin
Edited by: zubin on Feb 25, 2009 8:36 AM

Similar Messages

  • Total Settlement Value field  not getting populated in IW38  Transaction

    Dear all PMCS group Members,
    I have a list of  Maintenance Orders on which  Actual Costs are posted and also periodic settlements done before TECO.  When i list these Maintenance Orders in IW38 transaction the system is bringing in the values in  Total Actual Costs column  but  not the Settlement values in Total settlement column which i need to cross check before i do mass TECO. 
    Your help will be greatly appreciated.
    regards,
    rajaraman.

    Dear Rajaraman,
    You can see the Total Settlement values by using tcode IW38.
    ---> Goto IW38
    ---> Execute the Report for selected Orders
    ---> Click on the Current Tab or Press CTRL+F8
    ---> Select the Column of Total Settlements and Actual Settlements
    ---> Click on the Save Button... it will ask you to enter the Layout... Enter it and hit Enter
    Your Required Fields will be Displayed.
    Regards
    BK

  • COPA -update new value field

    Hi All,
    We have 3 revenue value fields and created new value field to capture total revenues for all 3 revenue value fields.
    only new sales orders total revenue value field is populated with revenues.how can we update old sales orders revenue value field information with total value field?
    Revenue A + Revenue B + Revenue C= Total revenue
    Thanks,
    Anusha

    Hi Anu
    KE4S is one option
    Another one is to do KE21n.. but that will be cumbersome.
    You can develop a custom program using Bapi to upload the values automatically
    Last option is to add those values in report manually or using key figure scheme ker1
    Br. Ajay M

  • Pending Value Field. In SO reports

    Hy All Experts.
    Please give me Details of Pending Order Value & Total Order Value Field for Sales Order Reports.
    I used following Tables in Reports.
    TABLES: VBEP , VBAP ,  VBPA , VBKD , VBAK , LIKP , LIPS , VBUP , KNA1.
    Thnaks in Advance.
    Bhavesh Panchal.

    hi, hope this code will help u.
    MOVE-CORRESPONDING it_vbep to IT_VBEPVB.
    append it_VBEPVB.
    ALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
    EXPORTING
       fbeleg                        = it_vbap-vbeln
       fposnr                        = it_vbap-Posnr
    VERRECHNUNG                  = ' '
    S073_ALT                     = ' '
    F_NO_SORT                    = ' '
    tables
       fvbfa                         = it_vbfa
       fvbup                         = it_vbup
       fxvbep                        = it_VBEPVB
    VBLB                         =
       fvbap                         = it_VBAPVB
    EXCEPTIONS
      FEHLER_BEI_LESEN_FVBUP        = 1
      FEHLER_BEI_LESEN_FXVBEP       = 2
      OTHERS                        = 3
    LOOP AT it_VBEPVB WHERE POSNR = IT_VBAP-POSNR.
    IT_FINAL-KWMENG_d = IT_FINAL-KWMENG_d + it_VBEPVB-VSMNG.  " COMPUTE DELIVERY QTY
    IT_FINAL-KWMENG_p = IT_FINAL-KWMENG - IT_FINAL-KWMENG_d.    "COMPUTE pENDING QTY
    in this way u will get pending order quantity.
    multiply this quantity with ur list amout which  u will get it from konv-KSCHL = ZLSP .
    multiply pending quantiy with konv-kwert where kschl = 'ZLSP'

  • How to set item values without using fields in branch's ACTION block?

    Okay, I will try to say this in a easy way so it is not weird.
    I have created a button, SAVE, that has a Branch of branch type: Branch To Function Returning A Page. This is my code for the branch:
    if :P2008_NAP_SUPPORTING_MATERIALS = 'Yes' then
    return '2092';
    else
    return '2040';
    end if;
    The code for this type of branch is stored in the ACTION block of the Branch page. The ACTION block for a Branch of branch type: Branch To Function Returning A Page is different than the ACTION block for a Branch of branch type: Branch To Page Or URL.
    I need to set some item values with some specific values, which I can do with a branch type: Branch To Page Or URL. This is not possible with the branch type: Branch To Function Returning A Page. The ACTION block is totally different.
    How can I set some values on say Page 2040 from Page 2008 without using fields in the branch's ACTION block?
    Thank you in advance,
    Maggie

    Andy and Scott,
    I love seeing different perspectives in solving problems, it opens my eyes to new ways of looking at/using the tools (reserved words and 'Function returning a Page', etc.).
    One of my pet peeves has been that on branches I was limited to only 10 variables to be passed (I know, who would want more - but there was an instance where I had to pass more), and an even more frustrating time when using report Column Linking, which limits me to 3 variables.
    At least with the Branch linking I can use your suggestion Andy and add the variable setting statements into the function. I am assuming of course (and I should be able to) that I will be able to set more that 10 variables in a IF condition prior to the RETURN statement. This method will be much more understandable, for me, when looking through the branch at a later time to see what is happening, than an URL link where all the variable are strung out 'in a line' so to speak.
    I will still need to use URL Target branching on Links contained within a Column Attribute when I need to pass more than 3 variables, of which I have several places where I do this.
    Thomas

  • BUG: Sorting drop-down lists from the field tab when using "specify item values"

    Hi all,
    I've finished creating my form now, but I came across this whilst writing up my documentation for maintenance tasks.
    This occurs when adding new values to a drop-down list that has the "Specify item values" checkbox in the binding tab checked.
    When I then try to sort my list using the built in sort buttons, it will sort the items, but the list of specified values in the binding tab does not sort reorder to stay with the original items in the list.  This is hapenning when I sort from the Object > Field tab.  If I sort in the Object > Binding tab then the sort will include the specified values.
    For example:
    A    5
    C    2
    D    9
    Add a new value to get:
    A    5
    C    2
    D    9
    B    10
    Sort the list using the button:
    A    5
    B    2
    C    9
    D    10
    But it should be:
    A     5
    B     10
    C     2
    D     9

    I was able to duplicate this problem and it looks like a possible bug.  I've submitted it to support.

  • Item category related to Quotation, Statistical value field

    Hi All,
    IN my Project, Item category Y003 which is used in creation of Quotions, for which Statistical value is 'X' which means "No cumulation - Values can not be used Statistically". My requirement is I need to change this filed value to 'Y' which means " No Cummulation - Values can be used statistically". If I change this filed value, it will solve issue currently I am facing but I would like to know what are the other implications.
    Could any one of you please let me know what will be implications if I change Statistical value from 'X' to 'Y'.
    Thanks in Advance
    Anil

    Hello,
    The maintain Functionality of this field is to ADD the Item values to the Sales document header values
    If the value is Blank then all the item values will be added to the header values
    If the Values is X then No Cummulation and the values are not statistical
    If the Value is  Y then No cummulation and the values are statistical
    Apart from the above there is no impact in the sales document

  • Is it possible to change the VBAP-ADRNR item address field value?

    Hi,
    Is it possible to update the VBAP-ADRNR item record field value?
    I am trying to update this field value from BAPI_SALESORDER_CHANGE but it is not changing the value.
    I am only able to change the corresponding address for that address number.
    But I need to change the address number( I want to replace with header address number) itself.
    If any ideas please let me know.
    Thanks,
    Mohan.

    ajitabap wrote:
    Hi
    >
    > Schedule Lines related Data USING BAPISDORDER_GETDETAILEDLIST Then Pass them to BAPI_SALESORDER_CHANGE Then It work and update the field.
    >
    > Regards
    > AJIT
    eh????
    What's the relevance of schedule lines and ADRNR?
    @OP: Don't. There is a reason why SAP gives out a new ADRNR. And manually changing the value of a primary/foreign key is never a good thing to do.

  • Dynamically Update a number field by summing of page item values.

    Hi,
    I'm trying to update a number field on an apex page by summing up the values of multiple page items. I've tried to follow this tutorial http://st-curriculum.oracle.com/obe/db/apex/r40/apexdynactions/apexdynactions_ll.htm , especially the "Create a Set Value Dynamic Action Using PL/SQL" part.
    In the tutorial example they return an page item value P3_SAL multiplied by a multiplier they've determined by another page item's case. What I want to do is much simpler in that I just want to add up multiple page item values and then display them in a number field at the bottom of the page.
    so the code I tried to use based on the tutorial is in the tab: Home >Application Builder>Application 103>Page 3>Edit Dynamic Action>Create / Edit Action
    Set Type: PL/SQL Function Body
    PL/SQL Function Body:
    BEGIN
    return :P3_ITEM1+P3_ITEM2+P3_ITEM3;
    END;
    Page Items to Submit: P3_ITEM1,P3_ITEM2,P3_ITEM3
    But it gives me an error that I need to declare the identifiers, yet it works if I only use one item and I can perform any arithmetic.
    ie.
    BEGIN
    return :P3_ITEM1+1000;
    END;
    Any help would be appreciated.

    PL/SQL Function Body:
    BEGIN
    return :P3_ITEM1+P3_ITEM2+P3_ITEM3;
    END;
    Page Items to Submit: P3_ITEM1,P3_ITEM2,P3_ITEM3
    But it gives me an error that I need to declare the identifiers, yet it works if I only use one item and I can perform any arithmetic.In your code is missing the ":" for the items P3_ITEM2 and P3_ITEM3.
    Try this:
    BEGIN
    return :P3_ITEM1+:P3_ITEM2+:P3_ITEM3;
    END;

  • CO-PA Value Field from Sales Document: Item Data

    Hi,
    I need to see a field from sales document.
    This field is "volume" and it is in table VBAP, field VOLUM.
    Can any body give a hint how should I configure the system to get data on a value field if I want to run a report?
    Thanks
    G

    Try creating a characteristic from VBAP. KEA5 is the tcode. Create a new characteristics from table VBAP and pick VOLUM. Then it will be availble for u in COPA.

  • How to reference SQL column value for  page item text field

    greetings,
    I created a simple report based on sql query. the query is select employeeid,salary from emp_tbl. under the report column i see employeeid and salary. I created a page item text field with the source type pl/sql function body. inside this source is simple block.
    begin
    if salary < 10000 then
    return (1);
    else
    return (2);
    end if;
    end;
    from the error i take it that it doesn't understand salary. I have tried bind variable (:salary) , hash marks (#salary#), ampersand (&salary.) but nothing works. Is this even possible?
    thank you,
    mon

    Hi Mon,
    I think you will find that anything you do in Forms, you can achieve in Apex, but you may have to think a little differently. Finding direct equivalents in both environments may not be easy or even possible in some circumstances, but with a little knowledge and thought an equivalent overall business flow can be achieved that is just as efficient.
    For example, in Forms where you have a multi row block based on a table, if you need to add any derived fields then you will add these at the block level. I can see that this is what you are trying to achieve in Apex.
    In Apex this will be more easily achieved by specifying the derived fields as part of the query for the region, and if the derivation of the fields is complex you can use user defined functions. If you require page type items to be displayed such as text boxes, LOV's, radiogroups, datepickers etc then these can be embedded in the query with the use of the Apex API, see the APEX_ITEM supplied package.
    I know this is still very high level, but I hope it helps you on your way in your journey with Apex.
    Regards
    Andre

  • Make Net Value Field at item level Editable in Sales Order

    Hi
    All pricing in our system are manual .
    So the client wants to change the Net Value Field in Credit and Debit Memo Request to be Editable ( Currently it is not modifiable)
    Plz suggest how to g about it.
    Do i need to use Userexit_ Field_ Modification, if yes how , The field VBAP-NETWR.
    REgards
    Rohit

    Hi Yadav
    Changing Net Value will effect the updation of various tables ...so u r right not the correct approach .
    Can i put condition type and its value in Credit Request Memo and its value aditable same as in screen for Sales Order .if yes how , changing screen sequence group in credit memo request is creating problems
    Regards
    Rohit

  • Not allowing totaling of a field in alv output

    hi,
    I had made a ALV in which i have to hide 1 field for getting it totaling.
    i.e. if somebody try to make total of it ,it should not be allowed on dat field . is dere any solution for this problem?
    plzz provide me guidelines for it.

    Please please it this. I made the total for every field other than RACCT and SUM_COMM.
    *&      Form  sub_prepare_display_output
          Display output
    -->  No Parameter
    FORM sub_prepare_display_output .
    Local variables
      DATA: l_lead_col   TYPE char25,       " Lead column
            l_progname   TYPE sy-repid,     " Program name
    Local internal tables
            l_oref_layout TYPE REF TO cl_salv_layout, "Layout
    Local work area
            l_wa_key      TYPE salv_s_layout_key,     "Work area for key
            l_except1   TYPE REF TO cx_salv_msg,"Exception
            l_text1     TYPE string.            "Exception msg
    If profit center is checked
      IF p_prfctr = c_check.
        l_lead_col = 'Profit Center'(041).
    If product catagory is checked
      ELSEIF p_prodc = c_check.
        l_lead_col = 'Product Category'(042).
    If material is checked
      ELSEIF p_smatnr = c_check.
        l_lead_col = 'Material No.'(043).
      ENDIF.
    Create ALV instance with class-method cl_salv_table=>factory
      TRY.
          CALL METHOD cl_salv_table=>factory
            EXPORTING
              list_display = if_salv_c_bool_sap=>false
            IMPORTING
              r_salv_table = v_oref_table
            CHANGING
              t_table      = i_final.
        CATCH cx_salv_msg INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
    Make header of the report
      PERFORM sub_header_report USING v_oref_table.
    Get the toolbar
      v_oref_functions = v_oref_table->get_functions( ).
    For activating application toolbar
      v_oref_functions->set_all( abap_true ).
      v_oref_columns = v_oref_table->get_columns( ).
    It populate the key fields which are always displayed
      PERFORM sub_fill_fields_of_fcatalog USING:
    'SUM_COMM'        l_lead_col                ' ',
    'RACCT'          'Account Number'(035)      ' ',
    'FOBAC'          'FOB Acrual'(023)          'X',
    'EXCESS'         'Excess'(024)              'X',
    'OBSOLE'         'Obsolescence'(025)        'X',
    'PPV'            'Puchachse Price Var'(026) 'X',
    'FR_VAR'         'Freight Variance'(027)    'X',
    'PROD_OR_VAR'    'Produc Ord Var'(028)      'X',
    'DEP_VAR'        'Dept. Variance'(029)      'X',
    'OTH_PROD_VAR'   'Other Prod Var'(030)      'X',
    'PR_OR_SCRP_VAR' 'Scrap Variance'(031)      'X',
    'COST_OF_ACC'    'Cost of Sales Accnt'(032) 'X',
    'INV_ACC'        'Inventory Account'(033)   'X'.
    Optimize the columns
      v_oref_columns->set_optimize( value = 'X' ).
    Setting the layout
    get the LAYOUT object
      l_oref_layout = v_oref_table->get_layout( ).
    set the layout key
      l_progname = sy-repid.
      l_wa_key-report = l_progname.
      l_oref_layout->set_key( value = l_wa_key ).
    set save restriction:
    none / only user-dependent / only user-independent
      l_oref_layout->set_save_restriction(
      value = if_salv_c_layout=>restrict_none  ).
    set: setting of default layout is allowed / isnu2019t allowed
      l_oref_layout->set_default( value = 'X' ).
    Dispaly the output
      v_oref_table->display( ).
    ENDFORM.                    " sub_prepare_display_output
    *&      Form  sub_header_report
        Create the header of the report
         -->P_v_oref_TABLE  table name
    FORM sub_header_report  USING    p_v_oref_table TYPE REF TO
                                               cl_salv_table .
      DATA : l_oref_grid TYPE REF TO cl_salv_form_layout_grid.
      CREATE OBJECT l_oref_grid.
    Add  text items for top of page
      l_oref_grid->create_text( row = 1  column = 1  text = 'Program'(022)
      l_oref_grid->create_text( row = 1  column = 2  text = sy-repid  ).
      l_oref_grid->create_text( row = 2  column = 1
      text = 'User Name'(021) ).
      l_oref_grid->create_text( row = 2  column = 2  text = sy-uname  ).
      l_oref_grid->create_text( row = 3  column = 1  text = 'Date'(020) ).
      l_oref_grid->create_text( row = 3  column = 2  text = sy-datum ).
      l_oref_grid->create_text( row = 3  column = 3  text = 'Time'(019)  ).
      l_oref_grid->create_text( row = 3  column = 4  text = sy-uzeit  ).
      l_oref_grid->create_text( row = 4  column = 1  text = 'System'(018) ).
      l_oref_grid->create_text( row = 4  column = 2  text = sy-sysid ).
      l_oref_grid->create_text( row = 4  column = 3  text = 'Client'(017) ).
      l_oref_grid->create_text( row = 4  column = 4  text = sy-mandt ).
    Declare grid as header of list
      p_v_oref_table->set_top_of_list( value = l_oref_grid ).
    ENDFORM.                    " sub_header_report
    *&      Form  sub_fill_fields_of_fcatalog
          This subroutine populates the field catalog excluding
          period fields
         -->P_FIELDNAME Table field name
         -->P_NAME      Field description
         -->P_DEC       Decimal value flag
    FORM sub_fill_fields_of_fcatalog  USING p_fieldname TYPE lvc_fname
                                            p_name      TYPE c
                                            p_dec       TYPE c.
      DATA: l_char_l TYPE scrtext_l,  "For short text
            l_char_m TYPE scrtext_m,  "For medium text
            l_char_s TYPE scrtext_s,  "For long text
            l_except1   TYPE REF TO cx_salv_not_found,"Exception
            l_text1     TYPE string,            "Exception msg
            l_orf_aggregs TYPE REF TO cl_salv_aggregations.
    Getting the text long/short/medium into variables
      l_char_l = p_name.
      l_char_m = p_name.
      l_char_s = p_name.
    Setting the long/short/medium text and fix the key fileds
      TRY.
          CALL METHOD v_oref_columns->get_column
            EXPORTING
              columnname = p_fieldname
            RECEIVING
              value      = v_oref_column1.
        CATCH cx_salv_not_found INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
      v_oref_column ?= v_oref_column1.
      v_oref_column->set_long_text( l_char_l ).
      v_oref_column->set_medium_text( l_char_m ).
      v_oref_column->set_short_text( l_char_s ).
      v_oref_column->set_key( value = 'X' ).
      v_oref_columns->set_key_fixation( value = 'X' ).
    Set the decimal length
      IF p_dec = 'X'.
        v_oref_column->set_decimals( value = '2' ).
      ENDIF.
      IF p_fieldname = 'RACCT' AND p_gl <> c_check.
        v_oref_column->set_visible( value = space ).
      ENDIF.
      IF p_gl = c_check.
        v_oref_columns->set_column_position( columnname = 'RACCT'
                                               position = 2 ).
      ENDIF.
      IF p_fieldname NE 'RACCT' AND p_fieldname NE 'SUM_COMM'.
        l_orf_aggregs = v_oref_table->get_aggregations( ).
        l_orf_aggregs->add_aggregation( columnname = p_fieldname
                       aggregation = if_salv_c_aggregation=>total ).
      ENDIF.
    ENDFORM.                    " sub_fill_fields_of_fcatalog

  • Alv subtotals  and grand total for a field

    Hi friends,
    I Have an internal table ITAB1
    in that i have a senario as below.
    In my GRID display iam getting values in the layou as follows
    BUKRS =  1000
    LIFNR      MATNR     STCST
    100          abc            500,00
    100          pqr             400,00
    100          xyz            200,00
                        sub total
    200         pto              700,00
    200         vbr              900,00
                        sub total
    BUKRS =  2000
    LIFNR      MATNR     STCST
    150          abc            500,00
    150          pqr             400,00
    150          xyz            200,00
                        sub total
    260         pto              700,00
    260         vbr              900,00
                        sub total
              GRAND TOTAL = 
    Now my requirement is at the end of every vendor  i need sub total for STCST field.
    and at the end of every company code i need GRAND TOTAL for STCST field.
    Its alv grid display.
    how can i do that.
    Regards,
    Priyanka.

    Check this sample code may it will help u:
    *& Report  Z_ALV_SUBTOTAL
    REPORT z_alv_subtotal.
    *& Table declaration
    TABLES: ekko.
    *& Type pool declaration
    TYPE-POOLS: slis. " Type pool for ALV
    *& Selection screen
    SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.
    *& Type declaration
    * Type declaration for internal table to store EKPO data
    TYPES: BEGIN OF x_data,
           ebeln  TYPE char30,  " Document no.
           ebelp  TYPE ebelp,   " Item no
           matnr  TYPE matnr,   " Material no
           matnr1 TYPE matnr,   " Material no
           werks  TYPE werks_d, " Plant
           werks1 TYPE werks_d, " Plant
           ntgew  TYPE entge,   " Net weight
           gewe   TYPE egewe,   " Unit of weight                          
           END OF x_data.
    *& Internal table declaration
    DATA:
    * Internal table to store EKPO data
      i_ekpo TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
    * Internal table for storing field catalog information
      i_fieldcat TYPE slis_t_fieldcat_alv,
    * Internal table for Top of Page info. in ALV Display
      i_alv_top_of_page TYPE slis_t_listheader,
    * Internal table for ALV Display events
      i_events TYPE slis_t_event,
    * Internal table for storing ALV sort information
      i_sort TYPE  slis_t_sortinfo_alv,
      i_event TYPE slis_t_event.
    *& Work area declaration
    DATA:
      wa_ekko TYPE x_data,
      wa_layout     TYPE slis_layout_alv,
      wa_events         TYPE slis_alv_event,
      wa_sort TYPE slis_sortinfo_alv.
    *& Constant declaration
    CONSTANTS:
       c_header   TYPE char1
                  VALUE 'H',                    "Header in ALV
       c_item     TYPE char1
                  VALUE 'S'.
    *& Start-of-selection event
    START-OF-SELECTION.
    * Select data from ekpo
      SELECT ebeln " Doc no
             ebelp " Item
             matnr " Material*
             matnr " Material*
             werks " Plant*
             werks " Plant*
             ntgew " Quantity
             gewei " Unit
             FROM ekpo
             INTO TABLE i_ekpo
             WHERE ebeln IN s_ebeln
             AND ntgew NE '0.00'.
      IF sy-subrc = 0.
        SORT i_ekpo BY ebeln ebelp matnr .
      ENDIF.
    * To build the Page header
      PERFORM sub_build_header.
    * To prepare field catalog
      PERFORM sub_field_catalog.
    * Perform to populate the layout structure
      PERFORM sub_populate_layout.
    * Perform to populate the sort table.
      PERFORM sub_populate_sort.
    * Perform to populate ALV event
      PERFORM sub_get_event.
    END-OF-SELECTION.
    * Perform to display ALV report
      PERFORM sub_alv_report_display.
    *&      Form  sub_build_header
    *       To build the header
    *       No Parameter
    FORM sub_build_header .
    * Local data declaration
      DATA: l_system     TYPE char10 ,          "System id
            l_r_line     TYPE slis_listheader,  "Hold list header
            l_date       TYPE char10,           "Date
            l_time       TYPE char10,           "Time
            l_success_records TYPE i,           "No of success records
            l_title(300) TYPE c.                " Title
    * Title  Display
      l_r_line-typ = c_header.               " header
      l_title = 'Test report'(001).
      l_r_line-info = l_title.
      APPEND l_r_line TO i_alv_top_of_page.
      CLEAR l_r_line.
    * Run date Display
      CLEAR l_date.
      l_r_line-typ  = c_item.                " Item
      WRITE: sy-datum  TO l_date MM/DD/YYYY.
      l_r_line-key = 'Run Date :'(002).
      l_r_line-info = l_date.
      APPEND l_r_line TO i_alv_top_of_page.
      CLEAR: l_r_line,
             l_date.
    ENDFORM.                    " sub_build_header
    *&      Form  sub_field_catalog
    *       Build Field Catalog
    *       No Parameter
    FORM sub_field_catalog .
    *  Build Field Catalog
      PERFORM sub_fill_alv_field_catalog USING:
         '01' '01' 'EBELN' 'I_EKPO' 'L'
         'Doc No'(003) ' ' ' ' ' ' ' ',
         '01' '02' 'EBELP' 'I_EKPO' 'L'
         'Item No'(004) 'X' 'X' ' ' ' ',
         '01' '03' 'MATNR' 'I_EKPO' 'L'
         'Material No'(005) 'X' 'X' ' ' ' ',
         '01' '03' 'MATNR1' 'I_EKPO' 'L'
         'Material No'(005) ' ' ' ' ' ' ' ',
         '01' '04' 'WERKS' 'I_EKPO' 'L'
         'Plant'(006) 'X' 'X' ' ' ' ',
         '01' '04' 'WERKS1' 'I_EKPO' 'L'
         'Plant'(006) ' ' ' ' ' ' ' ',
         '01' '05' 'NTGEW' 'I_EKPO' 'R'
         'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.
    ENDFORM.                    " sub_field_catalog
    *&     Form  sub_fill_alv_field_catalog
    *&     For building Field Catalog
    *&     p_rowpos   Row position
    *&     p_colpos   Col position
    *&     p_fldnam   Fldname
    *&     p_tabnam   Tabname
    *&     p_justif   Justification
    *&     p_seltext  Seltext
    *&     p_out      no out
    *&     p_tech     Technical field
    *&     p_qfield   Quantity field
    *&     p_qtab     Quantity table
    FORM sub_fill_alv_field_catalog  USING  p_rowpos    TYPE sycurow
                                            p_colpos    TYPE sycucol
                                            p_fldnam    TYPE fieldname
                                            p_tabnam    TYPE tabname
                                            p_justif    TYPE char1
                                            p_seltext   TYPE dd03p-scrtext_l
                                            p_out       TYPE char1
                                            p_tech      TYPE char1
                                            p_qfield    TYPE slis_fieldname
                                            p_qtab      TYPE slis_tabname.
    * Local declaration for field catalog
      DATA: wa_lfl_fcat    TYPE  slis_fieldcat_alv.
      wa_lfl_fcat-row_pos        =  p_rowpos.     "Row
      wa_lfl_fcat-col_pos        =  p_colpos.     "Column
      wa_lfl_fcat-fieldname      =  p_fldnam.     "Field Name
      wa_lfl_fcat-tabname        =  p_tabnam.     "Internal Table Name
      wa_lfl_fcat-just           =  p_justif.     "Screen Justified
      wa_lfl_fcat-seltext_l      =  p_seltext.    "Field Text
      wa_lfl_fcat-no_out         =  p_out.        "No output
      wa_lfl_fcat-tech           =  p_tech.       "Technical field
      wa_lfl_fcat-qfieldname     =  p_qfield.     "Quantity unit
      wa_lfl_fcat-qtabname       =  p_qtab .      "Quantity table
      IF p_fldnam = 'NTGEW'.
        wa_lfl_fcat-do_sum  = 'X'.
      ENDIF.
      APPEND wa_lfl_fcat TO i_fieldcat.
      CLEAR wa_lfl_fcat.
    ENDFORM.                    " sub_fill_alv_field_catalog
    *&      Form  sub_populate_layout
    *       Populate ALV layout
    *       No Parameter
    FORM sub_populate_layout .
      CLEAR wa_layout.
      wa_layout-colwidth_optimize = 'X'." Optimization of Col width
    ENDFORM.                    " sub_populate_layout
    *&      Form  sub_populate_sort
    *       Populate ALV sort table
    *       No Parameter
    FORM sub_populate_sort .
    * Sort on material
      wa_sort-spos = '01' .
      wa_sort-fieldname = 'MATNR'.
      wa_sort-tabname = 'I_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      APPEND wa_sort TO i_sort .
      CLEAR wa_sort.
    * Sort on plant
      wa_sort-spos = '02'.
      wa_sort-fieldname = 'WERKS'.
      wa_sort-tabname = 'I_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      APPEND wa_sort TO i_sort .
      CLEAR wa_sort.
    ENDFORM.                    " sub_populate_sort
    *&      Form  sub_get_event
    *       Get ALV grid event and pass the form name to subtotal_text
    *       event
    *       No Parameter
    FORM sub_get_event .
      CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
    'SUBTOTAL_TEXT'.
      DATA: l_s_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 4
        IMPORTING
          et_events       = i_event
        EXCEPTIONS
          list_type_wrong = 0
          OTHERS          = 0.
    * Subtotal
      READ TABLE i_event  INTO l_s_event
                        WITH KEY name = slis_ev_subtotal_text.
      IF sy-subrc = 0.
        MOVE c_formname_subtotal_text TO l_s_event-form.
        MODIFY i_event FROM l_s_event INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    " sub_get_event
    *&      Form  sub_alv_report_display
    *       For ALV Report Display
    *       No Parameter
    FORM sub_alv_report_display .
      DATA: l_repid TYPE syrepid .
      l_repid = sy-repid .
    * This function module for displaying the ALV report
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_top_of_page   = 'SUB_ALV_TOP_OF_PAGE'
          is_layout                = wa_layout
          it_fieldcat              = i_fieldcat
          it_sort = i_sort
          it_events                = i_event
          i_default                = 'X'
          i_save                   = 'A'
        TABLES
          t_outtab                 = i_ekpo
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
    *    MESSAGE i000 WITH 'Error in ALV report display'(055).
      ENDIF.
    ENDFORM.                    " sub_alv_report_display
    *       FORM sub_alv_top_of_page
    *       Call ALV top of page
    *       No parameter
    FORM sub_alv_top_of_page.                                   "#EC CALLED
    * To write header for the ALV
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = i_alv_top_of_page.
    ENDFORM.                    "alv_top_of_page
    *&      Form  subtotal_text
    *       Build subtotal text
    *       P_total  Total
    *       p_subtot_text Subtotal text info
    FORM subtotal_text CHANGING
                   p_total TYPE any
                   p_subtot_text TYPE slis_subtot_text.
    * Material level sub total
      IF p_subtot_text-criteria = 'MATNR'.
        p_subtot_text-display_text_for_subtotal
        = 'Material level total'(009).
      ENDIF.
    * Plant level sub total
      IF p_subtot_text-criteria = 'WERKS'.
        p_subtot_text-display_text_for_subtotal = 'Plant level total'(010).
      ENDIF.
    ENDFORM.                    "subtotal_text
    Edited by: Joyjit Ghosh on Aug 21, 2008 5:25 PM

  • Using enhancement COPA0001 in a derivation to clear value fields

    Dear colleagues,
    In our sales process, freight is added as an item of the sales order, which means we maintain different freight types as materials (mat type ZFRE - "Freight") and we create cost estimates, so that this cost can be valuated into COPA.
    Our problem is that we do not want to capture the cost of goods sold and the cost of sales for those materialss, as they only represent the freight cost that is paid by us and reimbursed by our customers. In addition, I we would like to move the value of the revenue value field to another value field (Freight sales).
    I am trying to accomplish this by using enhancement COPA0001 - I created an enhancement step and I added a code to include ZXKKEU11 which specifies the "clear" of 2 value fields and the "move" of the revenue to another value field.
    I had done this in the past to clear quantity fields, but I am testing this new config and it doesn't work.
    When testing the derivation analyzer tells me that "Derivation was not carried out. Reason: None of the target fields are to be derived".
    I looked in the known resources, but couldn't find any valuable information about such an issue. I did see in the SAP library that target fields can be "All quantity unit fields" , but value fields are not mentioned.
    Did anyone have a similar experience or knows if what I'm trying to do is possible?
    Thanks,
    Yoel.

    Hi
    You can try with exit COPA0005 as Christian mentioned...
    But, I would like to know your process in ddetail to see if any standard mechanism is possible...
    1. What does your sale order look like? Does it has one saleable material + Multiple freight materials?
    2. What purpose these freight materials serve? Do they have a revenue as well as cost in the sale order pricing procedure?
    3. Can you explain your total scenario with accounting entries? and what exactly are you looking at
    Regards
    Ajay M

Maybe you are looking for

  • Error in the standard htmlb.jar from EP6 SP9 (HTMLx)

    I've successfully migrated my custom developed applications from EP5 SP5 to EP6 SP9. I've used the well known 3rd party HTMLxframework for the DatePicker and Locale corrections only (I am a brazilian developer).  In the org.sapportals.htmlb.rendering

  • Is there a concept of initialization in package?

    Hi, I am trying to simulate object initialization in package. CREATE OR REPLACE PACKAGE PKG_TEST AS FUNCTION abc RETURN DATE; FUNCTION def RETURN DATE; FUNCTION ghi RETURN DATE; END; CREATE OR REPLACE PACKAGE BODY PKG_TEST AS   FUNCTION abc RETURN DA

  • I type from Brazil - like shifting the sql in time of execution

    Hi, friend�s like shifting the sql in time of execution inside of the netbeans Thank�s I Type from Brazil and you ?

  • Remove 9 prefix in voce mail email message

    When a user gets a voice mail Unity sends an email to the user that they got a voice mail.  In that message the calling number is listed but it has a 9 infront of it.  How can I get rid of that? Thanks Folks                  

  • Using a segger's flasher 5 programmer in labview

    I want to use labview to send and receive commands to a Flasher 5 programmer made by Segger.  It comes with ASCII command sets, and I was unsucessful in getting the return information using the basic serial read and write, labview example, error stat