Multiple blocking of Customers

Hi! Good Day!!
Can anyone please help me...
Scenario: Customer A & Customer B are sister companies. Customer A is suspended due to over credit limit.
Question: Is there a way that the system can also automatically block customer B? Provided that they  have different payment term, credit limit, payer, etc. Is there a partner function I can use for both of them that when I block customer A at XD05, customer B will also be blocked..  
Please help me.. Thank You!

Yes i understand, but is there a partner function that i can use for both of them that when one customer is block, all other customers related will also be blocked.
for example: the partner function PAYER, when the payer is blocked all dependent customers will not be able to place an order. But i cannot use this partner function since they have different payer.
please please help
Thank You

Similar Messages

  • Multiple block size

    Hi
    When I use multiple block size tablespaces.(32K)
    I have to set DB_32K_CACHE_SIZE parameter.
    Assume the size of the buffer cache is 500m.
    If I set DB_32K_CACHE_SIZE to 200M.
    Will there be only 300m available in buffer cache? how is the allocation works?

    The vast majority of databases do not need to deploy multiple blocksizes.
    As noted here it is not for all databases only specific: http://www.dba-oracle.com/t_multiple_blocksizes_summary.htm
    I have some doubts in this issue...When in doubt consult the official documentation and metalink.
    Here is IBM's Oracle documentation on multiple blocksizes: http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100883
    While most customers only use the default database block size, it is possible to use up to 5 different database block sizes for different objects within the same database.
    Having multiple database block sizes adds administrative complexity and (if poorly designed and implemented) can have adverse performance consequences. Therefore, using multiple block sizes should only be done after careful planning and performance evaluation.

  • How to copy values in a multiple block based on conditions....

    hi
    i have a multiple block having 5 records and 10 columns...what i want to do is that
    when i am in the 2 record and if the values in the 2 to 5th column is same when compared with the values of the same column in 1st record....copy the values of columns 6 to 9 in 1 record to 2nd record...the same some times i may need to do with 3 and 2nd record when i am in 3 rd record...etc...like to the rest records...
    pls help
    Kris

    Create a POST-TEXT-ITEM trigger on column 2 to 5 that calls the same procedure (A).
    Create a procedure A
    with the following logic
    - remember the current record (incl. contents of column 2 to 5) (name new-record)
    - go to first record
      while continue loop
        if new-record.column2 = this-record.column2 (and that also for 3, 4 and 5)
        then
            new.record.column6 := his-record.column6 (and that also for 7,8,9 and 10)
            continue := false;
        end if;
        continue :=  ( this-record = last-record )
        if continue
        then
          next record
        end if;
      end loop

  • Selecting multiple blocks of images

    How do I select multiple blocks of sequential images in LR3?
    In PSE 8 I used Ctrl and holding the left mouse button while dragging over the required images but this does not seem to work in LR3
    Using Ctrl and /or Shift to select individual groups of images works in LR but is very slow when I want to select numerous groups of sequential images
    Specifically I want to select the many groups of 3 to 10 sequential images showing each of my kids so that I can add the appropriate keyword(s).

    Thanks - so the click and drag does not work..??
    The Shift.Ctrl does work but the click/drag is much faster.
    Cheers

  • Unable to spefify multiple blocks relatinve positions.

    1. Multiple blocks can't be placed based on relative position to each other: When i create more than two blocks (Tables/Charts) - Block1, Block2 and Block3, i was able to specify how much distance should Block2 from Block1 by selecting Block -> select Format -> Go to Layout properties tab -> choose top of this table is Bottom side of Block 1. But when i used the same procedure for Block2 and Block3 it didn't work. Block3 was always re-sets itself. So i have to place the blocks/tables at fixed distances. If table2 has large data it will go over table3.

    Hello,
    This issue sounds like a bug in the core webi product.
    I have asked a few people to investigate if a fix is available that can be deployed to our site.
    I will try to update this post when I know more.
    Cheers
    Steve

  • Credit Block for customers with out crossing the limit

    Recently credit limit of the all the cusotmers has been altered and been updted newly, but nbow when the rush orders creating for these customers, system is blocking the orders for the credit limit. i did run the program RVKRED77, but still credit data is not been re organized. i am struck here.

    Hi ,
    Please select the check credit limit as blank at rush order document type level and item category level.
    Regards,
    Sash.

  • Why is Verizon blocking its customers from using OpenDNS service?

    I have always used my devices through my home WiFi until recently my phone and tablet are not using my preferred DNS server. I'm considering changing wireless companies if this issue is permanent.

    Verizon does block certain ports for safety and security reasons. That is true. They have a responsibility to protect their customers and their network.
    You state in the past your tablet and phone was able to connect to your home WiFi network using Open DNS.
    The part I am trying to get across is the tablet and phone have no idea what DNS you are using.
    A properly set up network either using your broadband or DSL providers network versus you using the open DNS service is not going to stop the tablet or the phone from making a connection to your mode/router.
    In example I receive my connection through RR. I then have my own modem connected to it, my modem grabs its DNS from RR. This modem also has WiFi built in. So the address is 292.168.1.100 but I can change it.
    My router now is accessed via 192.168.1.1 but in the routers settings I can use open DNS or any other proxy server I have rights to.
    I use different id  names for both WiFi devices. So I set my tablets to use a dedicated address, in fact every device is set to use 192.168.1.25, or 24, 23, or 13 and so on. This forces all connected devices to acquire the same address each time.
    However it makes no difference what DNS server I am using. As long as my modem/router has a solid connection to the net my devices will always work and do.
    Good Luck

  • One Digital signature signs multiple blocks

    Good afternoon,
    I tried running this script
    if ( this.getField("MainCheckbox").value=="Choice3" && this.getField("SupervisorSignature").value!="" {
         this.getField("SupervisorSignature1").value = this.getField("SupervisorSignature").value
    } else this.getField("SupervisorSignature1").value = "";
    Basically, what I am trying to do is minimize the workload on the PDF user. The information on all the pages is the same; however, he needs to sign each block. I am trying to have it where the signatures essentially are linked. Once the user reads the agreement, multiple signature blocks are signed.
    The script above gives me a syntax error.
    Any ideas?

    Maybe I must give you an answer, which is not liked:
    The purpose of a digital signature is to check, whether the PDF or a defined block of the PDF form (since A6 / AR6 for PDF, since A 8.1.2 / AR 8.1.2 for XFA PDF) has being changed since signature creation. To copy an image of an already existing digital signature means:
    YOU ARE CHANGING THE SIGNED DOCUMENT / FORM !!
    Digital signatures and their images (appearance internally) are unique and cannot be copied. During creating digital signatures, the structure of the PDF is being changed and the additional dictionary "V" is being created within the SigField. SigFields are COS-Fields (PDF Fields), even if some properties are available by JS. Forget about copying from that "V" dictionary .
    If a visible signature image is a "nice to have feature" then maybe you should try ink signatures, but I have no experience with those.
    Best Regards

  • Multiple blocking locks on same object

    we have a database that is providing a great deal of application 'freezing' due to lock problems that were not experienced before moving to a new 10g database environment.
    one of the items i believe to be of interest is the fact that when this 'freezing' occurs then a look at the database locks reveals that more than one TX exclusive blocking lock is held on the same database object without any waits showing.
    my understanding is that this should not be the case? that only one user should possess the exclusive transaction level lock and that the other user should only have an outstanding request for this same level lock?
    any information you can provide would be most appreciated.
    thanks in advance.

    You would need to find out the sql the application is executing when those locks freeze like that. From there determine if there is a logical syntax issue or get the explain plan to ensure it isn't for example an update statement on a massive table that has improper indexing.
    Also, do you see other sessions blocking other sessions as orafad suggested? In this scenario my original explanation is different. If the locks are all chained on waiting on another session, that means the first session that is blocking is updating the same data that the waiters are wanting.
    In my opinion you need to find out the exact SQL causing these locks to ensure it is an issue with one of your applications. Determining the performance of that query is a must.
    The only weird thing is you say there is no waits taking place....did you look in v$session_wait?
    Lee

  • How to use At Selection Screen for fields whiledealing with Multiple Blocks

    Hi Guys,
                In my requirement i am having 4 blocks.1st block with raduio buttons for activating the opther 3 Blocks.
                  In these 3 blocks i am having some fields.
           How to do Validation for these fields.?
    I am using At Selection-screen on S-SCAD1. I am getting error"S_SCACD1 is neither a selection screen nor a Parameter"
    On the top of this" At Selection-screen on S-SCAD1" I am having"AT SELECTION-SCREEN OUTPUT."
                    Can anybody tell me how to solve this error?
    Thanks,
    Gopi.

    If you are using your block name than you should use like:
    AT SELECTION-SCREEN ON BLOCK S-SCAD1.
    Regards,
    Naimesh Patel

  • Non-Database Item Sort Using Multiple Block Values

    I need to sort the result set of a block based on a calculated item. I found several messages addressing this, however they all speak to using the columns from within the same block as input variables to the function used to calculate the non-database column value.
    My problem is that I need to use values from a different block as input variables. I have not found a way to use them since I need to use the full block.column syntax. Forms does not like this and always thows an error right at the period(.). I need to do this because the column names are the same in each block. the function compares the column values and changes the record instance background a different color based based on how many of the column pairs match. Each block is mutually exclusive from each other and doing a accurate join is not really possible.
    I tried renaming the block column name to something unique, however I get a variable not bound error when I try to use it in the order by function even though their values are in the top most block.
    For Example:
    First Block. Contains a list of cases that need to be worked because the automated process could not find a valid provider based on the values received. This list is created by a background process.
    Table: CASE_MAIN
    TIN
    CASE_ID
    FCLTY_CM
    MEDICARE_CM
    Unrelated Second Block (i.e., no join). It uses the TIN value in the first block to get a list of all of the providers for the TIN associated with the Case so that a person can assign the correct Provider to the case (A TIN has a provider and address associated with it). As a result there is no link to the results of this table and the CASE_ID. That's what the users needs to do manually
    Table: PROVIDER_MAIN
    FCLTY
    MEDICARE
    I need to take the values in the first block and compare them in the second block so that I can recolor the background based on matching logic in the function below.
    order by clause = get_vals( ''||:FCLTY_CM||''
    ,''||:MEDICARE_CM||''
    ,fclty
    ,medicare) desc
    I am able to do the coloring within the form easily, however I need to order them by how many values match exactly so the ones that match to most value pairs show at the top. Hence ordering by the result of the function. I return a 0,1, or 2 based on the matches. 0 for none and 2 for both.
    I cannot create a view because the sources of the information I need to compare are NOT related to each other, yet. that is what the application is designed to do. I have a case without a
    provider assigned, but I have a tax id number that possible identifies the provider. I use this TIN to query the provider table for all of the possible providers under that TIN. As a result there is no link between the case information and provider information. The goal is to get this list compare the values from the target information and put the most likely matches on top, with
    the ones with the most matches first. I can create a function many ways that takes in various parameters. For example Case ID and Provider Id and query the records in subselects
    individually like so;
    select count(*)
    from (select fclty, medicare from case_main where case_id p_case_id) cm
    ,(select fclty, medicare from provider_main where prv_id = p_prv_id) pm
    where cm.fclty = pm.fclty
    and cm.medicare = pm.medicare
    If the number is greater than zero I know I have a match with that provider and I can sort accoringly. I can also pass in the target information from case_main and the provider inforation from provider_main and then do an if/then statement for comparing. Then I can use this function to create a column value for each record and then use the same reference to the function in the order by clause to order by that value.
    The problem comes in trying to reference the case_id or target information from a different block than where the fucntion needs to be used. I get a variable bound not error message. What am I missing here. Why can I not reference a uniquely named block item as a input variable to a function in a different block? Does Forms first figure out what it needs to retrieve and then executes the SQL for each block in isolation, or does the first block's result set get retrieved, then the second, third, etc. Based on the message i am getting I would suspect the former since it appears their is no value in subsequent blocks. If so is there anyway around this? thanks.

    Don't quite understand your problem completely. But this might help. I sure hope your Provider_Main is a single-record block ...otherwise, how would you supply a list of values of FCLTY and MEDICARE to the function that does the sorting? Be awere, too, that the order-by is processed by the server, and NOT by Forms.
    Assuming it is a single-record block, you can put the values into parameters:
    :Parameter.Fclty := :Provider_Main.Fclty;
    :Parameter.Medicare := :Provider.Medicare;
    Execute_Query;
    And your order-by clause would be
    get_vals( ''||:FCLTY_CM||'',''||:MEDICARE_CM||'',
    :Parameter.Fclty,
    :Parameter.Medicare) desc
    By the way, the first line of your order-by looks strange. Shouldn't it be:
    get_vals( FCLTY_CM || ',' || MEDICARE_CM,
    or even better, get_vals should take in 4 parameters:
    get_vals(Fclty_cm, Medicare_cm, :parameter.Fclty, :parameter.Medicare)

  • Populating multiple blocks on one form

    I have two blocks on the same form, all blocks are from tables in the same database.
    I am using 'EXECUTE_QUERY' in the 'WHEN-NEW-FORM-INSTANCE' trigger to populate the blocks but only one block is populated.
    Any suggestions?
    Thanks in advance.

    If the tables are related then you can use a Relationship on the master table to query the detail table every time the user navigates to a new record.
    If not then doGo_Block('block2');
    Execute_Query;
    Go_Block('block1');
    Execute_Query;to query both blocks.
    James.

  • ALV multiple header and multiple blocks

    Hi SAP gurus,
    I have probelm  problem in displying the ALV block display
    I want to disply in the following format
    *Header part *
    Name:
    place:
    list part
    coloum1
    coloum2
    coloum3
    coloum4
    *Header part *
    Name:
    place:
    list part
    coloum1
    coloum2
    coloum3
    coloum4
    *Header part *
    Name:
    place:
    list part
    coloum1
    coloum2
    coloum3
    coloum4
    The number of repetation is nt known its based on the header details so how to do this in ALV list disply or any ALV
    i need a output as it is in MB5B tocde please help me
    Thanx in advance

    Hi
    Thanx for ur reply
    I am doing as u said puting header in one internal table and corresponding reocrds in one internal table probelm is to while displaying ho wto display it??
    I am putiing header detail  in one internal table and corresponding records  into one internal table and he calling the list append FM module and den again second header and corresponding data in the internal table and calling the FM 'LIST APPEND' while doing this i am clearing the internal table which was used earlier i.e  data corresponding to 1st header i think the clearing will causing the poblem i am seeing the empty block list.
    so how to achive this??
    Thanx In Advance

  • Multiple Blocks Problem

    i have 3 data blocks in a form
    one is Master and the other is Detail and in Detail block a buttons on which when i click another block against parameters of that test is shown
    user enter value 1 and value 2 then in third column avg is calculated now i want to use a loop on detail block in which i want to populate that average which is calculated in that parameter block
    i know the situation is complex to understand but plz help
    thanks

    this is detail block
    sno testcode result button
    1 10
    2 20
    3 30
    now when i click on button to calculate the result
    the parameter defined in a table against test 10 appears like this
    parameter_id value1 value2 Avg (value1 and value2)
    IBP 2 2 2
    R10 3 3 3 Save button
    Now the code under save button is
    DECLARE
    No_Rec number;
    BEGIN
    go_block('detail');
    No_Rec:=:System.Cursor_Record;
    First_Record;
              FOR I in 1..No_Rec loop
         If :parameter1.parameter_id = 'IBP' and :detail.test_code='10' then
    :detail.result_value:=:avg;
    end if;
    if :parameter1.parameter_id = 'R10' and :detail.test_code='20' then
    :detail.result_value:=:avg;
    end if;
    Next_Record;
    End Loop;
    end;
    but it only returns one value not all in detail block and i have to check 7 conditions and have to populate 7 values from Parameter Block into detail
    Thanks

  • ALV REPORT WITH MULTIPLE BLOCKS - COLUM TOTAL

    Hi friends,
    In the following code, I am not getting the column total.
    --- SAMPLE 1--
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
           EXPORTING
                i_callback_program      = sy-cprog
                i_callback_user_command = 'USER_COMMAND'.
      PERFORM list_append TABLES IT_CTV
                           USING '1'
                                 'IT_CTV'.
      PERFORM list_append TABLES IT_APP
                           USING '2'
                                 'IT_APP'.
      PERFORM f_list_display.
          FORM USER_COMMAND                                             *
    FORM user_command USING i_ucomm     LIKE sy-ucomm
                            is_selfield TYPE slis_selfield.     "#EC CALLED
    ENDFORM.                               " USER_COMMAND
          Form  list_append
    FORM list_append TABLES ut_table
                     USING  u_no      TYPE char1
                            u_tabname TYPE slis_tabname.
      DEFINE m_fieldcat.
        ls_fieldcat-fieldname = &1.
        ls_fieldcat-ref_tabname = &2.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
    DATA: GT_ZSUM TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE.
      DEFINE m_sort.
        ls_sort-fieldname = &1.
        ls_sort-up        = 'X'.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA :
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
        ls_sort     TYPE slis_sortinfo_alv,
        lt_sort     TYPE slis_t_sortinfo_alv. " Sort table
      DATA:
        lt_events TYPE slis_t_event,
        ls_event  TYPE slis_alv_event,
        ls_layout TYPE slis_layout_alv.
      ls_layout-group_change_edit = 'X'.
      ls_layout-colwidth_optimize = 'X'.
      ls_layout-zebra             = 'X'.
      ls_layout-cell_merge        = 'X'.
      ls_layout-detail_popup      = 'X'.
      ls_layout-get_selinfos      = 'X'.
      ls_layout-max_linesize      = '300'.
      CASE u_no.
        WHEN '1'.
          ls_fieldcat-SELTEXT_L = ' REGION'.
          m_fieldcat  'BZIRK' 'IT_CTV'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' CTV STOCK'.
          m_fieldcat  'CTVST' 'IT_CTV'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' CTV VALUE'.
          m_fieldcat  'CTVVL' 'IT_CTV'.
          ls_fieldcat-DO_SUM = 'X'.
          m_sort  'BZIRK'.
        WHEN '2'.
          ls_fieldcat-SELTEXT_L = ' REGION'.
          m_fieldcat  'BZIRK' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' RFG STK'.
          m_fieldcat  'RFGST' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' RFG VAL'.
          m_fieldcat  'RFGVL' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' WM STK'.
          m_fieldcat  'WMCST' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' WM VAL'.
          m_fieldcat  'WMCVL' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' MCCS STK'.
          m_fieldcat  'MOVST' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' MCCS VAL'.
          m_fieldcat  'MOVVL' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' APP STK'.
          m_fieldcat  'APPST' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-SELTEXT_L = ' APP VAL'.
          m_fieldcat  'APPVL' 'IT_APP'.
          ls_fieldcat-just = 'R'.
          ls_fieldcat-DO_SUM = 'X'.
         m_sort  'BZIRK'.
      ENDCASE.
    ls_fieldcat-COL_POS = 1.
    ls_fieldcat-FIELDNAME = 'BZIRK'.
    ls_fieldcat-DO_SUM = 'X'.
    ls_fieldcat-FIX_COLUMN = 'X'.
    APPEND ls_fieldcat TO lT_fieldcat.
      IF u_no CA '13'.
        MOVE        'TOP_OF_PAGE'        TO ls_event-name.
        CONCATENATE 'TOP_OF_PAGE' u_no INTO ls_event-form.
        APPEND ls_event TO lt_events.
      ELSE.
        MOVE        'TOP_OF_LIST'        TO ls_event-name.
        CONCATENATE 'TOP_OF_LIST' u_no INTO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                it_fieldcat                = lt_fieldcat
                is_layout                  = ls_layout
                i_tabname                  = u_tabname
                it_events                  = lt_events
                it_sort                    = lt_sort
           TABLES
                t_outtab                   = ut_table
           EXCEPTIONS
                program_error              = 1
                maximum_of_appends_reached = 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.                               " LIST_APPEND
          Form  f_list_display
    FORM f_list_display.
      DATA ls_print TYPE slis_print_alv.
      ls_print-no_print_selinfos  = 'X'.   " Display no selection infos
      ls_print-no_print_listinfos = 'X'.   " Display no listinfos
      ls_print-reserve_lines      = 2.     " Lines reserved for end of page
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
           EXPORTING
                i_interface_check = ' '
                is_print          = ls_print
           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.                               " F_LIST_DISPLAY
          FORM top_of_page1                                             *
    FORM top_of_page1.                                          "#EC CALLED
      WRITE 'SALES REPORT'.
      PERFORM TOP_LIST1.
    ENDFORM.
          FORM top_of_list2                                             *
    FORM top_of_list2.                                          "#EC CALLED
      WRITE 'STOCK REPORT'.
      PERFORM top_of_page.
    ENDFORM.
    *-----END OF SAMPLE 1 -
    Could any help me.
    Thanx in advance.
    Regards,
    A S VINCENT

    Hai Vincent
    Check & Run the follow ABAP Code
    *& Report  ZALV_Block                                               *
    REPORT  ZALV_block NO STANDARD PAGE HEADING
                                    MESSAGE-ID ZZ.
    *..Type Definitions for ALV Report
    TYPE-POOLS SLIS.
    Table Declarations.                                        *
    TABLES: MARA,        "Material Master
            MARC,        "Plant Data for Material
            MARD,        "Storage Location Data for Material
            VBAP,        "Sales Document: Item Data
            VBUP.        "Sales Document: Item Status
    Internal table to store sales orders.......
    DATA: BEGIN OF IT_VBAP OCCURS 0,
            VBELN LIKE VBAP-VBELN,    "Sales Document
            POSNR LIKE VBAP-POSNR,    "Sales Document Item
            KWMENG LIKE VBAP-KWMENG,  "Cumulative order quantity in sales
                                       "                        Units
          END OF IT_VBAP.
    internal table to store final data
    DATA: BEGIN OF IT_FINAL OCCURS 0,
            WERKS LIKE MARD-WERKS,    "Plant
            MATNR LIKE MARD-MATNR,    "Material Number
            LGORT LIKE MARD-LGORT,    "Storage Location
            LABST LIKE MARD-LABST,    "Valuated stock with unrestricted use
            INSME LIKE MARD-INSME,    "Stock in quality inspection
            RETME LIKE MARD-RETME,    "Blocked Stock Returns
            UMLME LIKE MARD-UMLME,    "Stock in transfer
            MAKTX LIKE MAKT-MAKTX,    "Material description
            VBELN LIKE VBAP-VBELN,    "Sales Document
            POSNR LIKE VBAP-POSNR,    "Sales Document Item
            KWMENG LIKE VBAP-KWMENG,  "Cumulative order quantity in sales
                                       "                        Units
          END OF IT_FINAL.
    ALV Type declaration                                                 *
    *..Field Catalog for Basic List.
    DATA : IT_FIELDCAT  TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT  TYPE SLIS_FIELDCAT_ALV.
    *..Events For Basic List.
    DATA : IT_EVENTS TYPE SLIS_T_EVENT,
           WA_EVENTS TYPE SLIS_ALV_EVENT.
    *..Layout For Basic List
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    *..Sort Table For Basic List
    DATA: IT_SORT TYPE SLIS_SORTINFO_ALV OCCURS 0 WITH HEADER LINE.
               DATA DECLARATIONS                                         *
    DATA: V_FLAG,
          VINDEX TYPE SY-TABIX,
          TOTAL TYPE VBAP-KWMENG.     "Open order quantity
    *..To Store Program Name
    DATA: V_REPID  TYPE SYREPID.
    *..To know whether basic list contains any data
    Selection Screen.                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-H01.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR,
                    S_WERKS FOR MARC-WERKS,
                    S_LGORT FOR MARD-LGORT.
    SELECTION-SCREEN END OF BLOCK B1.
    Event:Initialization                                                 *
    INITIALIZATION.
      V_REPID = SY-REPID.
    AT Selection Screen.                                                 *
    AT SELECTION-SCREEN.
      PERFORM VALIDATIONS.
    Event: Start-of-Selection                                            *
    START-OF-SELECTION.
         To get data from vbap into internal table IT_VBAP
      PERFORM FETCH_OPEN_DATA.
          To get data into final internal table IT_FINAL
      IF V_FLAG = 'X'.
        PERFORM FETCH_FINAL_DATA.
      ENDIF.
      IF V_FLAG = ''.
        MESSAGE I010 WITH 'NO DATA TO BE DISPLAYED'.
        EXIT.
      ELSE.
      --Setting the FIELD CATALOG for ALV
        PERFORM FILL_FIELDCAT_HEADER.
    *-----Setting the LAYOUT for ALV
        PERFORM GET_LAYOUT.
    *-----Getting the ALV Events
        PERFORM GET_EVENT.
    *---- To Sort the list
        PERFORM DO_SORT.
      ENDIF.
    Event: End-of-Selection                                            *
    END-OF-SELECTION.
    *--Generating the ALV LIST DISPLAY
      PERFORM DISPLAY_LIST.
                             FORM DEFINITIONS                            *
    *&      Form  VALIDATIONS
          To validate data in selection screen
    -->  p1        text
    <--  p2        text
    FORM VALIDATIONS.
      PERFORM VALIDATE_MATNR.
      PERFORM VALIDATE_WERKS.
      PERFORM VALIDATE_LGORT.
      IF NOT ( ( MARA-MATNR IS INITIAL ) AND
              ( MARC-WERKS IS INITIAL ) AND
              ( MARD-LGORT IS INITIAL ) ).
        SELECT SINGLE MATNR
                      WERKS
                      LGORT
                      FROM MARD
          INTO (MARD-MATNR, MARD-WERKS, MARD-LGORT)
          WHERE MATNR = MARA-MATNR
            AND WERKS = MARC-WERKS
            AND LGORT = MARD-LGORT.
      ENDIF.
    ENDFORM.                    " VALIDATIONS
    *&      Form  VALIDATE_MATNR
          To validate MATNR
    -->  p1        text
    <--  p2        text
    FORM VALIDATE_MATNR.
      IF NOT S_MATNR[] IS INITIAL.
        SELECT MATNR
               UP TO 1 ROWS
               INTO (MARD-MATNR)
               FROM MARA
               WHERE MATNR IN S_MATNR.
        ENDSELECT.
      ENDIF.
      IF SY-SUBRC NE 0.
        MESSAGE E000 WITH TEXT-001.
      ENDIF.
    ENDFORM.                    " VALIDATE_MATNR
    *&      Form  VALIDATE_WERKS
          To validate plant
    -->  p1        text
    <--  p2        text
    FORM VALIDATE_WERKS.
      IF NOT S_WERKS[] IS INITIAL.
        SELECT WERKS
               UP TO 1 ROWS
               INTO (MARD-WERKS)
               FROM MARC
               WHERE WERKS IN S_WERKS.
        ENDSELECT.
      ENDIF.
      IF SY-SUBRC NE 0.
        MESSAGE E000 WITH TEXT-002.
      ENDIF.
    ENDFORM.                    " VALIDATE_WERKS
    *&      Form  VALIDATE_LGORT
          To validate storage
    -->  p1        text
    <--  p2        text
    FORM VALIDATE_LGORT.
      IF NOT S_LGORT[] IS INITIAL.
        SELECT LGORT
               UP TO 1 ROWS
               INTO (MARD-LGORT)
               FROM MARD
               WHERE LGORT IN S_LGORT.
        ENDSELECT.
      ENDIF.
      IF SY-SUBRC NE 0.
        MESSAGE E000 WITH TEXT-003.
      ENDIF.
    ENDFORM.                    " VALIDATE_LGORT
    *&      Form  FETCH_OPEN_DATA
          To get data into internal table IT_VBAP
    -->  p1        text
    <--  p2        text
    FORM FETCH_OPEN_DATA.
      IF NOT ( ( MARA-MATNR IS INITIAL ) AND
               ( MARC-WERKS IS INITIAL ) AND
               ( MARD-LGORT IS INITIAL ) ).
        SELECT VBELN
               POSNR
               KWMENG
               INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
               FROM VBAP
               WHERE MATNR IN S_MATNR
                 AND WERKS IN S_WERKS
                 AND LGORT IN S_LGORT.
      ENDIF.
      LOOP AT IT_VBAP.
        SELECT * FROM VBUP
                 INTO VBUP
                 WHERE VBELN = IT_VBAP-VBELN
                   AND POSNR = IT_VBAP-POSNR
                   AND LFSTA NE 'C'.
        ENDSELECT.
      ENDLOOP.
      IF SY-SUBRC NE 0.
        REFRESH IT_VBAP.
        MESSAGE E000 WITH TEXT-004.
        EXIT.
      ELSE.
        V_FLAG = 'X'.
      ENDIF.
          To get sum of all quantities as open order quantity
      LOOP AT IT_VBAP.
        TOTAL = TOTAL + IT_VBAP-KWMENG.
      ENDLOOP.
    ENDFORM.                    " FETCH_OPEN_DATA
    *&      Form  FETCH_FINAL_DATA
         To get data into final internal table IT_FINAL
    -->  p1        text
    <--  p2        text
    FORM FETCH_FINAL_DATA.
      SELECT A~MATNR
             A~WERKS
             A~LGORT
             MAKTX
             LABST
             INSME
             RETME
             UMLME
             VBELN
             POSNR
             KWMENG
             INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
             FROM MARD AS A
             INNER JOIN MAKT AS B
             ON AMATNR = BMATNR
              AND SPRAS = 'E'
             INNER JOIN VBAP AS C
             ON AMATNR = CMATNR
             FOR ALL ENTRIES IN IT_VBAP
             WHERE VBELN = IT_VBAP-VBELN
               AND POSNR = IT_VBAP-POSNR
               AND KWMENG = IT_VBAP-KWMENG
               AND A~MATNR IN S_MATNR
               AND A~WERKS IN S_WERKS
               AND A~LGORT IN S_LGORT.
      IF SY-SUBRC NE 0.
        V_FLAG = SPACE.
        MESSAGE E001 WITH 'No data found IN the selection criteria'.
        EXIT.
      ELSE.
        V_FLAG = 'X'.
      ENDIF.
    ENDFORM.                    " FETCH_FINAL_DATA
    *&      Form  FILL_FIELDCAT_HEADER
          text
    -->  p1        text
    <--  p2        text
    FORM FILL_FIELDCAT_HEADER .
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = V_REPID
         I_INTERNAL_TABNAME           = 'IT_FINAL'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = IT_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.
      LOOP AT IT_FIELDCAT INTO WA_FIELDCAT.
        CASE WA_FIELDCAT-FIELDNAME.
          WHEN 'KWMENG'.
           WA_FIELDCAT-COL_POS = '11'.
           WA_FIELDCAT-OUTPUTLEN = '22'.
           WA_FIELDCAT-SELTEXT_L = 'Net Value'.
            WA_FIELDCAT-DO_SUM    = 'X'.
        ENDCASE.
        MODIFY IT_FIELDCAT FROM WA_FIELDCAT INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.                    " FILL_FIELDCAT_HEADER
    *&      Form  GET_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM GET_LAYOUT .
      WA_LAYOUT-TOTALS_TEXT = 'TOTAL'.
    ENDFORM.                    " GET_LAYOUT
    *&      Form  GET_EVENT
          text
    -->  p1        text
    <--  p2        text
    FORM GET_EVENT .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 0
        IMPORTING
          ET_EVENTS       = IT_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.
      LOOP AT IT_EVENTS INTO WA_EVENTS.
        CASE WA_EVENTS-NAME.
          WHEN 'TOP_OF_PAGE'.
            WA_EVENTS-FORM = 'FILL_LIST_HEADER'.
          WHEN 'USER_COMMAND'.
            WA_EVENTS-FORM = 'PROCESS_BASIC_LIST'.
        ENDCASE.
        MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.                    " GET_EVENT
          FORM FILL_LIST_HEADER                                         *
    FORM FILL_LIST_HEADER.
      WRITE:2'Report :' ,   SY-REPID,
           : 85 '         Intelligroup Asia Pvt Ltd' CENTERED,
           : 159 'Date  :' ,SY-DATUM,
           :/2'User   :',   SY-UNAME,
           : 82 '               Hyderabad         ' CENTERED ,
           : 159 'Pg.No :' ,SY-PAGNO,
           :/86 '           Stock Report    ' CENTERED.
      SKIP 2.
    ENDFORM.                    "FILL_LIST_HEADER
    *&      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             = V_REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
         IT_SORT                        = IT_SORT[]
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
         IT_EVENTS                      = 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
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_FINAL
       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  do_sort
          text
    -->  p1        text
    <--  p2        text
    FORM DO_SORT .
    *-- Populating the sort table
      IT_SORT-FIELDNAME = 'MATNR'.
      IT_SORT-TABNAME = 'IT_FINAL'.
      IT_SORT-UP = 'X'.
    it_sort-subtot = 'X'.
      APPEND IT_SORT.
    ENDFORM.                    " do_sort
    Thanks & Regards
    Sreenivasulu P

Maybe you are looking for

  • How can I create system image of Win-7 only on drive with Win-7 (NTFS) and Win-ME (FAT-32) system partitions

    I am trying to create a Windows 7 Image Backup on my Windows 7 Ultimate 32 bit PC. I have two bootable partitions on my hard drive. One is NTFS and contains the Win-7 system files. The other is FAT-32 and contains a Windows-ME system. When it comes t

  • How do I include the radio-button items on a second column as possible answers to the question?

    Using Adobe Acrobat Pro X, we created a fillable PDF from an existing PDF. One question can be answered by choosing one of four choices (radio buttons). The answers are laid out in a 2-by-2 arrangement. When Acrobat Pro converted the PDF into fillabl

  • From Mac mini to iMac?

    Hello I switched about 6 months ago when I bought a Mac mini, and I'm definitely loving the whole Mac-thing! However, the computer is kinda weak, I recently read that the video card on Mac mini stops working properly if the screen resolution exceeds

  • Oracle equivalent to SQL SERVER CLRClipString function

    Hello Friends, I am running the following sql query in SQL SERVER successfully .. select * from CLRSplitString('33,54,105,148,149,163,165,179,193,195,201,202,234,239,279,282,297,299,329,332,350,415,417,439,440,500,552,570,589,603,628,655', '', ',') x

  • OS X Mavericks Calendar issue

    After upgrading to OS X Mavericks, when I open my calendar on my MacBook pro it endlessly says "Moving calendars to server account..." I cannot acces calendar, and must force quit.  I have restarted my computer and upgraded Firefox and Safari. How do