Application Development 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: 

ALV POPUP

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

Hi Rob,

I did the same thing and my problem is solved. Thank you very much for the response Rob.

Regards,

Vijay.

0 Kudos

Glad to help - please close the thread.

Rob

0 Kudos

You can also use FM "REUSE_ALV_POPUP_TO_SELECT" to display data as ALV POPUP.