Extending field catalog of application ME using transaction NACE

Hello,
I extended the field catalog of application ME using Transaction NACE. I inserted material field as ZZMATNR but I couldn't find this field at IMG->Materials Management->Inventory Management and Physical Inventory->Output Determination->Maintain Condition Tables->Output: Create Conditions Table ->FieldCatalog.
How can I use ZZMATNR?
Thank you.
Yasar Unalp

Follow the OSS note below (OSS note - 39462) you need to follow the same for your field.
Summary
Symptom
In the message determination for purchasing, the field catalog in Transaction M/60 should be enhanced, for example, with a field for the user ID.
Other terms
USNAM, condition table
Reason and Prerequisites
The communication structure to be maintained can be taken from table T681Z. Table T681Z can be displayed with Transaction SE16.Use 'B' for message determination and application EF for purchase order.
Thus the structure for purchase orders to be maintained is KOMKBEA.
The following section describes how to include field 'User ID' in the structure.If other applications or fields are used, the following example can be used in a modified form.
Solution
1. You must include field ZZUSNAM in communication structure KOMKBEA.In this structure there is an include that is provided for additional fields.In this Include KOMKBZ you must include the field with the name ZZUSNAM. ERNAM can be used as the domain in this case.
2. The same field must also be included in structure KOMB in Include KOMBZ (the same procedure as under point 1).
3. In table T681F use Transaction SM31 with key B, EF to add the same field. You can do this by overwriting an existing field.
              As of Release 4. 0 you can use view V_T681F in Transaction SM30 for that purpose. Enter usage 'B', your application and field group '001'.
4. In the message determination, the system runs perform USEREXIT_KOMKBEA_FILL. This perform is in program RVCOMFZZ.
The source code should be changed as follows:
FORM_USEREXIT_KOMKBEA_FILL.
COM_KBEA-ZZUSNAM = SY-UNAME.

