Custom ALV HTML Header

I am trying to create a standard header for our company as we are trying increase the development of custom ALV reports.  I have the header working, but I am wondering how to convert an internal table to html and display in the header.  This is mostly for formatting purposes.
I have included the code i use currently below... i am open to any suggestion.. thanks.
  DATA:        V_EVENT_RECEIVER      TYPE REF TO V_LCL_EVENT_RECEIVER.
  DATA: V_SPLIT            TYPE REF TO CL_GUI_EASY_SPLITTER_CONTAINER,
        O_DOCKINGCONTAINER TYPE REF TO CL_GUI_DOCKING_CONTAINER,
        V_CONTNR_TOP       TYPE REF TO CL_GUI_CONTAINER,
        V_CONTNR_BOT       TYPE REF TO CL_GUI_CONTAINER,
        V_GRID_02          TYPE REF TO CL_GUI_ALV_GRID,
        V_HTML             TYPE REF TO CL_DD_DOCUMENT,
        V_HTML_VIEW        TYPE REF TO CL_GUI_HTML_VIEWER,
        V_TEXT20(255)      TYPE C,
        V_TEXT16(255)      TYPE C.
  IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
*Create a container
    CREATE OBJECT O_DOCKINGCONTAINER
      EXPORTING
        RATIO                       = '95'
      EXCEPTIONS
        CNTL_ERROR                  = 1
        CNTL_SYSTEM_ERROR           = 2
        CREATE_ERROR                = 3
        LIFETIME_ERROR              = 4
        LIFETIME_DYNPRO_DYNPRO_LINK = 5
        OTHERS                      = 6.
*    IF sy-subrc NE 0.
*      MESSAGE i000 WITH text-e01."Error in creating Docking container
*      LEAVE LIST-PROCESSING.
*    ENDIF.
  ENDIF.
  CREATE OBJECT V_SPLIT
       EXPORTING
         PARENT            = O_DOCKINGCONTAINER
          ORIENTATION       = 0
         SASH_POSITION     = 25
         WITH_BORDER       = 1
       EXCEPTIONS
         CNTL_ERROR        = 1
         CNTL_SYSTEM_ERROR = 2
         OTHERS            = 3.
  IF SY-SUBRC NE 0.
*      MESSAGE i000 WITH text-e01."Error in creating Docking container
    LEAVE LIST-PROCESSING.
  ENDIF.
*   Get the containers of the splitter control
  V_CONTNR_TOP = V_SPLIT->TOP_LEFT_CONTAINER.
  V_CONTNR_BOT = V_SPLIT->BOTTOM_RIGHT_CONTAINER.
*   CREATE OBJECT o_alvgrid
  CREATE OBJECT CUSTOM_ALVGRID_1
  EXPORTING
    I_PARENT = O_DOCKINGCONTAINER.
*   Create an instance of alv control
  CREATE OBJECT CUSTOM_ALVGRID_1
  EXPORTING I_PARENT = V_CONTNR_BOT.
*  CREATE OBJECT V_HTML_VIEW
*    EXPORTING
*      PARENT = V_CONTNR_TOP.
*   Object for display of selection parameters in HTML top container
  CREATE OBJECT V_HTML
       EXPORTING
         STYLE = 'ALV_GRID'
         BACKGROUND_COLOR = cl_dd_document=>COL_TEXTAREA.
*   Must be after the SET HANDLER for TOP_OF_PAGE and foreground only
  CALL METHOD CUSTOM_ALVGRID_1->LIST_PROCESSING_EVENTS
    EXPORTING
      I_EVENT_NAME = 'TOP_OF_PAGE'
      I_DYNDOC_ID  = V_HTML.
  CALL METHOD V_HTML->ADD_GAP
    EXPORTING
      WIDTH = 25.
  CALL METHOD V_HTML->ADD_PICTURE
    EXPORTING
      PICTURE_ID       = 'BD_LOGO_TEST'
      WIDTH            = '800'
