Skip to Content
0
Former Member
Apr 10, 2007 at 08:33 AM

need help in alv grid output

12 Views

Hi ihave a problem in alv grid i want display the longtext which was very long in characters it contains of more than 20 lines as shown below now i want the output the material number and shorttext description only one time but not as many times as there are lines in the long text that is i want to delete the remaining short text and material number for a single material number.

I'm posting here my ALv grid code also pla consider it and give me solution

FORM field_catalog.


***MATERIAL NO no
  int_cat-tabname       = 'INT_OUT'.
  int_cat-fieldname     = 'MATNR'.
  int_cat-reptext_ddic  = 'MATERIAL NO'.
  APPEND int_cat .
 
*vender name
  int_cat-tabname       = 'INT_OUT'.
  int_cat-fieldname     = 'MAKTX'.
  int_cat-reptext_ddic  = 'MATERIAL SHORT DESCRIPTION'.
  APPEND int_cat .
 
** PO No
  int_cat-tabname       = 'INT_OUT'.
  int_cat-fieldname     = 'TDLINE'.
  int_cat-reptext_ddic  = 'MATERIAL LONG DESCRIPTION'.
  int_cat-outputlen = '100'.
  APPEND int_cat .
 
endform.
 
 
*&---------------------------------------------------------------------*
*&      Form  display_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
 
 
 
FORM display_data.
DATA : X_SORT TYPE SLIS_SORTINFO_ALV.
DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV.
 
X_SORT-SPOS = '1'.
X_SORT-FIELDNAME = 'MATNR'.
X_SORT-TABNAME = 'INT_OUT'.
X_SORT-UP = 'X'.
APPEND X_SORT TO IT_SORT.
CLEAR X_SORT.
 
 
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      it_fieldcat        = int_cat[]
*      I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
*      I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
**      IS_LAYOUT = X_LAYOUT
**      IT_FIELDCAT = IT_FIELDCAT
**      IT_EVENTS = IT_EVENT
*      IT_SORT = INT_OUT
 
    TABLES
      t_outtab           = int_out
    EXCEPTIONS
      program_error      = 1
      OTHERS             = 2.
ENDFORM.                    "display_data

<b>

1000100000 Test material 1 1. DataSet vs DataReader

1000100000 Test material 1 # DataReader

1000100000 Test material 1 # Object to access data in a connected, forward-only, read-only

1000100000 Test material 1 fashion

1000100000 Test material 1

1000100000 Test material 1 # DataSet

1000100000 Test material 1 # Data structure to store schema and data in a disconnected fashion

1000100000 Test material 1 # Useful for editing data offline and later update to data source

1000100000 Test material 1

1000100000 Test material 1 2. What is Microsoft .NET?

1000100000 Test material 1 .NET represents an advanced new generation of software that will

1000100000 Test material 1 drive the Next Generation Internet. Its purpose is to make information

1000100000 Test material 1 available any time, any place, and on any device.

1000100000 Test material 1 Quick Definition

1000100000 Test material 1 .NET is an initiative to integrate all Microsoft products with

1000100000 Test material 1 the #Next Generation# web.

1000100000 Test material 1

1000100000 Test material 1 3. Recordset

1000100000 Test material 1

1000100000 Test material 1 ? Recordsets are generated one per table. This does not support

1000100000 Test material 1 hierarchical structure of data access. It will be programmer#s

1000100000 Test material 1 responsibility to define relationships among different recordsets.

1000100000 Test material 1 ? Rercordsets can not support data accessing from multiple sources.

1000100000 Test material 1

1000100000 Test material 1

1000100000 Test material 1 4. Connection-oriented Vs Connection-less

1000100000 Test material 1 ? Connection-oriented

1000100000 Test material 1 # Keeps the connection to the data base alive

1000100000 Test material 1 # Intended for applications with:

1000100000 Test material 1 ? short running transactions

1000100000 Test material 1 ? only a few parallel accesses

1000100000 Test material 1 ? up-to-date data

1000100000 Test material 1

1000100000 Test material 1 ? Connectionless</b>