Customizing a single crosstable in DS 1.4

In my Design Studio Application I have 2 crosstables. Is there a way to customize a single table without effecting the other? Everything I read is saying to insert a .CSS file at the Application Property level. However this changes them all. For example I would like to hide headers of a single table. I am using the below CSS File. Works at App level but I need to apply to a single table. Is there any way for this?

Hi Victor. Thanks for the help. I have added the ".myClass" as per your example you gave using Tammy's script. I am still unable to get it to actually work. In the screenshot below you will see my repository location, the custom.css being used, and my input on the CSS Class for the CROSSTAB_1. Hopefully you notice something that I need to tweak.

Similar Messages

  • Role prefix for XI custom composite/single roles

    We have XI custom composite roles which start with TI_XI_* and contain single SAP roles (SAP_) and single custom roles (AAW:). Are we forced to use a certain XI role naming standard at the composite and single role levels due to Java authorizations?
    Thanks,
    Brad

    Just transport it rather than upload it.  The generated profiles will be carried through with their existing convention.
    If you need to have different profile names due to the naming constraints then LSMW or SECATT will let you do this easily.  If you are not familiar with the tools then 1. Take time to learn one of them (they are very useful) or 2. Do it manually.  60 profiles can be named in 30 minutes or less if you already have created the profile names in a spreadsheet, text file etc.

  • Role prefix for custom composite/single roles

    We have custom composite roles which start with TI_XI_* and contain single SAP roles (SAP_) and single custom roles (AAW:). Are we forced to use a certain role naming standard at the composite and single role levels due to Java authorizations?
    Thanks,
    Brad

    Just transport it rather than upload it.  The generated profiles will be carried through with their existing convention.
    If you need to have different profile names due to the naming constraints then LSMW or SECATT will let you do this easily.  If you are not familiar with the tools then 1. Take time to learn one of them (they are very useful) or 2. Do it manually.  60 profiles can be named in 30 minutes or less if you already have created the profile names in a spreadsheet, text file etc.

  • Multiple order of a one customer.Require single Delivery and single invoice

    Dear Gurus,
    I have a customer say 10005000 (xyz)
    i have now n no. of orders from this particular customer of different material and diff. quantities.
    e.g. Order no. 1000 have mat. A Qty.50, mat.B Qty.100, mat.C Qty.200  (Date: 01/09/10)
    Similarly Order no. 1001 have D Qty.10, mat.E Qty.40, mat.A Qty.60      (Date: 03/09/10)
    and so on
    Now I want to create Single Delivery No. for 10005000 instead of individual deliveries.
    how can i????
    Or if i have multiple deliveries of a single customer and i want single Invoice no. against all deliveries.
    Please suggest.
    Harry

    Now I want to create Single Delivery No. for 10005000 instead
       of individual deliveries.  how can i????
    Or if i have multiple deliveries of a single customer and i want
         single Invoice no. against all deliveries.
    For both these questions, many times, it has been answered in this forum.  Please put some efforts to search the forum.
    thanks
    G. Lakshmipathi

  • Error in the ABAP Code for Customer Exit Variable

    Could you please update me what is the wrong with the below ABAP Code developed for Customer Exit Variable in BW
    i created a Variable (ZVWKNO) of Customer Exit,Single Value ,Mandatory and Variable is ready for input
    In CMOD i had written the below Code:
    When 'ZVWKNO'.
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    But when i execute the query the default value is not populated with Week-1 No in the variable screen
    Please update me what went wrong
    Thanks

    Case ZVWKNO.                "write this with out comments
    When '1'.              "write the value that needs to equal with value in varaible ZVWKNO after when in sungle quotes
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.                                    "check this Week Minimum is '01' and Maximum '52'
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    Prabhudas

  • How To create custom login and create user pages

    Where can I find documentation that discusses how I can create a custom login page and create new user page?
    Also, I cannot find how to get away from the default login page.
    I am using 9iAS/Portal R2.
    Bill G...

    Well - I did find some docs;
    Chapter 8 of the Oracle9 iAS Single Sign-On.pdf file titled "Customizing the Single Sign-On Interface" has some good info but I'm wondering about the "create new user part".
    Bill G...

  • How is the address selected in the Customer Account Statement (F.27)?

    Hi expert,
    The customer account statement (transaction F.27) uses the address which is in the customer master data.
    This is the customer master data on the company code level (Street, postal code, city).
    Is it possible to select the PO address (PO box , postal code, city) in the account statepment?
    This data is also available on the company code level.
    Thank you for your feedback.
    Kind regards,
    Linda

    Hi,
    Customer Account Statement uses the below program :
    SAP13: Customer statement (single statement)
    Copy the same and change accorndingly.
    Your requirement can be done with the ABAP changes
    VVR

  • Single SignOn in webdynpro ABAP

    Hi,
    I am pretty new in Netweaver Portal side and recently got an requirement from a customer for single Sign on:
    Requirement -
    We already had a SSO set up with MS Windows with SAP Portal. Hence in order to open SAP Portal, user has to use his Window's credential (Usually Company's own network credentials) instead of SAP credentials.
    Now customer also has another legacy portal where  client has similar SSO set up.
    Recently we had implemented SAP Learner Portal (SAP LSO Solution) and now user should directed to legacy portal only when he/she clicks a button in SAP portal's application (Webdynpro ABAP).
    Therefore, we need to implement same SSO inside Webdynpro Action. Please suggest me what should be our approach of doing so.
    Will APIs like IF_WD_PORTAL_MANAGER be handy ?

    Enable SSO between the portal and the AS ABAP system hosting the WDA. Using SAP Logon Tickets is the simplest way. Then access the WDA through the portal. That way you will have SSO since portal already has SSO using Windows Credentials. Another option is to enable SSO in the AS ABAP system hosting the WDA. Your options include at least SPNEGO for ABAP (part of the NWSSO suite), X.509 certificates and SAML.

  • Consolidation of Customers in single business partner in FSCM

    Hi FSCM Experts,
    We have a scenario where ECC box and FSCM box are different. Over and above there are multiple ECC boxes linked to single FSCM box.
    We are implementing Credit/Collection/Dispute Management in FSCM box.
    Has someone worked in distributed landscape for BP creation based on Customers in Separate ECC box? Please share the steps and watchpoints, common issues which are faced.
    Also in collection Management while synchronizing master data we have two queries:
    1. Is there a way to consolidate the two different customers (without head/branch office relationhip) as single business partner in collection worklist.?
    2. How do we avoid potential number range clash from multiple ECC boxes?
    How does FI-AR data flow to Collection management work in distributed landscape ?
    Thanks for response in advance
    Alok

    Hi Alok,
    Regarding Customer-BP synchronization (in different boxes) I don't have much idea. In one it can be done easily though. Please let us know if you find anything.
    Coming to your other issue.
    1) You can consolidate 2 customer in single BP by modifying the corresponding BADI by taking ABAP help but in worklist you wont be able to see data (Open-line items) from both the customers, will show data of only 1 customer. So in a way it will solve your problem.
    Let us know if it helped.
    Cheers !
    Aditiya

  • Miss matach of hours in customized report

    hi friends
    hours that are captured via time sheet in sap does not match with one of our customized report ( single P and L Report ).im not sure where things are going wrong,can any one give me any inputs on this,how to rectify and where to do the neccessary changes ? pls this is of high urgency.needed points will be rewarded</b>.

    Hi,
    As you have indicated it is a Customized report, you need to take help of ABAP Consultant and debug the program. Check what values are populated in Tables and what is getting populated in the report. The values in tables are considered as correct, hence the logic of the report needs to be looked into.
    Thanks
    Murali.

  • Mass Changes to Customer Master partner functions

    Hi Gurus,
    I would like to change PE (Sales employee) MASS please guide me.
    Thanks

    Hi,
    Goto the T.Code "XD99".Or Goto the T.Code "MASS".Here(In MASS T.Code),select teh Object Type as "KNA1".
    Click on Tables.
    Select "Customer Master Partner Functions(KNVP)".
    Click on Execute.
    Enter the range of Customer Numbers/single values in the multiple values.
    Select the Partner Function as "PE".
    Execute.
    Click on Select Fields(First Icon under Customer master partner functions).
    Select "Customer(KNVP-KUNNR)" and click on Choose.
    Enter.
    Enter the value for the field "New Values" and ensure that all rows are selected.
    Click on the icon "Carry out a mass Change"(sixth icon).
    Save.
    Regards,
    Krishna.

  • Custom Logout Page based on PL/SQL

    Hi
    I need to write a custom logout page using PL/SQL Procedure.I have created a procedure as :
    create or replace PROCEDURE my_logout
    p_done_url in varchar2 default null,
    p_paname in wwsec_api.array default wwsec_api.empty,
    p_palogout in wwsec_api.array default wwsec_api.empty
    is
    begin
    end;
    I granted execute permission on this procedure to public.
    I made the changes in WWSSO_LS_CONFIGURATION_INFO$ table and set login_url as 'UNUSED UNUSED http://host:port/pls/orasso/orasso.my_logout'
    But on logout I keep getting the 404 'not found' error.
    Please let me know if my declaration of the procedure is correct?
    Thanks,
    Shipra

    Pls take a look at Chapter 8-'Customizing the Single Sign-On Interface' of 'Oracle9iAS Single Sign-On Administrator's Guide Release 2 (9.0.2)' for installing customized logout page.
    Hope it helps!!!
    PS:
    The LOGIN_URL column contains three values separated by a space. The first value specifies the URL for the Login page, the second the URL for the Change Password page, and the third the value for the Single Sign-Off page.
    By default, the LOGIN_URL column contains the values UNUSED UNUSED UNUSED, which specify that the Login, Change Password, and Single Sign-Off pages use the standard Single Sign-On pages.
    ...]

  • How to calculate different tax rates for  same material in single invoice.

    Dear All,
    If the excise rates are changed during the budget and the stock is lying with the client with the existing rate.
    After effective date of new rates we receive the good with new rates.The new and the old rate stock is sent to a customer in single invoice.How can we configure such case. The excise should calculate by old rate to old stock and new stock should be calculated by new rate.
    Please guide in such case.
    Thanks in advance.
    deepti

    Hi Deepti
    In copy control you will have to redeterfine taxes whilst billing.
    If you want you change this and keep it as copy pricing. This won't change anything. Else use Copy prices and redetermine tax. You can find this setting in VTLA and VTFA in item category Pricing type.
    You can't have both of then in the same invoice as procedure is decided for the whole invoice and not a single Item. You can rather have two different item category type. TAN and ZTAN you redetermine taxes for tan and copy them as it is for ZTAN.
    Regards

  • Problem by  Sending an Email with attached Adobe Interactive Form (Code)

    Thanks. I have written Programm, but it does not work as i want it to do. I will send an Email with attached Adobe Interactive Firm to [email protected]. I tried it with "*lo_recipient = cl_sapuser_bcs=>create( sy-uname )" at the marked(bold, fat) position. It worked but the Email was send to my SAP-Account, but i want to send to [email protected], so I tried this (see at code in bold, fat):
    lo_rec TYPE adr6-smtp_addr VALUE '[email protected]'. " Empfänger Receiver
    lo_recipient = cl_cam_address_bcs=>create_internet_address( lo_rec ).
    But it doens`t send the email.
    Can anybody help me please???
    Kevin
    Here my Code:
    Report FP_EXAMPLE_01
    Printing of documents using PDF based forms
    REPORT z_example_02.
    Data declaration
    DATA: carr_id TYPE sbook-carrid,
    customer TYPE scustom,
    bookings TYPE ty_bookings,
    connections TYPE ty_connections,
    fm_name TYPE rs38l_fnam,
    fp_docparams TYPE sfpdocparams,
    fp_outputparams TYPE sfpoutputparams,
    error_string TYPE string,
    l_booking TYPE sbook,
    t_sums TYPE TABLE OF sbook,
    l_sums LIKE LINE OF t_sums,
    fp_formoutput TYPE fpformoutput.
    PARAMETER: p_custid TYPE scustom-id DEFAULT 38.
    SELECT-OPTIONS: s_carrid FOR carr_id DEFAULT 'AA' TO 'ZZ'.
    PARAMETER: p_form TYPE tdsfname DEFAULT 'FP_EXAMPLE_01'.
    PARAMETER: language TYPE sfpdocparams-langu DEFAULT 'E'.
    PARAMETER: country TYPE sfpdocparams-country DEFAULT 'US'.
    Get data from the following tables: scustom(Flight customer)
    sbook (Single flight reservation)
    spfli (Flight plan)
    SELECT SINGLE * FROM scustom INTO customer WHERE id = p_custid.
    CHECK sy-subrc = 0.
    SELECT * FROM sbook INTO TABLE bookings
    WHERE customid = p_custid
    AND carrid IN s_carrid
    ORDER BY PRIMARY KEY.
    SELECT * FROM spfli INTO TABLE connections
    FOR ALL ENTRIES IN bookings
    WHERE carrid = bookings-carrid
    AND connid = bookings-connid
    ORDER BY PRIMARY KEY.
    Print data:
    First get name of the generated function module
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
    EXPORTING
    i_name = p_form
    IMPORTING
    e_funcname = fm_name.
    IF sy-subrc <> 0.
    MESSAGE e001(fp_example).
    ENDIF.
    Set output parameters and open spool job
    fp_outputparams-nodialog = 'X'. " suppress printer dialog popup
    fp_outputparams-getpdf = 'X'. " launch print preview
    CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
    ie_outputparams = fp_outputparams
    EXCEPTIONS
    cancel = 1
    usage_error = 2
    system_error = 3
    internal_error = 4
    OTHERS = 5.
    Set form language and country (->form locale)
    fp_docparams-langu = language.
    fp_docparams-country = country.
    *fp_docparams-fillable = 'X'.
    *fp_docparams-langu = 'E'. "wird jetzt automatisch gesetzt, bzw. kann dynamisch verändert werden
    *fp_docparams-country = 'GB'. "wird jetzt automatisch gesetzt, bzw. kann dynamisch verändert werden
    currency key dependant summing
    LOOP AT bookings INTO l_booking.
    l_sums-forcuram = l_booking-forcuram.
    l_sums-forcurkey = l_booking-forcurkey.
    COLLECT l_sums INTO t_sums.
    ENDLOOP.
    Now call the generated function module
    CALL FUNCTION fm_name
    EXPORTING
    /1bcdwb/docparams = fp_docparams
    customer = customer
    bookings = bookings
    connections = connections
    t_sums = t_sums
    IMPORTING
    /1bcdwb/formoutput = fp_formoutput
    EXCEPTIONS
    usage_error = 1
    system_error = 2
    internal_error = 3
    OTHERS = 4.
    IF sy-subrc <> 0.
    CALL FUNCTION 'FP_GET_LAST_ADS_ERRSTR'
    IMPORTING
    e_adserrstr = error_string.
    IF NOT error_string IS INITIAL.
    we received a detailed error description
    WRITE:/ error_string.
    EXIT.
    ELSE.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDIF.
    Close spool job
    CALL FUNCTION 'FP_JOB_CLOSE'
    EXCEPTIONS
    usage_error = 1
    system_error = 2
    internal_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.
    *********************Send the form*******************
    *********************to the Customer*****************
    *********************via Email***********************
    *IF i_down = abap_true.
    DATA: filename TYPE string,
    path TYPE string,
    fullpath TYPE string,
    default_extension TYPE string VALUE 'PDF'.
    Data:
    lt_att_content_hex TYPE solix_tab.
    *DATA: data_tab TYPE TABLE OF x255.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = fp_formoutput-pdf
    TABLES
    binary_tab = lt_att_content_hex.
    CLASS cl_bcs DEFINITION LOAD.
    DATA:
    lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
    lo_send_request = cl_bcs=>create_persistent( ).
    DATA:
    lt_message_body TYPE bcsy_text VALUE IS INITIAL.
    DATA: lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
    APPEND 'Dear Vendor,' TO lt_message_body.
    APPEND ' ' TO lt_message_body.
    APPEND 'Please fill the attached form and send it back to us.'
    TO lt_message_body.
    APPEND ' ' TO lt_message_body.
    APPEND 'Thank You,' TO lt_message_body.
    lo_document = cl_document_bcs=>create_document(
    i_type = 'RAW'
    i_text = lt_message_body
    i_subject = 'Vendor Payment Form' ).
    DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
    TRY.
    lo_document->add_attachment(
    EXPORTING
    i_attachment_type = 'PDF'
    i_attachment_subject = 'Vendor Payment Form'
    i_att_content_hex = lt_att_content_hex ).
    CATCH cx_document_bcs INTO lx_document_bcs.
    ENDTRY.
    lo_send_request->set_document( lo_document ).
    DATA:
    lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
    lo_send TYPE adr6-smtp_addr VALUE '[email protected]'. "Absender SENDER
    lo_sender = cl_cam_address_bcs=>create_internet_address( lo_send ).
    Set sender
    lo_send_request->set_sender(
    EXPORTING
    i_sender = lo_sender ).
    Create recipient
    DATA:
    lo_recipient type ref to if_recipient_bcs value is initial.
    Data:
    lo_rec TYPE adr6-smtp_addr VALUE '[email protected]'. " Empfänger Receiver
    lo_recipient = cl_cam_address_bcs=>create_internet_address( lo_rec ).
    *lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
    Set recipient
    lo_send_request->add_recipient(
    EXPORTING
    i_recipient = lo_recipient
    i_express = 'X' ).
    *lo_send_request->add_recipient(
    *EXPORTING
    *i_recipient = lo_recipient
    *i_express = 'X' ).
    Send email
    DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
    lo_send_request->send(
    EXPORTING
    i_with_error_screen = 'X'
    RECEIVING
    result = lv_sent_to_all ).
    COMMIT WORK.
    MESSAGE 'The payment form has been emailed to the Vendor' TYPE 'I'.

    Hi Kevin,
    Please try this code to send your mail, i wrote it and works well in many system.
    Take care if in your profile you got an e-mail adress define .
    Take care also of trnasaction SCOT customizing, are you able to send mail to e-mail adress ?
    Let me know if it's works.
    Best regards.
    <i>**----
    CLASS-DEFINITIONS
    DATA: send_request       TYPE REF TO cl_bcs.
    DATA: document           TYPE REF TO cl_document_bcs.
    DATA: sender             TYPE REF TO cl_sapuser_bcs.
    DATA: recipient          TYPE REF TO if_recipient_bcs.
    INTERNAL TABLES
    DATA: l_mailtext TYPE soli_tab.
    DATA: iaddsmtp   TYPE TABLE OF bapiadsmtp.
    DATA: ireturn    TYPE TABLE OF bapiret2.
    VARIABLES
    DATA: mail_line  LIKE LINE OF l_mailtext.
    DATA: bapiadsmtp         TYPE bapiadsmtp.
    DATA: subject    TYPE so_obj_des.
    DATA : att_subject TYPE so_obj_des.
    DATA : w_except TYPE REF TO cx_root .
    CONSTANTS : c_defmail TYPE ad_smtpadr VALUE
                     '[email protected]' .
    FIELD-SYMBOLS : <smtp> TYPE bapiadsmtp.
    *Convert the pdf given by function module into Binary .
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer     = output-pdf "PDF file from function module
      TABLES
        binary_tab = hexa.
    *Set subject of the mail
    subject = 'Exemple de PDF interactif'.
    Set text of the mail
    mail_line = 'Merci de remplir le formulaire et nous le retourner'.
    APPEND mail_line TO l_mailtext .
    Set the name of the attached document
    att_subject = 'Template du PDF'.
    TRY.
    Create persistent send request
        send_request = cl_bcs=>create_persistent( ).
    Get sender object
        sender = cl_sapuser_bcs=>create( sy-uname ).
    Add sender
        CALL METHOD send_request->set_sender
          EXPORTING
            i_sender = sender.
    Read the E-Mail address for the user
        CALL FUNCTION 'BAPI_USER_GET_DETAIL'
          EXPORTING
            username = sy-uname
          TABLES
            return   = ireturn
            addsmtp  = iaddsmtp.
        LOOP AT iaddsmtp ASSIGNING <smtp> WHERE std_no = 'X'.
          CLEAR bapiadsmtp.
          MOVE <smtp> TO bapiadsmtp.
        ENDLOOP.
        CASE bapiadsmtp-e_mail.
          WHEN space.
    No adress main for user, so send it to the default mail adress
            recipient =
         cl_cam_address_bcs=>create_internet_address( c_defmail ).
          WHEN OTHERS.
            recipient =
         cl_cam_address_bcs=>create_internet_address( bapiadsmtp-e_mail ).
        ENDCASE.
    Add recipient with its respective attributes to send request
        CALL METHOD send_request->add_recipient
          EXPORTING
            i_recipient  = recipient
            i_express    = 'X'
            i_copy       = space
            i_blind_copy = space
            i_no_forward = space.
    Set that you don't need a Return Status E-mail
        CALL METHOD send_request->set_status_attributes
          EXPORTING
            i_requested_status = 'E'
            i_status_mail      = 'E'.
    set send immediately flag
        send_request->set_send_immediately( 'X' ).
    *Build Document
        document = cl_document_bcs=>create_document(
                            i_type    = 'RAW'
                            i_text    = l_mailtext
                            i_subject = subject ).
        add attachment to document
        CALL METHOD document->add_attachment
          EXPORTING
            i_attachment_type    = 'PDF'
            i_attachment_subject = att_subject
            i_att_content_hex    = hexa.
    Add document to send request
        CALL METHOD send_request->set_document( document ).
    Send document
        CALL METHOD send_request->send( ).
        COMMIT WORK.
      CATCH cx_send_req_bcs INTO w_except.
      CATCH cx_address_bcs INTO w_except.
      CATCH cx_document_bcs INTO w_except.
    ENDTRY.</i>

  • Change of count on the header on filtering the ALV

    Hi Gurus!
    I have this ALV report which gives the sales order report, in the output right on the top the report shows the count of all the distinct sales order displayed when the report is run based ona  selection criteria. Is it possible to show the total count of teh sales order in the report to change and show teh number of distinct sales doc when we use filter on teh report. Suppose if we run the report based on a particular selection criteria and it gives a count of 30 . In the output if we put filter on a particular column and the report shows fewer lines , which will reduce the number of sales doc, is it possible to show this number which for eg will be say 20 , is it possible to show the number 20 after filetr on ALV instead of that 30 remainiung constant. I am wanting the report to show the change in count of distinct sales doc when I put filter on any columnh.
    report  zsales_orders message-id zsd no standard page heading.
    * For ALV usage
    type-pools: slis.
    data: gs_layout   type slis_layout_alv,
          ta_events   type slis_t_event_exit,
          tp_event    type slis_event_exit,
          tp_print    type slis_print_alv,
          gt_sort     type slis_t_sortinfo_alv,
          gt_events   type slis_t_event,
          t_fieldcat  type slis_t_fieldcat_alv with header line,
          repid       type syrepid,               " ABAP Program.
          gt_list_top_of_page type slis_t_listheader,     " Top of page text.
          gs_list_top_of_page type slis_listheader,
          alv_variant   type disvariant.           " Customize Disp. Variant
    data: w_field    type slis_fieldcat_alv.
    data: count type i.
    data: count1 type i.
    tables: vbak, vbap, vbpa, knvv.
    * Definition of selection screen                                       *
    *   By plant, storage location, sold-to customers, material and        *
    *   posting date of the sales orders                                   *
    selection-screen begin of block one with frame title text-001.
    parameters:     p_vkorg  type vkorg obligatory memory id vko,"DEVK906677
                    p_vtweg  type vtweg obligatory default '01',
                    p_spart  type spart obligatory default '01'.
    select-options: s_vkbur  for  vbak-vkbur,      " Sales Office     "DEVK906677
                    s_kunnr  for  vbak-kunnr.      " Sold-to customer number.
    select-options: s_shipto for  vbap-oid_ship,   " Ship-to customer number.
                    s_billto for  vbpa-kunnr,      " bill-to from S.O. header.
                    s_load   for  vbpa-kunnr,      " Load confirmation contact.
                    s_truck  for  vbap-oid_extbol. " Trucking ticket number.
    select-options: s_werks for vbap-werks obligatory no intervals. " Plant.
    select-options: s_lgort for vbap-lgort.        " Storage location.
    select-options: s_matnr for vbap-matnr.        " Material number.
    select-options: s_konda for knvv-konda.        " price group
    selection-screen skip 1.
    select-options: s_vdatu for vbak-vdatu default sy-datum.
    selection-screen end of block one.
    * ALV display layout
    selection-screen begin of block layout with frame title text-003.
    parameters: pa_vari type slis_vari default ' '. " Display variant.
    selection-screen end of block layout.
    selection-screen begin of block two with frame title text-028.
    selection-screen comment: /1(79) text-029.
    selection-screen comment: /1(79) text-030.
    selection-screen comment: /1(79) text-031.
    selection-screen comment: /1(79) text-032.
    selection-screen comment: /1(79) text-033.
    selection-screen comment: /1(79) text-034.
    selection-screen comment: /1(79) text-035.
    selection-screen comment: /1(79) text-036.
    selection-screen end of block two.
    * Data Definitions                                                     *
    * Storing Extracted Info.
    types: begin of t_extract,
             vbeln        type vbeln_va,   " Sales order number.
             augru        type augru,      " order reason
             vdatu        type edatu_vbak, " Requested delivery date.
             kunnr        type kunag,      " Sold-to customer number.
             soldto_name  type name1_gp,   " Sold-to name.
             posnr        type posnr_va,   " Item number.
             matnr        type matnr,      " Material number.
             vrkme        type vrkme,      " Sales UoM.
             mseh3        type mseh3,      " UoM text.
             netwr        type netwr_ap,   " Net value of the order item.
             kwmeng       type p length 13 decimals 1, " Quantity.
             werks        type werks_d,    " Plant.
             lgort        type lgort_d,    " Storage location.
             oid_extbol   type oid_extbol, " External BOL or truck ticker header.
             maktx        type maktx,      " Material description.
             oid_ship     type kunwe,      " Ship-to customer number.
             shipto_name  type name1_gp,   " Ship-to name.
             billto       type kunre,      " Bill-to customer number.
             billto_name  type name1_gp,   " Bill-to name.
             load_contact type kunnr,      " Load confirmation contact.
             load_name    type name1_gp,   " Load confirmation contact name.
             truck        type kunnr,      " Truck company number.
             truck_name   type name1_gp,   " Truck company name.
             bstkd        type bstkd,      " PO number.
             ihrez        type ihrez,      " AFE number per the contract/sales order.
             delivery     type vbeln_vl,   " Delivery number.
             posnr_vl     type posnr_vl,   " Delivery item number.
             bill_vbeln   type vbeln_vf,   " Invoice number.
             bill_posnr   type posnr_vf,   " Invoice item number.
             bill_netwr   type netwr_fp,   " Invoice net value.
             statu        type stats,      " Document status.
             auart        type auart,      " order type
             vkorg        type vkorg,      " sales org.
             vtweg        type vtweg,      " distrbtn channel
             spart        type spart,      " division
             vkbur        like vbak-vkbur, " Sales Office DEVK906677
             konda        type konda,      " price group
             tdline       type tdline,     " text for customer account reference
             count        type i,
           end of t_extract.
    data : it_extract  type table of t_extract with header line,
           it_extract2 type table of t_extract with header line.
    data:  it_text type table of tline with header line.
    data: w_index type sy-index,
          w_tdname type tdobname.
    constants: c_minus1       type netwr_ap value '1.00-'.
    *RANGES: r_auart FOR vbak-auart.
    data: r_auart type range of t_extract-auart,
          r_auart_line like line of r_auart.
    * initialization
    initialization.
      tp_event-ucomm = '&ILT'.  " Filter event.
      tp_event-after = 'X'.
      append tp_event to ta_events.
      gs_layout-colwidth_optimize = 'X'.
      tp_print-no_print_listinfos = 'X'.
      tp_print-no_coverpage = 'X'.
      perform set_fieldcat.
      perform alv_eventtab_build using:
    **    Event name     Form to execute     Event internal table
       'TOP_OF_PAGE'  'TOP_OF_PAGE'       gt_events[].
    * changed to exclude following order types
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZEQ'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * credit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * debit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRD'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZDR'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Industry sales order correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZSOC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield FF correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCF'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield WP correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCW'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Dropdown list for all created ALV layouts, global or user-specific
    at selection-screen on value-request for pa_vari.
      perform alv_variant_f4 changing pa_vari.
    * Main BODY of processing logic
    start-of-selection.
      perform extract_data.
    end-of-selection.
      if not it_extract[] is initial.
    * Build headings for report.
        perform build_top_of_page  using gt_list_top_of_page[].
        perform call_alv.
      endif.
    *&      Form  EXTRACT_KEY_DATA
    * Retreive the data for the report.
    form extract_data.
      clear: it_extract.  refresh: it_extract.
    * orders
      select vbak~vbeln vbak~auart vbak~augru vbak~vkorg vbak~vtweg
             vbak~spart vbak~vdatu vbak~kunnr vbak~vkbur
             vbap~posnr vbap~matnr vbap~vrkme vbap~netwr vbap~kwmeng
             vbap~werks vbap~lgort vbap~oid_extbol vbap~oid_ship
        into corresponding fields of table it_extract
        from vbak inner join vbap
             on  vbak~mandt = vbap~mandt
             and vbak~vbeln = vbap~vbeln where
        vbak~auart not in r_auart and
        vbak~vkorg eq p_vkorg and
        vbak~vtweg eq p_vtweg and
        vbak~spart eq p_spart and
        vbak~vkbur in s_vkbur and                               "DEVK906677
        vbak~vdatu in s_vdatu and
        vbak~kunnr in s_kunnr and
        vbap~matnr in s_matnr and
        vbap~werks in s_werks and
        vbap~lgort in s_lgort and
        vbap~oid_extbol in s_truck and
        vbap~oid_ship in s_shipto.
      if sy-subrc <> 0.
        message i000 with text-002 ' ' ' ' ' '.
      endif.
      sort it_extract by vbeln.
      check sy-subrc = 0.
      loop at it_extract.
    * Retrieve and select by load confirmation contacts from header
        select single kunnr from vbpa into it_extract-load_contact
         where vbeln = it_extract-vbeln
           and posnr = '000000'
           and parvw = 'ZB'.
        if it_extract-load_contact in s_load.
          it_extract-load_name = zcl_kna1=>get_name1( it_extract-load_contact ).
        else.
          delete it_extract.
          continue.
        endif.
    * Retrieve and select by sales order bill-to on header level
    * as well as lookup bill-to customer name/description
        select single kunnr from vbpa into it_extract-billto
         where vbeln = it_extract-vbeln
           and posnr = '000000'
           and parvw = 'RE'.
        if sy-subrc = 0.
          if s_billto is initial.
            it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
          else.
            if it_extract-billto in s_billto.
              it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
            else.
              delete it_extract.
              continue.
            endif.
          endif.
        else.
    * Newalta - always has bill-to, following will not occur but included
    *           as good programming practice.
          it_extract-billto_name = it_extract-billto.
        endif.
    * Retrieve and select by price group of sold-to
        select single konda from knvv into it_extract-konda
         where kunnr = it_extract-kunnr
           and vkorg = it_extract-vkorg
           and vtweg = it_extract-vtweg
           and spart = it_extract-spart.
        if sy-subrc = 0.
          if not ( it_extract-konda in s_konda ).
            delete it_extract.
            continue.
          endif.
        endif.
    * Retrieve trucking company customer
        select single kunnr from vbpa into it_extract-truck where
          vbeln = it_extract-vbeln and
          posnr = '000000' and
          parvw = 'ZT'.
        if sy-subrc = 0.
          it_extract-truck_name = zcl_kna1=>get_name1( it_extract-truck ).
        endif.
    * Retrieve sold-to name
        it_extract-soldto_name = zcl_kna1=>get_name1( it_extract-kunnr ).
    * Retrieve ship-to name
        it_extract-shipto_name = zcl_kna1=>get_name1( it_extract-oid_ship ).
    * lookup P.O.
        select single bstkd ihrez from vbkd into (it_extract-bstkd, it_extract-ihrez)
         where vbeln = it_extract-vbeln
           and posnr = '000000'.
    * Retreive the material description.
        it_extract-maktx = zcl_material=>get_maktx( it_extract-matnr ).
    * cosmetic change of material number, donot display leading zeros.
        shift it_extract-matnr left deleting leading '0'.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        select single mseh3 from t006a into it_extract-mseh3
         where spras = sy-langu
           and msehi = it_extract-vrkme.
        w_tdname = it_extract-vbeln.
    * read customer account reference which is under 'text'
        call function 'READ_TEXT'
          exporting
            client                        = sy-mandt
            id                            = 'Z010'
            language                      = sy-langu
            name                          = w_tdname
            object                        = 'VBBK'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
          tables
            lines                         = it_text
          exceptions
            id                            = 1
            language                      = 2
            name                          = 3
            not_found                     = 4
            object                        = 5
            reference_check               = 6
            wrong_access_to_archive       = 7
            others                        = 8.
        if sy-subrc = 0.
          read table it_text index 1.
          if sy-subrc = 0.
            it_extract-tdline = it_text-tdline.
          else.
            clear it_extract-tdline.
          endif.
        else.
          clear it_extract-tdline.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    * Get the delivery item.
        call method zcl_vbap=>get_delivery
          exporting
            itp_vbeln = it_extract-vbeln
            itp_posnr = it_extract-posnr
          importing
            etp_vbeln = it_extract-delivery
            etp_posnr = it_extract-posnr_vl.
        if it_extract-delivery is not initial.
          perform process_deliveries.
        else.
          perform invoice_process.
        endif.
        it_extract-count = 1 .
        move-corresponding it_extract to it_extract2.
        append it_extract2.
        at new vbeln.
          count1 = count1 + 1.
        endat.
      endloop.
    endform.                    " EXTRACT_DATA
    *&      Form  SET_FIELDCAT
    * Create the field catalogue.
    form set_fieldcat .
      clear w_field.
      clear t_fieldcat.  refresh t_fieldcat.
      w_field-col_pos = 1 .
      w_field-fieldname = 'VBELN'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Document.Nbr'.
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 2 .
      w_field-fieldname = 'POSNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Item'(023).
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 3 .
      w_field-fieldname = 'VDATU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Req. Del. Date'(005).
      append w_field to t_fieldcat.
      w_field-col_pos = 4.                                      "DEVK909658
      w_field-fieldname = 'KUNNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sold-to.'(038).
      append w_field to t_fieldcat.
      w_field-col_pos = 5 .
      w_field-fieldname = 'SOLDTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sold-to'(006).
      append w_field to t_fieldcat.
      w_field-col_pos = 6 .
      w_field-fieldname = 'MATNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Material'(007).
      append w_field to t_fieldcat.
      w_field-col_pos = 7 .
      w_field-fieldname = 'KWMENG'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Quantity'(008).
      append w_field to t_fieldcat.
      w_field-col_pos = 8.
      w_field-fieldname = 'MSEH3'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'UOM'(009).
      append w_field to t_fieldcat.
      w_field-col_pos = 9 .
      w_field-fieldname = 'BILL_VBELN'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Invoice #'(010).
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 10 .
      w_field-fieldname = 'BILL_NETWR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Values'(011).
      append w_field to t_fieldcat.
      w_field-col_pos = 11.
      w_field-fieldname = 'WERKS'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Plant'(012).
      append w_field to t_fieldcat.
      w_field-col_pos = 12.
      w_field-fieldname = 'LGORT'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Storage Loc'(013).
      append w_field to t_fieldcat.
      w_field-col_pos = 13 .
      w_field-fieldname = 'MAKTX'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Description'(014).
      append w_field to t_fieldcat.
      w_field-col_pos = 14.                                     "DEVK909658
      w_field-fieldname = 'OID_SHIP'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ship-to.'(039).
      append w_field to t_fieldcat.
      w_field-col_pos = 15 .
      w_field-fieldname = 'SHIPTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ship-to'(015).
      append w_field to t_fieldcat.
      w_field-col_pos = 16.                                     "DEVK909658
      w_field-fieldname = 'BILLTO'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Bill-to .'(040).
      append w_field to t_fieldcat.
      w_field-col_pos = 17 .
      w_field-fieldname = 'BILLTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Bill-to'(016).
      append w_field to t_fieldcat.
      w_field-col_pos = 18 .
      w_field-fieldname = 'LOAD_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Load Contact'(017).
      append w_field to t_fieldcat.
      w_field-col_pos = 19 .
      w_field-fieldname = 'TRUCK_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Truck Comp.'(018).
      append w_field to t_fieldcat.
      w_field-col_pos = 20 .
      w_field-fieldname = 'BSTKD'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'P.O.'(019).
      append w_field to t_fieldcat.
      w_field-col_pos = 21 .
      w_field-fieldname = 'IHREZ'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'AFE Nbr'(020).
      append w_field to t_fieldcat.
      w_field-col_pos = 22 .
      w_field-fieldname = 'OID_EXTBOL'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Truck Ticket'(021).
      append w_field to t_fieldcat.
      w_field-col_pos = 23.
      w_field-fieldname = 'STATU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Status'(022).
      append w_field to t_fieldcat.
      w_field-col_pos = 24.
      w_field-fieldname = 'AUGRU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ord.Reason'(024).
      append w_field to t_fieldcat.
      w_field-col_pos = 25.
      w_field-fieldname = 'TDLINE'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'cstmr.acct.ref.'(027).
      append w_field to t_fieldcat.
      w_field-col_pos = 26 .                                    "DEVK906678
      w_field-fieldname = 'VKBUR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sales Office'(037).
      append w_field to t_fieldcat.
      w_field-col_pos = 27.                                     "DEVK909658
      w_field-fieldname = 'COUNT'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Count'(041).
      w_field-do_sum = 'X'.
      append w_field to t_fieldcat.
    endform.                    " SET_FIELDCAT
    *&      Form  CALL_ALV
    * Call the ALV Grid function.
    form call_alv .
      sort it_extract by lgort vbeln.
    * repid is necessary since the ALV F.M. does not work properly with
    * sy-repid.
      repid = sy-repid.
      alv_variant-variant  = pa_vari.
      alv_variant-report   = sy-repid.
      alv_variant-username = sy-uname.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program      = repid
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat             = t_fieldcat[]
          it_sort                 = gt_sort[]
          i_default               = 'X'
          i_save                  = 'A'
          is_variant              = alv_variant
          it_events               = gt_events[]
          it_event_exit           = ta_events[]
          is_print                = tp_print
        tables
          t_outtab                = it_extract2
        exceptions
          program_error           = 1
          others                  = 2.
      if sy-subrc ne 0.
        message w000 with text-004 ' ' ' ' ' '.
      endif.
    endform.                    " CALL_ALV
    *&      Form  build_top_of_page
    * Build heading for report.                                            *
    *      -->P_GT_LIST_TOP_OF_PAGE[]  Header stuff for report
    form build_top_of_page using   e04_lt_top_of_page type slis_t_listheader.
      data: ls_line type slis_listheader.  "Header table for top of page
    * construct 'top of page' info. to display. In this case, one line.
      data: w_selections(40) type c,
            w_date_from(10) type c,
            w_date_to(10) type c.
      write: s_vdatu-low to w_date_from dd/mm/yyyy.
      if s_vdatu-high is not initial.
        write: s_vdatu-high to w_date_to dd/mm/yyyy.
        clear w_selections.
        concatenate 'Del.Req.Date: ' w_date_from 'To' w_date_to
          into w_selections separated by space.
        clear ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        append ls_line to e04_lt_top_of_page.
        gs_list_top_of_page-typ = 'S'.
        gs_list_top_of_page-info = ' Total Number of Sales Documents'.
        append gs_list_top_of_page to gt_list_top_of_page.
        gs_list_top_of_page-typ  = 'S'.
        gs_list_top_of_page-info = count1.
        append gs_list_top_of_page to gt_list_top_of_page.
      else.
        clear w_date_to.
        concatenate 'Del.Req.Date: ' w_date_from
             into w_selections separated by space.
        clear ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        append ls_line to e04_lt_top_of_page.
      endif.
    endform.                    " build_top_of_page
    *&      Form  alv_eventtab_build
    *     Pass list of events to be triggered by the ALV function module
    form alv_eventtab_build using  u_name  type slis_alv_event-name
                                   u_form  type slis_alv_event-form
                                   alv_lt_events  type slis_t_event.
      data: ls_event type slis_alv_event.   " structure for event handling
      ls_event-name = u_name.
      ls_event-form = u_form.
      append ls_event to alv_lt_events.
    endform.                    " alv_eventtab_build
    *       FORM TOP_OF_PAGE                                              *
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          i_logo             = 'NEWALTA_LOGO'
          it_list_commentary = gt_list_top_of_page.
    endform.                    " TOP_OF_PAGE
    *&      Form  process_deliveries
    * Process the delivery related records.
    form process_deliveries .
      data:
        ltp_date  type wadat_ist, " Goods movement date.
        ltp_vbtyp type vbtyp_n,
        ltp_mtart type mtart, " Material type.
        w_lfimg   type lfimg, " Actual quantity delivered (in sales units).
        w_vrkme   type vrkme. " Sales unit of measure.
    * Read delivery quantity and uom.
      select single lfimg vrkme into (w_lfimg, w_vrkme)
        from lips where
        vbeln = it_extract-delivery and
        posnr = it_extract-posnr_vl.
    * these fields have values from vbap. override with lips values
      if sy-subrc = 0.
        it_extract-kwmeng = w_lfimg.
        it_extract-vrkme  = w_vrkme.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        select single mseh3 from t006a into it_extract-mseh3
         where spras = sy-langu
           and msehi = it_extract-vrkme.
      endif.
    * Determine STATUS by reading 'service confirmation', R (goods movemt)
    * it is possible to have multiple 'service confirmation' records for
    * one item. ie. delivery 80010390 in PRD.
    * As long as there is at least one 'service confirmation' record,
    * status is considered 'complete'.
    * Validate the created on date of the goods movement or service confirmation.
      ltp_mtart = zcl_material=>get_mtart( it_extract-matnr ).
    *  ltp_date = zcl_lips=>get_goods_movement_date( itp_vbeln = it_extract-delivery
    *                           itp_posnr = it_extract-posnr_vl itp_mtart = ltp_mtart ).
      call method zcl_lips=>get_goods_mvt_info
        exporting
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
          itp_mtart = ltp_mtart
        importing
          rtp_date  = ltp_date
          rtp_vbtyp = ltp_vbtyp.
    * 'h' is cancel goods issue
      if ltp_vbtyp = 'h'.
        it_extract-statu = 'Incomplete'(025).
      else.
        if ltp_date is not initial.
          it_extract-statu = 'COMPLETE'(026).
        endif.
      endif.
    * Retrieve the invoice/billing document item.
      call method zcl_lips=>get_invoice
        exporting
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
        importing
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      if it_extract-bill_vbeln is not initial.
    * retrieve net value from the invoice.
        clear it_extract-bill_netwr.
        select single netwr into it_extract-bill_netwr from vbrp
         where vbeln = it_extract-bill_vbeln
           and posnr = it_extract-bill_posnr.
      else.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
      endif.
    endform.                    " process_deliveries
    *&      Form  user_command
    * Process the user command.
    *      -->R_UCOMM      User command
    *      -->RS_SELFIELD  Field selected
    form user_command using r_ucomm     like sy-ucomm
                            rs_selfield type slis_selfield.
      data: ltp_vbeln type vbeln.  " Sales document number.
      case  r_ucomm.
        when '&IC1'.
          if ( rs_selfield-fieldname = 'VBELN'
            or rs_selfield-fieldname = 'BILL_VBELN' )
           and rs_selfield-value is not initial.        " Display sales document.
            ltp_vbeln = rs_selfield-value.
            zcl_sales_doc=>display( ltp_vbeln ).
          endif.
        when '&ILT'.
          data:
    lta_filt type slis_t_filtered_entries.
          break rdrury.
          call function 'REUSE_ALV_LIST_LAYOUT_INFO_GET'
    importing
    *      es_layout               = gs_layout
    *      et_fieldcat             = t_fieldcat[]
    *      et_sort                 = gt_sort[]
    *   ES_LAYOUT                        =
    *   ET_FIELDCAT                      =
    *   ET_SORT                          =
    *   ET_FILTER                        =
    *   ES_LIST_SCROLL                   =
    *   ES_VARIANT                       =
    *   E_WIDTH                          =
    *   ET_MARKED_COLUMNS                =
       et_filtered_entries              = lta_filt
    *   ET_FILTERED_ENTRIES_HEADER       =
    *   ET_FILTERED_ENTRIES_ITEM         =  lta_filt
    *       TABLES
    *   et_outtab                        =
    *   ET_OUTTAB_HEADER                 =
    *   et_outtab_item                   =
    *   ET_COLLECT00                     =
    *   ET_COLLECT01                     =
    *   ET_COLLECT02                     =
    *   ET_COLLECT03                     =
    *   ET_COLLECT04                     =
    *   ET_COLLECT05                     =
    *   ET_COLLECT06                     =
    *   ET_COLLECT07                     =
    *   ET_COLLECT08                     =
    *   ET_COLLECT09                     =
           exceptions
             no_infos                         = 1
             program_error                    = 2
      endcase.
    endform.                    "user_command
    *&      Form  invoice_process
    * Process for orders without deliveries.                               *
    form invoice_process .
    * Translate unit of measure.
      select single mseh3 from t006a into it_extract-mseh3
       where spras = sy-langu
         and msehi = it_extract-vrkme.
    * Retrieve the invoice/billing document item.
      call method zcl_vbap=>get_invoice
        exporting
          itp_vbeln = it_extract-vbeln
          itp_posnr = it_extract-posnr
        importing
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      if it_extract-bill_vbeln is not initial.
    * retrieve net value from the invoice.
        clear it_extract-bill_netwr.
        select single netwr into it_extract-bill_netwr from vbrp
         where vbeln = it_extract-bill_vbeln
           and posnr = it_extract-bill_posnr.
      else. " If no Invoice, then status becomes 'incomplete'.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
        it_extract-statu = 'Incomplete'(025).
      endif.
    endform.                    " invoice_process
    *&      Form  alv_variant_f4
    * Get the display variant.
    *      <--CTP_VARI  Variant name
    form alv_variant_f4 changing ctp_vari type slis_vari.
      alv_variant-report   = sy-repid.             " Report ID
      alv_variant-username = sy-uname.             " User ID
      call function 'REUSE_ALV_VARIANT_F4'
        exporting
          is_variant = alv_variant
          i_save     = 'A'
        importing
          es_variant = alv_variant
        exceptions
          others     = 1.
      if sy-subrc = 0.
        ctp_vari = alv_variant-variant.
      endif.
    endform.                    " alv_variant_f4

    I have used all the FM modules mentioned but I am not able to get the total of the sales doc on the top of the page to chnage when filtering of data is done . I just want to see this count of sales document (distict ) and to see it change as filtering is done , be it at any place in teh ALV , its not necessary that it has to be on the top of the ALV output. Could I get some inputs please. As you can see I used the below mentioned FM but on debugging I find the gt_stack is empty still.
    *&      Form  build_top_of_page
    * Build heading for report.                                            *
    *      -->P_GT_LIST_TOP_OF_PAGE[]  Header stuff for report
    FORM build_top_of_page USING   e04_lt_top_of_page TYPE slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.  "Header table for top of page
    * construct 'top of page' info. to display. In this case, one line.
      DATA: w_selections(40) TYPE c,
            w_date_from(10) TYPE c,
            w_date_to(10) TYPE c.
      WRITE: s_vdatu-low TO w_date_from DD/MM/YYYY.
      IF s_vdatu-high IS NOT INITIAL.
        WRITE: s_vdatu-high TO w_date_to DD/MM/YYYY.
        CLEAR w_selections.
        CONCATENATE 'Del.Req.Date: ' w_date_from 'To' w_date_to
          INTO w_selections SEPARATED BY space.
        CLEAR ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        APPEND ls_line TO e04_lt_top_of_page.
        gs_list_top_of_page-typ = 'S'.
        gs_list_top_of_page-info = ' Total Number of Sales Documents'.
        append gs_list_top_of_page to gt_list_top_of_page.
        gs_list_top_of_page-typ  = 'S'.
        gs_list_top_of_page-info = count1.
        append gs_list_top_of_page to gt_list_top_of_page.
      ELSE.
        CLEAR w_date_to.
        CONCATENATE 'Del.Req.Date: ' w_date_from
             INTO w_selections SEPARATED BY space.
        CLEAR ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        APPEND ls_line TO e04_lt_top_of_page.
      ENDIF.
    ENDFORM.                    " build_top_of_page
    *&      Form  alv_eventtab_build
    *     Pass list of events to be triggered by the ALV function module
    FORM alv_eventtab_build USING  u_name  TYPE slis_alv_event-name
                                   u_form  TYPE slis_alv_event-form
                                   alv_lt_events  TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.   " structure for event handling
      ls_event-name = u_name.
      ls_event-form = u_form.
      APPEND ls_event TO alv_lt_events.
    ENDFORM.                    " alv_eventtab_build
    *       FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          i_logo             = 'NEWALTA_LOGO'
          it_list_commentary = gt_list_top_of_page.
      Data:lt_FILTERED_ENTRIES type SLIS_T_FILTERED_ENTRIES,
      wa_filter like line of lt_FILTERED_ENTRIES.
      data: count2 type i.
    data: it_fieldcat  type slis_t_fieldcat_alv with header line.
      CALL FUNCTION 'REUSE_ALV_LIST_LAYOUT_INFO_GET'
        IMPORTING
          ET_FILTERED_ENTRIES = lt_FILTERED_ENTRIES
        EXCEPTIONS
          NO_INFOS            = 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.
        MESSAGE i000 WITH  count1  .
      ENDIF.
      loop at lt_FILTERED_ENTRIES into wa_filter.
    *    if sy-tabix <> 0.
        if sy-subrc = 0 .
          count2 = count2 + 1.
    *count3 =  count1 - count2 .
    *  write:/ 'Total number of Sales Documents =', count3 .
        endif.
      endloop.
    ENDFORM.                    " TOP_OF_PAGE
    I tried using it at user-command level too but it dosent help.
    Thanks

Maybe you are looking for

  • Report Generation Toolkit files in incorrect location after installing deployment

    TestStand 2010 SP1 + LabVIEW 2011 + Report Generation Tookit After installing a deployment, the location of NI_Excel.lvclass is expected to be at ...\VIs for <project name>\SupportVIs\Excel\NI_Excel.lvclass (see attachment) but the path of the file i

  • Activation failed due to sructure generation error.-URGENT

    i tried to check in an activity but activation failed due to the foloowing error:PLEASE HELP VERY URGENT Development Component Build (2008-03-14 10:09:20)   Component name: tablist   Component vendor: worldbank.org   SC compartment: worldbank.org_GDB

  • Check spelling with foreign words

    I am using InDesign CS4 to create documents which mix foreign words and phrases in standard US English. The problem is that when I use Check Spelling, it flags as misspelled many properly-spelled non-English words. When these suspect words have accen

  • Collect error on AMD64

    When I try and run collect on my application, it fails with the following error: [crypt@sun0 crypt]$ /opt/sun/sunstudio10/bin/collect -o test.2.er -p on -S on -A on /home/crypt/src/ser/qs Warning: name test.2.er is in use; changed to test.7.er WARNIN

  • Using WiFi abroad

    I live in the UK and travel alot. If I am say in Hong Kong and connect to the free wifi at HK airport, am I going to be charged by O2 for connecting and using that as the data package only applies to the UK.