*        ALTERNATIVE_TEXT =
*        TABINDEX         =
*CALL METHOD V_HTML_VIEW->LOAD_DATA
**  EXPORTING
**    URL                  =
**    TYPE                 = 'text'
**    SUBTYPE              = 'html'
**    SIZE                 = 0
**    ENCODING             =
**    CHARSET              =
**    LANGUAGE             =
**  IMPORTING
**    ASSIGNED_URL         =
*  CHANGING
*    DATA_TABLE           = <ITAB>
*  EXCEPTIONS
*    DP_INVALID_PARAMETER = 1
*    DP_ERROR_GENERAL     = 2
*    CNTL_ERROR           = 3
*    others               = 4
*IF SY-SUBRC <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
**            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
  CALL METHOD V_HTML->NEW_LINE.
** Display Text-016
*    CALL METHOD v_html->add_gap
*                EXPORTING
*                  width         = 10.
  DATA:
    REPID    LIKE V_TEXT16,
    UNAME    LIKE V_TEXT16,
    SYSINFO  LIKE V_TEXT16,
    TITLE    LIKE V_TEXT16,
    MONTH    LIKE V_TEXT16,
    DAY      LIKE V_TEXT16,
    YEAR     LIKE V_TEXT16,
    DATUM    LIKE V_TEXT16,
    UZEIT    LIKE V_TEXT16.
  REPID = SY-REPID.
  TITLE = SY-TITLE.
  YEAR  = SY-DATUM(4).
  MONTH = SY-DATUM+4(2).
  DAY   = SY-DATUM+6(2).
  DATUM = SY-DATUM.
  uname = sy-uname.
  uzeit = sy-uzeit.
  CONCATENATE MONTH DAY YEAR INTO DATUM SEPARATED BY SLASH.
  CONCATENATE '  Run Date:   ' ' ' datum into datum.
  Concatenate '  Run Time:   ' uzeit(2) ':' uzeit+2(2) into uzeit.
  CALL METHOD V_HTML->ADD_GAP EXPORTING WIDTH = 10.
  CALL METHOD V_HTML->ADD_TEXT
    EXPORTING
      TEXT = 'Report Title:'.
  CALL METHOD V_HTML->NEW_LINE.
  CALL METHOD V_HTML->ADD_GAP EXPORTING WIDTH = 10.
  CALL METHOD V_HTML->ADD_TEXT
    EXPORTING
      TEXT = REPID.
  CALL METHOD V_HTML->NEW_LINE.
  CALL METHOD V_HTML->ADD_GAP EXPORTING WIDTH = 10.
  CALL METHOD V_HTML->ADD_TEXT
    EXPORTING
      TEXT = uname.
  CALL METHOD V_HTML->NEW_LINE.
  CALL METHOD V_HTML->ADD_GAP EXPORTING WIDTH = 10.
  CALL METHOD V_HTML->ADD_TEXT
    EXPORTING
      TEXT = uzeit.
  CALL METHOD V_HTML->NEW_LINE.
  CALL METHOD V_HTML->ADD_GAP EXPORTING WIDTH = 10.
  CALL METHOD V_HTML->ADD_TEXT
    EXPORTING
      TEXT = DATUM.
  CALL METHOD V_HTML->NEW_LINE.
*  CALL METHOD V_HTML->ADD_LINK
*    EXPORTING
*     NAME                   = 'TEST'
*       URL                    =
*'http://adweek.blogs.com/photos/uncategorized/bk_birds.jpg'
**      TOOLTIP                =
*      TEXT                   = 'Test'
**      DESTINATION_IN_DOC_SET =
**      DESTINATION_IN_DOC_POS =
**      TABINDEX               =
**      HOTKEY                 =
**   IMPORTING
**      LINK                   =
  call method v_html->SET_DOCUMENT_BACKGROUND
    EXPORTING
      PICTURE_ID = space.
* Display the data
  CALL METHOD V_HTML->DISPLAY_DOCUMENT
    EXPORTING
      PARENT = V_CONTNR_TOP
*data visible(1) type c.
*visible = v_html_view->visible_true.
*  CALL METHOD V_HTML_VIEW->SET_VISIBLE
*    EXPORTING
*      VISIBLE = 'Y'.
*   Handle the event
  CALL METHOD CUSTOM_ALVGRID_1->LIST_PROCESSING_EVENTS
    EXPORTING
      I_EVENT_NAME = 'PRINT_TOP_OF_PAGE'.
  CALL METHOD CUSTOM_ALVGRID_1->SET_TABLE_FOR_FIRST_DISPLAY
