2006 Jun 09 11:38 AM
Hi,
I need simple program or function module name that accepts internal table as input and displays the content of the internal table as list in popup window.
Regards
Madhu.
2006 Jun 09 11:42 AM
hi madhu,
check the function module <b>POPUP_WITH_TABLE_DISPLAY</b>
data: begin of itab occurs 0,
kunnr like kna1-kunnr,
end of itab.
select kunnr from kna1 into corresponding fields of table itab.
<b> CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'</b> EXPORTING
endpos_col = 45
endpos_row = 25
startpos_col = 10
startpos_row = 1
titletext = 'text'
IMPORTING
CHOISE = c
tables
valuetab = itab
EXCEPTIONS
BREAK_OFF = 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.
HOPE THIS HELPS,
DO REWARD IF IT HELPS,
PRIYA.
Message was edited by: Priya
hi madhu,
check the function module <b>POPUP_WITH_TABLE_DISPLAY</b>
data: begin of itab occurs 0,
kunnr like kna1-kunnr,
end of itab.
select kunnr from kna1 into corresponding fields of table itab.
<b> CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'</b> EXPORTING
endpos_col = 45
endpos_row = 25
startpos_col = 10
startpos_row = 1
titletext = 'text'
IMPORTING
CHOISE = c
tables
valuetab = itab
EXCEPTIONS
BREAK_OFF = 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.
HOPE THIS HELPS,
DO REWARD IF IT HELPS,
PRIYA.
Message was edited by: Priya
2006 Jun 09 11:42 AM
hi madhu,
check the function module <b>POPUP_WITH_TABLE_DISPLAY</b>
data: begin of itab occurs 0,
kunnr like kna1-kunnr,
end of itab.
select kunnr from kna1 into corresponding fields of table itab.
<b> CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'</b> EXPORTING
endpos_col = 45
endpos_row = 25
startpos_col = 10
startpos_row = 1
titletext = 'text'
IMPORTING
CHOISE = c
tables
valuetab = itab
EXCEPTIONS
BREAK_OFF = 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.
HOPE THIS HELPS,
DO REWARD IF IT HELPS,
PRIYA.
Message was edited by: Priya
2006 Jun 09 11:43 AM
HI
UISE THIS fm
<b>POPUP_WITH_TABLE_DISPLAY_OK</b>
<b>call function 'POPUP_WITH_TABLE_DISPLAY_OK'
exporting
endpos_col = 50
endpos_row = 20
startpos_col = 20
startpos_row = 10
titletext = text-019
tables
valuetab = i_last_extrct_dates
exceptions
break_off = 1
others = 2.</b>
2006 Jun 09 11:44 AM
Hi,
I think this can be done in ALV also by giving the column positions in the function module. For example:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = L_PROG
I_CALLBACK_PF_STATUS_SET = 'SET_STATUS_CALL'
I_CALLBACK_USER_COMMAND = C_USER_COMMAND
I_GRID_TITLE = L_TITLE
I_GRID_SETTINGS =
IS_LAYOUT = X_LAYOUT_
IT_FIELDCAT =IT_FIELDCAT[]
IT_SPECIAL_GROUPS =
IT_EVENTS =
I_SCREEN_START_COLUMN = 10
I_SCREEN_START_LINE = 5
I_SCREEN_END_COLUMN = 70
I_SCREEN_END_LINE = 15
TABLES
T_OUTTAB = IT_data
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2 .
2006 Jun 09 11:44 AM
YOU CAN USE THE FOLLOWING FUNCTION MODULE
POPUP_WITH_TABLE_DISPLAY
2006 Jun 09 11:47 AM
Hii Madhu
check this fm
<b>REUSE_ALV_POPUP_TO_SELECT</b>
check this implementation..
*&---------------------------------------------------------------------*
*& Report ZALV_SAMPLE *
*& *
*&---------------------------------------------------------------------*
*& Program for displaying data using function modules : *
*& REUSE_ALV_LIST_DISPLAY *
*& REUSE_ALV_POPUP_TO_SELECT *
*& REUSE_ALV_GRID_DISPLAY *
*& *
*&---------------------------------------------------------------------*
REPORT ZALV_SAMPLE .
TABLES VBAK.
DATA it_vbak LIKE VBAK OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN uline.
PARAMETERS: ALV1 RADIOBUTTON GROUP ALV, "REUSE_ALV_LIST_DISPLAY
ALV2 RADIOBUTTON GROUP ALV, "REUSE_ALV_POPUP_TO_SELECT
ALV3 RADIOBUTTON GROUP ALV, "REUSE_ALV_GRID_DISPLAY
ALV4 RADIOBUTTON GROUP ALV. " NORMAL DISPLAY
SELECTION-SCREEN uline.
SELECT * FROM VBAK
INTO CORRESPONDING FIELDS OF TABLE it_vbak
UP TO 10 ROWS.
IF ALV1 = 'X'.
PERFORM ALV_FUNC1.
ELSEIF ALV2 = 'X'.
PERFORM ALV_FUNC2.
ELSEIF ALV3 = 'X'.
PERFORM ALV_FUNC3.
ELSEIF ALV4 = 'X'.
PERFORM NORM.
ENDIF.
*&---------------------------------------------------------------------*
*& Form ALV_FUNC1
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM ALV_FUNC1 .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'VBAK'
TABLES
T_OUTTAB = it_vbak
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. " ALV_FUNC1
*&---------------------------------------------------------------------*
*& Form ALV_FUNC2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM ALV_FUNC2 .
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'SALES ORDER INFO'
I_ZEBRA = 'X'
I_TABNAME = 1
I_STRUCTURE_NAME = 'vbak'
TABLES
T_OUTTAB = it_vbak
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. " ALV_FUNC2
*&---------------------------------------------------------------------*
*& Form ALV_FUNC3
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM ALV_FUNC3 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'vbak'
I_GRID_TITLE = 'SALES ORDER INFO'
TABLES
T_OUTTAB = it_vbak
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. " ALV_FUNC3
*&---------------------------------------------------------------------*
*& Form NORM
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM NORM .
format intensified.
skip 1.
WRITE: /'SALES DOC.',
' Created on ',
' Time',
' Created by',
' Valid from ',
' Sold-to party'.
format intensified off.
skip 2.
LOOP AT it_vbak.
write: / it_vbak-vbeln,' ',
it_vbak-erdat,' ',
it_vbak-erzet,' ',
it_vbak-ERNAM,' ',
it_vbak-ANGDT,' ',
it_vbak-KUNNR.
endloop.
ENDFORM. " NORMReward points if helpful
Revert back for more help
REGARDS
Naresh
2006 Jun 09 11:47 AM
hi madhu,
check this function module:
REUSE_ALV_POPUP_TO_SELECT
regards,
keerthi.
2006 Jun 09 11:49 AM
Hi Madhu ,
1.
Have a look at these Test programs
<b>BALV_POPUP_TO_SELECT</b> Test program
<b>BALV_POPUP_TO_SELECT_2</b> Test program
<b>BCALV_GRID_AND_POPUP</b> ALV Grid in dialog box
<b>Thanks,
Venkat.O</b>
2006 Jun 09 11:50 AM
Hi madhu,
1. for such requirements,
it is always better to use
REUSE_ALV_LIST_DISPLAY
2. It will display as a POPUP WINDOW
if we pass 4 parameteres.
I_SCREEN_START_COLUMN
I_SCREEN_START_LINE
I_SCREEN_END_COLUMN
I_SCREEN_END_LINE
regards,
amit m.
2009 Apr 21 6:58 AM
Hi,
You can try using Function module:
popup_with_table_display
You can refer this sample code below:
data: begin of itab occurs 0,
name(10) type c,
Tel_NO(12) type c ,
Mob_NO(12) type c,
end of itab.
itab-name = 'Jitender'.
itab-tel_no = '0114556654' .
itab-mob_no = '981145'.
append itab .
clear itab.
itab-name = 'Narender'.
itab-tel_no = '0114588954' .
itab-mob_no = '987745'.
append itab .
clear itab.
itab-name = 'Priyank'.
itab-tel_no = '0118996654' .
itab-mob_no = '984545'.
append itab .
clear itab.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
endpos_col = 80
endpos_row = 25
startpos_col = 1
startpos_row = 1
titletext = 'Title POPUP_WITH_TABLE_DISPLAY'
* IMPORTING
* CHOISE =
TABLES
valuetab = itab
EXCEPTIONS
break_off = 1
OTHERS = 2
.
Hope it helps
Regards
Mansi
2009 Apr 21 7:00 AM
hi ,
FM POPUP_WITH_TABLE_DISPLAY_OK
pass u r text to display on popup.
hope it will help u .
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |