Show SGA output

Hello guys:
I am trying to understand the out put of show sga command. Is there anybody who can explain what is Variable size and what is fixed size mean?
sql>show sga
Total System Global Area 268039216 bytes
Fixed Size 455728 bytes
Variable Size 184549376 bytes
Database Buffers 81920000 bytes
Redo Buffers 1114112 bytes
Thank you
~Keyur

This thread would be of some interest to you then:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:365088445659
You may also want to take a look at the user guide.
C.
Message was edited by:
cd

Similar Messages

  • I want to show console output in my cmd prompt in C# winform application

    Hi,
    I'm launching the some process in C# .net Winform appliaction. But i couldn't able to see console output on the screen. The process is getting launched but inside cmd prompt window, it is showing nothing. I would like to show something on cmd prompt. Please
    help on this.
     using (Process comxdcProcess = new System.Diagnostics.Process())
                            comxdcProcess.StartInfo.FileName = fileName;
                            comxdcProcess.StartInfo.Arguments = args;
                            comxdcProcess.StartInfo.RedirectStandardError = true;
                            comxdcProcess.StartInfo.RedirectStandardOutput = true;
                            comxdcProcess.StartInfo.UseShellExecute = false;
                            comxdcProcess.Start();
                            this.errorComment = comxdcProcess.StandardError.ReadToEnd();
                            StreamReader myStreamReader = comxdcProcess.StandardOutput;
                            //// Read the standard output of the spawned process. 
                            this.errorComment = myStreamReader.ReadToEnd();
                            comxdcProcess.WaitForExit();
    click "Proposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you Happy Programming! Hari

    @Hariprasadbrk
    Do you mean you have use process class to start "cmd prompt" And want to display some output in it?
    If so, there is no need to use RedirectStandardOutput property. This property means the output of an application is written to the
    Process.StandardOutput stream.
    // Setup the process with the ProcessStartInfo class.
    ProcessStartInfo start = new ProcessStartInfo();
    start.FileName = @"C:\7za.exe"; // Specify exe name not cmd exe.
    start.UseShellExecute = false;
    start.RedirectStandardOutput = true;
    // Start the process.
    using (Process process = Process.Start(start))
    // Read in all the text from the process with the StreamReader.
    using (StreamReader reader = process.StandardOutput)
    string result = reader.ReadToEnd();
    Console.Write(result);
    Output
    This section shows the output of the process.
    7-Zip (A) 4.60 beta Copyright (c) 1999-2008 Igor Pavlov 2008-08-19
    Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]
    [<@listfiles...>]
    So you can start a cmd exe.
    Please also take a look at the article from codeproject
    How to redirect Standard Input/Output of an application
    In summary, the shutdown proces is invoked from my application, and it displays the output from the process in RichTextBox control.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Background job not showing full output of Report

    Dear Experts
    we have created zpgm for stad report and try to take output as mail to particular user for future analysis bcaz stad gives only 2 days report only we need keep report for months together so when we run job in foreground it shows proper output but when same thing when we run from background it shows only some part of report in mail (we are unable to get full output through background job )
    we send mail through spool receipts we have created folder and maintain user for getting mails through so15 distribution list
    we need some input to come out of this major issue
    if there is any other workaround let me know
    Regards

    Hello,
    If a job is defined by transaction SM36, the print format parameters will only be taken into account, if they are saved as user specific print parameters of the batch user. If no user specific print format
    is defined,  the ALV standard logic will be processed adjusting the print format to the actual line size of the report.
    For example, the list line size is about 132 characters, the widest available format of the chosen printer will be selected X_65_132.
    The problem would be solved by defining a device type which is no format assigned to print, or by defining user specific print format parameters for the batch user, who creates the jobs in SM36 (see
    SAP note 1179399, item 6).
    Regards,
    David

  • How to run the report and show the output in excel file

    salam
    how to run the report and show the output in excel file,
    how to run the report and print the o/p via printer
    how to run the report and send the o/p via mail
    thank u all

    Hi,
    There are Parameters DESTTYPE, DESFORMAT and DESNAME. You can set these parameters to get as you want.
    1) Output in Excel File
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'DELIMITED');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<file_name>.XLS');2) output to printer
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<printer_name>');3) Email - Have to configure SMTP and all. ( i didn't checked it)
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'MAIL');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<email_id>');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • EEM variable for show command output and create a filename

    I'm configuring EEM applet, example CPU High event. When it triggers the event, action is "show tech | redirect tftp://x.x.x.x/showtechoutput". The EEM event is working fine and triggered the show tech output into the tftp server. My question is, i'd like to add maybe date/time in the filename so it will not overwrite the file everytime there is a triggered event.
    The EEM event variable i'm seeing in doc is "_event_pub_sec" but it won't work when i add after or before the filename. any idea?
    thanks in advance ...

    Adding $_event_pub_sec to the end of the filename should work:
    action 1.0 "show tech | redirect tftp://x.x.x.x/showtech.$_event_pub_sec"
    That said, TFTP is very particular about how files can be created.  Typically, a TFTP server will require the file to exist before a remote host can copy to it.  If the filename changes each second, this will not work.  Using a protocol like FTP or SCP may work better.

  • This code didnt show any output

    hi i m little new bie in swings
    plz check the following code it compile well without error but diidnt show any output.
    plz chk ii
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class GoMoku1 extends JFrame{
    JButton newGameButton; // Button for starting a new game.
    JButton resignButton; // Button that a player can use to end the
    // game by resigning.
    JLabel message; // Label for displaying messages to the user.
    public void GoMoku1() {
    Container content = getContentPane(); // Content pane of applet.
    content.setLayout(null); // I will do the layout myself.
    content.setBackground(new Color(0,150,0)); // Dark green background.
    Board board = new Board(); // Note: The constructor for the
    // board also creates the buttons
    // and label.
    content.add(board);
    content.add(newGameButton);
    content.add(resignButton);
    content.add(message);
    /* Set the position and size of each component by calling
    its setBounds() method. */
    board.setBounds(16,16,220,220);
    newGameButton.setBounds(310, 60, 120, 30);
    resignButton.setBounds(310, 120, 120, 30);
    message.setBounds(0, 350, 350, 30);
    public static void main(String[] args)
              GoMoku1 gm=new GoMoku1();
    // ----------------------- Nested class -----------------------------------
    class Board extends JPanel implements ActionListener, MouseListener {
    int[][] board; // The data for the board is kept here. The values
    // in this array are chosen from the following constants.
    static final int EMPTY = 0, // Represents an empty square.
    WHITE = 1, // A white piece.
    BLACK = 2; // A black piece.
    boolean gameInProgress; // Is a game currently in progress?
    int currentPlayer; // Whose turn is it now? The possible values
    // are WHITE and BLACK. (This is valid only while
    // a game is in progress.)
    int win_r1, win_c1, win_r2, win_c2; // When a player wins by getting five or more
    // pieces in a row, the squares at the
    // ends of the row are (win_r1,win_c1)
    // and (win_r2,win_c2). A red line is
    // drawn between these squares. When there
    // are no five pieces in a row, the value of
    // win_r1 is -1. The values are set in the
    // count() method. The value of win_r1 is
    // tested in the paintComponent() method.
    public Board() {
    // Constructor. Create the buttons and label. Listen for mouse
    // clicks and for clicks on the buttons. Create the board and
    // start the first game.
    setBackground(Color.lightGray);
    addMouseListener(this);
    resignButton = new JButton("Resign");
    resignButton.addActionListener(this);
    newGameButton = new JButton("New Game");
    newGameButton.addActionListener(this);
    message = new JLabel("",JLabel.CENTER);
    message.setFont(new Font("Serif", Font.BOLD, 14));
    message.setForeground(Color.green);
    board = new int[ 15][ 15];
    doNewGame();
    public void actionPerformed(ActionEvent evt) {
    // Respond to user's click on one of the two buttons.
    Object src = evt.getSource();
    if (src == newGameButton)
    doNewGame();
    else if (src == resignButton)
    doResign();
    void doNewGame() {
    // Begin a new game.
    if (gameInProgress == true) {
    // This should not be possible, but it doesn't
    // hurt to check.
    message.setText("Finish the current game first!");
    return;
    for (int row = 0; row < 15; row++) // Fill the board with EMPTYs
    for (int col = 0; col < 15; col++)
    board[row][col] = EMPTY;
    currentPlayer = BLACK; // BLACK moves first.
    message.setText("BLACK: Make your move.");
    gameInProgress = true;
    newGameButton.setEnabled(false);
    resignButton.setEnabled(true);
    win_r1 = -1; // This value indicates that no red line is to be drawn.
    repaint();
    void doResign() {
    // Current player resigns. Game ends. Opponent wins.
    if (gameInProgress == false) {
    // This should not be possible.
    message.setText("There is no game in progress!");
    return;
    if (currentPlayer == WHITE)
    message.setText("WHITE resigns. BLACK wins.");
    else
    message.setText("BLACK resigns. WHITE wins.");
    newGameButton.setEnabled(true);
    resignButton.setEnabled(false);
    gameInProgress = false;
    void gameOver(String str) {
    // The game ends. The parameter, str, is displayed as a message.
    message.setText(str);
    newGameButton.setEnabled(true);
    resignButton.setEnabled(false);
    gameInProgress = false;
    void doClickSquare(int row, int col) {
    // This is called by mousePressed() when a player clicks on the
    // square in the specified row and col. It has already been checked
    // that a game is, in fact, in progress.
    /* Check that the user clicked an empty square. If not, show an
    error message and exit. */
    if ( board[row][col] != EMPTY ) {
    if (currentPlayer == BLACK)
    message.setText("BLACK: Please click an empty square.");
    else
    message.setText("WHITE: Please click an empty square.");
    return;
    /* Make the move. Check if the board is full or if the move
    is a winning move. If so, the game ends. If not, then it's
    the other user's turn. */
    board[row][col] = currentPlayer; // Make the move.
    repaint();
    if (winner(row,col)) {  // First, check for a winner.
    if (currentPlayer == WHITE)
    gameOver("WHITE wins the game!");
    else
    gameOver("BLACK wins the game!");
    return;
    boolean emptySpace = false; // Check if the board is full.
    for (int i = 0; i < 15; i++)
    for (int j = 0; j < 15; j++)
    if (board[i][j] == EMPTY)
    emptySpace = true;
    if (emptySpace == false) {
    gameOver("The game ends in a draw.");
    return;
    /* Continue the game. It's the other player's turn. */
    if (currentPlayer == BLACK) {
    currentPlayer = WHITE;
    message.setText("WHITE: Make your move.");
    else { 
    currentPlayer = BLACK;
    message.setText("BLACK: Make your move.");
    } // end doClickSquare()
    private boolean winner(int row, int col) {
    // This is called just after a piece has been played on the
    // square in the specified row and column. It determines
    // whether that was a winning move by counting the number
    // of squares in a line in each of the four possible
    // directions from (row,col). If there are 5 squares (or more)
    // in a row in any direction, then the game is won.
    if (count( board[row][col], row, col, 1, 0 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 0, 1 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 1, -1 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 1, 1 ) >= 5)
    return true;
    /* When we get to this point, we know that the game is not
    won. The value of win_r1, which was changed in the count()
    method, has to be reset to -1, to avoid drawing a red line
    on the board. */
    win_r1 = -1;
    return false;
    } // end winner()
    private int count(int player, int row, int col, int dirX, int dirY) {
    // Counts the number of the specified player's pieces starting at
    // square (row,col) and extending along the direction specified by
    // (dirX,dirY). It is assumed that the player has a piece at
    // (row,col). This method looks at the squares (row + dirX, col+dirY),
    // (row + 2*dirX, col + 2*dirY), ... until it hits a square that is
    // off the board or is not occupied by one of the players pieces.
    // It counts the squares that are occupied by the player's pieces.
    // Furthermore, it sets (win_r1,win_c1) to mark last position where
    // it saw one of the player's pieces. Then, it looks in the
    // opposite direction, at squares (row - dirX, col-dirY),
    // (row - 2*dirX, col - 2*dirY), ... and does the same thing.
    // Except, this time it sets (win_r2,win_c2) to mark the last piece.
    // Note: The values of dirX and dirY must be 0, 1, or -1. At least
    // one of them must be non-zero.
    int ct = 1; // Number of pieces in a row belonging to the player.
    int r, c; // A row and column to be examined
    r = row + dirX; // Look at square in specified direction.
    c = col + dirY;
    while ( r >= 0 && r < 15 && c >= 0 && c < 15 && board[r][c] == player ) {
    // Square is on the board and contains one of the players's pieces.
    ct++;
    r += dirX; // Go on to next square in this direction.
    c += dirY;
    win_r1 = r - dirX; // The next-to-last square looked at.
    win_c1 = c - dirY; // (The LAST one looked at was off the board or
    // did not contain one of the player's pieces.
    r = row - dirX; // Look in the opposite direction.
    c = col - dirY;
    while ( r >= 0 && r < 15 && c >= 0 && c < 15 && board[r][c] == player ) {
    // Square is on the board and contains one of the players's pieces.
    ct++;
    r -= dirX; // Go on to next square in this direction.
    c -= dirY;
    win_r2 = r + dirX;
    win_c2 = c + dirY;
    // At this point, (win_r1,win_c1) and (win_r2,win_c2) mark the endpoints
    // of the line of pieces belonging to the player.
    return ct;
    } // end count()
    public void paintComponent(Graphics g) {
    super.paintComponent(g); // Fill with background color, lightGray
    /* Draw a two-pixel black border around the edges of the canvas,
    and draw grid lines in darkGray. */
    g.setColor(Color.darkGray);
    for (int i = 1; i < 15; i++) {
    g.drawLine(1 + 15*i, 0, 1 + 15*i, getSize().height);
    g.drawLine(0, 1 + 15*i, getSize().width, 1 + 15*i);
    g.setColor(Color.black);
    g.drawRect(0,0,getSize().width-1,getSize().height-1);
    g.drawRect(1,1,getSize().width-3,getSize().height-3);
    /* Draw the pieces that are on the board. */
    for (int row = 0; row < 15; row++)
    for (int col = 0; col < 15; col++)
    if (board[row][col] != EMPTY)
    drawPiece(g, board[row][col], row, col);
    /* If the game has been won, then win_r1 >= 0. Draw a line to mark
    the five winning pieces. */
    if (win_r1 >= 0)
    drawWinLine(g);
    } // end paintComponent()
    private void drawPiece(Graphics g, int piece, int row, int col) {
    // Draw a piece in the square at (row,col). The color is specified
    // by the piece parameter, which should be either BLACK or WHITE.
    if (piece == WHITE)
    g.setColor(Color.white);
    else
    g.setColor(Color.black);
    g.fillOval(3 + 15*col, 3 + 15*row, 10, 10);
    private void drawWinLine(Graphics g) {
    // Draw a 2-pixel wide red line from the middle of the square at
    // (win_r1,win_c1) to the middle of the square at (win_r2,win_c2).
    // This routine is called to mark the 5 pieces that won the game.
    // The values of the variables are set in the count() method.
    g.setColor(Color.red);
    g.drawLine( 8 + 15*win_c1, 8 + 15*win_r1, 8 + 15*win_c2, 8 + 15*win_r2 );
    if (win_r1 == win_r2)
    g.drawLine( 8 + 15*win_c1, 7 + 15*win_r1, 8 + 15*win_c2, 7 + 15*win_r2 );
    else
    g.drawLine( 7 + 15*win_c1, 8 + 15*win_r1, 7 + 15*win_c2, 8 + 15*win_r2 );
    public Dimension getPreferredSize() {
    // Specify desired size for this component. Note:
    // the size MUST be 172 by 172.
    return new Dimension(220, 220);
    public Dimension getMinimumSize() {
    return new Dimension(220, 220);
    public Dimension getMaximumSize() {
    return new Dimension(220, 220);
    public void mousePressed(MouseEvent evt) {
    // Respond to a user click on the board. If no game is
    // in progress, show an error message. Otherwise, find
    // the row and column that the user clicked and call
    // doClickSquare() to handle it.
    if (gameInProgress == false)
    message.setText("Click \"New Game\" to start a new game.");
    else {
    int col = (evt.getX() - 2) / 15;
    int row = (evt.getY() - 2) / 15;
    if (col >= 0 && col < 15 && row >= 0 && row < 15)
    doClickSquare(row,col);
    public void mouseReleased(MouseEvent evt) { }
    public void mouseClicked(MouseEvent evt) { }
    public void mouseEntered(MouseEvent evt) { }
    public void mouseExited(MouseEvent evt) { }
    } // end nested class Board
    } // end class GoMoku

    And doesn't work for me:
    init:
    deps-jar:
    Compiling 1 source file to C:\jdek\Prova\build\classes
    C:\jdek\Prova\src\gugi\GoMoku1.java:189: incomparable types: int[] and int
    if (board[j] == EMPTY)
    1 error
    BUILD FAILED (total time: 0 seconds)

  • How can I clear a SHOW EPHONE output ?

    I need to know is there a command to delete the show ephone output for the unregistered phones.
    R_VOZ_JGS#show ephone
    ephone-1 Mac: TCP socket:[-1] activeLine:0 UNREGISTERED
    mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0
    IP:0.0.0.0 0 Unknown 0  keepalive 0 max_line 0
    ephone-2 Mac: TCP socket:[-1] activeLine:0 DECEASED
    mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0
    IP:10.1.9.54 16223 ATA Phone keepalive 5 max_line 2 dual-line
    ephone-3 Mac: TCP socket:[-1] activeLine:0 UNREGISTERED
    mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0
    IP:10.1.9.54 3970 ATA Phone keepalive 18 max_line 2 dual-line

    I agree with you Manish, but since my phones are not going to SRST mode at the moment, so I was good at it . I immediately put back all the 19 commands I had configured and I was good to go

  • Submit a program and skip output or dont show the output (alv list)

    hi,
    is it possible to use the submit command and skip output or don't show the output (alv list) ?
    Regrads
    ertas

    Hi all,
    I get the message
    REPORT  ZTEST.
    DATA: jtab TYPE TABLE OF sbook,
          wa_jtab LIKE LINE OF jtab,
          jtab2 TYPE z_incident_li OCCURS 0 WITH HEADER LINE.
    submit Z_INCIDENT_LIST EXPORTING LIST TO MEMORY AND RETURN.
    IMPORT lt_incident_res TO  jtab2 FROM MEMORY ID 'table'.
    LOOP AT jtab2 .
      WRITE / jtab2-RECN.
    ENDLOOP.
    Runtime Errors         RAISE_EXCEPTION
    Date and Time          12.06.2008 17:54:00
    Short text
         Exception condition "CNTL_ERROR" raised.
    What happened?
         The current ABAP/4 program encountered an unexpected
         situation.
    Error analysis
         A RAISE statement in the program "CL_GUI_CONTROL================CP" rais
          exception
         condition "CNTL_ERROR".
         Since the exception was not intercepted by a superior
         program, processing was terminated.
         Short description of exception condition:
         For detailed documentation of the exception condition, use
         Transaction SE37 (Function Library). You can take the called
         function module from the display of active calls.

  • AppBuilder Application doesnt show the output

    Hi All,
      I am doing the sample application in AppBuilder, when i run the application it opens a new browser window but it doesnt show the output.
    this is the problem, how to resolve this?
    If any body come across this issue please help me.
    Regards,
    Sravanya

    Hi Sravanya K,
    There seems to be some compatibility issue with latest Chrome update. (All the other pre requisites have nt had any releases very recently)
    Last release of other Pre requisites :
    Node JS - 5th june 2014 ( Node.js ChangeLog )
    JDK - (its to be manually updated).
    APP Builder (appbuilder-1.0.1252.zip is the last release which happened a long time back )
    Google Chrome - Can find latest release logs in Chrome Releases and chrome has an Update almost everyday
    UI5 Liraries - As per OpenUI5 - Download  16 th July 2014 is the last release of Ui5 libraries.
    More over App builder does not need any internet connectivity to atleast run the sample applications / templates of SuperList,Chart. (so the issue might be internally in the system using these pre requisites )
    So i certainly doubt the Auto Update feature of Google Chrome , causing this issue.
    Though this currently have nt worked in latest version of chrome in my system , other major browsers are still supported .
    As a work around can suggest to work with other browsers.
    I also tried with Safari , Firefox and  safari  worked satisfactorily -
    (Chrome, Safari are recommended for App Builder ) (Firefox worked partially)
    attached is the screenshot of Sample Application running in Safari
    Regards
    Virinchy

  • Ncurses won't show any output nor accept input (SOLVED .sort of)

    Hi
    I have an elderly application (PB/PG for Linux) that builds and runs fine on other distros than ArchLinux (AL). When I build it on AL it builds fine, meaning that the include files and the library are found. When I run the program it does not show any output on the screen and it will not accept keyboard input.
    I must admit that I am somewhat at a loss as to what could be wrong, so any help will be much appreciated.
    Have any of you experienced this (or a similar) problem? And how did you solve it?
    Regards,
    Bent
    EDIT 2007-12-04: The root cause of this problem had nothing to do with Ncurses whatsoever. I have found another tree to bark up. Sorry for the inconvenience.
    Bent
    Last edited by BentB (2007-12-04 13:46:43)

    So rather quick addition.
    I just played with the AccelMethod option in /etc/X11/xorg.conf.d/20-intel.conf and found that this only occurs when it is set to "uxe" or "glamor" changing the setting to "sna" does not result in this problem.
    I had originally changed this setting from sna due to font rendering issues. I'll leave it as sna for now and see if those same issues still exist.
    Marked solved, but may not a good solution if font issues with sna are still present.

  • What does act/unsup mean in the "show vlan" output

    I have 2 same switches with factory default configuration. I found that once those 2 switches are up, the show vlan output is different.
    one of the switch shows active in the status column for the vlans 1002-1005, and the other switch shows act/unsup for same set of vlan.
    I've delete the vlan.dat file and reboot but the problem is still there.
    Why?
    Can anyone tell me what is the meaning of act/unsup?

    Hi,
    The 'act/unsup' is stating that the switch doesn't support TR or FDDI vlans.
    Check the versions of IOS on both switches to see if they match.
    Regards,
    Phil.

  • Problem :ALV:Deletion Flags not showing in output

    hi all !
    I have a alv program which displays customer data.there are three deletion flags columns in the output.
    First deletion flag will be: KNA1-LOEVM
    Second deletion flag will be: KNB1-LOEVM
    Third deletion flag will be: KNVV-LOEVM
    earlier all three were showing.but now no one is showing.i'm pasting my code here if any expert can have a look and find out the BUG.
    CODE STARTS----
    report zqsdcap_cust.
    INCLUDE DECLARATIONS
    include:
      ziabapcapph_macros.                   "Holcim Useful Macros
    TABLE DECLARATIONS
    tables:
      tvko,                                "Org. Unit: Sales Organizations
      t001,                                "Company codes
      kna1,                                "Customer Master
      knvv,                                "Customer master sales
      knvi,                                "Customer tax classificat'n
      knb1,                                "Customer master company code
         <<CR003-DEVK949538 start ins
      adr6.                                "SMTP numbers
         <<CR003-DEVK949538 end ins
    TYPE DECLARATIONS
    type-pools:
      slis.
    STRUCTURE DECLARATIONS
    Define structure for keep data in ALV list
    data: begin of gs_output_list,
            vkorg   like  knvv-vkorg,                "Sales organization
            ktokd   like  kna1-ktokd,                "Customer A/C grp
            kunnr   like  kna1-kunnr,                "Customer number
            vtweg   like  knvv-vtweg,                "Distribution channel
            name1   like  kna1-name1,                           "Name1
            name3   like  kna1-name3,                           "Name3
            name4   like  kna1-name4,                           "Name4
            stras   like  kna1-stras,                "Street
            cityc   like  kna1-cityc,                "City
            bezei1  like  t005h-bezei,               "Sales office
            land1   like  kna1-land1,                "Country
            regio   like  kna1-regio,                "Region
            bezei2  like  t005u-bezei,               "Region decription
            kdgrp   like  knvv-kdgrp,                "Customer group
            ktext   like  t151t-ktext,               "Cust grp name
            bzirk   like  knvv-bzirk,                "Sales district
            bztxt   like  t171t-bztxt,               "Description
            zterm   like  knvv-zterm,                "Payment term
            lzone   like  kna1-lzone,                "Transport zone
            vtext   like  tzont-vtext,               "Description
            erdat   like  kna1-erdat,                "Creation date
          end of gs_output_list.
    Internal table for customer tax data
    data: begin of gs_output_tax,
            vkorg  like  knvv-vkorg,                 "Sales organization
            kunnr  like  kna1-kunnr,                 "Customer number
            vtweg  like  knvv-vtweg,                 "Distribution channel
            name1  like  kna1-name1,                            "Name1
            name3  like  kna1-name3,                            "Name3
            name4  like  kna1-name4,                            "Name4
            ort01  like  kna1-ort01,                 "City
            stcd1  like  kna1-stcd1,                 "STD code
            spart  like  knvv-spart,                 "Division
            taxkd  like  knvi-taxkd,                 "Tax classific'n
            tatyp  like  knvi-tatyp,                 "Tax category
            vtext  like  tskdt-vtext,                "Tax description
          end of gs_output_tax.
    Internal table for HVL customer master
    data: begin of gs_output_hvl,
            kunnr  like  kna1-kunnr,                 "Customer number
            stceg  like  kna1-stceg,                 "VAT registration no
            telfx  like  kna1-telfx,                 "Fax number
            telf1  like  kna1-telf1,                 "First telephone number
            stras  like  kna1-stras,                 "House number and stret
            ort02  like  kna1-ort02,                 "District
            cityc  like  kna1-cityc,                 "City code
            bezei  like  t005h-bezei,                "City description
            regio  like  kna1-regio,                 "Region
            ort01  like  kna1-ort01,                 "City
            name2  like  kna1-name2,                            "Name2
            name1  like  kna1-name1,                            "Name1
            bzirk  like  knvv-bzirk,                 "Sales district
            spart  like  knvv-spart,                 "Division
            vtweg  like  knvv-vtweg,                 "Distribution channel
            vkorg  like  knvv-vkorg,                 "Sales organization
          end of gs_output_hvl.
    Internal table for customer database CRM
    data: begin of gs_output_crm,
            vkorg      like  knvv-vkorg,             "Sales organization
            vtweg      like  knvv-vtweg,             "Distribution channel
            bzirk      like  knvv-bzirk,             "Sales district
            kunnr      like  kna1-kunnr,             "Customer number
            name1      like  kna1-name1,                        "Name1
            name2      like  kna1-name2,                        "Name2
            stras      like  kna1-stras,             "House number street
            ort01      like  kna1-ort01,             "City
            ort02      like  kna1-ort02,             "District
            pstlz      like  kna1-pstlz,             "Postal code
            cityc      like  kna1-cityc,             "City code
            telf1      like  kna1-telf1,             "First telephone number
            telfx      like  kna1-telfx,             "Fax number
            vkbur      like  knvv-vkbur,             "Sales office
            regio      like  kna1-regio,             "Region
            vkgrp      like  knvv-vkgrp,             "Sales group
            kdgrp      like  knvv-kdgrp,             "Customer group
            kvgr3      like  knvv-kvgr3,             "Customer group 3
            altkn      like  knb1-altkn,             "Previous record number
            erdat      like  knvv-erdat,             "Creation date
            found_dat  like  zcrm_bp_ext-found_dat,  "Found date
          <<CR000-DEVK943142 start del
          versg      like  knvv-versg,             "Customer statistic grp
          bukrs      like  knb1-bukrs,             "Company code
          <<CR000-DEVK943142 end del
          end of gs_output_crm.
    Internal table for customer information
    data: begin of gs_output_info,
            kunnr           like  kna1-kunnr,        "Customer number
            vkorg           like  knvv-vkorg,        "Sales organization
            vtweg           like  knvv-vtweg,        "Distribution channel
            stcd2           like  kna1-stcd2,        "Tax code
            name1           like  kna1-name1,        "Name1
            name2           like  kna1-name2,        "Name2
          <<CR002-DEVK944835 start ins
            name3           like  kna1-name3,        "Name3
          <<CR002-DEVK944835 end ins
            stras           like  kna1-stras,        "House number street
            ort01           like  kna1-ort01,        "City
            ort02           like  kna1-ort02,        "District
            pstlz           like  kna1-pstlz,        "Postal code
            regio           like  kna1-regio,        "Region
            land1           like  kna1-land1,        "Country code
            cityc           like  kna1-cityc,        "City code
            telf1           like  kna1-telf1,        "First telephone number
            telfx           like  kna1-telfx,        "Fax number
          <<CR001-DEVK944239 start ins
            bzirk           like  knvv-bzirk,        "Sales District
            vkbur           like  knvv-vkbur,        "Sales Office
            kdgrp           like  knvv-kdgrp,        "Customer group
          <<CR001-DEVK944239 end ins
            vkgrp           like  knvv-vkgrp,        "Sales group
            kvgr3           like  knvv-kvgr3,        "Customer group 3
            versg           like  knvv-versg,        "Customer stat grp
            kdkg2           like  kna1-kdkg2,        "Customer condition gp2
            kdkg1           like  kna1-kdkg1,        "Customer condition gp1
          <<CR001-DEVK944239 start del
          kdgrp           like  knvv-kdgrp,        "Customer group
          <<CR001-DEVK944239 end del
            altkn           like  knb1-altkn,        "Previous record#
            erdat           like  knvv-erdat,        "Creation date
            note_text(200)  type  c,                 "<<CR003-DEVK949538 ins
            smtp_addr       like  adr6-smtp_addr,    "<<CR003-DEVK949538 ins
            loevm1          like  kna1-loevm,        "Deletion flag all
            loevm2          like  knb1-loevm,        "Deletion flag Cd
            loevm3          like  knvv-loevm,        "Deletion flag sal
          end of gs_output_info.
    ALV Grid Declaration
    data:
      gs_fieldcat             type  slis_fieldcat_alv,
      gs_layout               type  slis_layout_alv,
      gs_event                type  slis_t_event,
      gs_variant              like  disvariant,
      gs_sort_info            type  slis_sortinfo_alv,
      gs_exit_caused_by_user  type  slis_exit_by_user,
      gs_tabname              type  slis_tabname,
      gs_header               type  slis_entry.
    INTERNAL TABLE DECLARATIONS
    Define internal table for keep data in ALV list
    data:
      gt_output_list       like  table of gs_output_list,
      gt_output_tax        like  table of gs_output_tax,
      gt_output_hvl        like  table of gs_output_hvl,
      gt_output_crm        like  table of gs_output_crm,
      gt_output_info       like  table of gs_output_info,
    <<CR003-DEVK949538 start ins
      gv_text              like  tline occurs 0 with header line,
    <<CR003-DEVK949538 start ins
    ALV Grid Declaration
      gt_fieldcat           type  slis_t_fieldcat_alv,
      gt_list_top_of_page   type  slis_t_listheader,
      gt_list_top_of_page2  type  slis_t_listheader,
      gt_sort_info          type  slis_t_sortinfo_alv.
    VARIABLE DECLARATIONS
    data:
    ALV Grid Declaration
      gv_save,
      gv_exit_caused_by_caller,
      gv_repid         type  sy-repid,
      gv_user_command  type  slis_formname value 'USER_COMMAND',
      gv_top_of_page   type  slis_formname value 'TOP_OF_PAGE',
      gv_top_of_list   type  slis_formname value 'TOP_OF_LIST',
      gv_end_of_list   type  slis_formname value 'END_OF_LIST',
      lv_store         like  thead-tdname,           "<<CR003-DEVK949538 ins
      lv_id            like  thead-tdid,             "<<CR003-DEVK949538 ins
      lv_lines         type  i.                      "<<CR003-DEVK949538 ins
    SELECTION SCREEN DECLARATIONS
    Define selection-screen of query
    selection-screen: begin of block blk with frame title text-001.
    select-options:   s_vkorg  for   knvv-vkorg           "Sales org
                                     obligatory
                                     memory id vko,
                      s_bzirk  for   knvv-bzirk,          "Sales district
                      s_vtweg  for   knvv-vtweg,          "Dist channel
                      s_spart  for   knvv-spart           "Division
                                     default 'CM',
                      s_taxkd  for   knvi-taxkd,          "Tax classific'n
                      s_kunnr  for   kna1-kunnr,          "Customer number
                      s_regio  for   kna1-regio,          "Region
                      s_kdgrp  for   knvv-kdgrp,          "Customer group
                      s_vkgrp  for   knvv-vkgrp,          "Sales group
                      s_vkbur  for   knvv-vkbur,          "Sales office
                      s_lzone  for   kna1-lzone,          "Zone
                      s_erdat  for   kna1-erdat,          "Creation date
                      s_zuawa  for   knb1-zuawa,          "Key for sorting
                      s_ktokd  for   kna1-ktokd,          "Customer A/C grp
                      s_altkn  for   knb1-altkn,          "Previous rec no
                      s_bukrs  for   knb1-bukrs           "Company code
                                     obligatory
                                     memory id buk,
                     s_loevm1 for   kna1-loevm,          "Deletion flag all
                     s_loevm2 for   knb1-loevm,          "Deletion flag Cd
                     s_loevm3 for   knvv-loevm.          "Deletion flag sal
    selection-screen: end of block blk.
    selection-screen: begin of block b2 with frame title text-002.
    parameters:       pr_cust1  radiobutton group a1
                                default 'X'
                                user-command bkg,
                      pr_cust2  radiobutton group a1,
                      pr_cust3  radiobutton group a1,
                      pr_cust4  radiobutton group a1,
                      pr_cust5  radiobutton group a1.
    selection-screen: end of block b2.
    AT SELECTION-SCREEN ON S_VKORG
    at selection-screen on s_vkorg.
      select  vkorg
        into  tvko-vkorg
        from  tvko
       where  vkorg in s_vkorg.
      authorization check for sales org.
        authority-check object 'V_VBRK_VKO'
                            id 'VKORG' field tvko-vkorg
                            id 'ACTVT' field '03'.
        check sy-subrc ne 0.
        message e002(zgen) with 'No authorization for sales org.'
                                 tvko-vkorg.
      endselect.
    AT SELECTION-SCREEN ON S_BUKRS
    at selection-screen on s_bukrs.
      if pr_cust4 eq 'X' or
         pr_cust5 eq 'X'.
        select  bukrs
          into  t001-bukrs
          from  t001
         where  bukrs in s_bukrs.
        authorization check for plant and company code
          authority-check object 'A_S_WERK'
                              id 'BUKRS' field t001-bukrs
                              id 'WERKS' dummy.
          check sy-subrc ne 0.
          message e002(zgen) with 'No authorization for this company code.'
                                   t001-bukrs.
        endselect.
      endif.
    AT SELECTION-SCREEN OUTPUT
    at selection-screen output.
      loop at screen .
        if pr_cust1 eq 'X'.
          if screen-name = 'S_VTWEG-LOW'   or
             screen-name = 'S_VTWEG-HIGH'  or
             screen-name = 'S_SPART-LOW'   or
             screen-name = 'S_SPART-HIGH'  or
             screen-name = 'S_TAXKD-LOW'   or
             screen-name = 'S_TAXKD-HIGH'  or
             screen-name = 'S_BUKRS-LOW'   or
             screen-name = 'S_BUKRS-HIGH'  or
             screen-name = 'S_ERDAT-LOW'   or
             screen-name = 'S_ERDAT-HIGH'  or
             screen-name = 'S_ALTKN-LOW'   or
             screen-name = 'S_ALTKN-HIGH'  or
             screen-name = 'S_VKBUR-LOW'   or
             screen-name = 'S_VKBUR-HIGH'  or
             screen-name = 'S_LOEVM1-LOW'  or
             screen-name = 'S_LOEVM1-HIGH' or
             screen-name = 'S_LOEVM2-LOW'  or
             screen-name = 'S_LOEVM2-HIGH' or
             screen-name = 'S_LOEVM3-LOW'  or
             screen-name = 'S_LOEVM3-HIGH'.
            screen-input = 0.
          endif.
        elseif pr_cust2 eq 'X'.
          if screen-name = 'S_BZIRK-LOW'    or
             screen-name = 'S_BZIRK-HIGH'   or
             screen-name = 'S_KDGRP-LOW'    or
             screen-name = 'S_KDGRP-HIGH'   or
             screen-name = 'S_LZONE-LOW'    or
             screen-name = 'S_LZONE-HIGH'   or
             screen-name = 'S_KTOKD-LOW'    or
             screen-name = 'S_KTOKD-HIGH'   or
             screen-name = 'S_ERDAT-LOW'    or
             screen-name = 'S_ERDAT-HIGH'   or
             screen-name = 'S_KTOKD-LOW'    or
             screen-name = 'S_KTOKD-HIGH'   or
             screen-name = 'S_ALTKN-LOW'    or
             screen-name = 'S_ALTKN-HIGH'   or
             screen-name = 'S_VKBUR-LOW'    or
             screen-name = 'S_VKBUR-HIGH'   or
             screen-name = 'S_LOEVM1-LOW'   or
             screen-name = 'S_LOEVM1-HIGH'  or
             screen-name = 'S_LOEVM2-LOW'   or
             screen-name = 'S_LOEVM2-HIGH'  or
             screen-name = 'S_LOEVM3-LOW'   or
             screen-name = 'S_LOEVM3-HIGH'  or
             screen-name = 'S_BUKRS-LOW'    or
             screen-name = 'S_BUKRS-HIGH'   or
             screen-name = 'S_VKGRP-LOW'    or
             screen-name = 'S_VKGRP-HIGH'.
            screen-input = 0.
          endif.
        elseif pr_cust3 eq 'X'.
          if screen-name = 'S_BZIRK-LOW'   or
             screen-name = 'S_BZIRK-HIGH'  or
             screen-name = 'S_KDGRP-LOW'   or
             screen-name = 'S_KDGRP-HIGH'  or
             screen-name = 'S_LZONE-LOW'   or
             screen-name = 'S_LZONE-HIGH'  or
             screen-name = 'S_ERDAT-LOW'   or
             screen-name = 'S_ERDAT-HIGH'  or
             screen-name = 'S_KTOKD-LOW'   or
             screen-name = 'S_KTOKD-HIGH'  or
             screen-name = 'S_SPART-LOW'   or
             screen-name = 'S_SPART-HIGH'  or
             screen-name = 'S_TAXKD-LOW'   or
             screen-name = 'S_TAXKD-HIGH'  or
             screen-name = 'S_REGIO-LOW'   or
             screen-name = 'S_REGIO-HIGH'  or
             screen-name = 'S_ALTKN-LOW'   or
             screen-name = 'S_ALTKN-HIGH'  or
             screen-name = 'S_VKBUR-LOW'   or
             screen-name = 'S_VKBUR-HIGH'  or
             screen-name = 'S_LOEVM1-LOW'  or
             screen-name = 'S_LOEVM1-HIGH' or
             screen-name = 'S_LOEVM2-LOW'  or
             screen-name = 'S_LOEVM2-HIGH' or
             screen-name = 'S_LOEVM3-LOW'  or
             screen-name = 'S_LOEVM3-HIGH' or
             screen-name = 'S_BUKRS-LOW'   or
             screen-name = 'S_BUKRS-HIGH'  or
             screen-name = 'S_VKGRP-LOW'   or
             screen-name = 'S_VKGRP-HIGH'  or
             screen-name = 'S_VTWEG-LOW'   or
             screen-name = 'S_VTWEG-HIGH'.
            screen-input = 0.
          endif.
        elseif pr_cust4 eq 'X'.
          if screen-name = 'S_LZONE-LOW'  or
             screen-name = 'S_LZONE-HIGH' or
             screen-name = 'S_TAXKD-LOW'  or
             screen-name = 'S_TAXKD-HIGH' or
             screen-name = 'S_REGIO-LOW'  or
             screen-name = 'S_REGIO-HIGH' or
             screen-name = 'S_ZUAWA-LOW'  or
             screen-name = 'S_ZUAWA-HIGH'.
            screen-input = 0.
          endif.
        else.
          if screen-name = 'S_LZONE-LOW'   or
             screen-name = 'S_LZONE-HIGH'  or
             screen-name = 'S_TAXKD-LOW'   or
             screen-name = 'S_TAXKD-HIGH'.
            screen-input = 0.
          endif.
        endif.
        modify screen.
      endloop.
    INITIALIZATION
    initialization.
      perform deactivate_program using sy-cprog.
    START OF SELECTION
    start-of-selection.
    Customized function to get data from database table
      perform get_data.
    <<CR003-DEVK949538 start ins
      perform get_internal_note_text tables gt_output_info.
    <<CR003-DEVK949538 end ins
    Create sort of ALV list
      perform build_sort.
    Send data to ALV list to display
      if pr_cust1 eq 'X'.
        gs_tabname = text-003.
        gs_header  = text-004.
        perform write_alv_report tables gt_output_list
                                        gt_sort_info.
      elseif pr_cust2 eq 'X'.
        gs_tabname = text-005.
        gs_header  = text-006.
        perform write_alv_report tables gt_output_tax
                                        gt_sort_info.
      elseif pr_cust3 eq 'X'.
        gs_tabname = text-007.
        gs_header  = text-008.
        perform write_alv_report tables gt_output_hvl
                                        gt_sort_info.
      elseif pr_cust4 eq 'X'.
        gs_tabname = text-009.
        gs_header  = text-010.
        perform write_alv_report tables gt_output_crm
                                        gt_sort_info.
      else.
        gs_tabname = text-011.
        gs_header  = text-012.
        perform write_alv_report tables gt_output_info
                                        gt_sort_info .
      endif.
    FORM EVENTTAB_FIELD
    Fill Event tab, for ALV Grid Display
    form eventtab_field using gs_events type slis_t_event.
      data:
        ls_event  type  slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gs_events.
      read table gs_events with key name = slis_ev_top_of_page
                               into ls_event.
      if sy-subrc = 0.
        move gv_top_of_page to ls_event-form.
        append ls_event     to gs_events.
      endif.
    endform.                    " eventtab_field
    FORM TOP_OF_PAGE
    Write at Top of Page of ALV grid
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = gt_list_top_of_page.
    endform.                    "top_of_page
    FORM COMMENT_BUILD
    Write header of ALV grid
    form comment_build using lt_top_of_page type slis_t_listheader
                             gs_header.
      data:
        lv_tdate(10),
        lv_fdate(10),
        ls_line   type  slis_listheader.
      clear: ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = gs_header.
      append ls_line to lt_top_of_page.
    endform.                    "comment_build
    FORM INIT_FIELDCAT
    Fill Field Catalog for ALV Grid
    form init_fieldcat using gs_tabname.
      refresh: gt_fieldcat.
    use this function to get the all fields in the structure.
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
           exporting
                i_program_name     = gv_repid
                i_internal_tabname = gs_tabname
                i_inclname         = gv_repid
           changing
                ct_fieldcat        = gt_fieldcat.
      if sy-subrc eq 0.
      clear mark for key field to set color of key column
        gs_fieldcat-key = ''.
        modify gt_fieldcat from gs_fieldcat transporting key
                          where fieldname ne space.
        read table gt_fieldcat with key fieldname = 'FOUND_DAT'
                                   into gs_fieldcat.
        gs_fieldcat-seltext_l = text-013.
        modify gt_fieldcat from gs_fieldcat
                   transporting seltext_l
                          where fieldname = 'FOUND_DAT'.
      <<CR003-DEVK949538 start ins
        read table gt_fieldcat with key fieldname = 'NOTE_TEXT'
                                   into gs_fieldcat.
        gs_fieldcat-seltext_l = text-014.
        modify gt_fieldcat from gs_fieldcat
                   transporting seltext_l
                          where fieldname = 'NOTE_TEXT'.
      <<CR003-DEVK949538 start ins
      endif.
    endform.                    "init_fieldcat
    FORM INIT_LAYOUT
    Layout initial
    form init_layout using gs_layout type slis_layout_alv.
      gs_layout-info_fieldname    = 'LINECOLOR'.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-zebra             = 'X'.
    endform.                    " init_layout
    FORM WRITE_ALV_REPORT
    form write_alv_report tables gt_output
                                 gt_sort_info.
    ALV Grid display
      clear: gv_repid,
             gv_save.
      gv_repid          = sy-repid.
      gs_variant-report = gv_repid.
      gv_save           = 'A'.
    Build fieldcatalog
      perform init_fieldcat using gs_tabname.
    Build list events
      perform eventtab_field using gs_event.
    Show in ALV Grid form
      perform init_layout using gs_layout.
    Build comments
      perform comment_build using gt_list_top_of_page[]
                                  gs_header.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_buffer_active         = ' '
                i_callback_program      = gv_repid
                is_layout               = gs_layout
                i_save                  = gv_save
                is_variant              = gs_variant
                it_events               = gs_event[]
                it_sort                 = gt_sort_info[]
                it_fieldcat             = gt_fieldcat[]
           importing
                e_exit_caused_by_caller = gv_exit_caused_by_caller
                es_exit_caused_by_user  = gs_exit_caused_by_user
           tables
                t_outtab                = gt_output
           exceptions
                program_error           = 1
                others                  = 2.
    endform.                    "write_alv_report
    FORM GET_DATA
    form get_data.
    Get customer list
      if pr_cust1 eq 'X'.
        select  knvv~vkorg
                kna1~ktokd
                kna1~kunnr
                knvv~vtweg
                kna1~name1
                kna1~name3
                kna1~name4
                kna1~stras
                kna1~cityc
                kna1~regio
                kna1~land1
                knvv~kdgrp
                knvv~bzirk
                knvv~zterm
                kna1~lzone
                kna1~erdat
          from  kna1 join  knvv
            on  kna1kunnr = knvvkunnr
          into  corresponding fields of table gt_output_list
         where  kna1~kunnr in s_kunnr
           and  knvv~vkorg in s_vkorg
           and  knvv~bzirk in s_bzirk
           and  kna1~regio in s_regio
           and  knvv~kdgrp in s_kdgrp
           and  kna1~lzone in s_lzone
           and  kna1~erdat in s_erdat
           and  kna1~ktokd in s_ktokd.
        loop at gt_output_list into gs_output_list.
        Get City decsription
          perform get_city_description using gs_output_list-cityc
                                    changing gs_output_list-bezei1.
        Get Region description
          select single  bezei
                   from  t005u
                   into  gs_output_list-bezei2
                  where  bland = gs_output_list-regio
                    and  land1 = gs_output_list-land1"<<CR000-DEVK942345 ins
                    and  spras = sy-langu.
        Get customer group description
          select single  ktext
                   from  t151t
                   into  gs_output_list-ktext
                  where  kdgrp = gs_output_list-kdgrp
                    and  spras = sy-langu.
        Get sales district description
          select single  bztxt
                   from  t171t
                   into  gs_output_list-bztxt
                  where  bzirk = gs_output_list-bzirk
                    and  spras = sy-langu.
        Get zone decription
          select single  vtext
                   from  tzont
                   into  gs_output_list-vtext
                  where  zone1 = gs_output_list-lzone
                    and  spras = sy-langu.
          modify gt_output_list from gs_output_list index sy-tabix
                                             transporting bezei1
                                                          bezei2
                                                          ktext
                                                          bztxt
                                                          vtext.
          clear gs_output_list.
        endloop.
    Get customer tax data
      elseif pr_cust2 eq 'X'.
        select  kna1~kunnr
                kna1~name1
                kna1~name3
                kna1~name4
                kna1~ort01
                kna1~stcd1
                knvv~vkorg
                knvv~spart
                knvv~vtweg
                knvi~taxkd
                knvi~tatyp
          from  kna1 join  knvv
            on  kna1kunnr = knvvkunnr
                join  knvi
            on  kna1kunnr = knvikunnr
          into  corresponding fields of table gt_output_tax
         where  kna1~kunnr in s_kunnr
           and  knvv~vkorg in s_vkorg
           and  knvv~vtweg in s_vtweg
           and  knvv~spart in s_spart
           and  kna1~regio in s_regio
           and  knvi~taxkd in s_taxkd.
      Get customer tax description
        loop at gt_output_tax into gs_output_tax.
          select single  vtext
                   from  tskdt
                   into  gs_output_tax-vtext
                  where  tatyp = gs_output_tax-tatyp
                    and  taxkd = gs_output_tax-taxkd
                    and  spras = sy-langu.
          if sy-subrc eq 0.
            modify gt_output_tax from gs_output_tax index sy-tabix
                                             transporting vtext.
            clear gs_output_tax.
          endif.
        endloop.
    Get customer HVL data
      elseif pr_cust3 eq 'X'.
        select  kna1~kunnr
                kna1~stceg
                kna1~telfx
                kna1~telf1
                kna1~stras
                kna1~ort02
                kna1~cityc
                kna1~regio
                kna1~ort01
                kna1~name2
                kna1~name1
                knvv~bzirk
                knvv~spart
                knvv~vtweg
                knvv~vkorg
          from  kna1 join  knvv
            on  kna1kunnr = knvvkunnr
          into  corresponding fields of table gt_output_hvl
         where  kna1~kunnr in s_kunnr
           and  knvv~vkorg in s_vkorg.
        loop at gt_output_hvl into gs_output_hvl.
        Get city description.
          perform get_city_description using gs_output_hvl-cityc
                                    changing gs_output_hvl-bezei.
          if sy-subrc eq 0.
            modify gt_output_hvl from gs_output_hvl index sy-tabix
                                             transporting bezei.
            clear gs_output_hvl.
          endif.
        endloop.
    Get cust CRM data
      elseif pr_cust4 eq 'X'.
        select  kna1~kunnr
              knvv~versg                           "<<CR000-DEVK943142 del
                knvv~vkorg
                knvv~vtweg
                knvv~bzirk
                knvv~vkgrp
                knvv~kdgrp
                knvv~vkbur
                kna1~name1
                kna1~name2
                kna1~ort01
                kna1~pstlz
                kna1~regio
                kna1~stras
                kna1~telf1
                kna1~telfx
                kna1~ort02
                kna1~cityc
                knvv~kvgr3
                knb1~altkn
              knb1~bukrs                           "<<CR000-DEVK943142 del
                knvv~erdat
                zcrm_bp_ext~found_dat
          from  kna1 join knvv
            on  kna1kunnr = knvvkunnr
          join  knb1
            on  knvvkunnr = knb1kunnr
          join  zcrm_bp_ext
            on  knb1kunnr = zcrm_bp_extkunnr
          into  corresponding fields of table gt_output_crm
         where  kna1~kunnr in s_kunnr
           and  knvv~vkorg in s_vkorg
           and  knvv~vtweg in s_vtweg
           and  knvv~spart in s_spart
           and  knvv~bzirk in s_bzirk
           and  knvv~kdgrp in s_kdgrp
           and  knvv~vkgrp in s_vkgrp
           and  knvv~vkbur in s_vkbur
           and  knvv~erdat in s_erdat
           and  kna1~ktokd in s_ktokd
           and  kna1~loevm in s_loevm1
           and  knb1~loevm in s_loevm2
           and  knvv~loevm in s_loevm3
           and  knb1~bukrs in s_bukrs
           and  knb1~altkn in s_altkn.
      else.
      Get customer information
       <<CR001-DEVK944342 start del
       select  kna1~kunnr
               knvv~vkorg
               knvv~vtweg
               kna1~stcd2
               kna1~name1
               kna1~name2
               kna1~ort01
               kna1~land1
               kna1~pstlz
               kna1~regio
               kna1~stras
               kna1~telf1
               kna1~telfx
               knvv~bzirk                          "<<CR001-DEVK944239 ins
               knvv~vkbur                          "<<CR001-DEVK944239 ins
               kna1~ort02
               kna1~cityc
               knvv~vkgrp
               knvv~kvgr3
               knvv~versg
               kna1~kdkg2
               kna1~kdkg1
               knvv~kdgrp
               knb1~altkn
               knvv~erdat
               kna1~loevm
               knb1~loevm
               knvv~loevm
       <<CR001-DEVK944342 end del
      <<CR001-DEVK944342 start ins
        select  kna1~kunnr
                knvv~vkorg
                knvv~vtweg
                kna1~stcd2
                kna1~name1
                kna1~name2
                kna1~name3                           "<<CR002-DEVK944835 ins
                kna1~stras
                kna1~ort01
                kna1~ort02
                kna1~pstlz
                kna1~regio
                kna1~land1
                kna1~cityc
                kna1~telf1
                kna1~telfx
                knvv~bzirk
                knvv~vkbur
                knvv~kdgrp
                knvv~vkgrp
                knvv~kvgr3
                knvv~versg
                kna1~kdkg2
                kna1~kdkg1
                knb1~altkn
                knvv~erdat
                kna1~loevm
                knb1~loevm
                knvv~loevm
      <<CR001-DEVK944342 end ins
          from  kna1 join knvv
            on  kna1kunnr = knvvkunnr
                join knb1
            on  kna1kunnr = knb1kunnr
        <<CR001-DEVK944252 start del
        into  corresponding fields of table gt_output_info
        <<CR001-DEVK944252 end del
        <<CR003-DEVK949538 start del
          into  table gt_output_info                "<<CR001-DEVK944342 ins
        <<CR003-DEVK949538 end del
        <<CR003-DEVK949538 start ins
          into  corresponding fields of table gt_output_info
        <<CR003-DEVK949538 end ins
         where  kna1~kunnr in s_kunnr
           and  knvv~vkorg in s_vkorg
           and  knvv~vtweg in s_vtweg
           and  knvv~spart in s_spart
           and  knvv~bzirk in s_bzirk
           and  knvv~kdgrp in s_kdgrp
           and  knvv~vkgrp in s_vkgrp
           and  knvv~vkbur in s_vkbur
           and  knvv~erdat in s_erdat
           and  kna1~ktokd in s_ktokd
           and  kna1~regio in s_regio
         <<CR001-DEVK944252 start del
         and  kna1~loevm in s_loevm1
         and  knb1~loevm in s_loevm2
         and  knvv~loevm in s_loevm3
         <<CR001-DEVK944252 end del
         <<CR001-DEVK944252 start ins
           and ( kna1~loevm in s_loevm1
            or   knb1~loevm in s_loevm2
            or   knvv~loevm in s_loevm3 )
         <<CR001-DEVK944252 end ins
           and  knb1~zuawa in s_zuawa
           and  knb1~bukrs in s_bukrs
           and  knb1~altkn in s_altkn.
         <<CR003-DEVK949538 start ins
           loop at gt_output_info into gs_output_info.
          select single  adrnr
                   into  kna1-adrnr
                   from  kna1
                  where  kunnr = gs_output_info-kunnr.
          check sy-subrc eq 0.
          select single  smtp_addr
                   into  adr6-smtp_addr
                   from  adr6
                  where  addrnumber = kna1-adrnr.
          check sy-subrc eq 0.
          gs_output_info-smtp_addr = adr6-smtp_addr.
          modify gt_output_info from gs_output_info.
        endloop.
         <<CR003-DEVK949538 end ins
      endif.
    <<CR003-DEVK949538 start ins
      loop at gt_output_info into gs_output_info.
        lv_store = gs_output_info-loevm1.
      endloop.
    <<CR003-DEVK949538 end ins
    endform.
    FORM BUILD_SORT
    form build_sort.
      if pr_cust1 eq 'X' or
         pr_cust2 eq 'X'.
        clear gs_sort_info.
        gs_sort_info-fieldname = 'VKORG'.
        gs_sort_info-spos      = 1.
        gs_sort_info-up        = 'X'.
        append gs_sort_info to gt_sort_info.
      endif.
      clear gs_sort_info.
      gs_sort_info-fieldname = 'KUNNR'.
      gs_sor

    hi shivaji!
    thx for the reply.
    can u chk whether there is any problem with the queries or not.
    regards
    sachin

  • Sales Analysis Report - Monthly report shows blank output

    Hi,
    When i run the Sales Analysis Report - Customer (Annual) report for a data set it shows the correct data - large number of invoices
    However, there is no output available (blank output) when i use the the Monthly version of the same report using the same parameters. Even when i am taking the widest possible range of data sets ( large date range; no properties; All customers) i am not getting any output.  I am using Individual display.
    Please help out.
    Regards.
    Edited by: Manish Chaturvedi on Jul 14, 2009 11:56 AM

    hello
    In sales analysis report have u given posting date for a particular month if not give and select client /customer in group and run the report u will get exactly if not then u do have any postings for a particular month and definr due date that means posting period also
    regards
    jenny

  • Print message when there are no pages to show in output

    Hi,
    I need to give a custom message like "Report did not produce any output due to .... " in the BI publisher report output instead of adobe giving the error 'there are no pages" in the pdf output.
    Any inputs ?
    Thanks&regards,
    Mukthi

    Hi,
    I am getting the same problem. I have the following tags which are causing the issue. If i remove these, it does not show error.
    <?start@last-page-first:body?>
    <?end body?>
    I also have @section for main group. Could that be the issue ?
    Regards,
    Mukthi.

  • How do I show the output of a command called within a gui script

    I'm starting from scratch on a project I've been tasked with.  My intention is a quick down-and-dirty way to apply an image within winPE to apply a windows image to the machine I've booted to a usb drive loaded with winPE.
    Here's my start.  It's rough, but, I have to start somewhere.
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    $objForm = New-Object System.Windows.Forms.Form
    $objForm.Text = "DISM"
    $objForm.Size = New-Object System.Drawing.Size(600,400)
    $objForm.AutoSizeMode = "GrowAndShrink"
    $objForm.StartPosition = "CenterScreen"
    $objForm.FormBorderStyle = "Fixed3D"
    $objForm.KeyPreview = $True
    Function do_DISM{
    $dism = "dism /apply-image /imagefile:D:\W7x86.wim /index:1 /applydir:C:\"
    Invoke-Expression $dism
    $DISMButton = New-Object System.Windows.Forms.Button
    $DISMButton.BackColor = "ButtonFace"
    $DISMButton.Location = New-Object System.Drawing.Size(12,27)
    $DISMButton.Size = New-Object System.Drawing.Size(120,25)
    $DISMButton.TabIndex = 1
    $DISMButton.Text = “Start DISM”
    $DISMButton.Add_Click({do_DISM})
    $objForm.Controls.Add($DISMButton)
    $objForm.Add_Shown({$objForm.Activate()})
    [void] $objForm.ShowDialog()
    Now, this does work, and it will in fact apply the windows image to c:\ which is what I need it to do.  But, I have a few quesitons.
    Am I correct to use "Invoke-Expression" in the function do_DISM to start the command?  According to technet's articles, yes, but, want to make sure I'm doing this the proper way, since I'm learning that calling Invoke-Expression isn't always
    the way to do things.
    Also, since this will be used by others in my group, I'm going to need to show some sort of progress report on how far along DISM is getting along, otherwise, 5 minutes into DISM running, some people are going to think nothing's happening, and just power
    down the computer no matter what I tell them.  I know that running DISM from the command line, it will show a progress bar that is adequate for what I'm needing.  Running the script above and clicking the button, it does run, but, all in the background
    with no progress indication.  Is there a way I can tell either in the function or when the function calls Invoke-Expression to run DISM, to open in a new command window which shows the live progress of the command running?
    Again, my disclaimer: VERY new to writing bits of code, and am trying my best here, so, thanks in advance for patience with me.

    That's exactly what I was looking for!  Thank you!
    Changed code to:
    $dism = "X:\Windows\System32\Cmd.exe /c start CMD /k dism /apply-image /imagefile:D:\W7x86.wim /index:1 /applydir:C:\"
    And voila, new window opened with the live output of dism.
    new... and have a glazed over look about my eyes to prove it...

Maybe you are looking for

  • HTML Forms in OHJ

    We would like to be able to link from our online documentation to our corporate website through our secure customer portal, giving users access to features like discussion lists, FAQ, and bug fixes. In order to do this, we need to have functioning HT

  • Barcodes and QR codes

    Hi guys, My company is looking to implement Barcodes or QR codes to manage hardware inventory. We've just started using SCCM and I was just wondering if anybody is using a QR Code solution with conjunction with SCCM 2012?

  • If table empty hide subform

    Hi, I need to suppress subform when table displayed in this subform is empty. if ($.my_table is empty )  " How to do this then   $.presence = "hidden" else   $.presence = "visible" endif Thanks in advance!!! Regards, Amel

  • Need Help Automating (Silent Install) and Serializing PSE 12. Installation (Volumn License)

    I am trying to automate and serialize a silent installation for PSE 12. I have a volume license for 50 users. The old Silent Install command (PSE 11) no longer works for a silent install (PSE 12). I need this routine to suppress the EULA and any othe

  • Sound Blaster Z driver settings suggestions please

    Hello everyone! I'm new here, this is my first post (I've had this account since 2009.. wow.) Just had some questions that I'm hoping someone here will know the answers to. I am using the Sound Blaster Z sound card with an Astro A40 System headset th