*    IMPORTING
*       is_variant                    = w_variant
*       i_save                        = c_a
*       is_layout                     = w_layout
    CHANGING
       IT_OUTTAB                     = <ITAB>
       IT_FIELDCATALOG               = GT_FIELDCAT_LVC[]
    EXCEPTIONS
       INVALID_PARAMETER_COMBINATION = 1
       PROGRAM_ERROR                 = 2
       TOO_MANY_LINES                = 3
       OTHERS                        = 4.
  IF SY-SUBRC <> 0.
*    MESSAGE i000 WITH text-e06."Error in ALV report display
    LEAVE LIST-PROCESSING.
  ENDIF.
* Create object
  IF V_EVENT_RECEIVER IS INITIAL.
    CREATE OBJECT V_EVENT_RECEIVER.
  ENDIF.
  SET HANDLER V_EVENT_RECEIVER->HANDLE_PRINT_TOP_OF_PAGE FOR
      CUSTOM_ALVGRID_1.
  SET HANDLER V_EVENT_RECEIVER->HANDLE_TOP_OF_PAGE FOR
      CUSTOM_ALVGRID_1.

Hi
An internal table can be converted into an HTML Template using the function Module WWW_HTML_FROM_LISTOBJECT. This will create an HTML template which will be stored in SMW0->(Zero)
Now you can call this template in your header.
Regards,
Vara

