How to use the after_line_output event in ALV

Hi experts,
My requirement is to show the purchase order details including taxes amount. But my user ask me to highlight the tax details and it should be under the purchase order item details. I am having separate internal table for tax amount for every PO. I dono how to append the tax amount under the net price of PO then only we can get the total amount of PO. Please guide me how can i solve this issue.

Hello,
Please, did you solved your problem?
Thanks!
Kleber

Similar Messages

  • How to use the PROGRESS Event?

    Can someone explain to me how to use the PROGRESS event, i looked at the docs but it never helped me?
    I want to use it to display the prgress of downloading data from a API, its a URL event. But i was told i can do this via a PROGREE Event

    copy and paste the trace output from:
    import flash.events.ProgressEvent;
    //var facebookAPI:String = "https://graph.facebook.com/ginorea1/feed?access_token=277830088900615|2.AQDUBMBocIw_QcqE.3600.1313856000.0-100001000396080|5bXT8Cj0OUxNpr7y NeqTsJfwADg";//
    var facebookAPI:String = "https://graph.facebook.com/100001000396080/statuses?access_token=14563 4995501895|2.AQAKdU4pcsdMmmBO.3600.1313859600.0-100001000396080|7uzAMoRdsg5kXLjc exS5bVaPhag";
    var loader:URLLoader = new URLLoader(new URLRequest(facebookAPI));
    loader.addEventListener(Event.COMPLETE, loadComplete);
    loader.addEventListener(ProgresEvent.PROGRESS,loadProgress);
    function loadProgress(e:ProgressEvent):void
    trace(e.bytesLoaded,e.bytesTotal);
    progress_txt.text = String(Math.floor((e.bytesLoaded/e.bytesTotal)*100));
    function loadComplete(e:Event):void{
    processData(e.target.data);
    function processData(data:String):void
    var facebookFeed:Array = JSON.decode(data).data as Array;
    for (var i:uint, feedCount:uint = 10; i < feedCount; i++)
    var tf2:TextField=new TextField();
    feed1.text = facebookFeed[i].message;
    feed2.text = facebookFeed[2].message;
    feed3.text = facebookFeed[3].message;
    feed4.text = facebookFeed[4].message;
    feed5.text = facebookFeed[5].message;
    feed6.text = facebookFeed[6].message;
    feed7.text = facebookFeed[7].message;
    feed8.text = facebookFeed[8].message;
    feed9.text = facebookFeed[9].message;
    feed10.text = facebookFeed[10].message;
    stop();

  • How could control the scroll events in ALV OO?

    Hello experts!
    I'm programing a report, inside there is a field that need time of processing. I'm using ALV OO.
    I have thought that it could only calculate the field for the lines that visualize.
    How could control the scroll events to calculate the field of the visualized lines?
    I'm using CL_SALV_TABLE class and cl_salv_events_table to control the events, but there aren't any event to control the scroll.
    best regards!

    Hi Sriram,
    I did view the information that you was attaching, but this don't resolve my problem. With methods get_scroll_info_via_id and set_scroll_info_via_id, we can get and put information of selection and view rows in the screen but we don't control when the user click in the scroll for advance or to back down a page.
    I would like to refresh the data in ALV when the user view news rows.
    I want your genial ideas.
    Best regards!

  • How to use the ONF4 event in REUSE_ALV_GRID_DISPLAY?

    I am able to use the methods for BUTTON_CLICK and HOTSPOT_CLICK for a report that outputs ALV Grid using REUSE_ALV_GRID_DISPLAY.
    But I am not able to trigger the ONF4 event.
    How to enable this?
    Thanks,

    hi look at the code ...may be helpful for u..
    TYPE-POOLS SLIS.
    DATA: BEGIN OF T_OUT_FOR_F4 OCCURS 0,
            BUKRS LIKE T001-BUKRS,
            BUTXT LIKE T001-BUTXT,
          END   OF T_OUT_FOR_F4.
    PARAMETERS: P_BUKRS TYPE BUKRS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BUKRS.
      PERFORM F4_FOR_BUKRS.
    *&      Form  F4_FOR_BUKRS
          text
    -->  p1        text
    <--  p2        text
    FORM F4_FOR_BUKRS.
      DATA: IT_FIELDCAT TYPE  SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
            IT_REPORT   TYPE  SY-REPID,
            ES_SELFIELD TYPE  SLIS_SELFIELD.
    Get data
      SELECT BUKRS BUTXT FROM T001 INTO TABLE T_OUT_FOR_F4
      WHERE BUKRS = '0001' OR BUKRS = 'US01'.
    Get field
      IT_REPORT = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME     = IT_REPORT
                I_INTERNAL_TABNAME = 'T_OUT_FOR_F4'
                I_INCLNAME         = IT_REPORT
           CHANGING
                CT_FIELDCAT        = IT_FIELDCAT[].
      LOOP AT IT_FIELDCAT.
        IT_FIELDCAT-KEY = SPACE.
        IF IT_FIELDCAT-FIELDNAME = 'BUTXT'.
          IT_FIELDCAT-KEY = 'X'.
        ENDIF.
        MODIFY IT_FIELDCAT.
      ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
        I_TITLE                       =
        I_SELECTION                   = 'X'
        I_ZEBRA                       = ' '
        I_SCREEN_START_COLUMN         = 0
        I_SCREEN_START_LINE           = 0
        I_SCREEN_END_COLUMN           = 0
        I_SCREEN_END_LINE             = 0
        I_CHECKBOX_FIELDNAME          =
        I_LINEMARK_FIELDNAME          =
        I_SCROLL_TO_SEL_LINE          = 'X'
          I_TABNAME                     = 'T_OUT_FOR_F4'
        I_STRUCTURE_NAME              =
          IT_FIELDCAT                   = IT_FIELDCAT[]
        IT_EXCLUDING                  =
        I_CALLBACK_PROGRAM            =
        I_CALLBACK_USER_COMMAND       =
        IS_PRIVATE                    =
        IMPORTING
          ES_SELFIELD                   = ES_SELFIELD
        E_EXIT                        =
        TABLES
          T_OUTTAB                      = T_OUT_FOR_F4
       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.
      ELSE.
        READ TABLE T_OUT_FOR_F4 INDEX ES_SELFIELD-TABINDEX.
        P_BUKRS = T_OUT_FOR_F4-BUKRS.
      ENDIF.
    ENDFORM.                    " F4_FOR_BUKRS

  • How to use the drop event of the tree control in LabVIEW 8.20?

    Hi,
                I am using the two tree controls in my application to provide a option for the user to drag and drop item from one tree to the other.  I have to validate the user selection. I tried to capture the user drop event  using the event structure. The problem I am facing is, I am not able to drop the item even though i have wired a constant true to the filter(Accepted?) in the event case. I have enable the property(Allow droping) in the right menu of the tree control also.
              While configuring an event case for (drop, drag entered and some thing like this) only I am getting the problem otherwise it is working fine.  
    What do i need to do to caprture the drop event ?
    Is there any way to avoid the item duplication while droping a new item in the tree control ?
    or how can i do this?
    Thanks,
    Pandiarajan R

    Hi Pandiarajan,
    I hope you are doing well today! There is a lengthy discussion on the Tree Control Drag & Drop feature at this forums post including contributions from the developer of the Drag & Drop feature:
    Tree Control Drag & Drop in LabVIEW 8
    By avoiding item duplication, do you mean that you don't want the same item to be in the old tree control or do you not want more than one item in the new tree control?
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • May I know how to use the user event

    I saw a sample as the attached screen. The user event is used. I am totally new of user event.
    may you give a brief explanation of it and how it used.
    Thanks.
    Attachments:
    Event.JPG ‏195 KB

    Hi turbot,
    attached you will find an example. There is no need to use local variables.
    Mike
    Attachments:
    test41_LV80.vi ‏17 KB

  • How to use the table maintenance events for validating the input entries..?

    Hi,
    I have created a Z table with 6 fields in which all are KEY fields. All are of CHAR type. I have created the Table Maintenance Generator for the same. While maintaining the entries in the table, even though I maintain a blank entry for a field it is saving the entry. But, I don't want that way. All the fields are mandatory in my table. One should enter all the fields. Otherwise it should not allow to save the entry. So, I think it can be done using the Table Maintenance Events. can someone tell me how to use the Table Maintenance Events. and which event to use for my reuqirement and what is the logic to be written.
    Or Is there any other way to solve my problem.
    Please share your inputs. Thanks in advance.
    Best regards,
    paddu.

    In the table maintenance generator, Environment --> Modifications --> Events then a screen will be appear here,we need to create the Events.In the EVENTS screen, press new Entries, there give 01(Before Saving the Data in the Database) and give a name(This will become a PERFORM), then click the Editor pushbutton, this will be there at the right side of the entry, then a popup will be appear, you can create an include program, there inside of the include program write ur code.
    Here is documentation for Event 01(Before Saving the Data in the Database )
    Event 01: Before Saving the Data in the Database
    Use
    This event occurs before new, changed or deleted entries are written to the database. Other activities can be performed, for example:
    hidden entry processing
    fill hidden fields
    flag data to be written to hidden tables after the database change.
    To have the changes saved by the central maintenance dialog routines, SY-SUBRC must be set to 0 at the end of the routine.
    Realization
    This event has no standard routine. The following global data is available for the realization of the user routine:
    internal table TOTAL
    field symbols
    field symbols <ACTION> and <ACTION_TEXT>
    <STATUS>-UPD_FLAG
    If internal table data are to be changed before saving, t he changes should be made in both the internal table TOTAL and in the internal table EXTRACT.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM.
    Regards,
    Joy.

  • How to use the eventing and databag with a WAS 6.20 ?

    How to use the eventing and databag with a WAS 6.20 ?
    Is what there is a good guide for these services?
    Thank's

    In the raise event you can pass the value
    like below.
    <SCRIPT>
    function raiseEvt(value1){
    if(window.document.domain == window.location.hostname){
    if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);
       EPCMPROXY.raiseEvent( "urn:com.sap:BWEvents","BWiViewevent", value1, null );
      // alert('tree domain'+document.domain);
    </SCRIPT>
    and in the
    subscribe event you can get the values like below.
    <script language="javascript">
    if(window.document.domain == window.location.hostname){
    document.domain = document.domain.substring(document.domain.indexOf('.')+1);
        EPCMPROXY.subscribeEvent("urn:com.sap:BWEvents","BWiViewevent", window, "myreceiveEvent");
    function myreceiveEvent( eventObj ) {
          document.forms[0].gp_hidden.value = eventObj.dataObject;
    </script>
    Also look at the following link for a complete documentation.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Enterprise%20Portal%20Client.pdf
    Regards
    Raja

  • Hi gurur's how we  do the interactive report in ALV

    hi gurur's how we  do the interactive report in ALV.
    PLZ HELP ME

    Hi Srivasu,
                    I will send a sample code along with Comments check it once ok.copy the below code and execute it and debug it ok..
    *& Report  YPURCHASEORDER_ALV_LISTDISP                                 *
    *&  DEVELOPER  : KIRAN KUMAR.G                                         *
    &  PURPOSE    : CREATING A PURCHASE ORDER BASED ON PURCHASE DOC NUMBER
    *&  CREATION DT: 22/11/2007                                            *
    *&  REQUEST   : ERPK900035                                             *
    REPORT  YPURCHASEORDER_ALV_LISTDISP.
    Tables
    TABLES : ekko, "Purchasing Document Header
             ekpo. "Purchasing Document Item
    Type pools
    TYPE-POOLS: slis.
    Internal Tables
    DATA: BEGIN OF gt_headerdat OCCURS 0,
           ebeln LIKE ekko-ebeln,        " Purchasing Document Number
           bukrs LIKE ekko-bukrs,        " Company Code
           bstyp LIKE ekko-bstyp,        " Purchasing Document Category
           bsart LIKE ekko-bsart,        " Purchasing Document LIKE
           aedat LIKE ekko-aedat,        " Date on which the recordwascreate
           ernam LIKE ekko-ernam,        " Name of Person who Created Object
           lifnr LIKE ekko-lifnr,        " Vendor's account number
           spras LIKE ekko-spras,        " Language Key
           ekorg LIKE ekko-ekorg,        " Purchasing Organization
           ekgrp LIKE ekko-ekgrp,        " Purchasing group
          END OF gt_headerdat.
    DATA: BEGIN OF gt_item OCCURS 0,
           matnr LIKE ekpo-matnr,        "Material Number
           werks LIKE ekpo-werks,        "Plant
           lgort LIKE ekpo-lgort,        "Storage location
           matkl LIKE ekpo-matkl,        "Material group
           menge LIKE ekpo-menge,        "Purchase order quantity
           meins LIKE ekpo-meins,        "Order unit
           netpr LIKE ekpo-netpr,        "Net price in purchasing document
           kunnr LIKE ekpo-kunnr,        "Customer Number 1
          END OF gt_item.
    Global Structures
    DATA: gt_header    TYPE slis_t_listheader, "For Headings
          wa_header    TYPE slis_listheader,
          gt_fieldcat  TYPE slis_t_fieldcat_alv, "Structure Defintion
          wa_fieldcat  TYPE slis_fieldcat_alv,
          gt_fieldcat1 TYPE slis_t_fieldcat_alv,
          wa_fieldcat1 TYPE slis_fieldcat_alv,
          wa_layout    TYPE slis_layout_alv,     "Layout
          gt_events    TYPE slis_t_event,        "For Events
          wa_events    TYPE slis_alv_event.
    Selection Screen
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS  : s_ebeln FOR ekko-ebeln.
    SELECTION-SCREEN: END OF BLOCK b1.
    Initialization
    INITIALIZATION.
      PERFORM initial.
    Fetch Data
    START-OF-SELECTION.
      PERFORM fetch_data.
    END-OF-SELECTION.
    Bulid fieldcatalog
      PERFORM fieldcat.
    Change fieldcatalog
      PERFORM fieldcat_change.
    Events Triggering
      PERFORM place_events.
    Layout.
      PERFORM layout.
    Display Data
      SORT gt_headerdat BY ebeln.
      PERFORM display_list.
    *&      Form  initial
          text
    -->  p1        text
    <--  p2        text
    FORM initial .
      s_ebeln-sign    = 'I'.
      s_ebeln-option  = 'BT'.
      s_ebeln-low     = '3000000090'.
      s_ebeln-high    = '3000000166'.
      APPEND s_ebeln.
    ENDFORM.                    " initial
    *&      Form  fetch_data
          text
    -->  p1        text
    <--  p2        text
    FORM fetch_data .
      REFRESH gt_headerdat.  "Clear the Body of Internal Table
      CLEAR   gt_headerdat.  "Clear Header Line
      SELECT ebeln
             bukrs
             bstyp
             bsart
             aedat
             ernam
             lifnr
             spras
             ekorg
             ekgrp
        FROM ekko
        INTO TABLE gt_headerdat
       WHERE ebeln IN s_ebeln.
    ENDFORM.                    " fetch_data
    *&      Form  display_list
          text
    -->  p1        text
    <--  p2        text
    FORM display_list .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
        i_callback_program             = sy-cprog
      I_CALLBACK_PF_STATUS_SET       = ' '
        i_callback_user_command        = 'USERCOMMAND'
      I_STRUCTURE_NAME               =
        is_layout                      = wa_layout
        it_fieldcat                    = gt_fieldcat
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
        it_events                      = gt_events
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
        t_outtab                       = gt_headerdat
       EXCEPTIONS
        program_error                  = 1
        OTHERS                         = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " display_list
    *&      Form  place_events
          text
    -->  p1        text
    <--  p2        text
    FORM place_events .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = gt_events
        EXCEPTIONS
          list_type_wrong = 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.
      CLEAR wa_events.   "Clear Header Line
      READ TABLE gt_events INTO wa_events WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc = 0.
        wa_events-form = 'HEADING'.
        MODIFY gt_events FROM wa_events INDEX sy-tabix.
      ENDIF.
      CLEAR wa_events.   "Clear Header Line
      READ TABLE gt_events INTO wa_events WITH KEY name = 'END_OF_LIST'.
      IF sy-subrc = 0.
        wa_events-form = 'PAGEDOWN'.
        MODIFY gt_events FROM wa_events INDEX sy-tabix.
      ENDIF.
      CLEAR wa_events.    "Clear Header Line
      READ TABLE gt_events INTO wa_events WITH KEY name = 'USER_COMMAND'.
      IF sy-subrc = 0.
        wa_events-form = 'USERCOMMAND'.
        MODIFY gt_events FROM wa_events INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    " place_events
    *&      Form  layout
          text
    -->  p1        text
    <--  p2        text
    FORM layout .
      CLEAR wa_layout.                   "Clear Header Line
      wa_layout-zebra = 'X'.             "Zebra Lines in the Output
      wa_layout-colwidth_optimize = 'X'. "Optimize the Column Width
    ENDFORM.                    " layout
    *&      Form  heading
          text
    FORM heading.
      WRITE:/6 'THIS REPORT DISPLAYS THE PURCHASE ORDER DETAILS'.
      WRITE:/6 'CLICK ON PURCHASE DOC NO FIELD(INTERACTIVE LIST)'.
    ENDFORM.                    "heading
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM fieldcat .
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
        i_program_name               = SY-CPROG
        i_internal_tabname           = 'GT_HEADERDAT'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
        i_inclname                   = SY-CPROG
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
        ct_fieldcat                  = gt_fieldcat
       EXCEPTIONS
        inconsistent_interface       = 1
        program_error                = 2
        OTHERS                       = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " fieldcat
    *&      Form  fieldcat_change
          text
    -->  p1        text
    <--  p2        text
    FORM fieldcat_change .
      LOOP AT gt_fieldcat INTO wa_fieldcat.
        CASE wa_fieldcat-fieldname.
          WHEN 'EBELN'.
            wa_fieldcat-hotspot  = 'X'.
        ENDCASE.
        MODIFY gt_fieldcat FROM wa_fieldcat INDEX sy-tabix.
      ENDLOOP.
    ENDFORM.                    " fieldcat_change
    *&      Form  pagedown
          text
    FORM pagedown.
      WRITE:/35 'HAVE A NICE DAY...' COLOR 4.
    ENDFORM.                    "pagedown
    *&      Form  usercommand
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM usercommand USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      READ TABLE gt_headerdat INDEX selfield-tabindex.
      CASE selfield-sel_tab_field.
        WHEN 'GT_HEADERDAT-EBELN'.
          REFRESH : gt_item.
          CLEAR   : gt_item.
          SELECT matnr
                 werks
                 lgort
                 matkl
                 menge
                 meins
                 netpr
                 kunnr
            FROM ekpo
            INTO TABLE gt_item
           WHERE ekpo~ebeln EQ gt_headerdat-ebeln.
    *Build a Field Catalog
          PERFORM fieldcat1.
    *For Heading in the Interactive List
          PERFORM heading1.
    *Display Interactive Data
          PERFORM display_data1.
      ENDCASE.
    ENDFORM.                    "usercommand
    *&      Form  fieldcat1
          text
    -->  p1        text
    <--  p2        text
    FORM fieldcat1 .
      REFRESH : gt_fieldcat1.
      CLEAR   : wa_fieldcat1.
      wa_fieldcat1-col_pos    = '1'.           "Column Postion
      wa_fieldcat1-fieldname  = 'MATNR'.       "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.   "Internal Table
      wa_fieldcat1-key        = 'X'.           "Blue Color
      wa_fieldcat1-seltext_l  = 'MATERIAL NO'. "Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
      wa_fieldcat1-col_pos    = '2'.           "Column Postion
      wa_fieldcat1-fieldname  = 'WERKS'.       "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.   "Internal Table
      wa_fieldcat1-seltext_l  = 'PLANT'.       "Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
      wa_fieldcat1-col_pos    = '3'.           "Column Postion
      wa_fieldcat1-fieldname  = 'LGORT'.       "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.   "Internal Table
      wa_fieldcat1-seltext_l  = 'STORAGE LOCATION'."Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
      wa_fieldcat1-col_pos    = '4'.            "Column Postion
      wa_fieldcat1-fieldname  = 'MATKL'.        "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.    "Internal Table
      wa_fieldcat1-seltext_l  = 'MATERIAL GRP'. "Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
      wa_fieldcat1-col_pos    = '5'.            "Column Postion
      wa_fieldcat1-fieldname  = 'MENGE'.        "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.    "Internal TAble
      wa_fieldcat1-seltext_l  = 'PO QUANTITY'.  "Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
      wa_fieldcat1-col_pos    = '6'.            "Column Pos tion
      wa_fieldcat1-fieldname  = 'MEINS'.        "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.    "Internal TAble
      wa_fieldcat1-seltext_l  = 'BASE UNIT MEASURE'."Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
      wa_fieldcat1-col_pos    = '7'.            "Column Postion
      wa_fieldcat1-fieldname  = 'NETPR'.        "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.    "Internal Table
      wa_fieldcat1-seltext_l  = 'NET PRICE'.    "Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
      wa_fieldcat1-col_pos    = '8'.            "Column Postion
      wa_fieldcat1-fieldname  = 'KUNNR'.        "Field Name
      wa_fieldcat1-tabname    = 'GT_ITEM'.    "Internal Table
      wa_fieldcat1-seltext_l  = 'CUSTOMER NO'.  "Display Text Screen
      APPEND wa_fieldcat1 TO gt_fieldcat1.
      CLEAR wa_fieldcat1.
    ENDFORM.                                                    " fieldcat1
    *&      Form  heading1
          text
    -->  p1        text
    <--  p2        text
    FORM heading1 .
      REFRESH : gt_header.
      CLEAR   : wa_header.
      wa_header-typ  = 'H'.
      wa_header-info = 'THIS IS AN INTERACTIVE LIST'.
      APPEND wa_header TO gt_header.
    ENDFORM.                                                    " heading1
    *&      Form  top
          text
    FORM top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
        it_list_commentary       = gt_header
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    ENDFORM.                    "top
    *&      Form  display_data1
          text
    -->  p1        text
    <--  p2        text
    FORM display_data1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
        i_callback_program                = SY-CPROG
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
        i_callback_top_of_page            = 'TOP'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
        it_fieldcat                       = gt_fieldcat1
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
        t_outtab                          = gt_item
       EXCEPTIONS
        program_error                     = 1
        OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " display_data1
    Reward points if helpful.
    Kiran Kumar.G.A
            Have a Nice Day..

  • How to use Mouse Wheel Events

    Hello Everyone
    I am using Datagrid in my Canvas.
    I use mouse wheel to scroll the datagrid. But in one scroll
    through that wheel make the more than 4 rows to be scroll.
    So Now my requirement is to control the delta value of mouse
    wheel event and how to use that with my datagrid so that i will
    able to scroll one row through mouse wheel scroller.
    Thanks

    please give me some suggestion around it.
    I want to scroll one row of datagrid with per mousewheel
    scroll. I am not getting how to use the scrollMouseWheelMultiplier
    property of the IConfiguration class because i am not able to
    create the object of this class.
    I am using the Flex 3.0 and flash 9 version.
    please help me out around this.

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • How to use pf-status u2018menuu2019  in ALV report ?

    Hi Friends,
    How to use pf-status u2018menuu2019  in ALV report ?
    I want to use back button ( F3). whenever press it should show
    another report.
    I used  subroutine
    form SUB_ERROR_OUTPUT USING RT_EXTAB TYPE SLIS_T_EXTAB .
    SET PF-STATUS 'ZMENU' EXCLUDING RT_EXTAB.  u201C( the button name is u201C back u201C)
    CASE SY-UCOMM.
    *WHEN '&F03'.
    WHEN 'BACK'
    ( my coding is there ).
    endcase.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PF_STATUS_SET          = 'SUB_ERROR_OUTPUT'
    but it is  executing, working the back button but not showing another report .
    any other procedure to use back button in alv report ?
    plz any idea .
    For correct answer  reword most.
    Thanking you.

    Purchase day Book .
    Data to be down loaded / printed for EDP dept. CGL.
    CGL - Requirement .
    WRITTEN  BY : ADI.****
    *CONSULTANT : SANJAY JAJOO..
    AS PER DP REQUIREMENT.
    -CHANGED BY    :    KRISHNA MOHAN  (15/01/2002)--
    -CHANGE REQ BY :    JAJU S--
    -DESCRIPTION   :    SUMMRY BY TAX CODE WISE & GL CODE WISE--
    ---MODIFIED LINES: -
    ---CHANGED BY    :    -
    ---CHANGE REQ BY :    -
    ---DESCRIPTION   :    -
    ---MODIFIED LINES: -
    *---changed by    :    sanjay jajoo on 23/08
    *---changed req by:    Ranka
    *---Description   :    Inserting Range of period as sel field
      changed by    :    krishna mohan
      func. consultant:  sanjay jajoo
    REPORT ZMMPURDB MESSAGE-ID 00
                    LINE-SIZE 255
                    LINE-COUNT 60
                    NO STANDARD PAGE HEADING .
    TABLES :   MKPF   ,  MSEG  ,SKAT,
               EKKO   ,  EKPO  , EKBE ,
               BSEG   ,  BKPF  , BSET ,
               T009B  ,  T001  , T007S ,
               T001W  ,  T001K ,LFA1.
    ******Table deactivated on 30/8/2000------jaju
    *tables : zcgltaxatn .
    DATA  : ZFILE1(65) VALUE '/DOWNLOAD/'.
    DATA  : ZFILE2(65) .
    DATA  : ZFILE(30) TYPE C VALUE '/DOWNLOAD/'.
    DATA   : ZMON(2).
    DATA : ZTOTAL(11) TYPE N.
    DATA: ZTOT1 TYPE P DECIMALS 2.
    DATA: ZTXT LIKE SKAT-TXT50.
    TYPES: BEGIN OF COMPANY ,
    HKONT LIKE BSEG-HKONT,
    TOTAL LIKE BSEG-DMBTR,
    END OF COMPANY.
    DATA: COMP TYPE COMPANY,
          COMPTAB TYPE HASHED TABLE OF COMPANY WITH UNIQUE KEY HKONT
          WITH HEADER LINE.
    DATA : NEXT LIKE BSEG-BUZEI.           "A.A. (28/03/2000)
    DATA : DOC LIKE BSEG-BELNR.            "A.A. (28/03/2000)
    DATA  S_GSBER.
    DATA: CTR TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-B01.
    PARAMETERS : T_BUKRS LIKE T001-BUKRS OBLIGATORY MEMORY ID BUK .
    ***********CH--ID- ADI- 29 / 09 / 1999
    SELECT-OPTIONS : ZGL FOR BSEG-HKONT OBLIGATORY.
    ***********CH--ID- ADI- 29 / 09 / 1999
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(9) TEXT-C01 .
    PARAMETERS : POPER RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN COMMENT 13(7) TEXT-C02 .
    PARAMETERS : MONTH RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN COMMENT 23(8) TEXT-C03 .
    SELECTION-SCREEN POSITION 33 .
    commented on 22/08 sanjay jajoo
    *PARAMETERS :  T_MONAT LIKE BKPF-MONAT .
    SELECTION-SCREEN END OF LINE.
    PARAMETERS : T_GJAHR LIKE BKPF-GJAHR OBLIGATORY .
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS : S_DOCTYP FOR BKPF-BLART,
                     S_VENDOR FOR LFA1-LIFNR  MATCHCODE  OBJECT KRED,
                     S_MATNR FOR BSEG-MATNR NO-DISPLAY,
                    T_BUDAT FOR MKPF-BUDAT NO-EXTENSION MODIF ID DAT,
                    p_gsber FOR bseg-gsber  OBLIGATORY,
                     P_GSBER FOR BSEG-GSBER,
    mod starts for inserting range of period - sanjay jajoo
                     T_MONAT FOR BKPF-MONAT OBLIGATORY.
    mod ends
    *SELECT-OPTIONS: br_blart FOR mkpf-blart.
    *Select-options:  br_blart for bkpf-blart.
    SELECTION-SCREEN END OF BLOCK B1 .
    Start of Delete by B.Elan on 23/12/2005
    *PARAMETERS : errors AS CHECKBOX .
    *PARAMETERS : summary AS CHECKBOX .
    *PARAMETERS : nodetail AS CHECKBOX .
    **selection-screen skip 2.
    *SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-b03.   "<<<
    *Add
    *PARAMETER : stax_reg RADIOBUTTON GROUP rad2 .                   "<<<
    *Add
    *PARAMETER : pur_db RADIOBUTTON GROUP rad2 .                     "<<<
    *Add
    *SELECTION-SCREEN END OF BLOCK b3 .     "<<< Add
    *SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02.
    *PARAMETERS : display RADIOBUTTON GROUP grp1 ,
                dload RADIOBUTTON GROUP grp1.
    *PARAMETERS : fname1 LIKE rlgrap-filename .
    *DATA : zdoc LIKE bseg-belnr.
    *DATA : fname LIKE rlgrap-filename.
    *SELECTION-SCREEN END OF BLOCK b2 .
    End of Delete by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETER : PUR_DB RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C06.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETERS : MAT_SM RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C04.
    SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
    PARAMETERS : VEN_SM RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 44(20) TEXT-C05.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETERS : MAT_DT RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C07.
    SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
    PARAMETERS : VEN_DT RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 44(20) TEXT-C08.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    End of Insert by B.Elan on 23/12/2005
    Hard coded values used in the program
    added by krishna mohan on 09/02/02
    DATA : BEGIN OF IT_MSEG OCCURS 0,
            BELNR LIKE BSEG-BELNR,
            MBLNR LIKE MSEG-MBLNR,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
          END OF IT_MSEG.
    mod ends
    Start of Insert by B.Elan on 23/12/2005
    *--vikky
    DATA : BEGIN OF IT_FINAL OCCURS 0,
             MATNR LIKE MARA-MATNR,
             BLART LIKE BKPF-BLART,         "  doctype
             BELNR LIKE BSEG-BELNR,         "sr - nO  10
             XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
             NAME1_VENDOR(25),
             "lfa1-name1,   " Vendor Name 35
             HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
             MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
             BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
             DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
             PON    LIKE EKKO-EBELN ,                           " PON 10
             MAKTX LIKE MAKT-MAKTX,         "Material text 40
             MBLNR LIKE MSEG-MBLNR,
             QTY(8) TYPE P DECIMALS 2  ,                        "Qty 11
             RATE(9) TYPE P DECIMALS 2  ,                       "Rate11
             DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
             PROD-AMT(9) TYPE P DECIMALS 2,
                                                                "AMOUNT 13
             EXCISE(8) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
             SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
             FREIGHT(9) TYPE P DECIMALS 2,   "FREIGHT     11
             OTHERS(11) TYPE P DECIMALS 2,    " OTHERS     11
             TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           END OF IT_FINAL.
    *DATA : BEGIN OF IT_FINAL OCCURS 0,
            MATNR LIKE MARA-MATNR,
            BLART LIKE BKPF-BLART,         "  doctype
            BELNR LIKE BSEG-BELNR,         "sr - nO  10
            XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
            NAME1_VENDOR(25),
            "lfa1-name1,   " Vendor Name 35
            HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
            MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
            BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
            DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
            PON    LIKE EKKO-EBELN ,                           " PON  10
            MAKTX LIKE MAKT-MAKTX,         "Material text 40
            MBLNR LIKE MSEG-MBLNR,
            QTY(13) TYPE P DECIMALS 2  ,                       "Qty 11
            RATE(13) TYPE P DECIMALS 2  ,                      "Rate 11
            DISCOUNT(13) TYPE P DECIMALS 2,  "DISCOUNT 11
            PROD-AMT(13) TYPE P DECIMALS 2,
                                                               "AMOUNT 13
            EXCISE(13) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
            SALES(13) TYPE P DECIMALS 2 ,    "SALES TAX   11
            FREIGHT(13) TYPE P DECIMALS 2,   "FREIGHT     11
            OTHERS(13) TYPE P DECIMALS 2,    " OTHERS     11
            TOTAL(13) TYPE P DECIMALS 2,     "TOTAL       17
          END OF IT_FINAL.
    *--vikky
    DATA : BEGIN OF IT_FINAL_VN OCCURS 0,
               NAME1_VENDOR(25),
               "lfa1-name1,   " Vendor Name 35
               MATNR LIKE MARA-MATNR,
               BLART LIKE BKPF-BLART,         "  doctype
               BELNR LIKE BSEG-BELNR,         "sr - nO  10
               XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
               HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
               MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
               BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
               DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
               PON    LIKE EKKO-EBELN ,                         " PON  10
               MAKTX LIKE MAKT-MAKTX,         "Material text 40
               MBLNR LIKE MSEG-MBLNR,
               QTY(8) TYPE P DECIMALS 2  ,                      "Qty 11
               RATE(9) TYPE P DECIMALS 2  ,                     "Rate 11
               DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
               PROD-AMT(9) TYPE P DECIMALS 2,
                                                                "AMOUNT 13
               EXCISE(5) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
               SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
               FREIGHT(5) TYPE P DECIMALS 2,   "FREIGHT     11
               OTHERS(9) TYPE P DECIMALS 2,    " OTHERS     11
               TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           END OF IT_FINAL_VN.
    End of Insert by B.Elan on 23/12/2005
    DATA: BEGIN OF ITAB_DISPLAY OCCURS 0,
            BLART LIKE BKPF-BLART,         "  doctype
            BELNR LIKE BSEG-BELNR,         "sr - nO  10
            XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
            NAME1_VENDOR(25),              "lfa1-name1,   " Vendor Name 35
            HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
            MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
            BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
            DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
            PON    LIKE EKKO-EBELN ,                            " PON  10
            MAKTX LIKE MAKT-MAKTX,         "Material text 40
           QTY(8) TYPE P DECIMALS 2  ,                          "Qty 11
                                                                "qty 5
         RATE(5) TYPE P DECIMALS 2  ,                         "Rate 11
         mod starts on 21/08 for inc size to 7
           RATE(9) TYPE P DECIMALS 2  ,                         "Rate 11
                                                                "Rate 7
         mod ends -  sanjay jajoo 21/08
           DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
           PROD-AMT(9) TYPE P DECIMALS 2,                       "AMOUNT 13
           EXCISE(5) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
           SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
           FREIGHT(5) TYPE P DECIMALS 2,   "FREIGHT     11
           OTHERS(9) TYPE P DECIMALS 2,    " OTHERS     11 " added by vik on
    *21.08.2008
           TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           TOTAL1(9) TYPE P DECIMALS 2,
           MATNR LIKE MARA-MATNR,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
        END OF ITAB_DISPLAY.
    DATA: BEGIN  OF ITAB_TOTAL1 OCCURS 0,
          HKONT LIKE BSEG-HKONT,
          TOTAL TYPE P DECIMALS 2,
          TXT50 LIKE SKAT-TXT50,
          END OF ITAB_TOTAL1.
    DATA: BEGIN  OF ITAB_KONV OCCURS 0,
            KNUMV LIKE KONV-KNUMV,
            KPOSN LIKE KONV-KPOSN,
            STUNR LIKE KONV-STUNR,
            ZAEHK LIKE KONV-ZAEHK,
            KSCHL LIKE KONV-KSCHL,
            KWERT LIKE KONV-KWERT,
          END OF ITAB_KONV.
    DATA:BEGIN OF ITAB_RATE_MODVAT OCCURS 0,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MENGE LIKE EKPO-MENGE,
           BRTWR LIKE EKPO-BRTWR,
           KZWI5 LIKE EKPO-KZWI5,
           KNUMV LIKE EKKO-KNUMV,
           MATNR LIKE EKPO-MATNR,
           TXZ01 LIKE EKPO-TXZ01,
         END OF ITAB_RATE_MODVAT.
    DATA: BEGIN OF ITAB_PO OCCURS 0,
            EBELN LIKE EKPO-EBELN,
            EBELP LIKE EKPO-EBELP,
          END OF ITAB_PO.
    DATA: BEGIN OF ITAB_PO_ITEM OCCURS 0,
            BELNR LIKE BSEG-BELNR,
            EBELN LIKE BSEG-EBELN,
            BUZID LIKE BSEG-BUZID,
            XBLNR LIKE BKPF-XBLNR,
            MATNR LIKE BSEG-MATNR,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
            EXCISE LIKE BSEG-DMBTR, " ADDED ON 21/01/02 FOR 27500 EXCISE
          SGTXT LIKE BSEG-SGTXT, " ADDED ON 24/01/02
            FLAG,
          END OF ITAB_PO_ITEM.
    DATA:BEGIN OF I_LFA1 OCCURS 0,
           LIFNR LIKE BSEG-LIFNR,
         END OF I_LFA1.
    DATA: BEGIN  OF I_VENDOR OCCURS 0,
            LIFNR LIKE LFA1-LIFNR,
            NAME1 LIKE LFA1-NAME1,
          END OF I_VENDOR.
    DATA: BEGIN OF ITAB_PO_OTHERS OCCURS  0,
            BELNR LIKE BSEG-BELNR,
            MATNR LIKE BSEG-MATNR,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
          END OF ITAB_PO_OTHERS.
    DATA: BEGIN OF ITAB_FINAL OCCURS 0,
            BUKRS LIKE BSEG-BUKRS,
            BELNR LIKE BSEG-BELNR,
            GJAHR LIKE BSEG-GJAHR,
            BUZEI LIKE BSEG-BUZEI,
            BUZID LIKE BSEG-BUZID,
            SHKZG LIKE BSEG-SHKZG,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
            MATNR LIKE BSEG-MATNR,
            HKONT LIKE BSEG-HKONT, " ADDED ON 21/01/02 FOR 27500 EXCISE
            SGTXT LIKE BSEG-SGTXT,         " ADDED ON 24/01/02 FOR SALES TAX
          END OF ITAB_FINAL.
    DATA : BEGIN OF ITAB OCCURS 100 ,
               MWSKZ LIKE EKPO-MWSKZ ,     " St-cd
               HKONT LIKE BSEG-HKONT ,     " Alloc-cd
               MBLNR LIKE MKPF-MBLNR ,     " Sr-No
               LIFNR LIKE LFA1-LIFNR ,     " Supp-cd
               XBLNR LIKE BKPF-XBLNR ,     " Bill-no
               BUDAT LIKE BKPF-BUDAT ,     " Bill-dt
               DUE_DATE LIKE BSEG-ZFBDT ,  " Due date
               PON    LIKE EKKO-EBELN ,    " PON
               BELNR LIKE BKPF-BELNR ,     " CCI no
               DMBTR LIKE BSEG-DMBTR ,     " Prod-amount
               EXCISE LIKE BSEG-DMBTR ,    " Excise / ModVAT
               ST_INV LIKE BSEG-DMBTR ,    " Sales Tax Loaded on Inv.
               ST_SET LIKE BSEG-DMBTR ,    " Sales Tax setoff .
               OCT_TOT LIKE BSEG-DMBTR ,   " A,A, (29/03/2000) Octroi chargs
               PT_PABLE LIKE BSEG-DMBTR ,  " Purchase tax payable
               ST_TOT LIKE BSEG-DMBTR ,    " Sales Tax total
               OTHR_CHRG LIKE BSEG-DMBTR , " Other chagres
               NEBTR LIKE BSEG-NEBTR,      " Total-amount
               NAME1_VENDOR LIKE LFA1-NAME1,   " Vendor Name
         END OF ITAB.
    DATA: BEGIN OF ITAB_DOC OCCURS 0,
            BELNR LIKE BKPF-BELNR,
            BLART LIKE BKPF-BLART,
          END OF ITAB_DOC.
    DATA : BEGIN OF DOCTAB OCCURS 100 ,
             MWSKZ LIKE BSEG-MWSKZ ,
             HKONT LIKE BSEG-HKONT ,
             BELNR LIKE BKPF-BELNR ,
    Changed By Pankaj              19.03.99
    Included field fiscal year
             GJAHR LIKE BKPF-GJAHR ,
             BUDAT LIKE BKPF-BUDAT ,
             XBLNR LIKE BKPF-XBLNR ,
             LIFNR LIKE LFA1-LIFNR ,
             ZTERM LIKE BSEG-ZTERM ,
             AMOUNT LIKE BSEG-DMBTR ,
             DMBTR  LIKE BSEG-DMBTR ,
             OTHR_CHRG LIKE BSEG-DMBTR ,
             MBLNR LIKE MKPF-MBLNR ,
             MJAHR LIKE MSEG-MJAHR ,
             DUE_DATE LIKE BSEG-ZFBDT ,
             PON    LIKE EKKO-EBELN ,
             JMO1  LIKE BSEG-DMBTR ,
             JMO2  LIKE BSEG-DMBTR ,
             JIP1  LIKE BSEG-DMBTR ,
             JIP2  LIKE BSEG-DMBTR ,
    ************CH-ID-ADI-START-28 / 09 / 1999
             JIP4 LIKE BSEG-DMBTR ,
             ZTUT LIKE BSEG-DMBTR ,
    *****************ABEY
             ZOCT LIKE BSEG-DMBTR ,
    *****************END
    ************CH-ID-ADI-START-28 / 09 / 1999
             ZSET  LIKE BSEG-DMBTR ,
             ZPTX  LIKE BSEG-DMBTR ,
             BLART LIKE BKPF-BLART ,
          END OF DOCTAB .
    Download for EDP    "EDP
    DATA : BEGIN OF DOWNLOAD OCCURS 100 ,
           SIGN1(1) ,
           TOT_VAL(11) TYPE N,
           SIGN2(1) ,
           TAXABLE(11) TYPE N ,
           SIGN3(1) ,
           TOT_TAX(11) TYPE N ,
           SIGN4(1) ,
           SURCHARG(9) TYPE N ,
           SIGN5(1) ,
           ST_AMT(9) TYPE N ,
           SIGN6(1) ,
           OTH_CHRG(9) TYPE N ,
    ******************************ch-adi-start-28 / 09 / 1999
           SIGN7(1),
           TOT(9) TYPE N,
    ******************************ch-adi-end-28 / 09 / 1999
           TYPE(1) TYPE N ,
           STKY1(1) TYPE N ,
           STBR(2) ,
           STDV(2) ,
           STCC(1) ,
           STKY(1) ,
           STDC(2) TYPE N ,
           STTYP(1) ,
           STCODE(2) ,
           STRATE(2) TYPE N ,
           STRTT(2) TYPE N ,
           SERIAL_NO(6) TYPE N ,
           STACP(9) ,
           BLANK1(3) ,
           STYRMN(6) ,
           BLANK2(7) TYPE C .
    DATA : END OF DOWNLOAD .
    DATA : BEGIN OF GLTAB OCCURS 5 ,
               MWSKZ LIKE BSEG-MWSKZ,      " << ADD A.A. (01.02.2000)
               HKONT LIKE BSEG-HKONT ,
               DMBTR LIKE BSEG-DMBTR ,     " Prod-amount
               EXCISE LIKE BSEG-DMBTR ,    " Excise / ModVAT
               ST_INV LIKE BSEG-DMBTR ,    " Sales Tax Loaded on Inv.
               ST_SET LIKE BSEG-DMBTR ,    " Sales Tax setoff .
               PT_PABLE LIKE BSEG-DMBTR ,  " Purchase tax payable
               ST_TOT LIKE BSEG-DMBTR ,    " Sales Tax total
               OTHR_CHRG LIKE BSEG-DMBTR , " Other Charges
               NEBTR LIKE BSEG-NEBTR.      " Total-amount
    DATA : END OF GLTAB .
    DATA : BEGIN OF ERRORTAB OCCURS 5 .
            INCLUDE STRUCTURE ITAB .
    DATA : END OF ERRORTAB .
    *- Start of change by Raj on 3-Spet-05
    DATA : V_TMPVAL TYPE P DECIMALS 2.
    *- End of change by Raj on 3-Spet-05
    DATA : STRING LIKE BKPF-AWKEY ,
           V_NO TYPE I,
           V_EBELN LIKE BSEG-EBELN,
           V_MATNR LIKE BSEG-MATNR. " ADDED ON 21/01/02 FOR BUZID = 'S'
    Start of Insert by B.Elan on 23/12/2005
    WORK AREA
    DATA : WA_DISPLAY LIKE ITAB_DISPLAY.
    DATA : V_UCOMM TYPE SY-UCOMM.
    CONSTANTS : C_X TYPE C VALUE 'X'.
    End of Insert by B.Elan on 23/12/2005
    AT SELECTION-SCREEN ON T_BUKRS.
      SELECT SINGLE * FROM T001 WHERE BUKRS = T_BUKRS .
      IF SY-SUBRC NE 0 .
        MESSAGE E368 WITH T_BUKRS TEXT-M01 .
      ENDIF .
    AT SELECTION-SCREEN ON T_MONAT.
    PERFORM check_period_year USING 'X'.   " COMMENTED
    AT SELECTION-SCREEN ON T_GJAHR.
    PERFORM check_period_year USING ' '.   "COMMENTED
    Start of Delete by B.Elan on 23/12/2005
    *AT SELECTION-SCREEN ON RADIOBUTTON GROUP grp1 .
    CLEAR fname .
    DATA : BEGIN OF xt247 OCCURS 12 .
             INCLUDE STRUCTURE t247 .
    DATA : END OF xt247 .
    CHECK dload EQ 'X' .
    REFRESH xt247 .
    IF poper EQ 'X' .
       MESSAGE e368 WITH text-m05 .
    ENDIF .
    CALL FUNCTION 'MONTH_NAMES_GET'
       TABLES
         month_names           = xt247
       EXCEPTIONS
         month_names_not_found = 1
         OTHERS                = 2.
    READ TABLE xt247 WITH KEY mnr = t_monat .
    CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
    CONCATENATE  '
    DOWNLOAD\'   fname    INTO fname1.
    CONCATENATE  zfile1   fname    INTO   zfile2.
    CONDENSE fname1 NO-GAPS.
    CONDENSE zfile2 NO-GAPS.
    CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
    End of Delete by B.Elan on 23/12/2005
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN .
        IF SCREEN-NAME EQ 'FNAME' .
          SCREEN-INPUT = 0.
          MODIFY SCREEN .
        ENDIF .
        IF SCREEN-GROUP2 EQ 'DBS' .
          SCREEN-ACTIVE = 0 .
          MODIFY SCREEN .
          IF SCREEN-NAME EQ 'BR_BLART-LOW' .
    Form the select option for the LDB .
            CLEAR BR_BLART . REFRESH BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'RE' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'SR' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'SP' .
            APPEND BR_BLART .       " ADD ON 11122003 JAJ
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
           br_blart-low = 'VI' .
            BR_BLART-LOW = 'ST'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'S1'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'P1'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'PM'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'R1'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'KR' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
    *************CH-ID-ADI---30 / 09 / 1999.
            BR_BLART-LOW = 'RA'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'EM'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'EI' .
            APPEND BR_BLART .
          ENDIF .
        ENDIF .
        CHECK SCREEN-GROUP1 EQ 'DAT' .
        SCREEN-INPUT = 0.
        MODIFY SCREEN .
      ENDLOOP .
    START-OF-SELECTION .
    Block 1 - Selection of accounting documents in the posting period
    is done through the LDB
    GET BKPF .
    commented on 22/08
    CHECK BKPF-MONAT = T_MONAT.
      CHECK BKPF-MONAT IN T_MONAT.
      CHECK BKPF-GJAHR = T_GJAHR.
      CHECK BKPF-STBLG IS INITIAL .        "<<<< Reversed
    *CHECK bkpf-budat IN t_budat .
      CHECK BKPF-BUKRS EQ T_BUKRS .
      CHECK BKPF-BUKRS EQ T_BUKRS .
      CHECK BKPF-BSTAT EQ SPACE .          "<<< Sample docs
      CHECK BKPF-BLART EQ 'RE'             "MM-IV
        OR  BKPF-BLART EQ 'KR'             "FI-IV
      OR  bkpf-blart EQ 'VI'          "FI-IV Direct
    *************CH-ID-ADI-30 / 09  / 1999
      OR  bkpf-blart EQ 'RA'           "CASH CCI
      OR  bkpf-blart EQ 'EM'           "MAINTAINANCE
      OR  bkpf-blart EQ 'EI' .        "IDT
        OR BKPF-BLART EQ  'P1'
        OR BKPF-BLART EQ 'PM'
        OR  BKPF-BLART EQ 'R1'
        OR  BKPF-BLART EQ 'S1'
        OR  BKPF-BLART EQ 'ST'
        OR  BKPF-BLART EQ 'SR'      " ADD ON 101203 JAJ
        OR  BKPF-BLART EQ 'SP'.
    *************CH-ID-ADI-30 / 09  / 1999
      CLEAR DOCTAB .
      DOCTAB-BLART = BKPF-BLART .
      DOCTAB-BELNR = BKPF-BELNR .
      DOCTAB-BUDAT = BKPF-BUDAT .
      DOCTAB-XBLNR = BKPF-XBLNR .
    Added By Pankaj                   19.03.99
    Initializing fiscal year for document table
      DOCTAB-GJAHR = BKPF-GJAHR .
      APPEND DOCTAB.
    Tax details
    GET BSET .   " Commented because LDB gives wrong BSET entries
      " for some documents
      CASE BSET-KSCHL .
        WHEN 'JMO1' .
          DOCTAB-JMO1 = DOCTAB-JMO1 + BSET-HWSTE .
        WHEN 'JMO2' .
          DOCTAB-JMO2 = DOCTAB-JMO2 + BSET-HWSTE .
        WHEN 'JIP1' .
          DOCTAB-JIP1 = DOCTAB-JIP1 + BSET-HWSTE .
        WHEN 'JIP2' .
          DOCTAB-JIP2 = DOCTAB-JIP2 + BSET-HWSTE .
        WHEN 'ZSET' .
         break deven .
          DOCTAB-ZSET = DOCTAB-ZSET + BSET-HWSTE .
        WHEN 'ZPTX' .
          DOCTAB-ZPTX = DOCTAB-ZPTX + BSET-HWSTE .
      ENDCASE .
      DOCTAB-MWSKZ = BSET-MWSKZ.
      MODIFY DOCTAB INDEX SY-TABIX.
    Item details
    *changed by srinivas yerra.
    GET BSEG .
      IF BSEG-KOART = 'K' .              "<<< Vendor Line
    IF BSEG-KOART = 'K' .
    *end of chnages by srinivas yerra.
        DOCTAB-LIFNR = BSEG-LIFNR .
        IF NOT BSEG-ZTERM IS INITIAL .
          DOCTAB-ZTERM = BSEG-ZTERM .
          DOCTAB-DUE_DATE = BSEG-ZFBDT + BSEG-ZBD1T .
        ENDIF .
        IF BSEG-SHKZG EQ 'H' .             "<< Add credits
          DOCTAB-AMOUNT = DOCTAB-AMOUNT + BSEG-DMBTR .
        ELSE .                             "<< Subtr debits
          DOCTAB-AMOUNT = DOCTAB-AMOUNT - BSEG-DMBTR .
        ENDIF .
      ENDIF .
      CASE BSEG-KTOSL .
        WHEN 'WRX' .
          DOCTAB-PON = BSEG-EBELN .
          IF DOCTAB-MWSKZ IS INITIAL .
            DOCTAB-MWSKZ = BSEG-MWSKZ .
          ENDIF .
        WHEN 'BSX' .
    ***********ABEY
          IF NEXT = BSEG-BUZEI
             AND
             DOC = BSEG-BELNR
             AND
             ( BSEG-BUZID = 'M'
               OR
               BSEG-HKONT = 50765 ).
            DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
            IF BSEG-SHKZG EQ 'H' .         "<< Subtr credits
              DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
            ELSE .                         "<< Add debits
              DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
            ENDIF .
          ENDIF .
    ************END
          IF BSEG-SHKZG EQ 'S' .
            DOCTAB-DMBTR = DOCTAB-DMBTR + BSEG-DMBTR .
          ELSE .
            DOCTAB-DMBTR = DOCTAB-DMBTR - BSEG-DMBTR .
          ENDIF .
        WHEN 'OCT' OR 'FRE' OR 'FR1' OR SPACE .
    *****CH-ID-ADI-30 / 09 /1999.
          IF ( ( BKPF-BLART = 'EM'  OR  BKPF-BLART = 'RA'  OR  BKPF-BLART =
          'EI')
           AND BSEG-KTOSL = SPACE ) OR  BSEG-MWSKZ = '9W' OR BSEG-MWSKZ =
           'K9' OR
                                                                BSEG-MWSKZ =
                                                                'X9'.
            DOCTAB-OTHR_CHRG = 0.
          ELSE.
    *********CH-ID-ADI--01 / 10 / 1999
         Other Charges only for accounts other than vendor acc.
            CHECK BSEG-BUZID NE 'T' .
            CHECK BSEG-BUZID NE 'P' .
            IF BSEG-KOART NE 'K' .
    *********ABEY (25/02/2000), (21/02/2000)
              IF BSEG-BUZID = 'F'
               OR BSEG-HKONT = 75461.
                NEXT = BSEG-BUZEI + 1.
                DOC = BSEG-BELNR.
                DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
              ENDIF.
              IF BSEG-BUZEI = NEXT
                 AND
                 ( BSEG-BUZID = 'M'
                   OR
                   BSEG-HKONT = 50765 ).
                DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
              ENDIF.
    *********END
              IF BSEG-SHKZG EQ 'H' .       "<< Subtr credits
                DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
              ELSE .                       "<< Add debits
                DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
              ENDIF .
            ENDIF .
    *****NEXT-LINE ADDED BY ADI
          ENDIF .
    *************END.
      ENDCASE .
    *CHANGED BY SRINIVAS YERRA
    *MODIFY DOCTAB INDEX SY-TABIX.
      APPEND DOCTAB.
    *END OF CHANGES.
    PO History
    GET EKBE .
      CHECK DOCTAB-BELNR EQ EKBE-BELNR .
      DOCTAB-MBLNR = EKBE-LFBNR .
      DOCTAB-MJAHR = EKBE-LFGJA .
      MODIFY DOCTAB INDEX SY-TABIX .
    PERFORM show_indicator USING text-m02 .
    *PERFORM convert_data.
    END-OF-SELECTION .
    Data read from LDB is converted into printable format.
      PERFORM SHOW_INDICATOR USING TEXT-M04 .
      PERFORM CONVERT_DATA .
    Start of Delete by B.Elan on 23/12/2005
    IF stax_reg EQ 'X' .                 "<<< Add
       SORT itab BY mwskz hkont belnr .
    ELSE .                               "<<< Add
       SORT itab BY belnr .               "<<< Add
        SORT itab BY pon.
    ENDIF .                              "<<< Add
    Perform further operation based on user input
    IF display EQ 'X' .
       PERFORM write_itab.
       PERFORM write_data .
    ELSE .
      PERFORM download_data .
    ENDIF .
    End of Delete by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
      SORT ITAB BY BELNR.
      PERFORM WRITE_DATA.
      IF MAT_SM = C_X.
        PERFORM WRITE_MATERIAL_SUMMARY.
      ELSEIF MAT_DT = C_X.
        PERFORM WRITE_MATERIAL_DETAILS.
      ELSEIF VEN_SM = C_X.
        PERFORM WRITE_VENDOR_SUMMARY.
      ELSEIF VEN_DT = C_X.
        PERFORM WRITE_VENDOR_DETAILS.
      ENDIF.
    End of Insert by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
    AT USER-COMMAND.
      V_UCOMM = SY-UCOMM.
      CASE V_UCOMM.
        WHEN 'DETLS'.
          NEW-PAGE.
          PUR_DB = C_X.
          PERFORM CLEAR_DETAILS.
          PERFORM WRITE_DATA.
        WHEN 'MSUMRY'.
          PERFORM WRITE_MATERIAL_SUMMARY.
        WHEN 'MDETL'.
          PERFORM WRITE_MATERIAL_DETAILS.
        WHEN 'VSUMRY'.
          PERFORM WRITE_VENDOR_SUMMARY.
        WHEN 'VDETL'.
          PERFORM WRITE_VENDOR_DETAILS.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    End of Insert by B.Elan on 23/12/2005
    *- - - - - - - - - End Of Execution .- - - - - - - - - - - - - - - - - -
    TOP-OF-PAGE .
      IF PUR_DB = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_PUR_DB.
      ELSEIF MAT_SM = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_MAT_SM.
      ELSEIF MAT_DT = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_MAT_DT.
      ELSEIF VEN_SM = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_VEN_SM.
      ELSEIF VEN_DT = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_VEN_DT.
      ENDIF.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE V_UCOMM.
        WHEN 'DETLS'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_PUR_DB.
        WHEN 'MSUMRY'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_MAT_SM.
        WHEN 'MDETL'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_MAT_DT.
        WHEN 'VSUMRY'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_VEN_SM.
        WHEN 'VDETL'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_VEN_DT.
      ENDCASE.
    *&      Form  WRITE_DATA
          text                                                           *
    FORM WRITE_DATA.
      DATA:     V_SALES LIKE ITAB_DISPLAY-SALES,
                V_RATE LIKE ITAB_DISPLAY-RATE,
                V_DISCOUNT LIKE ITAB_DISPLAY-DISCOUNT,
                V_PROD-AMT LIKE ITAB_DISPLAY-PROD-AMT,
                V_EXCISE1 LIKE ITAB_DISPLAY-EXCISE,
                V_EXCISE LIKE ITAB_DISPLAY-EXCISE,
                V_PON LIKE ITAB_DISPLAY-PON,
                V_OTHERS LIKE ITAB_DISPLAY-OTHERS,
                V_FREIGHT LIKE ITAB_DISPLAY-FREIGHT.
      CLEAR ITAB .
    Write the correct data i.e. tax code and G/L code both available .
      LOOP AT ITAB .
    *************CH-ID-ADI-30 / 09 / 1999
        IF ( ITAB-MWSKZ = '9W' OR ITAB-MWSKZ = 'K9' OR ITAB-MWSKZ = 'X9' )
                                                   AND ITAB-OTHR_CHRG NE 0 .
          ITAB-DMBTR = ITAB-OTHR_CHRG.
          ITAB-OTHR_CHRG = 0.
          MODIFY ITAB.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB.
        I_LFA1-LIFNR = ITAB-LIFNR.
        APPEND I_LFA1.
        CLEAR I_LFA1.
      ENDLOOP.
      SORT I_LFA1.
      DELETE ADJACENT DUPLICATES FROM I_LFA1 COMPARING ALL FIELDS.
      SELECT LIFNR
             NAME1
        FROM LFA1 INTO TABLE I_VENDOR
        FOR ALL ENTRIES IN I_LFA1 WHERE
                                       LIFNR = I_LFA1-LIFNR.
      FREE I_LFA1.
      LOOP AT ITAB.
        READ TABLE I_VENDOR WITH KEY LIFNR = ITAB-LIFNR .
        IF SY-SUBRC EQ 0.
          ITAB-NAME1_VENDOR = I_VENDOR-NAME1.
          MODIFY ITAB  TRANSPORTING NAME1_VENDOR.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB.
        IF NOT  ITAB-LIFNR IN S_VENDOR.
          DELETE ITAB.
        ENDIF.
      ENDLOOP.
      SELECT BUKRS  BELNR GJAHR BUZEI BUZID SHKZG EBELN EBELP ERFMG WRBTR
       MATNR HKONT SGTXT " ERFMG for MENGE,HKONT,SGTXT Added by KrishnaMohan
             INTO TABLE ITAB_FINAL
            FROM BSEG FOR ALL ENTRIES IN ITAB
            WHERE BUKRS = T_BUKRS AND                           "'1000' AND
                  BELNR = ITAB-BELNR AND
    *added by srinivas
                 hkont in zgl and
    *end
                  GJAHR = T_GJAHR AND
    *- Start of change by Raj on 030905
                 buzid IN ('W', 'M', 'K', 'S', 'F' , 'P' ) AND
                   BUZID IN ('W', 'M', 'K', 'S', 'F' , 'P' , 'T', ' ') AND
                   " ADD T 090206  JAJ
                   KOART <> 'K'   AND    " mod by vik on 21.08.2008" sjaj si
    *- End of change by Raj on 030905
    BUZID = P Added on 21/01/02 by Krishna Mohan
                  GSBER IN P_GSBER AND
                 gsber IN p_gsber OR gsber = ' ' AND
                  MATNR IN S_MATNR.
      SELECT BELNR BLART INTO TABLE ITAB_DOC FROM BKPF
                FOR ALL ENTRIES IN ITAB_FINAL WHERE
                           BUKRS = T_BUKRS AND                  "'1000' AND
                           BELNR  = ITAB_FINAL-BELNR AND
                           GJAHR = T_GJAHR AND
                           BLART NOT IN ('WA' , 'WE').
      SORT ITAB_DOC BY BELNR BLART.
      LOOP AT ITAB_DOC.
        IF NOT ITAB_DOC-BLART IN S_DOCTYP .
          DELETE ITAB_DOC.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB_FINAL.
        READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_FINAL-BELNR BINARY SEARCH.
        IF SY-SUBRC NE 0.
          DELETE ITAB_FINAL.
        ENDIF.
      ENDLOOP.
      DELETE ITAB_FINAL WHERE BUZID = 'K' AND BUZEI = '1'.
      LOOP AT ITAB_FINAL WHERE SHKZG = 'H'.
        ITAB_FINAL-WRBTR = ITAB_FINAL-WRBTR * ( -1 ).
        MODIFY ITAB_FINAL TRANSPORTING WRBTR.
      ENDLOOP.
      LOOP AT ITAB_FINAL WHERE BUZID = 'M'.
        IF ITAB_FINAL-SGTXT NE ' '.
          TRANSLATE ITAB_FINAL-SGTXT TO UPPER CASE.
          MODIFY ITAB_FINAL.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB_FINAL .
        IF ITAB_FINAL-BUZID = 'W'.
          CLEAR V_MATNR.
          V_EBELN = ITAB_FINAL-EBELN.
          V_MATNR = ITAB_FINAL-MATNR.
          ITAB_PO_ITEM-BELNR = ITAB_FINAL-BELNR.
          ITAB_PO_ITEM-BUZID = ITAB_FINAL-BUZID.
          ITAB_PO_ITEM-MATNR = ITAB_FINAL-MATNR.
          ITAB_PO_ITEM-EBELN = ITAB_FINAL-EBELN.
          ITAB_PO_ITEM-EBELP = ITAB_FINAL-EBELP.
          ITAB_PO_ITEM-MENGE = ITAB_FINAL-MENGE.
          ITAB_PO_ITEM-WRBTR = ITAB_FINAL-WRBTR.
          COLLECT ITAB_PO_ITEM.
          CLEAR ITAB_PO_ITEM.
        ELSEIF ITAB_FINAL-BUZID = 'M' OR ITAB_FINAL-BUZID = 'K' OR
                                          ITAB_FINAL-BUZID = 'S' OR
            ITAB_FINAL-BUZID = 'P' OR      " ADDED ON 21/01/02
    *- Start of change by Raj on 030905
            ITAB_FINAL-BUZID = ' ' OR
             ITAB_FINAL-BUZID = 'T' OR   " ADD BY JAJ ON 090206
    *- End of change by Raj on 030905
                                          ITAB_FINAL-BUZID = 'F'.
          IF ITAB_FINAL-MATNR IS INITIAL.
            ITAB_FINAL-MATNR = V_MATNR.
          ENDIF.
        CLEAR V_MATNR.
          ITAB_PO_OTHERS-BELNR = ITAB_FINAL-BELNR.
         ITAB_PO_OTHERS-MATNR = ITAB_FINAL-MATNR.
         ITAB_PO_OTHERS-EBELN = ITAB_FINAL-EBELN.
         ITAB_PO_OTHERS-EBELP = ITAB_FINAL-EBELP.
         ITAB_PO_OTHERS-MENGE = ITAB_FINAL-MENGE.
          ITAB_PO_OTHERS-WRBTR = ITAB_FINAL-WRBTR.
    IF CONDITION,ADDED ON 21/01/02 FOR GETTING EXCISE WHEN CONDITION MEETS
    ie TOTAL AMOUNT = EXCISE WHEN BUZID = S AND HKONT = 27500
    *IF itab_final-buzid = 'S' AND ( itab_final-hkont = '0000027500' OR  "
    *COMM BY JAJ ON 090206
          IF ITAB_FINAL-BUZID = 'S' OR ITAB_FINAL-BUZID = 'T' AND (
          ITAB_FINAL-HKONT = '0000027500' OR
                                        ITAB_FINAL-HKONT = '0000027515'
            OR  ITAB_FINAL-HKONT = '0000027550'       " jaj on 090206
           OR  ITAB_FINAL-HKONT = '0000027507' OR
            ITAB_FINAL-HKONT = '0000027508').  "Added on 050905 - Raj
            ITAB_FINAL-EBELN = V_EBELN.
    to get ebeln value into header so that when there are 2 po's
    and 2 W's excise can go into only one po which is v_ebeln
    Start of insert by B.Elan on 10/02/2006
            READ TABLE ITAB_PO_ITEM WITH KEY BELNR = ITAB_FINAL-BELNR
                                             EBELN = ITAB_FINAL-EBELN
                                             MATNR = ITAB_FINAL-MATNR.
            ITAB_PO_ITEM-EXCISE = ITAB_PO_ITEM-EXCISE + ITAB_FINAL-WRBTR.
    End of insert by B.Elan on 10/02/2006
    Start of delete by B.Elan on 10/02/2006
          itab_po_item-excise = itab_final-wrbtr.
    End of delete by B.Elan on 10/02/2006
            MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
                  WHERE BELNR EQ ITAB_FINAL-BELNR AND
                        EBELN EQ ITAB_FINAL-EBELN.
            CLEAR ITAB_PO_ITEM.
          ELSE.
            COLLECT ITAB_PO_OTHERS.
          ENDIF.
          CLEAR ITAB_PO_OTHERS.
        ENDIF.
      ENDLOOP.
    sateesh
      SORT ITAB_PO_ITEM BY BELNR EBELN.
      LOOP AT ITAB_PO_ITEM.
       AT NEW BELNR.
        AT NEW EBELN.
          READ TABLE ITAB_PO_ITEM INDEX SY-TABIX.
          ITAB_PO_ITEM-FLAG = 'X'.
          MODIFY ITAB_PO_ITEM INDEX SY-TABIX.
        ENDAT.
       ENDAT.
      ENDLOOP.
      LOOP AT ITAB_PO_ITEM.
        ITAB_PO_ITEM-EXCISE = 0.
        MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
         WHERE EXCISE > 0
           AND FLAG = SPACE.
      ENDLOOP.
    end
      LOOP AT ITAB_PO_ITEM.
        ITAB_PO-EBELN = ITAB_PO_ITEM-EBELN.
        ITAB_PO-EBELP = ITAB_PO_ITEM-EBELP.
        APPEND ITAB_PO.
        CLEAR ITAB_PO.
      ENDLOOP.
      LOOP AT ITAB_PO_OTHERS.
        ITAB_PO-EBELN = ITAB_PO_OTHERS-EBELN.
        ITAB_PO-EBELP = ITAB_PO_OTHERS-EBELP.
        APPEND ITAB_PO.
        CLEAR ITAB_PO.
      ENDLOOP.
      SORT ITAB_PO.
      DELETE ADJACENT DUPLICATES FROM  ITAB_PO COMPARING ALL FIELDS.
      SELECT EKPO~EBELN
             EBELP
             MENGE
             BRTWR
             KZWI5
             EKKO~KNUMV
             EKPO~MATNR
             EKPO~TXZ01
             INTO TABLE ITAB_RATE_MODVAT
             FROM EKPO INNER JOIN EKKO
                 ON EKPO~EBELN = EKKO~EBELN
        FOR ALL ENTRIES IN ITAB_PO WHERE
                        EKPO~EBELN = ITAB_PO-EBELN AND
                        EBELP = ITAB_PO-EBELP.
      SELECT KNUMV KPOSN STUNR ZAEHK KSCHL KWERT
        INTO TABLE ITAB_KONV
        FROM KONV
        FOR ALL ENTRIES IN ITAB_RATE_MODVAT
            WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND
      KSCHL IN ('YT02', 'YF07', 'YOTH', 'YPF1', 'YD01', 'YD02', 'YD03' ) .
      SORT ITAB_KONV BY KNUMV KSCHL.
      SORT ITAB BY BELNR.
      SORT ITAB_RATE_MODVAT BY EBELN EBELP.
      SORT ITAB_PO_OTHERS BY BELNR MATNR.
      LOOP AT ITAB_PO_ITEM.
        ITAB_DISPLAY-BELNR = ITAB_PO_ITEM-BELNR.
        READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY
        SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-BLART = ITAB_DOC-BLART.
        ENDIF.
        READ TABLE ITAB WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-XBLNR = ITAB-XBLNR.
          ITAB_PO_ITEM-XBLNR = ITAB-XBLNR.
          ITAB_DISPLAY-NAME1_VENDOR = ITAB-NAME1_VENDOR.
          ITAB_DISPLAY-HKONT = ITAB-HKONT.
          ITAB_DISPLAY-MWSKZ = ITAB-MWSKZ.
          ITAB_DISPLAY-BUDAT = ITAB-BUDAT.
          ITAB_DISPLAY-DUE_DATE   = ITAB-DUE_DATE.
         ITAB_DISPLAY-PON    =  ITAB_PO_ITEM-EBELN.
        ENDIF.
        ITAB_DISPLAY-QTY  =    ITAB_PO_ITEM-MENGE.
        READ TABLE ITAB_RATE_MODVAT WITH KEY EBELN = ITAB_PO_ITEM-EBELN
                                             EBELP = ITAB_PO_ITEM-EBELP
                                             BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-PON    =  ITAB_PO_ITEM-EBELN.
          ITAB_DISPLAY-MATNR = ITAB_RATE_MODVAT-MATNR.
          ITAB_DISPLAY-MAKTX  =  ITAB_RATE_MODVAT-TXZ01.
          ITAB_DISPLAY-RATE = ITAB_RATE_MODVAT-BRTWR /
          ITAB_RATE_MODVAT-MENGE.
          ITAB_DISPLAY-PROD-AMT = ITAB_DISPLAY-RATE * ITAB_PO_ITEM-MENGE.
          IF ITAB_PO_ITEM-EXCISE NE 0.
            ITAB_DISPLAY-EXCISE = ITAB_PO_ITEM-EXCISE.
        ELSE.
    *ITAB_DISPLAY-EXCISE = ( ITAB_PO_ITEM-MENGE * ITAB_RATE_MODVAT-KZWI5 ) /
                                      ITAB_RATE_MODVAT-MENGE.
    *commentedon 210102 to get excise directly from BSEG - IV
          ENDIF.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YT02' .
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-SALES  = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                 ITAB_RATE_MODVAT-MENGE.
          READ TABLE ITAB_FINAL WITH KEY BELNR = ITAB_PO_ITEM-BELNR
                                         BUZID = 'M'
                                        SGTXT(9) = 'SALES TAX'.
          IF SY-SUBRC EQ 0.
          IF ITAB_FINAL-SGTXT(9) EQ 'SALES TAX'
             OR ITAB_FINAL-SGTXT(9) EQ 'sales tax'.
            ITAB_DISPLAY-SALES = ITAB_DISPLAY-SALES + ITAB_FINAL-WRBTR.
          ENDIF.
          ENDIF.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YF07'.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-FREIGHT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                  ITAB_RATE_MODVAT-MENGE.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YD01' .
        IF SY-SUBRC EQ 0.
         ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                              ITAB_RATE_MODVAT-MENGE.
        ELSE.
          READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                        KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YD02' .
          IF SY-SUBRC EQ 0.
           ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT )
    ITAB_RATE_MODVAT-MENGE.
          ELSE.
            READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                          KPOSN = ITAB_RATE_MODVAT-EBELP
                                          KSCHL = 'YD03' .
            IF SY-SUBRC EQ 0.
             ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT
    ITAB_RATE_MODVAT-MENGE.
            ENDIF.
          ENDIF.
        ENDIF.
        LOOP AT ITAB_KONV WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND KPOSN =
                                 ITAB_RATE_MODVAT-EBELP AND
                       (  KSCHL = 'YPF1' OR KSCHL = 'YOTH' ) .
          ITAB_KONV-KWERT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                   ITAB_RATE_MODVAT-MENGE.
          ITAB_DISPLAY-OTHERS = ITAB_DISPLAY-OTHERS + ITAB_KONV-KWERT.
        ENDLOOP.
        READ TABLE ITAB_PO_OTHERS WITH KEY BELNR = ITAB_PO_ITEM-BELNR.
                                          EBELN = ITAB_PO_ITEM-EBELN.
                                          BINARY SEARCH.
    sateesh as on 10092003
        IF SY-SUBRC NE 0. CLEAR ITAB_PO_OTHERS. ENDIF.
    end
        IF NOT ITAB_PO_OTHERS-EBELN IS INITIAL.
          READ TABLE ITAB_PO_OTHERS WITH KEY EBELN = ITAB_PO_ITEM-EBELN
                                             EB

  • How to use the separate symbol in the text field in the adobe form.

    Hi,experts,
    I don’t know how to use the separate symbol to make a paragraph separate into several lines correctly in the text field in the adobe form.
    Action:
    1. config the ADS successfully.
    2. create the adobe form with a mult-line textfield(binding the 'remark' context in the interface of the form) using sfp.
    3. create a WDA for invoke the form and transfer the 'remark' context data.
    I use the following codes to display the paragraph in the PDF document:
    CONCATENATE
    '1&#12289;aaaaaaaaaaa&#65307;'
    '2&#12289;bbbbbbbbb '
    '3&#12289;ccccccccccc'
    '4&#12289;ddddddddd'
    INTO remark .
    lo_nd_z_hr_php_payslip->set_attribute(
    EXPORTING
    name = `REMARK`
    value = remark ).
    But I found all the content aren't paragraph separate correctly in the text field in the adobe form when I run the WDA.
    Could you please give me some hints to make the paragraph separate correctly in PDF document? Thanks a lot in advance!
    My email is : [email protected]
    Best regards,
    Tao
    Edited by: wang tao on Apr 8, 2008 1:58 AM

    Hi,
    If it is just a one word value then you could use this in the exist event;
    this.rawValue    
    = util.printx(">?<*",this.rawValue);
    This changes the first character (represented by the ?) to uppercase (represented by the >) and all trailing characters (represented by the *) to lowercase (represented by the <).
    If you wanted something more general ... if they could also enter a middle name then you could call a function like;
    function        toTitleCase(textValue)
      return  textValue.toLowerCase().replace(/\b[a-z]/g, function replacer(match) { return match.toUpperCase(); });
    This uses a regex to change all lowercase letters following a word boundary to uppercase.
    Bruce

  • How to add the double headings in Alv Report.

    Hi All,
    Plz suggest me how to add the double headings in ALv Report.
    Ram

    Hi,
    Try out this program....
    REPORT  ypm_historycard_rep.
    TYPE-POOLS : slis.
    DATA : it_cbm TYPE STANDARD TABLE OF mara.
    DATA : it_layout TYPE STANDARD TABLE OF slis_layout_alv WITH HEADER LINE,
           wa_fcat TYPE slis_fieldcat_alv,
           it_fcat TYPE slis_t_fieldcat_alv.
    START-OF-SELECTION.
      SELECT  *
      FROM  mara
      INTO CORRESPONDING FIELDS OF TABLE  it_cbm
      where matnr = 'D80K7'.
    END-OF-SELECTION.
      it_layout-zebra = 'X'.
      it_layout-colwidth_optimize = 'X'.
      it_layout-f2code = '&ETA'.
      APPEND it_layout.
      DEFINE macro4fcat.
        wa_fcat-col_pos = &1.
        wa_fcat-fieldname = &2.
        wa_fcat-tabname = &3.
        wa_fcat-seltext_l = &4.
        append wa_fcat to it_fcat.
        clear wa_fcat.
      END-OF-DEFINITION.
      macro4fcat    '1'  'MATNR'         'IT_CBM'   'MATERIAL NO'    .
      DESCRIBE TABLE it_cbm.
      IF sy-ucomm = '&F03'.
        MESSAGE 'hi hello good morning "press enter button" this is quiz' TYPE 'S'.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      i_callback_program                = sy-repid
    i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'
      is_layout                         = it_layout
      it_fieldcat                       = it_fcat
       i_save                            = 'A'
      TABLES
      t_outtab                          = it_cbm
      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  html_top_of_page
    *       text
    *      -->TOP        text
    FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
      DATA: l_text(255) TYPE c.
      DATA: text1(255)  TYPE c.
      DATA: t_header TYPE REF TO cl_dd_table_element ,
            wa_header TYPE REF TO cl_dd_table_area.
      CALL METHOD top->add_gap
        EXPORTING
          width = 10.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'hello'
        sap_style     = 'HEADING'
    CALL METHOD top->add_gap
        EXPORTING
          width = 20.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'HOW ARE YOU'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 50.
      CALL METHOD top->add_text
      EXPORTING
        text          = '____________________________________________________________'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 90.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'YOU CAN TRY LIKE THIS'
        sap_style     = 'HEADING'.
    ENDFORM.                    "html_top_of_page
    Regards
    Debarshi

  • How to get the total pages in ALV report?

    Hi guys,
    Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.

    automatic display total page.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    r

Maybe you are looking for