02-27-2006 9:23 PM
Hi all,
I have developed a ALV report with a push button on the output of the list. Now when I push the button, I want to display a popup into which I can enter some values and append them to the output of the ALV list. Can anyone please explain me how I can achieve this ? Actually this was a suggestion given by Saquib Khan in my previous query .
Regards,
Vijay.
02-27-2006 9:50 PM
Since you want to enter data on the screen, when the button is pressed:
call screen 100 starting at 1 6
ending at 80 10.
Define screen 100 as modal dialogue and process it. You'll have to add PBO and PAI logic to your report.
Rob
02-27-2006 9:46 PM
Hi Vijay,
Are you using GRID function or OO.
In case of using GRID function:
I think you have defined a user interface at screen level.
then You will write routine for the user interface:
FORM FRM_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'SELECT'.
PERFORM GET_data USING RS_SELFIELD.
-
-
ENDCASE .
FORM GET_data USING RS_SELFIELD.
READ TABLE TAB_DATA INDEX RS_SELFIELD-TABINDEX.
Call POP -UP Function .
*--Example
CALL FUNCTION 'POPUP_CHECK_N'
EXPORTING
TITEL = Z_TITLE
IMPORTING
ANSWER = W_ANS
TABLES
TEXT = XZSEL.
IF W_ANS = 'Y'.
*--add your logic to change TAB_DATA.
ENDIF.
RS_SELFIELD-REFRESH = 'X'. --This will refresh the ALV display with changed values.
ENDFORM.
Regards,
Lanka
02-27-2006 9:48 PM
When user clicks on button, call fm POPUP_TO_gET_ONE_VALUE.
USer will enter the value then populate your final itnernal table again with this new value and display new report.
Take care of BACK button while handling this. You may not want to go back to old version of report when user clicks BACK.
Sample code for the fm
call function 'POPUP_TO_GET_ONE_VALUE'
exporting
textline1 = 'Enter Amount'
titel = 'Amount Entry'
valuelength = 20
importing
answer = l_ans
value1 = l_amt
exceptions
titel_too_long = 1
others = 2.
02-27-2006 9:50 PM
Since you want to enter data on the screen, when the button is pressed:
call screen 100 starting at 1 6
ending at 80 10.
Define screen 100 as modal dialogue and process it. You'll have to add PBO and PAI logic to your report.
Rob
02-27-2006 9:53 PM
Hi Rob,
I did the same thing and my problem is solved. Thank you very much for the response Rob.
Regards,
Vijay.
02-27-2006 9:55 PM
02-27-2006 9:58 PM
You can also use FM "REUSE_ALV_POPUP_TO_SELECT" to display data as ALV POPUP.