ALV Reference Field

Hi
I have want to display a custom label for a field in ALV. But that field uses REFERENCE Table and Field name. hence the label for that column is picked from dictionary level. I even used SEL_TEXT_L of the fieldCatalog, But still the text maintained in Dataelement of the REF field is only displayed.
Here is the code:
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-COL_POS = 10.
  LS_FIELDCAT-FIELDNAME = TEXT-032.
  LS_FIELDCAT-TABNAME = GC_TAB.
  LS_FIELDCAT-REF_TABNAME = 'MYTABLE'.
  LS_FIELDCAT-REF_FIELDNAME = 'MYFIELD'.
  LS_FIELDCAT-OUTPUTLEN = 8.
  LS_FIELDCAT-SELTEXT_L = TEXT-012.

Hi Muralidaran,
Try this out...
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 10.
LS_FIELDCAT-FIELDNAME = 'MYFIELD'.
LS_FIELDCAT-TABNAME = GC_TAB.
LS_FIELDCAT-OUTPUTLEN = 8.
Reward points if the answer was helpful...
Regards,
Kunal

Similar Messages

  • Reference field and table for AUFK for F4 help in alv.

    Hi All,
       I need to put F4 help on ALV for order no (AUFK) what is the reference field and table for that?
      i tried giving field as aufk and table as ccss but its not working.
       ls_fcat-ref_field = 'AUFNR'.
        ls_fcat-ref_table = 'CCSS'.
    Thanks & Regards,
    Ruchi Tiwari

    Hi,
    Try this.
    Set the f4 help for the field in the fieldcatalog
      ls_fcat-f4availabl = 'X'.
    1. Create a event of ONF4 for the alv grid.
    2. Set the event handler.
    3. Append the field for the F4 help in the internal table and call the below method
        CALL METHOD g_mprn->register_f4_for_fields
        EXPORTING
          it_f4 = i_f4.
    4. create a class definition and implementation
        refer sample pgms (BCALV_F4, BCALV_GRID_EDIT_DELTA and BCALV_GRID_EDIT)
    Hope this may be helpful.
    Regards,
    Sharin.

  • ALV QUANTITY field Geting converted into decimals ?

    Hi All ,
    I have developed an alv report .In that the quantity field is made editable after editing the quantity when i save it .It gets converted into decimals.Suppose if i give 77 its getting reflected as .077 all the field name ,table name ,reference field name, reference table name, quantity field data type has been passed but the problem persists.If there is any one whos has come across this kind of scenario please share your thoughts on this.
    Best Regards,
    Sreeram

    Hi Sreeram,
    I am not gettin this issue. See below code :
    If you are gettiing the same issue with the below code then it has something to do with your user settings.
    Go to Menu Item System -> User Profile -> Own Data -> Defaults ->Decimal Notation.
    Set it to 1,234,567.89 and save. Now try the program again.
    REPORT z_test.
    TYPE-POOLS: slis.
    TYPES : BEGIN OF ty_ekpo,
              ebeln TYPE ebeln,
              ebelp TYPE ebelp,
              ktmng TYPE ktmng,
              menge TYPE bstmg,
            END OF ty_ekpo.
    DATA: it_ekpo TYPE TABLE OF ty_ekpo,
          it_fieldcat TYPE slis_t_fieldcat_alv.
    SELECT ebeln ebelp ktmng menge
      FROM ekpo
      INTO TABLE it_ekpo
      UP TO 20 ROWS.
    PERFORM add_fieldcat USING 'EBELN'.
    PERFORM add_fieldcat USING 'EBELP'.
    PERFORM add_fieldcat USING 'KTMNG'.
    PERFORM add_fieldcat USING 'MENGE'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                = sy-repid
       it_fieldcat                       = it_fieldcat
      TABLES
        t_outtab                          = it_ekpo
    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.
    FORM add_fieldcat  USING  p_fieldname TYPE slis_fieldcat_alv-fieldname.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-tabname = 'IT_EKPO'.
      wa_fieldcat-ref_fieldname = p_fieldname.
      wa_fieldcat-ref_tabname = 'EKPO'.
      IF p_fieldname EQ 'KTMNG'.
        wa_fieldcat-edit = 'X'.
      ENDIF.
      APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM.                    " ADD_FIELDCAT
    Regards,
    Jovito

  • F4 help for ALV table field

    Hi Experts,
    I need to implement F4 help for ALV table field.
    I my scenario, I am using two views. If we click on any record in fist view then it displays the popup window (second view) with relevant record details.
    Here one of the columns having fieldnames corresponding values (old values), for correcting old values I have created new value editable column, we can enter new value for old value then we can save it. Till this functionality is ok.
    Then I have included OVS help for new value field. Here I need to get f4 help for newvalue field relevant to fieldname.
    For example: user clicks on f4 in cell (new value) then if corresponding fieldname is u2018WERKSu2019 then it shows the plant values
    Here I can get fieldname, domain name  and value table using method set_attribute ().
    Same concept I have implemented in ALV using F4IF_FIELD_VALUE_REQUEST. It is working fine
    Here I have little bit confusion. Please advise me how to implement in OVS.
    Regards,
    BBC

    Hi,
    you'll have to create a method for the OVS search help (define it in the "OVS component usage" field in the context).
    Sample code (should work for WERKS):
    method on_ovs .
    declare data structures for the fields to be displayed and
    for the table columns of the selection list, if necessary
      types:
        begin of lty_stru_input,
      add fields for the display of your search input here
          WERKS TYPE WERKS,
        end of lty_stru_input.
      types:
        begin of lty_stru_list,
      add fields for the selection list here
          WERKS TYPE WERKS_D,
          NAME1 type NAME1,
        end of lty_stru_list.
      data: ls_search_input  type lty_stru_input,
            lt_select_list   type standard table of lty_stru_list,
            ls_text          type wdr_name_value,
            lt_label_texts   type wdr_name_value_list,
            lt_column_texts  type wdr_name_value_list,
            lv_window_title  type string,
            lv_group_header  type string,
            lv_table_header  type string,
            lv_werks type werks_d.
      field-symbols: <ls_query_params> type lty_stru_input,
                     <ls_selection>    type lty_stru_list.
      case ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.  "configuration phase, may be omitted
      in this phase you have the possibility to define the texts,
      if you do not want to use the defaults (DDIC-texts)
    Set label from Medium Description to something more logical...
          ls_text-name = `NAME1`.  "must match a field in list structure
          ls_text-value = `Plant description`.
          insert ls_text into table lt_label_texts.
    Set col header from Medium Description to something more logical...
          ls_text-name = `NAME1`.  "must match a field in list structure
          ls_text-value = `Plant description`.
          insert ls_text into table lt_column_texts.
         lv_window_title = wd_assist->get_text( `003` ).
         lv_group_header = wd_assist->get_text( `004` ).
         lv_table_header = wd_assist->get_text( `005` ).
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 20 ).
        when if_wd_ovs=>co_phase_1.  "set search structure and defaults
      In this phase you can set the structure and default values
      of the search structure. If this phase is omitted, the search
      fields will not be displayed, but the selection table is
      displayed directly.
      Read values of the original context (not necessary, but you
      may set these as the defaults). A reference to the context
      element is available in the callback object.
         ovs_callback_object->context_element->get_static_attributes(
             importing static_attributes = ls_search_input ).
        pass the values to the OVS component
         ovs_callback_object->set_input_structure(
             input = ls_search_input ).
        when if_wd_ovs=>co_phase_2.
      If phase 1 is implemented, use the field input for the
      selection of the table.
      If phase 1 is omitted, use values from your own context.
          if ovs_callback_object->query_parameters is not bound.
          endif.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
          if not <ls_query_params> is assigned.
    TODO exception handling
          endif.
            call method ovs_callback_object->context_element->get_attribute
              exporting
                name  = 'WERKS'
              importing
                value = lv_werks.
            data: lv_subcat_text type rstxtmd.
            select werks
                   name1
              into table lt_select_list
              from T001W.
            ovs_callback_object->set_output_table( output = lt_select_list ).
        when if_wd_ovs=>co_phase_3.
      apply result
          if ovs_callback_object->selection is not bound.
          endif.
          assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
            ovs_callback_object->context_element->set_attribute(
                                   name  = `WERKS`
                                   value = <ls_selection>-werks ).
          endif.
      endcase.
    endmethod.

  • Currency Key Reference field in WebDynpro Table Column

    Hi Experts,
    I am using a WebDynpro table (not ALV) showing multiple currency fields in a single row - each one potentially referencing a different currency key e.g. Japanese Yen and USD in a single row.
    My currency context attributes are already defined as currency types, but how can I assign different currency key references to each of my currency context attributes? Or is this somehow done as a property of the table column UI element?
    Thanks for your help,
    Peter

    Hi Kris,
    You answer is very helpful, but I do have a question about going the DDIC route. So you are saying that if I take a DDIC structure into my context with multiple currency keys as reference fields for multiple currency fields, then my WebDynpro context will know exactly which currency key is the reference for which currency field without having do do this programatically as you described? If that's true, can I bring a whole DDIC structure over to the context and then delete the 'Dictionary Structure' refrence from my context node, so that I can add my own additional fields to the context node?  E.g. in the case of DDIC structure VBAP can I get all my currency fields and their reference fields from the DDIC from VBAP and then delete 'VBAP' as a 'Dictionary Structure' from my context node and add my own custom fields. The fields I would have brought in from VBAP still retain their type and everything after the deletion of 'VBAP' as a 'Dictionary Structure', so my question is will it also retain the node_info of what currency key goes with what field?
    Please let me know if you happend to have done this before.
    Thanks,
    Peter

  • Excise invoice number getting reflected in the reference field in VF01

    Hello,
    I require excise invoice number to get get reflected in the reference field of billing document number . (i.e accounting document generated from VF01)
    Thanks,

    Dear Muscan,,
    As per STANDARD SAP PROCESS this functionality is not Possible. The reason is very clear, Excise Invoice is always created after creating billing/invoice document. Without creating excise invoice you cannot have excise invoice number reflected in the reference field of billing document.
    Hope this clarifies your doubt?
    Regards
    MBS

  • How to use the Cross Reference fields in P4P

    I have been receiving questions related to the Cross Reference section from many different customers and partners. This post represents my attempt to describe the Cross Reference Section and the Equivalent Numbers stored within.
    Identity
    A term that Kelly uses and I will borrow is “identity”. A given specification can have many identities. The basic identity is the specification number generated by GSM. This is useful during early stages of design. Once we get past a draft or development status in the workflow the organization quickly wants to identify the specification in other ways. Examples include:
    Execution System Number: Operations and Supply Chain quickly need to formalize an item or material for forecasting, inventory and purchasing…
    Custom Numbering Conventions: Sometimes an organization has very specific custom logic for identifying materials. Usually terms like smart numbering are used to describe their methods.
    Data Migration Identifier: In some cases customers have extensive data clean up projects. As part of the effort systems and processes are developed and an identity is created. In my experience we loaded a “Base Stock” number to represent Packaging Materials. The label stock that was commonly used was historically not represented so we created a number as part of the migration project.
    Identity Functionality:
    The Fields: The four major fields that make up the Cross Reference section are as follows:
    >>System Name: This field describes the system generating the identifier. Examples I like to use are Oracle EBS or SAP Material Master. Sometimes geography must also be concatenated to the system, i.e. Oracle EBS – NA. This occurs when the customer is a large multinational where multiple ERP implementations exist. Therefore the same material may be known by many different numbers, i.e. Oracle EBS – NA = 77432, Oracle EBS – EU = 88883.
    >>System Code: The system code is merely the syntax used during integration. Using CSS or various APIs you may chose to identify the system using an abbreviation, EBSNA or SAPMM.
    >>Equivalent: The value representing the identity within a given system.
    >>Externally Managed: If you are using CSS or an API to receive Cross Reference data you can define the field as "Externally Manged". When a cross reference is marked in this manner the general user community will not be able to edit the field. Administrators associated with the role [Externally_Managed_Cross_Ref_Admin] can edit the field if needed.
    Syndication: While some users enter equivalent numbers manually, others use integration tools to generate and transmit identities. If a given cross reference is marked as “Externally Managed” then users are unable to manually enter data. On initial syndication the specification will not have a given equivalent. The specification is sent to middleware, a number is generated by the appropriate system and the response is sent back to GSM to add the System Code to the specification with the appropriate identity value.
    Copy verses Issue:
    >>Copy: When a user copies a specification the Cross Reference data is NOT included. Since the identities refer to the originating specification it does not make sense to carry over to the copy. If we did then users would quickly need to delete the data.
    >>Issue: When a user issues a specification it maintains the Cross Reference data. This is an important concept because it is expected that a system like GSM will have many issues related to a single ERP #. ERP systems are usually not interested in many of the fields stored in the Product Data Management system.
    Reference: As raw materials are consumed as inputs into Formulation or Trade Specifications the organization may come to identify the materials based on equivalent numbers. Therefore GSM allows for an equivalent number to appear next to the GSM number.
    Implementation Issue:  Ingredients In Packaged Quantities
    Some customers run into a situation where the ingredient specification does not represent a packaged quantity. From an R&D perspective the developer does not care if the material comes in a box or a tanker. In this situation the GSM ingredient may be represented in the ERP system by many items and therefore more than one cross reference value. These items represent packaging differences that are important to purchasing, manufacturing, warehousing, and other execution systems.
    I hope this helps describe some of the purposes and implementation issues around the Cross Reference field.

    You need to get jmf.jar in your CLASSPATH, either on the command line, in an environment variable, by putting a symlink in $JAVA_HOME/lib/ext, whatever works for you. Have you done that? Once it's in the classpath, you can run jmstudio from any directory with the command "java JMStudio".
    Items in the bin directory are just shell scripts, run with "sh jmstudio" or whatever suits your shell (on Mac OS X, copy one of these guys and append ".command" to the filename to make him double-clickable in the Finder).
    --invalidname

  • How to set a default value in the "Our reference"-field in purchse orders?

    Hi!
    When creating a purchase order the "Our reference"-field in the Communication-tab is empty. Is it possible to configure this so that the field is filled by default with the name of the person who is creating the PO?

    Hi,
    There is a button named Personal Settings on ME21N screen. Click on that button --> Click on second tab of Default Values --> Click on More fields --> Select Our reference and maintain the default value. This will always come up at the time of creation of PO.
    Hope this serves the purpose.
    Thanks...
    Edited by: vilas amrutkar on Feb 17, 2009 5:17 AM

  • Reference field of invoice not filled in PO history

    The reference field of the invoice (INFVO-XBLNR) is not copied into the EKBE-XBLNR. I couldn't find an OSS note to solve the problem. Please advise.
    Kind regards,
    Annerie Deckers

    Hello,
    Table EKBE is only updated if "GR-Based IV" indicator is active at Purchase order item level.
    Only then field EKBE-XBLNR is updated with the value of the corresponding GR doc.  reference field (MKPF-XBLNR) and not with the value of the      RBKP-XBLNR (logistics invoice).
    There is also a note explaining the case link:[Note 383828 - ME23N: Reference in the purchase order history]
    BR,
    Elly Leondi

  • Reference field from MIRO in PO History

    Hi,
    The reference field in MIRO has to be displayed in Purchase Order History. For PO's with GR Based IV the field is copied from GR and for PO's without GR based IV it is blank. We want the data from MIRO to be displayed in PO History in the reference field of IR.
    Thanks to provide the information regarding the settings for the same.
    Regards

    Link will help you.
    http://sap.ittoolbox.com/groups/technical-functional/sap-log-mm/miro-couldnt-get-the-gr-number-for-reference-field-in-line-items-3975712

  • BADI/user exit for ME21N - Warning message for "our reference" field

    Dear all,
    I have a problem.
    In ME21N, I need to show a warning message (message w... ) when user enter an already-used-before input in "Our reference' field (EKKO-UNSEZ).
    I've tried in two methods.
    1. Using fm EXIT_SAPMM06E_004. But it can only works for Error message. My warning message never shows up.
    2. Tried to implement classic BADI ME_PROCESS_PO_CUST, using the PROCESS_HEADER method. Got the break-point spot on, but still didn't show the warning message.
    Why is my warning message always got override?
    Please advise.
    Thanks in advance
    Ahmad

    Hi Ahmad,
    Check the below links:
    Unable to put Warning messages in ME21N and ME22N in Exit / BAdI in ECC 6.0
    Warning message in me22n check user-exit can't process?
    Custome warning message in T. code me51n me52n & me21n , me22n
    Regards,
    Nisha Vengal.

  • SO number in reference field in accounting doc after GI posting

    Hello,
    In the header of accounting document, which is being created after posting goods issue, in the "Reference doc." field delivery number is displayed.
    Is it possible to have in this field sales order number?? If so, where can I change this set up?
    Regards,
    Sylwia

    Hi Sylwia,
    This goes to the same explanation I gave you in previuos inquiry. Talk with you Sales & Distribution folks or go to the set up of copy control strategy that drives transfer of information "Copying control: Delivery document to billing document" (Tcode: VTFL). Select the right combination Billing/Delivery and change the header reference field to capture the sales order number. Again when the financial document is released to accounting the value would be transferred.
    Hope this helps.
    Thanks,
    GG

  • Re:  Reference field to change red alert message. How?

    Hi FICO Consultant,
    We are using T-Code:  FBL1N, using our com code and execute the report.  In this report, we have used the reference field for company purpose key in the same reference no.: (EX:  789100).  The same number appeared again on the screen (Reference No.).  That time red alert message appeared on the screen or an existing same reference in this field.  Any body gives the idea to me in FICO.
    We expect the reply from you. 
    Thank you,
    Regards,
    Krishnan.

    The icons are a function of the Alert style: that can only be changed in the property palette. I'don't believe there is any way of substituting your own icons for the Oracle ones short of overwriting the Oracle supplied files with graphics of your own. However, we can set the Alert Title and Message Text programmatically with the SET_ALERT_PROPERTY built-in.
    Cheers, APC

  • How to make the Reference field in the in Accounting Tab a required field.

    Hi,
    Can i make the REference field in the Accounting tab required. I want to enter contract number from RE in that field.
    Thank you.
    Rachelle

    Hi,
    Goto t.code OVA2 select A-sales header and then click on procedures in the left--> select the procedure in which you want to incolude this field and new entries the table name is VBAK and field is XBLNR for the reference field in the accouting tab and accordingly assign the status 01 or 02 as per your requirement.
    Then you need to assign the incompletion procedure to the sales document type in VOV8.
    Regards,
    Gopal.

  • Payment Reference Field KIDNO Not apprearing at the time of Vendor Payment

    Hi,
    When we are making the Vendor Payment thru F-53, we are not able to see the Payment Reference Field KIDNO there. But when the payment document is posted and we see the line items then this field KIDNO comes there as non-modifiable field. We want to fill some information there in that field for some report purposes. Can you please help me, how can I see this field as changable field at the time of making vendor paymnts thru F-53.
    Regards.

    Hi Senthilkumar,
    Change the field status for the 'payment reference field' to optional or required, based on your requirements. You can do this in T.Code - FBKP.
    Do this:
    a) Check the field status group maintained in the master data of the Reconciliation account of the vendor.
    b) In t.code - FBKP, click on 'Field Status Groups' and enter the variant created for your company code
    c) Now from the resultant entries, double click on the field status group which has been maintained in the master data of the Reconciliation account of the vendor.
    d) Double click on 'Payment transactions', you would see 'Payment Reference' there which would be having its status as 'Suppressed'. Just change it to Optional or Required!!
    Regards,
    Angad

Maybe you are looking for