T code to change data

Hi Guru's
What is the transaction to change data for Co Object: Statistical key figure totals which is COSR table?
Nagesh.

Nagesh,
I am not sure if this is the forum for the same - changing data for a CO Object would mean that this is related to the Finalcial-controlling forum.

Similar Messages

  • Change Data Provider Based on ComboBox Selection

    Complete noob using Flash CS5 for Macs. I have a ComboBox component and a TileList. I want the ComboBox selection to change the data provider for the TileList. I've used a sample script from the Adobe website at the bottom, but it is not working in this context. Google returns no better examples. Can anyone point me in the right direction?
    import fl.controls.ComboBox;
    import fl.data.DataProvider;
    import flash.display.DisplayObject;
    import flash.display.MovieClip;
    import fl.events.DataChangeEvent;
    // Combo Box ("aCb")
    var aCb:ComboBox = aCb;
    var Choices:Array = new Array(
        {label:"Artist Resin", data: "resin"},
        {label:"Ceramic", data: "ceramic"}
    aCb.dataProvider = new DataProvider(Choices);
    // TileList ("aTl")
    aTl.columnWidth = 110;
    aTl.rowHeight = 130;
    aTl.setSize(110,150);
    aTl.move(20, 150);
    aTl.setStyle("contentPadding", 5);
    // TileList Content
    var i:uint = 0;
    var resinitems:Array = [
    {label: "Image 1", source: "http://www.helpexamples.com/images/montreal/images/IMG_5057.jpg"},
    {label: "Image 2", source: "http://www.helpexamples.com/flash/images/gallery2/images/IMG_1592.jpg"}];
    var resin:DataProvider = new DataProvider();
    for(i=0; i < resinitems.length; i++) {}
    var ceramicitems:Array = [
    {label: "Image 3", source: "http://www.helpexamples.com/flash/images/gallery1/images/pic11.jpg"},
    {label: "Image 4", source: "http://www.helpexamples.com/flash/images/gallery1/images/pic14.jpg"},];
    var ceramic:DataProvider = new DataProvider();
    for(i=0; i < ceramicitems.length; i++) {}
    addChild(aCb);
    addChild(aTl); 
    // Code to Change Data Provider for Tile List
    aCb.addEventListener(Event.CHANGE, changedataProvider);
    function changedataProvider(event:Event):void {
        aTl.dataProvider = event.target.selectedItem.data;

    Thanks for your answers.
    I have already checked those links.
    Now th problem what I am facing is,
    I am not able to call the function ChangeLanguage through javascript.
    I have created a dropdwon using Hovermenu and added English and German.
    Now when I click on these the function should be called.
    Please help me in getting how setClientSideScript() can be used to call a function.
    or any other way to call the function after clicking on Hovermenu Item.
    Thanks in advance,
    Sumangala

  • Possible t-codes for changing schedule line dates

    Hi
       I am trying to find out all possible t-codes for changing schedule dates in sales order. I found out of the following t-codes:
    VA02
    CO06
    V_RA
    V_V2
    Experts please tell if I'm missing any t-code
    TIA

    Hi,
    As far as my knowledge goes, you have got all the tcode. if you get more tcode send me a mail.
    Thanking you
    Regards
    Manoj
    ([email protected])

  • Change comapny code for master data directly.

    As per the requirement i need to change the company code for some records for company consolidation.
    I need to convert three company codes with one comapny code.
    Is it possible or there is any work arround. answers will be rewarded.

    Probably not the answer you are looking for but SAP has [SLO|http://www.sap.com/services/bysubject/consulting/brochures/index.epx?PageSize=10&ActualPage=4] (System Landscape Optimization) consulting services.  This service is used by SAP customers when they need to change data (master data/transactional data) during say a company consolidation.
    Changing data in SAP tables directly is obviously highly discouraged, especially in a productive system.

  • How to get changed data in ALV in Web Dynpro for ABAP

    METHOD on_data_check .
    DATA:
        node_spfli                          TYPE REF TO if_wd_context_node,
        node_sflight                        TYPE REF TO if_wd_context_node,
        itab_sflight2                        TYPE if_display_view=>elements_sflight.
      node_spfli = wd_context->get_child_node( name = if_display_view=>wdctx_spfli ).
      node_sflight = node_spfli->get_child_node( name = if_display_view=>wdctx_sflight ).
      CALL METHOD node_sflight->get_static_attributes_table
        IMPORTING
          table = itab_sflight2.
    this code is ..get all data(changed and not changed)
    but i want get changed data only, not all data.
    how to get changed data?
    Edited by: Ki-Joon Seo on Dec 27, 2007 6:04 AM

    Hi,
    To get only the changed data in the ALV grid of a WD, you need to capture the "ON_DATA_CHECK" of the ALV grid.
    To this please do the following in the ALV initialization of the ALV table settings :
        lr_table_settings->set_data_check(
                IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CELL_EVENT ).
    You may also do this:
        lr_table_settings->set_data_check(            IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CHECK_EVENT)
    The above two ways would depend on when do you need to check for the changed data. If you want to check the data as soon as it is entered, then use the first method. Else, use the second method.
    You need to register an EVENT HANDLER for this event.(You may do this in your VIEW or Component Controller).
    In this Event handler, you would find an importing parameter R_PARAM which is a ref type of      IF_SALV_WD_TABLE_DATA_CHECK.
    The attribute T_MODIFIED_CELLS of this interface IF_SALV_WD_TABLE_DATA_CHECK will contain the modified cells of the ALV with the old & new values.

  • How to update changed data in alv grid.

    hi experts,
    i have a editable alv report how to update the changed data on the grid to database table when i click save.
    can anybody tell me how to do this if possible with example.
    thanks in advance.
    regards,
    venu

    The code below isn't a working program, but has most of what you should need.  Field-symbol <dyn_table> will always have what is in the grid.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>.
    DATA: pt_fieldcat TYPE lvc_t_fcat,
          ls_fcat TYPE lvc_s_fcat,
          new_table TYPE REF TO data,
          new_line TYPE REF TO data.
    CREATE OBJECT g_custom_container
          EXPORTING container_name = g_container.
    CREATE OBJECT g_grid EXPORTING i_parent = g_custom_container.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'MATERIAL'.
    ls_fcat-datatype  = 'CHAR'.
    ls_fcat-intlen    = 18.
    ls_fcat-outputlen = 18.
    ls_fcat-coltext   = 'Material'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'QUANTITY'.
    ls_fcat-datatype  = 'INT4'.
    ls_fcat-intlen    = 6.
    ls_fcat-outputlen = 6.
    ls_fcat-coltext   = 'Qty'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                 EXPORTING
                    it_fieldcatalog = pt_fieldcat
                 IMPORTING
                    ep_table = new_table.
    * assign ref variable  to a field symbol
    ASSIGN new_table->* TO <dyn_table>.
    * Create dynamic work area and assign to FS
    CREATE DATA new_line LIKE LINE OF <dyn_table>.
    ASSIGN new_line->* TO <dyn_wa>.
    * data_itab is filled with data that you want in grid
    LOOP AT data_itab INTO data_wa.
      CLEAR <dyn_wa>.
      ASSIGN COMPONENT 'MATERIAL' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-material.
      ASSIGN COMPONENT 'QUANTITY' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-quantity.
      APPEND <dyn_wa> TO <dyn_table>.
    ENDLOOP.
    CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          i_structure_name              = '<DYN_TABLE>'
          is_variant                    = gs_variant
          i_save                        = 'A'
          i_default                     = 'X'
          is_layout                     = gs_layout
          it_toolbar_excluding          = gt_exclude
        CHANGING
          it_outtab                     = <dyn_table>
          it_fieldcatalog               = pt_fieldcat[]
          it_sort                       = gt_sort[].

  • How to change data type of content type column.

    Hi all,
    I am having one content type. I have 10 columns in it. There are two rich text columns in my content type. I have attached this content type to pages library. I want to change the data type of this rich text column  to "Full
    HTML content with formatting and constraints for publishing".
    Please assist me with this issue.
    amol

    Hi,
    From your description, my understanding is that you want to change the data type for rich text column in content type.
    The field type of Full HTML content with formatting and constraints for publishing is "Invalid", you could refer to this article:https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldtype.aspx.
    You also could test it by create a Full HTML content with formatting and constraints for publishing column and get the its type with C# code below:
    //change the URL to your SharePoint site
    using (SPSite site = new SPSite("http://sp/sites/sharepoint2013"))
    using (SPWeb web = site.OpenWeb())
    SPFieldType type = web.Fields["Column name"].Type;
    I have tested it with the PowerShell, it cannot hange the rich text column to “Full HTML content with formatting and constraints for publishing” column. If you want to edit the rich text column, you could not change the type of the column as the screenshot
    below:
    As a workaround, you could follow these steps to accomplish your requirement:
    Create a “Full HTML content with formatting and constraints for publishing” type column in the content type.
    Enter your site columns by clicking gear icon -> Site Settings -> Site columns under Web Designer Galleries under section.
    Find and delete the rich text column you want to change.
    Find the column you have created in step 1, and change the column’s name to the name of the text column you have deleted in step 3.
    But you will lose the data of the rich text column in pages library with this method.
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Editable ALV, how to capture changed data

    Hi All,
    I have created an editable ALV. User can make some changes in the displayed record and press "Submit" button (custom button on application toolbar), the program should validate the data and write the file on application server if validations are successful otherwise controls stay on the same screen.
    I am handling this validation and writing file part in PAI of the screen.
    Problem: The program is capturing the data when user changes it for the first, but program is failing to capture the subsequent changes (user makes after the validation fails). Program processes always the first time changed data only. Please help me in getting this problem resolved.
    Step1 : Program shows output.
    Step2: User changes Company Code.
    Step3: User clicks on Submit Button.
    Step3.1: Program reads the new data and performs validation.
    Step3.2: New Company code is not valid, error displayed.
    Step4: User changes the company code again, presses submit button.
    Goto step 3.1 -> Here program does not read the new data, rather first time changes company code is again read and validated, and program shows the same error again, which is not a desired result

    Hi Ashish,
    you need a method HANDLE_DATA_CHANGED as handler for grid event DATA_CHANGED.
    Use
    LOOP AT er_data_changed->mt_mod_cells ASSIGNING <mod>.
    to check all changed data. In this event, add the error messages to ER_DATA_CHANGED object.
    set all required handlers, i.e.
    SET HANDLER:
          handle_data_changed          FOR ro_grid,
          handle_data_changed_finished FOR ro_grid,
          handle_toolbar_set           FOR ro_grid,
          handle_user_command          FOR ro_grid,
          handle_hotspot_click         FOR ro_grid,
          handle_f4                    FOR ro_grid,
          handle_f1                    FOR ro_grid.
       ro_grid->set_toolbar_interactive( ).
    Register ENTER and MODIFIED events.
        ro_grid->register_edit_event( cl_gui_alv_grid=>mc_evt_enter ).
        ro_grid->register_edit_event( cl_gui_alv_grid=>mc_evt_modified ).
    Regards,
    Clemens

  • Changing data in a linked list object.

    hi,
    i'm still pretty new to java, so bear with me if i am making stupid mistakes, heh.
    i'm having trouble with changing data in an object stored in a singly-linked list. i've created a class that will store polynomials in sorted order (descending) in a singly-linked list. each linked list is one polynomial, and each node references to a polynomial object that stores two ints: the coefficient and the exponent of that term.
    i'm having trouble when it comes to 'collecting like terms,' though. here's a rough skeleton of my code:
    public class Polynomial
    private LinkedList polynoList;
    private LinkedListItr Itr;
    private int coeff;
    private int exponent;
    public Polynomial()
    zeroPolynomial();
    } // this constructor sets up an empty linked list
    public Polynomial( int c, int e )
    coeff = c;
    exponent = e;
    } // this creates a Polynomial object storing the two ints
    public void zeroPolynomial()
    polynoList = new LinkedList();
    theItr = polynoList.zeroth();
    } // this method creates the empty linked list and sets the
    //iterator on the zeroth node.
    //various other methods are here, not relevant to my post
    //this next method is the one i am having trouble with.
    //it takes two ints as parameters, the coefficient
    //and the exponent.
    public void insertTerm( int c, int e )
    //...i have a few if/then statements here
    //so that the terms can be inserted in descending order.
    LinkedListItr tester = polynoList.first();
    //the 'tester' iterator is set on the first node
    //this following if statement retrieves the exponent
    //in the current node by casting the information
    //retrieved from the LinkedList retrieve() method
    //into Polynomial, then compares it to the current
    //exponent. if they are equal, i want to add the
    //coefficients.
    if( e == ((Polynomial)tester.retrieve()).getExp() )
    this.coeff = ((Polynomial)tester.retrieve()).getCoeff() + c;
    //a main method goes here wherein the user can insert
    //terms, print the polynomial, etc.
    }//end Polynomial class
    can anyone help me out? the code i'm using compiles correctly, but it does not change the value of the current coeff variable as i'd like to think it should. any input would be GREATLY appreciated, thanks!

    hey,
    thanks for the reply...
    i am sure that ((Polynomial)tester.retrieve()).getExp() will return an int equal to 'e.' i tried this:
    System.out.println("e="+e);
    System.out.println((Polynomial)tester.retrieve()).getExp());
    if( e == ((Polynomial)tester.retrieve()).getExp() ){
    this.coeff = ((Polynomial)tester.retrieve()).getCoeff() + c;
    System.out.println( "this.coeff = " + this.coeff );
    with that, the output showed that e and the getExp() output were the same. it also showed (as output) that this.coeff did change in value, but when i tried this:
    System.out.println( ((Polynomial)tester.retrieve()).getCoeff() )
    to check if the value changed within the object, it didn't. this.coeff changed, but the actual coeff variable in the object didn't.
    any ideas?

  • File names with last changed Date and time in a directory

    Hi All.
    I need to get all filename, last changed date, last changed time in a directory. Is there any function module for this?
    Regards,
    Venkat.

    hi,
    if the directory is in any application server try to use this code
    >  DATA: wa_file TYPE zdpp_file_read.
    >  DATA: nomefile(75).
    >  DATA: ext_chek(3).
    >DATA: BEGIN OF wa_file,
    >        dirname     TYPE DIRNAME_AL11, " name of directory
    >        name        TYPE FILENAME_AL11," name of entry
    >        type(10)    TYPE c,            " type of entry.
    >        len(8)      TYPE p,            " length in bytes.
    >        owner(8)    TYPE c,            " owner of the entry.
    >        mtime(6)    TYPE p,            " last mod.date, sec since 1970
    >        mode(9)     TYPE c,            " like "rwx-r-x--x": prot. mode
    >        useable(1)  TYPE c,
    >        subrc(4)    TYPE c,
    >        errno(3)    TYPE c,
    >        errmsg(40)  TYPE c,
    >        mod_date    TYPE d,
    >        mod_time(8) TYPE c,            " hh:mm:ss
    >        seen(1)     TYPE c,
    >        changed(1)  TYPE c,
    >      END OF file.
    >  data: files like wa_file occurs 0 with header line.
    >
    >  CALL FUNCTION 'FILE_GET_NAME'
    >       EXPORTING
    >            client           = sy-mandt
    >            logical_filename = logpath
    >            operating_system = sy-opsys
    >       IMPORTING
    >            file_name        = path
    >       EXCEPTIONS
    >            file_not_found   = 1
    >            OTHERS           = 2.
    >  IF sy-subrc <> 0.
    >    RAISE file_not_found.
    >  ENDIF.
    >
    >  DATA: last_path TYPE i.
    >  DO.
    >    last_path = strlen( path ).
    >    last_path = last_path - 1.
    >    IF pathlast_path(1) = '/' or pathlast_path(1) = '\'.
    >      EXIT.
    >    ELSE.
    >      CLEAR path+last_path(1).
    >    ENDIF.
    >  ENDDO.
    >
    >  MOVE extension TO ext_chek.
    >  TRANSLATE ext_chek TO UPPER CASE.
    >  nomefile = '*'.
    >
    >  CALL 'C_DIR_READ_FINISH'
    >      ID 'ERRNO'  FIELD wa_file-errno
    >      ID 'ERRMSG' FIELD wa_file-errmsg.
    >
    >  CALL 'C_DIR_READ_START' ID 'DIR'    FIELD path
    >                          ID 'FILE'   FIELD nomefile
    >                          ID 'ERRNO'  FIELD wa_file-errno
    >                          ID 'ERRMSG' FIELD wa_file-errmsg.
    >  IF sy-subrc <> 0.
    >    RAISE wrong_directory.
    >  ELSE.
    >
    >    DO.
    >      CLEAR wa_file.
    >
    >      CALL 'C_DIR_READ_NEXT'
    >        ID 'TYPE'   FIELD wa_file-type
    >        ID 'NAME'   FIELD wa_file-name
    >        ID 'MTIME'  FIELD wa_file-mtime
    >        ID 'ERRNO'  FIELD wa_file-errno
    >        ID 'ERRMSG' FIELD wa_file-errmsg.
    >      IF sy-subrc <> 0.
    >        EXIT.
    >      ENDIF.
    >
    >        PERFORM p6_to_date_time_tz(rstr0400) USING wa_file-mtime
    >                                                   wa_file-mod_time
    >                                                   wa_file-mod_date.
    >      MOVE path TO wa_file-dirname.
    >      APPEND wa_file TO files.
    >    ENDDO.
    >  ENDIF.
    >
    >  CALL 'C_DIR_READ_FINISH'
    >      ID 'ERRNO'  FIELD wa_file-errno
    >      ID 'ERRMSG' FIELD wa_file-errmsg.
    bye,
    marco

  • Retrieving latest changed date UDATE for Vendor.

    Hi All,
    I have a requirement to retrieve latest changed date UDATE field from CDHDR table based on company code wise??.
    As the vendor can be same for different company codes, I need to retrieve the company code wise latest changed date of vendor.
    Hope am clear.
    Currently am doing this 
    SELECT objectclas objectid tcode udate
        FROM cdhdr INTO  CORRESPONDING FIELDS OF TABLE it_cdhdr
        FOR ALL ENTRIES IN it_lfa2
        WHERE objectclas = 'KRED' AND
              objectid   = it_lfa2-objectid
        AND   change_ind = 'U'.
    SORT it_cdhdr BY objectid udate  DESCENDING.
    Its giving me the latest changed date. But I need latest changed date -company code wise?
    Any help is highly appreciated.
    Thanks & regards
    Himayat.

    Hi,
    Use function module CHANGEDOCUMENT_READ to get the details of CDHDR as well as CDPOS data. Records of table CDPOS where TABNAME = 'LFB1' will have the details related to changes in company-specific data.  Structure EDITPOS of above function module will give you detail information.
    Regards
    Vinod

  • Save changed data in editable ALV

    Hi experts,
    I have a problem with an editable ALV. I get data out of a table and show it with my web dynpro application in an alv. Now I made the alv editablke, so that I can change the content of each cell in the alv in the web browser. But how will this changed data be saved? I want that it will be changed after ENTER or clicking a save button. I have a button, but all I tried yet brought no success.
    Which code has to be in which method? Have I to do something eith the context. How can I reach that the changed content is also changed in the table, so that after reload the web dynpro application, the changed content is shown?
    It would be nice if you had an answer with code examples and the exact place where to put it in, because I am very new to ABAP and WD4A.
    Thanks a lot!
    Best Regards
    Ingmar

    If you look on the following lokn, there is the tutorial "Editing ALV in Web Dynpr for ABAP".
    There is described how to save the data. But in the implementation of On_data_check on page 8 and 9 the code detail for saving the data to database is missing, because the flight model shall not be changed.
    Would the missing code be the solution? What is the code?
    Thanks!!!
    Best Regards Ingmar
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • ALV SAVE changed data

    Hi,
    I need to save only changed data in my ALV.  I created a button SAVE and have an event handler for this data. SAVE action should only be triggered when user presses this button.
    ON_DATA_CHECK method is what I need since I can pull out changed content from R_PARAM but this action gets executed only when I press on Filter link, etc. Is there  a way to bind it to my custom button?
    I can execute the following code
    DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
    * Check for changes
      l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
      l_ref_interfacecontroller->data_check( ).
    however, data_check method won't be executed if any data changed but I want to executed regardless of changes.
    Any ideas?
    Bottom line is that I would like to execute action ON_DATA_CHECK in my SAVE method.
    Thanks.

    If you look on the following lokn, there is the tutorial "Editing ALV in Web Dynpr for ABAP".
    There is described how to save the data. But in the implementation of On_data_check on page 8 and 9 the code detail for saving the data to database is missing, because the flight model shall not be changed.
    Would the missing code be the solution? What is the code?
    Thanks!!!
    Best Regards Ingmar
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • ALV CHECK CHANGED DATA WITH REUSE_ALV_GRID_DISPLAY

    HELLO  EVERY-ONE.
        I have a question that how to check changed data in ALV. I know we can use CHECK_CHANGE_DATA Method in OO, and how to check it in REUSE_ALV_GRID_DISPLAY <b>without double click</b> ?

    Try this code , it will give the solution that has been solved with funtion module
    REPORT zalvprg1.
    TYPE-POOLS: slis.
    TABLES: ekko.
    DATA : it_list_top_of_page TYPE slis_t_listheader,
           it_list_end_of_page TYPE slis_t_listheader,
           it_events           TYPE slis_t_event,
           wa_line             TYPE slis_listheader,
           wa_event            TYPE slis_alv_event.
    DATA :  it_fieldcat  TYPE slis_t_fieldcat_alv ,
            wa_fieldcat  TYPE slis_fieldcat_alv.
    TYPES :BEGIN OF ty_ekko,
           ebeln TYPE ebeln,
           bukrs TYPE bukrs,
           ernam TYPE ernam,
           bsart TYPE esart,
           waers TYPE waers,
           END   OF ty_ekko.
    TYPES :BEGIN OF ty_ekpo,
           ebeln TYPE ebeln,
           ebelp TYPE ebelp,
           matnr TYPE matnr,
           werks TYPE werks,
           menge TYPE bstmg,
           END   OF ty_ekpo.
    TYPES :BEGIN OF ty_marc,
           matnr TYPE matnr,
           werks TYPE werks_d,
           tranz TYPE tranz,
           herbl TYPE herbl,
           END   OF ty_marc.
    TYPES : BEGIN OF ty_show,
            old  TYPE i,
            new(10) TYPE c,
            END OF ty_show.
    TYPES : BEGIN OF ty_final,
           ebeln TYPE ebeln,
           bukrs TYPE bukrs,
           ernam TYPE ernam,
           bsart TYPE esart,
           waers TYPE waers,
           matnr TYPE matnr,
           werks TYPE werks,
           menge TYPE bstmg,
           END   OF ty_final.
    DATA: it_ekko  TYPE TABLE OF ty_ekko,
          it_ekpo  TYPE TABLE OF ty_ekpo,
          it_marc TYPE TABLE OF ty_marc,
          it_final TYPE TABLE OF ty_final,
          it_show  TYPE TABLE OF ty_show WITH HEADER LINE,
          wa_marc  TYPE ty_marc,
          wa_ekko  TYPE ty_ekko,
          wa_ekpo  TYPE ty_ekpo,
          wa_show  TYPE ty_show,
          wa_final TYPE ty_final.
    SELECT-OPTIONS: so_ebeln FOR ekko-ebeln.
    START-OF-SELECTION.
      PERFORM data_fetch.
      PERFORM alv_display.
    END-OF-SELECTION.
    *&      Form  data_fetch
          text
    -->  p1        text
    <--  p2        text
    FORM data_fetch .
      SELECT ebeln
             bukrs
             ernam
             bsart
             waers
             FROM ekko
             INTO TABLE it_ekko
             WHERE ebeln IN so_ebeln.
      SELECT ebeln
             ebelp
             matnr
             werks
             menge
             FROM ekpo
             INTO TABLE it_ekpo
             FOR ALL ENTRIES IN it_ekko
             WHERE ebeln = it_ekko-ebeln.
      LOOP AT it_ekko INTO wa_ekko.
        wa_final-ebeln = wa_ekko-ebeln.
        wa_final-bukrs = wa_ekko-bukrs.
        wa_final-ernam = wa_ekko-ernam.
        wa_final-bsart = wa_ekko-bsart.
        wa_final-waers = wa_ekko-waers.
        READ TABLE it_ekpo INTO wa_ekpo WITH KEY ebeln = wa_ekko-ebeln.
        IF sy-subrc EQ 0.
          wa_final-matnr = wa_ekpo-matnr.
          wa_final-werks = wa_ekpo-werks.
          wa_final-menge = wa_ekpo-menge.
        ENDIF.
        APPEND wa_final TO it_final.
      ENDLOOP.
    ENDFORM.                    " data_fetch
    *&      Form  alv_display
          text
    -->  p1        text
    <--  p2        text
    FORM alv_display .
      REFRESH it_fieldcat.
      PERFORM field_cat USING 'EBELN' 'PURCHASE ORDER NO'.
      PERFORM field_cat USING 'BUKRS' 'COMPANY CODE'.
      PERFORM field_cat USING 'ERNAM' 'USERNAME CREATED'.
      PERFORM field_cat USING 'BSART' 'DOCUMENT TYPE'.
      PERFORM field_cat USING 'WAERS' 'CURRENCY'.
      PERFORM field_cat USING 'MATNR' 'MATERIAL NO'.
      PERFORM field_cat USING 'WERKS' 'PLANT '.
      PERFORM field_cat USING 'MENGE' 'QUANTITY'.
      CLEAR it_list_top_of_page.
      PERFORM f009_list_header .
      CLEAR it_list_end_of_page.
      PERFORM f009_list_footer.
      PERFORM f012_grid_function_module TABLES it_final USING it_fieldcat.
    ENDFORM.                    " alv_display
    **&      Form  f009_list_header
          text
    FORM f009_list_header.
    **..... Header detail for ALV
      wa_event-name = text-001. "TOP_OF_PAGE
      wa_event-form = text-002. "F010_TOP_OF_PAGE
      APPEND wa_event TO it_events.
      CLEAR wa_event.
      CLEAR wa_line.
      wa_line-typ  = text-003.   "S
      wa_line-key  = text-004.   "9 - BLOCKER REPORT
      wa_line-info = text-005.
      APPEND wa_line TO it_list_top_of_page.
      CLEAR wa_line.
    ENDFORM.                    "f009_list_header
    *&      Form  f010_top_of_page
          text
    FORM f010_top_of_page.
    **......The form 'F010_TOP_OF_PAGE' cannot be called directly
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_list_top_of_page.
    ENDFORM.                    "f010_top_of_page
    *&      Form  field_cat
          text
         -->W_FIELD    text
         -->W_COL      text
    FORM field_cat  USING    w_field
                             w_col.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = w_field.
      wa_fieldcat-seltext_l = w_col.
      wa_fieldcat-outputlen = 15.
      APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM.                    " field_cat
    *&      Form  f012_grid_function_module
          text
    FORM f012_grid_function_module TABLES w_tab USING  w_fcat TYPE any.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          it_fieldcat              = w_fcat
          i_callback_pf_status_set = 'F010_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          it_events                = it_events[]
        TABLES
          t_outtab                 = w_tab
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "f011_grid_function_module
    *&      Form  f009_list_footer
          text
    FORM f009_list_footer.
    **..... Footer  detail for ALV
      CLEAR wa_event.
      CLEAR wa_line.
      wa_event-name = text-007. "BOTTOM_OF_PAGE
      wa_event-form = text-008. "F010_BOTTOM_OF_PAGE
      APPEND wa_event TO it_events.
      wa_line-typ  = text-009.   "S
      wa_line-key  = text-010.   "9 - BLOCKER REPORT
      wa_line-info = text-011.
      APPEND wa_line TO it_list_end_of_page.
      CLEAR wa_line.
    ENDFORM.                    "f009_list_footer
    *&      Form  f010_top_of_page
          text
    FORM f010_bottom_of_page.
    **......The form 'F010_TOP_OF_PAGE' cannot be called directly
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_list_end_of_page.
    ENDFORM.                    "f010_end_of_page
          FORM user_command                                             *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'MATNR'.
            SET PARAMETER ID 'MAT' FIELD rs_selfield-value.
            SET PARAMETER ID 'WRK' FIELD '1000'.     "<- Your plant here
            CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
           call transaction 'MM02' and skip first screen.
          ENDIF.
          IF rs_selfield-fieldname = 'WERKS'.
            PERFORM disp_marc USING rs_selfield.
          ENDIF.
        WHEN '&CHANGE'.
          IF rs_selfield-fieldname = 'MENGE'.
            PERFORM disp_alter USING rs_selfield.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "callback_ucomm
    *&      Form  f010_pf_status
          text
         -->RT_EXTAB   text
    FORM f010_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZS_ALV'.
    ENDFORM.                    "F010_PF_STATUS
    *ENDFORM.                    "dialog
    *&      Form  f002_FIELDCAT
          text
         -->P_0512   text
         -->P_0513   text
         -->P_0514   text
    FORM f002_fieldcat  USING   w_field
                                w_col
                                w_change   .
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = w_field.
      wa_fieldcat-seltext_l = w_col.
      wa_fieldcat-outputlen = 15.
      wa_fieldcat-edit      = w_change.
      wa_fieldcat-input     = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM.                    " f002_FIELDCAT
    *&      Form  disp_marc
          text
         -->P_W_SELFIELD  text
    FORM disp_marc  USING    rs_selfield TYPE slis_selfield.
      SELECT   matnr
               werks
               tranz
             FROM  marc INTO TABLE it_marc
             WHERE werks = rs_selfield-value.
      REFRESH it_fieldcat.
      PERFORM field_cat USING 'MATNR' 'MATERIAL NUMBER'.
      PERFORM field_cat USING 'WERKS' 'PLANT '.
      PERFORM field_cat USING 'TRANZ' 'INTER-OPERATION TIME'.
    PERFORM field_cat USING 'HERBL' 'STATE OF MANUFACTURE'.
      PERFORM f012_grid_function_module TABLES it_marc USING it_fieldcat .
      IF sy-subrc NE 0.
        MESSAGE 'MATERIAL DETAILS' TYPE 'S'.
      ENDIF.
    ENDFORM.                    " disp_marc
    *&      Form  disp_alter
          text
         -->P_RS_SELFIELD  text
    FORM disp_alter  USING    rs_selfield TYPE slis_selfield.
      DATA:l_var(10) TYPE c.
      REFRESH : it_fieldcat,
                it_show.
      it_show-old = rs_selfield-value.
      CLEAR it_show-new.
      APPEND it_show TO it_show.
      PERFORM field_cat  USING 'OLD'  'OLD QTY (MENGE)'.
      PERFORM f002_fieldcat USING 'NEW' 'NEW QTY (MENGE)' 'X'.
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
          i_title            = 'CHANGES IN MATERIAL'
          i_tabname          = 'IT_SHOW'
          it_fieldcat        = it_fieldcat
          i_callback_program = sy-repid
        TABLES
          t_outtab           = it_show
        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.
      l_var = it_show-new.
      READ TABLE it_final INDEX rs_selfield-tabindex INTO wa_final.
      wa_final-menge = l_var.
      MODIFY it_final INDEX rs_selfield-tabindex  FROM wa_final TRANSPORTING menge .
      PERFORM alv_display.
    ENDFORM.                    " disp_alter
    Reward points for the same
    Regards,
    Shanmuga perumal.L

  • Changing data in 'hidden' fields through BSP

    Hi all,
    We are using custom copy of hap_document BSP and in there i am trying to change values in the appraisal document using application->doc. I am able to change the values for the fields that are displayed in the layout in the application->doc-t_body_cell_notes, but not able to change the values for hidden fields(that have 'H' in application->doc-t_body_cells-cell_note_availability).
    Is it impossible to change data for hidden fields?
    Please let me know if anyone of you had ever done something like this earlier.
    Thanks,
    manasa

    Thanks Raja.
    In the HAP_DOCUMENT there is a cell for employee comments. Now i am hiding the cell in the BSP and when user clicks on a dropdown i am changing the value in the cell say from ABC to XYZ programatically. The document is being updated with the XYZ value when the cell is either in change/display mode but not in hidden mode. in hidden mode, When i change the value to XYZ and save the cell gets empty and doesnt have the previous value ABC also.
    I am changing the value in the cell using below code:
       READ TABLE application->doc-t_body_cell_notes INTO s_cell_notes
         WITH KEY column_iid = '0001' row_iid = '0002'.
       IF sy-subrc = 0.
         s_cell_notes-tdline = 'XYZ'.
       ENDIF.
       MODIFY application->doc-t_body_cell_notes
          INDEX sy-tabix  FROM s_cell_notes
          TRANSPORTING tdline.
       ENDIF.
    ENDIF.
    if you have any questions please let me know. I am assmuing that you have worked on the BSP HAP_DOCUMENT.
    Thanks again,
    manasa

Maybe you are looking for

  • My iPhone4 won't come on or charge

    I've tried reseting it on the charger. And when I hooked it up to the computer itunes automatically pops up. But a message pops up and says the iPhone update server is unavailable (probably because my internet is down)  Do I need an update or a new p

  • During PO creation system should not allow to create more than contract val

    Hi, System is allowing to create the PO more than  the contract value so I want to stop it please explain the required config settings. always system should allow to create the PO with in the contract value only. thanks.

  • Ad hoc query missing amounts

    Hi: I'm having problems in order to obtain amounts from a custom infotype, this custom infotype (9001) is attached to the positions. When I try to obtain information about amounts that I have store in the custom infotype with the ad hoc query, I have

  • Error in Database backup using RMAN.

    Hi While taking full online backup using RMAN i got the following error. ORA-19566: exceeded limit of 0 corrupt blocks for file /oracle/DEV/sapdata2/dev640_6/dev640.data6 Please help me how to resolve this issue.

  • Health Check Program?

    With what program you guys monitor the health condition of external hard drives? (Sony HD-E1 2.5" 1 TB External Hard Drive)