Similar Messages

  • Simple way to create field catalogs in ALV Reports using subroutine

         In ALV Reports When creating field catalog, instead of giving field catalog for every field seperatly we can use following simple method to create field catalog.
         This method makes your code very easy to read as well as to understand. I am going to show code only to prepare field catalog to make this method easy to understand. Their also contains code for fetching data from requires table and calling function module for ALV . I am not including it in this program but it should be their in program -
    REPORT ZALV_INTERACTIVE_REPORT.
    TYPE-POOLS SLIS.
    TYPES : BEGIN OF TY_MARA,
         MATNR TYPE MATNR,
         MTART TYPE MTART,
         MBRSH TYPE MBRSH,
         MEINS TYPE MEINS,
    END OF TY_MARA.
    DATA IT_MARA TYPE STANDARD TABLE OF TY_MARA.
    DATA WA_MARA TYPE TY_MARA.
    " Internal table and work area for Field Catalog
    DATA IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA WA_FIELDCAT LIKE LINE OF IT_FIELDCAT.
    START-OF-SELECTION.
    * PERFORM FETCH_DATA .
    " FIELDS IN FIELD CATALOG (PASSED IN SUBROUTINE):-
    "     'FIELDNAME'<SPACE> 'SELTEXT_M' <SPACE>'KEY'<SPACE> 'HOTSPOT'
    PERFORM PREP_CATALOG USING : 'MATNR' 'MATERIAL NO.' 'X' 'X' ,
                                                           'MTART' 'MATERIAL TYPE' ' ' ' ' ,
                                                           'MBRSH' 'IND SECTOR' ' ' ' ' ,
                                                           'MEINS' 'UOM' ' ' ' ' .
    * PERFORM CALL_ALV_FM .
    " Subroutine to create field catalog
    FORM PREP_CATALOG USING VALUE(P_FIELDNM)
                                                                  VALUE(P_SELTEXT)
                                                                  VALUE(P_KEY)
                                                                  VALUE(P_HOTSPOT) .
    WA_FIELDCAT-FIELDNAME = P_FIELDNM .
    WA_FIELDCAT-SELTEXT_M = P_SELTEXT .
    WA_FIELDCAT-KEY = P_KEY .
    WA_FIELDCAT-HOTSPOT = P_HOTSPOT .
    APPEND WA_FIELDCAT TO IT_FIELDCAT .
    ENDFORM .
              Above code will repeat the execution of subroutine PREP_CATALOG for every set of values passed to subroutine because we used
    USING : (chain operator) to pass value to subroutine.
              Subroutine will assign passed values to corresponding field and simply appends those values in ITAB created for field catalog(IT_FIELDCAT). It repeates this process until all the passed values are appended into ITAB.
              This method will reduce complexity of the code as well as time required to write code for every field's field catalog seperatly. It does lots of work in very few lines of codes.

    Scott,
    I don't think there is a way to divide all numbers by a million in one shot, but you could divide the numbers by million by writing code for each amount field as needed: <?FIELD1 div 1000000?> and the use the round function <?xdoxslt:round(2.777,2)?>
    combined function: <?xdoxslt:round((12345605.6 div 1000000),2)?>
    Thanks,
    Bipuser

  • Add a new field to field catalog in billing output

    Hi Experts
    can anyone tell me whether I can add 'item category' to field catalog for application V3.  and how can I do this? I want to create an access sequence-bill to party/item category, is that possible?
    thanks a lot!
    elly

    Hi..
    Below is process of adding filed to catalogue in Pricing..
    Follow below procedure as its same as condition technique...
    Add a field to a new condition table in Pricing (Condition Technique):-
    I will explain you the process with below example...Please follow steps in below sequence-
    Try to add the filed from the field catalog.  In case the required combination field is not there, you can add the field through the following process to filed catalog and create the condition table.   It is most common that one or other time we need to use this function while configuring multi tasking & complex Pricing Architecture.
    Here I'm giving a simple guide to add fields to the Pricing Field Catalogues:
    For example you want to use field PSTYV ('Sales document item category') that is included in structure KOMP ('Pricing Communication Item') as a key for a condition table.
    When you create a condition table (Transaction V/03), however, the system does not propose the field in the field catalog.
    Condition access, field catalog, allowed fields, KOMG, KOMK, KOMP, KOMPAZ, KOMKAZ, PSTYV are the other terms which we need to know about, to add Fields.
    Reason and Prerequisites: 
    For technical reasons, field PSTYV was included in structure KOMP, however, not in structure KOMG ('Allowed Fields for Condition Structures').
    Proceed as follows:
    1. Call up the ABAP Dictionary (Transaction SE11) and create data type ZZPSTYV. Choose PSTYV as a domain.As a short text, you can use, for example, 'ZZ - sales document item category' and as a field label, you can use the field labels of PSTYV.Save, check and activate your entries.
    2. Call up structure KOMPAZ in the ABAP Dictionary (Transaction SE11) in the change mode and make the following entry:
    Component Component type:
    ZZPSTYV ZZPSTYV
    Save, check and activate the change you made.
    3. Note:Because of the change in structure KOMPAZ, field ZZPSTYV is now known in structures KOMG and KOMP because structure KOMPAZ is included in both structures.
    4. Call up Transaction SPRO. Navigate to 'Sales and Distribution -> Basic Functions -> Pricing -> Pricing Control' and execute 'Define Condition Tables'.
    Choose 'Conditions: Allowed fields' and include ZZPSTYV as a new entry.
    5. Note:Now you can use field ZZPSTYV as a key field when you create a condition table Axxx.
    6. Supply the new field you defined by including the following source code line in USEREXIT_PRICING_PREPARE_TKOMP:
    MOVE xxxx-PSTYV TO TKOMP-ZZPSTYV.
    In order processing you find the user exit in Include MV45AFZZ, and in billing document processing you find it in Include RV60AFZZ.
    Consider that you can also use this note as a help if you want to use other customer-specific fields as key fields in a condition table.
    For header fields, use structure KOMKAZ instead of structure KOMPAZ and
    USEREXIT_PRICING_PREPARE_TKOMK instead of
    USEREXIT_PRICING_PREPARE_TKOMP.
    For more information, see Transaction SPRO via the path 'Sales and Distribution -> System Modifications -> Create New Fields (Using Condition Technique) -> New Fields for Pricing' and OSS Note 21040.
    REWATD IF U FINDS THIS AS HELPFUL..
    Regds
    MM

  • ALV Grid Field catalog

    Hi,
         I am trying to display data from two different tables, say 3 fields from one table and 3 fields from other table. in alv grid format using classes and using method CALL METHOD go_grid->set_table_for_first_display
    how can we build the field catalog for the internal table which consists of 6 fields from two different tables
    thanks in advance

    Hello,
    Please check,it is similar case.
    FORM set_grid.
      IF g_r_grid IS INITIAL.
        CREATE OBJECT g_r_cont
                     EXPORTING container_name = 'CUST1'.
        CREATE OBJECT g_r_grid
                     EXPORTING i_parent = g_r_cont.
        g_r_variant = sy-repid.
      Build Field Catalog
        PERFORM build_field_catalog.
      Exclude process options from ALV
        PERFORM alv_excl.
      setting ALV Grid layout
        PERFORM alv_layo.
        CALL METHOD g_r_grid->set_table_for_first_display
           EXPORTING
             is_layout                     = g_r_layo
             is_variant                    = g_r_variant
             it_toolbar_excluding          = g_r_excl
             i_save                        = 'X'
           CHANGING
             it_outtab                     = g_t_alv[]
             it_fieldcatalog               = g_t_fieldcat.
      ENDIF.
    ENDFORM.                    " set_grid
    *Form Routine ID    : build_field_catalog
    *Form Routine Name  : TO Build Field Catalog
    *Outline            : Subroutine for building the field catalog
    *Argument           : None
    *Return Value       : None
    FORM build_field_catalog.
      DATA : l_f_n TYPE i.
      REFRESH g_t_fieldcat.
      l_f_n  = 0.
    Add properties values to ALV Catalog
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'MATNR' 'CHAR' l_f_n
                                text-001 'X' space ' ' 18 ' '  .
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'TXZ01' 'CHAR' l_f_n
                                text-002 'X' space 'X' 40 ' ' .
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'MFRPN' 'CHAR' l_f_n
                                text-003 ' ' space ' ' 40 ' ' .
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'EBELN' 'CHAR' l_f_n
                                 text-004 space space ' ' 10 ' ' .
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'EBELP' 'NUMC' l_f_n
                                 text-005 space space ' ' 5 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'EINDT' 'DATS' l_f_n
                                 text-006 space space ' ' 10 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'MENGE' 'QUAN' l_f_n
                                 text-007 space space ' ' 13 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'MEINS' 'UNIT' l_f_n
                                 text-008 space space ' ' 3 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'MENGE1' 'QUAN' l_f_n
                                 text-009 space space ' ' 13 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'MEINS1' 'UNIT' l_f_n
                                 text-010 space space ' ' 3 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'LIFNR' 'CHAR' l_f_n
                                 text-011 space space ' ' 10 'ALPHA'.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'NAME1' 'CHAR' l_f_n
                                 text-012 space space 'X' 35 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'BSART' 'CHAR' l_f_n
                                 text-013 space space ' ' 4 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'BEDAT' 'DATS' l_f_n
                                 text-014 space space ' ' 10 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'AEDAT' 'DATS' l_f_n
                                 text-015 space space ' ' 10 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'INSMK' 'CHAR' l_f_n
                                 text-016 space space ' ' 1 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'WERKS' 'CHAR' l_f_n
                                 text-017 space space ' ' 4 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'LGORT' 'CHAR' l_f_n
                                 text-018 space space ' ' 4 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'EKGRP' 'CHAR' l_f_n
                                 text-019 space space ' ' 3 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'PSTYP' 'CHAR' l_f_n
                                 text-020 space space ' ' 1 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'LOEKZ' 'CHAR' l_f_n
                                 text-021 space space ' ' 1 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'DISPO' 'CHAR' l_f_n
                                 text-022 space space ' ' 3 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'PO_TEXT' 'CHAR' l_f_n
                                 text-023 space space 'X' 10 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'BSGRU' 'CHAR' l_f_n
                                 text-024 space space ' ' 3 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'PRDHA1' 'CHAR' l_f_n
                                 text-025 space space ' ' 18 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'VTEXT1' 'CHAR' l_f_n
                                 text-026 space space 'X' 40 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'PRDHA2' 'CHAR' l_f_n
                                 text-027 space space ' ' 18 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'VTEXT2' 'CHAR' l_f_n
                                 text-028 space space 'X' 40 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'PRDHA3' 'CHAR' l_f_n
                                 text-029 space space ' ' 18 ' '.
      l_f_n = l_f_n + 1.
      PERFORM add_catalog USING 'VTEXT3' 'CHAR' l_f_n
                                 text-030 space space 'X' 40 ' '.
    ENDFORM.                    " build_field_catalog
    *Form Routine ID    : add_catalog
    *Form Routine Name  : To Add the Catalog for the ALV
    *Outline            : Subroutine to add properties values to ALV Catalog
    *Argument           : p_fname        "Field Name
                        p_inttype      "Intenal Type
                        p_col_pos      "Column Position
                        p_coltext      "Column Text
                        p_key          "Key Field
                        p_hotspot      "Hotspot Enabled
                        p_outlen       "Internal Length
                        p_convexit     "conversion exit name
    *Return Value       : g_t_fieldcat   "Field Catalog Table
    FORM add_catalog USING   p_fname
                             p_inttype
                             p_col_pos
                             p_col_text
                             p_key
                             p_hotspot
                             p_lowercase
                             p_outlen
                             p_convexit.
      CLEAR g_r_fieldcat.
      g_r_fieldcat-fieldname = p_fname.
      g_r_fieldcat-inttype   = p_inttype.
      g_r_fieldcat-col_pos   = p_col_pos.
      g_r_fieldcat-coltext   = p_col_text.
      g_r_fieldcat-hotspot   = p_hotspot.
      g_r_fieldcat-lowercase = p_lowercase.
      g_r_fieldcat-outputlen = p_outlen.
      g_r_fieldcat-key       = p_key.
      g_r_fieldcat-convexit  = p_convexit.
      APPEND g_r_fieldcat TO g_t_fieldcat.
    ENDFORM.                    " add_catalog
    *Form Routine ID    : alv_excl
    *Form Routine Name  : ALV Exclude List
    *Outline            : Subroutine to exclude process options from ALV
    *Argument           : None
    *Return Value       : None
    FORM alv_excl.
      APPEND cl_gui_alv_grid=>mc_mb_sum          TO g_r_excl.
      APPEND cl_gui_alv_grid=>mc_mb_subtot       TO g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_graph        TO g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_info         TO g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_print_back   TO g_r_excl.
    ENDFORM.                    " alv_excl
    *Form Routine ID    : alv_layo
    *Form Routine Name  : alv_layo
    *Outline            : Subroutine to set alv layout
    *Argument           : None
    *Return Value       : None
    FORM alv_layo.
      g_r_layo-grid_title = text-100.
      g_r_layo-cwidth_opt = g_c_mark.
      g_r_layo-zebra      = g_c_mark.
      g_r_layo-no_rowmark = space.
      g_r_layo-sel_mode   = g_c_selmode.
    ENDFORM.                 
    Regards

  • What is the exact purpose of Transaction NACE and NAST Table?

    Hi All,
    What is the exact purpose of Transaction NACE and NAST Table?
    Pls help me…
    Akshitha.

    Hi
    When a Output type in an apllication doc is configured with a Medium, Partner, Lang and other communication paramters an entry is created in NAST table
    so to trigger the output an entry in NAST is compulsory
    Output is a link between the Driver Program and the Sapscript,
    An output type summarizes messages of the same meaning. It contains parameters that are valid for all its assigned messages, for example appropriate partner functions.
    Transmission medium is a medium which the layout will be come out, this may be printout, Fax or Mail
    Check this link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/19884743b111d1896f0000e8322d00/content.htm
    ex-how to config output type.
    You will assign output types using Transaction NACE.
    Do the follow steps to assign output type
    1)Select Application Type V2 which will have description Shipping.
    2)Click on Output types button.
    3)Go to change mode by pressing Ctrl+F4.
    4)Select one output type which already exists
    5)Do Copy As(F6)
    6)Give your output type against Output Type field.
    7)Under General data Tab, Give Program and Form routine and Save the data.
    i think it a work of functional guy but at senior level i think it is not a big deal for abaper.
    Check the following documentation
    In NACE t-codewe have the application for each one. based on the application output type can be defined, based on output type script and print progrma can be defined.
    If suppose data can be read from EDI then we should go for condition records.
    So whenever we execute the script first composer checks the output type and then execute the program. in program whenever opn form FM will be populate then script will open first. After that again program till another FM will populate if it then script will populate........like it is cycle proces. Composer does all these things and at last it will submit that output to spool.
    Go to the Transaction NACE.
    choose the related sub module.. like billing or shipping
    doubel click on Output Types
    Choose the Output Type for which whcih you wanted your script to trigger
    Then select the Output Type and double click on Processing Routine
    Then go to create new entries--> Select the Medium (1- print output), then enter your Script and Print Program detls --> Save and come out
    Now go to the Transaction (for which you have created the output type)... Issue output--> Select the output type --> Print....
    Device Types for SAP Output Devices (Detail Information)
    Definition
    The device type indicates the type of printer to be addressed. When you define an output device, choose the name of the device type that was defined in the SAP System for your printer model, such as Post2 for a PostScript printer. In the case of frontend printing under Microsoft Windows, you can also use the generic (device-independent) device type SWIN.
    The system uses the information in the device type to convert a document from the internal SAP character representation (spool request in OTF or in text format) to a device-specific, print-ready data stream (output request). Since a device type specifies attributes that apply to all devices of a certain model, it can be shared among device definitions. For example, all devices in the SAP spool system that are compatible with Hewlett-Packard LaserJet IIID printers would use the HPLJIIID device type.
    You should not confuse the device type with the printer driver. The device type is the total of all attributes of an output device that the SAP System must know to control the output device correctly, such as control commands for font selection, page size, character set selection, and so on. These attributes also include the printer driver that SAPscript/Smart Forms (the SAP form processor) should use for this printer. The SAPscript printer driver that is to be used for devices of this type for output formatting is therefore only an attribute that the device type specifies.
    How do I choose the correct device type?
    • In most cases, the SAP System already provides the appropriate device type for the printer type for the printer model that you want to use.
    These standard device types are completely defined and need no modification or extension before you use them in device definitions.
    • You can also download missing device types from the sapserv server. For a current list of the supported device types, see SAP Note 8928 in the SAP Service Marketplace.
    • Most printers can be controlled using a generic format, such as PostScript. They can be switched to a mode that is compatible with one of the standard printers for which an SAP device type is available. In this case, a supported model is emulated.
    • Almost all printers are delivered with Microsoft Windows printer drivers. The system can control these printers with the generic (device-independent) device type SWIN. The Microsoft Windows spool system then performs the processing of the print data.
    • If the specified device types are not available, and generic device types cannot be used, you must create your own device type or edit a copy of an existing device type. We recommend that only those with specialist knowledge of the SAP Spool System and printer driver code do this. For more information, see Defining a New Device Type .
    Attributes of a Device Type
    A device type is distinguished by the attributes listed below. If you change an existing device type or create a new device type, you must change at least some of these attributes.
    • Character set: A character set specifies the codes with which characters must be represented in the print-ready output stream (output request). This code replaces the generic SAP characters set that is used internally by the SAP spool system (spool request).
    • Printer driver: You can specify different printer drivers for printing SAPscript documents and ABAP lists.
    • Print controls: Print controls represent printer operations, such as boldface or changing the font size. These print control are replaced by printer-specific commands during the creation of the output request from a spool request.
    • Formats: Formats specify the format supported by the SAP system. The system differentiates between SAPScript formats (DINA4 and LETTER) and ABAP list formats (X_65_132 = 65 rows/132 columns).
    • Page format: A page format is the interface between a format and SAPscript. It specifies the paper dimensions with which SAPScript can calculate the row and column lengths.
    • Actions: Actions are output device-specific commands that are required for the implementation of a format. The action printer initialization, for example, can contain a printer command with which the number of rows on a page is defined. There is a set of actions for every format supported by a device type.
    Reward points for useful Answers

  • Sap upgrade-Error when using DP90-OK 530-field catalog not found

    Hello,
    We are upgrading from 4.6c to mySAP ERP 2004 version. In 4.6c, we are using VA90 to create a sales order from service order to bill the customer. However in mySAP ERP 2004 version, VA90 does not exist. So we created DP profile and are  using transaction code DP90 to create billling request for the service order. However, System gives an error 'Field catalog not found'. The diagnosis says that -The field catalog cannot be determined because the output table structure name was not specified.
    Please help us how to solve the above problem.
    Thanks
    Mala

    hi mala,
    did you see SAP-message 442170?
    it is all about conversion VA90/DP90.
    hope this helps.
    br,
    matthias
    Message was edited by: Matthias Leitner

  • ALV report using the field catalog

    which is the quickest way to generate an ALV report using the field catalog merge.  without needing to build the field catalog manually .
    is it easier to create a structure and passe it in the field catalog merge .  if yes can i have an example plzzzz

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
                             Data declaration
                             Data retrieval
                             Build fieldcatalog
                             Build layout setup
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    *            i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • Passing Changed  extended fields using ALE-IDOC to receiving system

    Hi all,
    Please tell me how passing changed  extended fields using ALE-IDOC to receiving system can be achieved. Is it possible by Chnage pointer concept.Do i need to do some coading after data enters into receiving system as it is required while creating the entries in database table.
    For ex. in matmas05 extended for classification and inspection view and then created using 'CREATION'
    related bapi.Do i also need to incorporate the changes by change related bapi or ir can be handled by change pointer concept.
    Thanks.

    Hi Sanu
    1) Please tell me how passing changed extended fields using ALE-IDOC to receiving system can be achieved. Is it possible by Chnage pointer concept.
    => Looks like you have extended standard IDOC here. so you need to find User Exit or BADI for the Push program to populate the additional fields. Yes, it is possible thru change pointers as well.
    1) Do i need to do some coading after data enters into receiving system as it is required while creating the entries in database table.
    => Yes, as suggested in 1 try finding User Exits/BADIs.
    Regards
    Shital

  • Error in field catalog in ALV grid display using classes at do_sum = "X'.

    Hi,
    I'm using classes in ALV Grid display.
    the code for the field catalog is going to dump because of the statement in the field catalog for field 'netwr',do_sum = 'X'.
    that do_sum = 'X' is not working and going to dump when executed.with out that do_sum it is working fine. the error in dump analysys is showing sap standard incude LSLVCF01.
        assign component
               <ls_fieldcat>-fieldname of structure rt_data to <g_field>.
        if sy-subrc ne 0.
          message x000(0k).
        endif.
    sy-subrc is 4 when the program is being executed.
    CODE:
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      ls_fcat-fieldname = 'VBELN1'.
      ls_fcat-ref_field = 'VBELN'.
      ls_fcat-ref_table = 'VBRK'.
      ls_fcat-coltext = 'Invoice No'.
      ls_fcat-seltext = 'Invoice No'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
      ls_fcat-fieldname = 'BUDAT'.
      ls_fcat-ref_table = 'BKPF'.
      ls_fcat-coltext = 'Invoice Date'.
      ls_fcat-seltext = 'Invoice Date'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
    ls_fcat-fieldname = 'NETWR'.
      ls_fcat-ref_field = 'NETWR'.
      ls_fcat-ref_table = 'VBRK'.
      ls_fcat-coltext = 'Value of Invoice'.
      ls_fcat-seltext = 'Value of Invoice'.
      ls_fcat-datatype = 'CURR'.
      ls_fcat-do_sum = 'X'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
    ENDFORM.
    can u please look in the code and rectify the error,
    would appeciate ur response.
    regards,
    veera.

    Hi,
    try this..
    ls_fcat-fieldname = 'NETWR'.
    ls_fcat-ref_field = 'NETWR'.
    ls_fcat-ref_table = 'VBRK'.
    ls_fcat-coltext = 'Value of Invoice'.
    ls_fcat-seltext = 'Value of Invoice'.
    ls_fcat-datatype = 'CURR'.
    ls_fcat-do_sum = 'X'.
    <b>ls_fcat-cfieldname = 'WAERS'.</b>
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    Regards
    vijay

  • Field catalog not generated using semi automatic method

    Hi,
    I have this structure defined in my program.
    TYPE: BEGIN OF TY_OUTPUT,
               BUKRS  TYPE BUKRS,
               KUNNR  TYPE KUNNR,
               NAME1  TYPE NAME1,
               BUSAB  TYPE BUSAB,
               KONZS  TYPE KONZS,
               LAND1  TYPE LAND1,
               WAERS  TYPE WAERS,
               BALAN  TYPE WRBTR,
               CAT01  TYPE WRBTR,
               CAT02  TYPE WRBTR,
               CAT03  TYPE WRBTR,
               CAT04  TYPE WRBTR,
               CAT05  TYPE WRBTR,
               CAT06  TYPE WRBTR,
               PYAMT  TYPE PYAMT,
               WROFF  TYPE WRBTR,
            END OF TY_OUTPUT.
    Using this structure i m creating field catalog semi automatically passing structure name as an exporting parameter.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          I_STRUCTURE_NAME       = 'TY_OUTPUT'
        CHANGING
          CT_FIELDCAT            = P_GT_FIELDCAT[]
        EXCEPTIONS
          INCONSISTENT_INTERFACE = 1
          PROGRAM_ERROR          = 2
          OTHERS                 = 3.
    But P_GT_FIELDCAT table is initial after the function hence grid is not displayed.
    Can anyone suggest me what to do??

    you need to pass a standard or z-structure created using se11 in parameter
    I_STRUCTURE_NAME.
    you need to create this structure in se11 instead of creating it using TYPE statement.
    I_STRUCTURE_NAME is of type DD02L-TABNAME.
    Regards
    Suvi

  • Issue while generating Field catalog using LVC_VARIANT_SELECT

    Hello Folks,
      When i passed the default field catalog to the function module LVC_VARIANT_SELECT... for which the field name that is passed is standard field and the table name i was passing is Internal table ( Which is mandatory for my Req). As i am not passing the table name that exists at the DB level to the default field catalog .. this function module LVC_VARIANT_SELECT is returning all the field types as CHAR ( Irrespective of the field). This is causing me a problem in calculating totals ( standard functionality - throwing me message 'Column cannot be calculated' ) in my ALV_tree.
      I have to use the Function Module LVC_VARIANT_SELECT ( Since i have a variant logic associated) and the Internal table to generate the field catalog .and i want  to achieve the functionality of total,Avg ,,,,etc.. Any idea is appreciated.

    Got the Solution ... Passes Ref-table and Ref-field ... it gives totals for currency and quantity fields

  • Use of field TEXT_FIELDNAME in Field Catalog for ALV

    Hi Experts,
    Could any one pls  tell me the relevance (purpose) of the field TEXT_FIELDNAME in Field catalog for an ALV ?
    How is it different from the fields such as seltext_l, seltext_m, seltext_s ? When is it necessary to assign a value to this field ?
    Thanks & Regards
    Abhijith

    Hi Abhijit
    Refer to the following
    <b>TEXT_FIELDNAME :</b>     Field name of internal table field. You can use this field to define a reference to a field that is used as the description for the current field. If a subtotal is calculated for the current field, the ALV Grid Control displays the descriptions in the field assigned.
    Example: Your output table contains one column for material numbers and one column for the description of what these numbers mean (such as clockwork). If you calculate subtotals for the material numbers, only these numbers are usually displayed as the subtotals text. Based on the link to TXT_FIELD , you can refer to the corresponding column with the material description. This description is then used as the subtotals text.
    <b>SELTEXT_L :</b>      Long key word (40 chars long). Determines the text to be used in the column selection for the column. A value should be assigned to this field if it does not have a Data Dictionary reference.
    <b>SELTEXT_M   :</b>        Medium key word (20 chars long). Determines the text to be used in the column selection for the column. A value should be assigned to this field if it does not have a Data Dictionary reference.
    <b>SELTEXT_S :</b>     Short key word (10 chars long). Determines the text to be used in the column selection for the column. A value should be assigned to this field if it does not have a Data Dictionary reference.
    Award points if found useful.
    Regards
    Inder

  • Using instruction for creating field catalog to archive object "MM_MATNR"

    Hi all,
    I need a using instruction for creating a new field catalog to archive object "MM_MATNR". I'd like to create a field catalog using some fields of tables mara, makt, mvke and marc.
    Thanks for your help!

    Hi,
    Go to following link;
    [Material Master Archiving|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90f75a80-867f-2d10-7aa6-ac164e43e89f?quicklink=index&overridelayout=true]

  • Calling a custom BSP application in CRM2007  ICWC using transaction launche

    Hi Experts,
    I created a Z BSP application in se80 which is a statefull application.Now I created a direct link in ICWC for this Bsp application using transaction launcher.
    Now my problem is that the session of this BSP remains active even if I click on some other link in the navigation bar.
    I need a way to end the session as soon as we navigate to some other link on the navigation bar.
    It would also be helpful if I just know the code for killing the session programatically.
    Helpful Answers will be rewarded!!
    Thanks,
    Ashish.

    Hi,
    I am not sure, but according to my understanding u can use CL_BSP_SERVER_SIDE_COOKIE class in ur BSP application to get refrence of ur BSP page.
    When u r in Web UI by the help of this class u can check whether u r in BSP related view or in other then view. If u r in other view then u can set runtime->keep_context = 0.
    Take help from this link for the class related info.
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
    Regards
    Gaurav

Maybe you are looking for

  • Flash player does not work 10.6.8

    Flash player was working fine, I tryed to look at youtube videos and can't see them. mac version 10.6.8

  • Transferring music from iphone to new iphone

    So, say I'm West Coast guy and in the East Coast visiting family. Had a iPhone 5s and just got a new iPhone 6. Figured I could backup my iPhone 5s on brother's iMac and then restore it to the new iPhone 6. Most of it went OK, except I've got some of

  • Error while using comments

    Hi, When I try to create a comment I get the following error - "The cell cannot be updated. Submission status must be modified to allow changes". On the Input schedule I have data cells where I can enter the data and that gets saved to the Database w

  • Classic scenario : Confirmation and invoice in same system ?

    Hello experts, My question is as follows. I am trying to learn various scenarios in SRM as a beginner.i undrstand how the scenarios are present and what they mean . In classic scenario, can i create a goods receipt in ERP(MIGO) and then a invoice in

  • How do I save my iCloud data?

    How can I save my data so as to transfer it to a new ID?