Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

write statement after alv display

Former Member
0 Likes
2,406

Hi Experts,

My requirement is that i am displaying an output of ALV List display, in the List display i have a button which undergoes updation of records in Ztable.After pressing the button now i have to display Total no of records in write statement in which i should not have ALV display(i need 2 screens ).

Regards,

Vikram Sukumar

8 REPLIES 8
Read only

venkat_o
Active Contributor
0 Likes
1,405

Hi Vikram, <li>If you are using REUSE_ALV_LIST_DISPLAY function module to display instead of GRID display, then you can simply use WRITE statement to display whatever you want to display after pressing button. It takes you to Classical List display.

*&---------------------------------------------------------------------*
*&      Form  USER_COMMAND
*&---------------------------------------------------------------------*
 FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
   IF r_ucomm = 'BUTTON1'.
     WRITE 'Venkat'.
   ENDIF.
 ENDFORM.                    "USER_COMMAND
Thanks Venkat.O

Read only

Former Member
0 Likes
1,405

Hi Venkat,

I am using ALV list display, write statement works but i need ALV display should not be shown is display but right now it shows write statement and ALV display.

Regards,

Vikram Sukumar

Read only

venkat_o
Active Contributor
0 Likes
1,405

<li>I don't know how you are doing but I am able to display. try this sample program for double click event.


 REPORT  ztest_notepad.
 DATA: BEGIN OF it_t001 OCCURS 0,
        bukrs TYPE t001-bukrs,
        butxt TYPE t001-butxt,
        adrnr TYPE t001-adrnr,
      END OF it_t001.
 TYPE-POOLS:slis.
 DATA:it_fieldcat   TYPE slis_t_fieldcat_alv,
     wa_fieldcat   LIKE LINE OF it_fieldcat.
 DEFINE fieldcat.
   wa_fieldcat-fieldname = &1.
   wa_fieldcat-tabname   = &2.
   wa_fieldcat-seltext_m = &3.
   append wa_fieldcat to it_fieldcat.
   clear  wa_fieldcat.
 END-OF-DEFINITION.
 START-OF-SELECTION.
   SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001 UP TO 10 ROWS.
   fieldcat: 'BUKRS' 'IT_T001' 'BUKRS',
             'BUTXT' 'IT_T001' 'BUTXT',
             'ADRNR' 'IT_T001' 'ADRNR'.
   CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
     EXPORTING
       i_callback_program      = sy-repid
       i_callback_user_command = 'USER_COMMAND'
       it_fieldcat             = it_fieldcat
     TABLES
       t_outtab                = it_t001.
*&---------------------------------------------------------------------*
*&      Form  USER_COMMAND
*&---------------------------------------------------------------------*
 FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
   IF r_ucomm = '&IC1'.
     WRITE 'Venkat'.
   ENDIF.
 ENDFORM.                    "USER_COMMAND
Thanks Venkat.O

Read only

Former Member
0 Likes
1,405

Hi Venkat,

Even though you use write statement the ALV display will be there but i need no need ALV to display while using write.

Regards,

Vikram Sukumar

Read only

Former Member
0 Likes
1,405

Hi Vikram,

Venkats code is running fine..

What exactly do you want? You want the ALV to be displayed or NOT?

Regards,

Sumit

Read only

Former Member
0 Likes
1,405

Hi Sumit Nene,

I no need ALV display after the trigger of button, i need to only display write statement.

Regards,

Vikram Sukumar

Read only

Former Member
0 Likes
1,405

hi

try this

FORM user_command USING r_ucomm LIKE sy-ucomm.

if sy-ucomm = 'Enter'.

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

WRITE :'welcome'.

endif.

ENDFORM.

Read only

anup_deshmukh4
Active Contributor
0 Likes
1,405

Try for

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.