Similar Messages

  • Refresh ALV HTML header

    Is it possible to refresh the ALV HTML header?
    ex: When I click in a button of the ALV Toolbar, I want the html header to refresh...
    Thanks.
    Alexandre

    Hi
    An internal table can be converted into an HTML Template using the function Module WWW_HTML_FROM_LISTOBJECT. This will create an HTML template which will be stored in SMW0->(Zero)
    Now you can call this template in your header.
    Regards,
    Vara

  • Where Should the JavaScript Go if I'm Calling from the Page HTML Header?

    In the Application Express User's Guide under "Calling the JavaScript File from the HTML Header Attribute" point 4 says:In HTML Header, call the JavaScript file using the following syntax:
    <script src="/my_images/custom.js" type="text/javascript"></script>However, it doesn't say where my_images is located.
    Where should the .js file be stored?
    Thanks,
    Gregory

    naviagte to shared component in the application edit screen and upload your .js file to static files.
    now you can ref. this file as
    In HTML Header, call the JavaScript file using the following syntax:
    <script src="#WORKSPACE_IMAGES#custom.js" type="text/javascript"></script>
    {?code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Customizing Cp HTML output

    I'm looking for a little assistance regarding the best way to insert an HTML + Flash wrapper around the wrapper that is automatically generated by Cp4 in its HTML output. I'm a FL newbie/intermediate DW user, and I don't want to screw up the existing scripting in the HTML template files.
    So I guess my question really surrounds best practice for adding a header/footer/maybe rt-or-left nav frame around the content that CP produces. Would anyone who has done this be willing to share some code (stripped of your content, if you prefer) that might help me achieve this?
    Or, if I'm thinking about this in entirely the wrong way, can someone point me in the right direction? I feel like I'm being particularly dense about this!
    Thanks in advance!!
    A. Stringer

    Hello Brian and Marcel:
    I have the same question as you did. Did you get any further
    information about this? I am dying for a solution. If anybody
    has a solution, please share with us. Thanks.
    Brian Lin (guest) wrote:
    : Hi all,
    : Marcel, I got the same questions (problems) with you did. I
    have
    : been searching this topic for long time, still I can not have
    : right materials. Recently AMAZON (www.amazon.com) will have
    : Oracle JDeveloper 2.0 (ISBN: 0072120983) on the market, but
    I'm
    : not sure what's the contents inside talking about DBServlet.
    : Good luck!
    : Brian Lin
    : Marcel Sansaricq (guest) wrote:
    : : Hi everyone,
    : : I am a new user of JDeveloper 2.0. I have been trying to
    : : understand how JDeveloper's Wizard generated Database
    Servlets
    : : generate standard HTML pages for Querying, Updating,
    inserting
    : : database records. The InitializeDBServlet method that is
    : : generated by the DBServlet Wizard provides very little
    insight
    : : into the HTML generation engine.
    : : The JDeveloper documentation gives some hints on customizing
    : : Servlet HTML output in section "Creating a Custom HTML
    form".
    : : Basically, it recommends to use
    : : methods provided in oracle.jdeveloper.servlet.DBServlet,
    : : oracle.jdeveloper.servlet.UserSession,
    : : oracle.jbo.rt.cs.RowIterator and oracle.jbo.rt.cs.Row
    : interfaces
    : : to implement custom HTML forms that servlets can generate.
    : : The documentation files for oracle.jbo.rt.cs.* interfaces
    are
    : : missing within the JDeveloper help menu and coverage on
    : : oracle.jdeveloper.servlet.DBServlet,
    : : oracle.jdeveloper.servlet.UserSession is very basic.
    : : Can anyone point me in the right direction to get thorough
    : : documentation, containing examples if possible, on the
    : mentionned
    : : interfaces.
    : : Thanks in advance,
    : : Marcel Sansaricq
    null

  • Page 0 : HTML Header : Javascript

    Hello,
    I've written a little bit of Javascript that pops up a custom window.
    Now, I can put this in the html header of an individual page and it works.
    However, I thought that I could put this in the html header of page 0 and it would then be inherited by every other page in the application.
    This would then mean if I needed to change it, I could change one reference, as opposed to one reference per page.
    It would also mean I could keep all my javascript in one place.
    This doesn't work for me, does this mean that only page items are inherited onto every page?
    Thanks.

    Hello,
    Page 0 will not replicate JavaScript code in the HTML header page or the On Load section. It will replicate JavaScript code within a region's HTML header or footer.
    However, I don't think using page 0 to make JavaScript code available to all pages is the right way to go. The "best practice" is to maintain an external JavaScript code file, and load it on every page using the page template. This is the technique the APEX builder using to load its built-in JavaScript functions. In the Header section of your relevant page template, just add something similar to the following:
    <script src="/i/javascript/MyScripts.js" type="text/javascript"></script>This will give you all the benefits you mentioned in your post.
    Regards,
    Arie.

  • HTML DB  Select Statement in HTML HEADER

    Can I put a select statement that return a value in the HTML HEADER?
    If I can How? Would point the way.
    Second Question
    Can I call store function from HTML HEADER? Help!

    I have a report screen that has Delete button. Each record on the screen has a checkbox
    What I would like to do is:
    when the user puts a check in the checkbox and click the Delete button. a message will pop up and ask "Are you usre?" If the user click Yes then the system will check for child record. If there no No child record go head delete the record. If there is a child record then another message pop up and ask "This Schedule is currently active. Do you really want to delete this." If the user answers Yes then it will delete both parent and child records. If the user answer no then no record will be deleted.
    I have been struggle with this in HTML DB for a bit, but I did not find the solution yet. Please Help!!!!

  • I built a website for a customer using HTML only, so it would work on everything, but some of the text numbers are not clear on the ipad. It works perfectly on all the other browsers.

    I built a website for a customer using HTML only, so it would work on any browser, and it works perfectly on everything except ipad safari. I'm loosing information with most of my text numbers - instead of being black they are displaying a 'ghost' image (white) of the numbers.
    Is this a memory issue, or cache issue, or something else?  I've downloaded iCab and the site works perfectly with it.
    Also wondering if I can manually reload/refresh web pages in iPad Safari.
    Since most people with iPads will use Safari rather than iCab, I have to tweak this site to work in Safari.

    Detecting phone numbers and making them clickable is a feature of the browser, and rebuilding your web-site links will not make any difference. Its done when the page is shown in the browser, not when the page is created.
    According to the Safari iOS developers guide, you can turn these data detectors off using this code:
    <meta name = "format-detection" content = "telephone=no">
    http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Referen ce/Articles/PhoneLinks.html

  • Traffic lights in ALV list header

    how do i display traffic lights as icons in ALV list header. for example, in the code below, i want to display a green icon at the end of closed items and a red icon at the end of the open items:
                closed : 4 [green-icon]
                open   : 2  [red-icon]
    CLEAR header_alv_wa-info.
      header_alv_wa-key  = 'closed:'.
      header_alv_wa-info = gv_closed.
      header_alv_wa-typ  = 'S'.
      APPEND header_alv_wa TO headeralv.
      CLEAR header_alv_wa-info.
      header_alv_wa-typ  = 'S'.
      header_alv_wa-key  = 'open:'.
      header_alv_wa-info = gv_open.
      APPEND header_alv_wa TO headeralv.

    Hi,
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    the above links will give u the code for the same..
    Regards,
    Aparna

  • Pass a value from a PL/SQL function to a javascript (html header) ? ?

    Hey Guys,
    Have a question regarding how to pass a value from a PL/SQL function to a javascript in the HTML Header.
    I have created a PL/SQL function in my database, which does looping.
    The reason for this is:  On my apex page when the user selects a code, it should display(or highlight buttons) the different project id's present for that particular code.
    example= code 1
    has project id's = 5, 6, 7
    code 2
    has project id's = 7,8
    Thank you for your Help or Suggestions
    Jesh
    The PL/SQL function :
    CREATE OR REPLACE FUNCTION contact_details(ACT_CODE1 IN NUMBER) RETURN VARCHAR2 IS
    Project_codes varchar2(10);
    CURSOR contact_cur IS
    SELECT ACT_CODE,PROJECT_ID
    FROM ACTASQ.ASQ_CONTACT where ACT_CODE = ACT_CODE1;
    currec contact_cur%rowtype;
    NAME: contact_details
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 6/25/2009 1. Created this function.
    BEGIN
    FOR currec in contact_cur LOOP
         dbms_output.put_line(currec.PROJECT_ID || '|');
         Project_codes := currec.PROJECT_ID|| '|' ||Project_codes;
    END LOOP;
    RETURN Project_codes;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END contact_details;
    /

    Jesh:
    I have made the following modifications to your app to get it to work as I thing you need it to.
    1) Changed the source for the HTML Buttons Region(note use of id vs name for the Buttons)
    <script>
    function hilitebtn(val) {
    //gray buttons
    $x('graduate').style.backgroundColor='gray'
    $x('distance').style.backgroundColor='gray'
    $x('career').style.backgroundColor='gray'
    $x('photo').style.backgroundColor='gray'
    //AJAX call to get project-ids
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=GETPROJECTS',0);
    get.addParam('x01',val)
    gReturn = get.get();
    var arr=gReturn.split(':');  //dump into array
    get = null;
    for (i=0;i<arr.length;i++) {
    // alert('val=' + arr);
    if ( arr[i]==5)
    $x('graduate').style.backgroundColor='red';
    if ( arr[i]==6)
    $x('distance').style.backgroundColor='red';
    if ( arr[i]==7)
    $x('career').style.backgroundColor='red';
    if ( arr[i]==8)
    $x('photo').style.backgroundColor='red';
    </script>
    <table cellpadding='0' cellspacing='0' border='0'>
    <tr><td>
    <input type='button' id='graduate' value='Graduate'>
    </td>
    <td>
    <input type='button' id='distance' value='Distance'>
    </td>
    <td>
    <input type='button' id='career' value='Career/Tech'>
    </td>
    <td>
    <input type='button' id='photo' value='Photos'>
    </td>
    </tr></table>
    2) Defined the application process  GETPROJECTS as DECLARE
    IDS varchar2(1000);
    l_act_code varchar2(100) :=4;
    begin
    IDS:='';
    l_act_code := wwv_flow.g_x01;
    for x in(
    SELECT ACT_CODE,PROJECT_ID
    FROM ASQ_CONTACT
    where ACT_CODE = l_act_code)
    LOOP
    IDS := IDS || X.PROJECT_ID|| ':' ;
    END LOOP;
    HTP.PRN(IDS);
    END;
    3) Changed the 'onchange' event-handler on p1_act_code to be 'onchange=hilitebtn(this.value)'
    4) Added the JS to the HTML Page Footer <script>
    hilitebtn($v('P1_ACT_CODE'));
    </SCRIPT>

  • Page failure when attempting to save java script in html header

    Currently there is java script code for a function that is seeded in the html header of a forms page by apex when the form is generated. This code is for the chicken test for the DELETE button.
    The function works as designed, but if I try to "APPLY CHANGES" to the the page definition I get the The page cannot be displayed "Cannot find server or DNS Error". "the url is http://nldg-3.appl.devjones.com:7777/pls/apex/wwv_flow.accept" If I remove the script coding from the HTML header the page will save just fine, but of course no more java script.
    I need to add a java script function to the page and I am unable to do so at this time because of this issue. I can reproduce this error on any of the sample apps that I have loaded into apex.
    the Apache error log contains:
    [Fri Feb 13 06:11:06 2009] [error] [client 172.16.85.122] [ecid: 1234527066:192.168.211.127:31922:0:17188,0] mod_plsql: /pls/apex/wwv_flow.accept HTTP-500 Error Reading Data from Client!!
    The Apache access gets:
    172.16.85.122 - APEX_PUBLIC_USER [13/Feb/2009:06:23:47 -0600] "POST /pls/apex/wwv_flow.accept HTTP/1.1" 500 653
    Apex is version 3.1.2.00.02 and uses on iAS on a Linux server. The Database is 10g. The browser is IE 6.0.2900.2180.
    I have been developing for about 3 months in Apex and this is the first issue of this kind that I have run into. Any help will be greatly appreciated as I have no clue at this time.

    Luis,
    All the forms are created by Apex with a default function in the html header for a delete chicken test as follows:
    <scrpt language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    //-->
    Even though the function is already a part of the page, if I try to save it, it will fail. I will look into the "black list" a little deeper. I have asked around abit as I also had suspected that, but so far all the answers were that it should not be a problem. If I take out the "SCRIPT" word I can get the page to save, but of course the code is worthless at that point.
    Keith

  • Add custom fields in header of FI documents using FI_HEADER_SUB_1300IM

    Hi
    We are trying to add a couple of custom fields in header area of FB01 by making a copy of badi FI_HEADER_SUB_1300IM. With this method we are facing a couple of problems
    - The custom fields added in bkpf structure,  only appears in FB01 just in the case we have go before to FB03 or FB02.
    - We don´t reach to save data of these fields in table BKPF.
    can anybody help us with these problems?
    thanks in advance for your help
    I leave here the code we have used in the copy of badi FI_HEADER_SUB_1300IM
    MODULE d1300_pbo OUTPUT.
      IF exit IS INITIAL.
        CALL METHOD cl_exithandler=>get_instance_for_subscreens
          CHANGING
            instance                      = exit
           EXCEPTIONS
    *      NO_REFERENCE                  = 1
    *      NO_INTERFACE_REFERENCE        = 2
    *      NO_EXIT_INTERFACE             = 3
    *      DATA_INCONS_IN_EXIT_MANAGEM   = 4
    *      CLASS_NOT_IMPLEMENT_INTERFACE = 5
             OTHERS                        = 6.
        IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      CALL METHOD exit->get_data_from_screen_pbo
        EXPORTING
          FLT_VAL       = 'ES'
        IMPORTING
          ex_bkpf       = g_bkpf
          ex_x_no_input = g_no_input.
      loop at screen.
       if g_no_input = 'X'.
         screen-input = 0.
         modify screen.
       endif.
      endloop.
    ENDMODULE.   
    **************************+
    FORM put_value .
    * import header data from main screen
      call method exit->get_data_from_screen_pai
        EXPORTING
          FLT_VAL  = 'ES'
        importing
          ex_bkpf  = g_bkpf.
    * set reference fields
    g_bkpf-ZZDPTOAPROBADOR = bkpf-ZZDPTOAPROBADOR.
    g_bkpf-ZZDELAPROBADOR = bkpf-ZZDELAPROBADOR.
    * put data to main screen
      call method exit->put_data_to_screen_pai
        exporting
          im_bkpf  = g_bkpf
          flt_val  = 'ES'.
    ENDFORM.
    Added code tags
    Edited by: Rob Burbank on May 10, 2011 12:17 PM

    SriVarma,
    Cool! I didn't know this BADI!
    Playing around with existing implementations I can see that, BADI_SD_TAB_CUST_H, can definitely enhance the Sales order header with additional tab strip screens. Similarly BADI_SD_TAB_CUST_I can be used to enhance Sales order item screens.
    Here is what I understand from the coding of an existing implementation
    ACTIVATE_TAB_PAGE - takes a module pool program name and a subscreen that you created and adds it as a additional tab page to sales order header screen. You need to pass back f_program and f_dynpro with your program and screen number that you painted
    TRANSFER_DATA_TO_SUBSCREEN - can be used to read and pass data to the fields on the subscreen you created
    TRANSFER_DATA_FROM_SUBSCREEN - can be used to pass back whatever changes done by user to the respective Z variables in VBAK
    PASS_FCODE_TO_SUBSCREEN - Pass the fcode the user selected to your subscreen.
    I would suggest that you create a function group and create screens, functions etc within that and use those in these methods. Refer existing implementations. The global data of the function group can then be used to communicate between all the above methods

  • Custom field at Header level in Additional Data B tab of VA01/VA02

    Kindly help me out , I have a requirement to add a custom field at Header level in Additional Data B tab of VA01/VA02.
    Program: SAPMV45A
    screen 8459
    This can be done only through access key or not. Can any body tell me procedure to do that.
    Appreciate your response.Thanks in advance

    Please help me out this

  • Writing selections in  alv list header

    Hi,
    in alv list header i have to show the values entered in selection screen.
    ex.
    Current year    : 2008
    current period  : 03
    report ID          : R_123
    company code : I BT  AA to BB
                            I BT  CC to DD
                            I EQ  FF
    in the above example first three are parameters and  company code is select-option, for parameters i can display what i want, but for company code( which is select option) it is showing only first line and not showing other lines.
    at the time of filling list header table for select-option, i am looping the select-option, first i am filling with  typ, key and info and for other i am filling only info, if i fill typ, key also for other recoreds also it is showing the  company code in all lines  as below ....
    company code  : I BT  AA to BB
    company code : I BT  CC to DD
    company code : I EQ  FF
    can any one suggest to get the list header as shown at the begining....
    thanks,
    bhushan

    Hi,
    Check this sample code. Here plant and date are selection screen paramters.
    Plant
      lwa_header-typ  = 'S'.
      lwa_header-key  = text-t47.
    If the select option for plant is 'EQ'
      LOOP AT s_werks.                                       "#EC *
        IF s_werks-option = 'EQ'.
          lwa_plant-werks = s_werks-low.
          APPEND lwa_plant TO lt_plant.
          CLEAR lwa_plant.
    If the select option for plant is 'BT'
        ELSEIF s_werks-option = 'BT'.
          CONCATENATE s_werks-low
                      text-t50
                      s_werks-high
            INTO lf_plant.
          lwa_header-info = lf_plant.
          APPEND lwa_header TO gt_header.
          CLEAR lwa_header.
        ENDIF.
      ENDLOOP.
      IF s_werks-option = 'EQ'.
        READ TABLE lt_plant INTO lwa_plant INDEX 1.
        lwa_header-info = lwa_plant-werks.
        APPEND lwa_header TO gt_header.
        CLEAR lwa_header.
        LOOP AT lt_plant INTO lwa_plant FROM 2.
          lwa_header-typ   = 'S'.
          lwa_header-key   = ''.
          lwa_header-info  =  lwa_plant-werks.
          APPEND lwa_header TO gt_header.
          CLEAR: lwa_header.
        ENDLOOP.
      ENDIF.
    Post date Range
      lwa_header-typ   = 'S'.
      lwa_header-key   = text-t33.
    If the select option for post date is 'EQ'
      LOOP AT s_budat.                                      "#EC *
        IF s_budat-option = 'EQ'.
          CONCATENATE s_budat-low+6(2) '.'
                      s_budat-low+4(2) '.'
                      s_budat-low(4) INTO lf_range.
        For multiple values
          IF lf_date_tmp IS INITIAL.
            lwa_date-date = lf_range.
            APPEND lwa_date TO lt_date.
          ELSE.
            lwa_date-date = lf_range.
            APPEND lwa_date TO lt_date.
          ENDIF.
      If the select option for post date is 'BT'
        ELSEIF s_budat-option = 'BT'.
          CONCATENATE s_budat-low+6(2) '.'
                      s_budat-low+4(2) '.'
                      s_budat-low(4) text-t49
                      s_budat-high+6(2) '.'
                      s_budat-high+4(2) '.'
                      s_budat-high(4) INTO lf_range .
          lwa_header-info  =  lf_range.
          CLEAR lf_range.
        ENDIF.
      ENDLOOP.
      IF s_budat-option = 'EQ'.
        READ TABLE lt_date INTO lwa_date INDEX 1.
        lwa_header-info  =  lwa_date-date.
        APPEND lwa_header TO gt_header.
        CLEAR: lwa_header.
        LOOP AT lt_date INTO lwa_date FROM 2.
          lwa_header-typ   = 'S'.
          lwa_header-key   = ''.
          lwa_header-info  =  lwa_date-date.
          APPEND lwa_header TO gt_header.
          CLEAR: lwa_header.
        ENDLOOP.
      ENDIF.
    Appending work area to the header table
      APPEND lwa_header TO gt_header.
      CLEAR lwa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_header.
    <REMOVED BY MODERATOR>
    Regards,
    Ramya
    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 4:30 PM

  • Alv list header problem

    Hai Friends,
    In my ALV List header..i am writing date , time and my program name.
    but all are coming on left side.
    can i get date on left side, program name on centered and time on write side.
    my code is like this.
    FORM list_headers.
          lists-typ = 'H'.
          lists-info = text-010.
          APPEND lists.
          CLEAR lists.
          lists-typ = 'S'.
          lists-key = text-011.
          CONCATENATE sy-datum+6(2) '/'
                      sy-datum+4(2) '/'
                      sy-datum+0(4) INTO lists-info.
          APPEND lists.
          CLEAR lists.
          lists-typ = 'S'.
          lists-key = text-012.
          CONCATENATE sy-uzeit+0(2) ':'
                      sy-uzeit+2(2) ':'
                      sy-uzeit+4(2) INTO lists-info.
          APPEND lists.
          CLEAR lists.
    ENDFORM.

    Hi again,
    1. first of all how are u writing / displaying
       the alv header ?
    2. using documentary write ?
       then also, u can use one variable of
      length 100 and use this concept.
    3. If u are using top_of_page
      event,
      in this event, WE CAN use WRITE.
      (i have used it, and it
      works fantastic)
                  (not in case of alv grid)
    4. My point is, what ever u are using,
       use on variable of length 100.
      WRITE value INTO variable.
      using offset
      and then proceed further.
    regards,
    amit m.

  • Is there a limit to amount of code that can be added to the HTML Header?

    I've got several javascript functions in the HTML Header section of the page attributes. I recently added another function and now receive an HTTP 404 Not Found error at runtime when navigating to the page. When I remove the function the error is gone. I don't think there is anything wrong with the function because even when I copy and rename an existing working function, this error occurs...as if I've exceeded some size limit. Any ideas?

    I now have a better understanding after reading this thread: Javascript as static file or on filesystem?
    As the post indicates, there are essentially two ways of including a .js file:
    1) upload as static file to the workspace or application and refer to it using the #APP_IMAGES# or #WORKSPACE_IMAGES# tag.
    2) put it on the webserver as a file on the filesystem under the images directory and refer to it using the #IMAGE_PREFIX# tag.
    For now (since I don't have permissions to the file server directory) I have created a .js file and uploaded it as a static file in Shared Components. I referenced the file as below, but when I go the page at runtime, none of my functions are being utilized. Is it because the web server is not using this static file yet because of caching? Does it need to be restarted in order to start using the uploaded js file?
    <script type="text/javascript" src="#WORKSPACE_IMAGES#apex_selection_criteria_page.js">
    </script>

Maybe you are looking for

  • 16:9 on Final Cut Express HD 3.0

    Major information: I am using Final Cut Express HD 3.0. i have a Canon HG 21 camcorder, that shoots in HD. The cam corder uses a .MTS format for it's video. I use Clipwrap to convert the .MTS files to .MOV files. Then I use After Effects to Convert t

  • Blog comments gone...

    I suppose I know the answer to this, but after several problems publishing, I "published all to mobileme" and all of the comments disappeared from my blogs. Unfortunately, this is a business for us, and we had multiple blogs with hundreds of comments

  • Discusssion Subscriptions

    Hi it's great to get a email from these forums and when i have ask a question i use to get an email drop in to tale me that some has answered . Thats great but the other week i am getting all the action sent to me. How can i stop this, it's happen on

  • HT1430 new cord for ipad not recognized by computer

    My daughter just got and refurbed  ipad 3, she plugged it in to sync with itunes account to transfer apps, says cord not recognized.  Obviously it was recognized for a bit because she went on itunes and accidently jit restore.  NOw ipad will not even

  • Control Approval mails for every user

    Hi everyone, I have following question: We have implemented an approval workflow to publish documents in our CM. If a user submits a document to approval, an email will be sent to the person who has to approve the document and a workitem is sent to t