2009 Feb 10 7:49 PM
Hi,
Iam using fn . module POPUP_WITH_TABLE_DISPLAY for my requirement where Iam displaying my internal table data on the screen.
FUNCTION popup_with_table_display.
*"----
""Local interface:
*" IMPORTING
*" VALUE(ENDPOS_COL) TYPE INT4
*" VALUE(ENDPOS_ROW) TYPE INT4
*" VALUE(STARTPOS_COL) TYPE INT4
*" VALUE(STARTPOS_ROW) TYPE INT4
*" VALUE(TITLETEXT) TYPE CHAR80
*" EXPORTING
*" VALUE(CHOISE) LIKE SY-TABIX
*" TABLES
*" VALUETAB
*" EXCEPTIONS
*" BREAK_OFF
*"----
I have 2 issues.
1. 3 fields are displayed on the screen. Even, if I select 1st row on the screen, Iam getting CHOISE vaues as '3' and so on.
Why its happening? What may b the problem?
2. CALL FUNCTION 'POPUP_WITH_TABLE DISPLAY'
EXPORTING
ENDPOS_COL = 40
ENDPOS_ROW = 12
STARTPOS_COL = 20
STARTPOS_ROW = 5
TITLETEXT = 'Demo'
IMPORTING
CHOISE = choice
TABLES
VALUETAB = it_Sd
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
Now, 5 records are displaying on the screen with above end positions and start positions.
If I have 50 records, does all of them get displayed on the screen.
If 'NO', what can I do to see all the data in the internal table on screen irrespective of no. of records?
Thanks,
Shivaa........
2009 Feb 10 8:31 PM
Hello Shiva,
This FM works like a charm for me, try out the following code
Data : Begin Of tOptions Occurs 50 ,
VTEXT(10),
End Of tOptions.
Data : cChoice Like SY-TABIX.
Clear tOptions.
Refresh tOptions.
Do 50 Times.
tOptions-VTEXT = sy-Index.
Append tOptions.
EndDo.
Perform DisplayOptions.
*
Form DisplayOptions.
Clear : cChoice.
Call Function 'POPUP_WITH_TABLE_DISPLAY'
Exporting
EndPOS_Col = 130
EndPOS_Row = 15
StartPos_Col = 50
StartPos_Row = 11
TitleText = 'Select processing option...'
Importing
Choise = cChoice
Tables
ValueTab = tOptions
Exceptions
Break_Off = 1
Others = 2.
Read Table tOptions
Index cChoice.
Write cChoice.
EndForm. " DisplayOptions
2009 Feb 10 8:31 PM
Hello Shiva,
This FM works like a charm for me, try out the following code
Data : Begin Of tOptions Occurs 50 ,
VTEXT(10),
End Of tOptions.
Data : cChoice Like SY-TABIX.
Clear tOptions.
Refresh tOptions.
Do 50 Times.
tOptions-VTEXT = sy-Index.
Append tOptions.
EndDo.
Perform DisplayOptions.
*
Form DisplayOptions.
Clear : cChoice.
Call Function 'POPUP_WITH_TABLE_DISPLAY'
Exporting
EndPOS_Col = 130
EndPOS_Row = 15
StartPos_Col = 50
StartPos_Row = 11
TitleText = 'Select processing option...'
Importing
Choise = cChoice
Tables
ValueTab = tOptions
Exceptions
Break_Off = 1
Others = 2.
Read Table tOptions
Index cChoice.
Write cChoice.
EndForm. " DisplayOptions