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

ALV GRID

Former Member
0 Likes
594

Hi,

I have a de-allocate button on the ALV grid , on click

of this alv its pops up a message TYPE (I) (goods movement) when the user dont want to go ahead he click on 'x' on the pop message , it not comming back to the alv indeed its going ahaed with the deallocation process.

my code is like this :

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&DEALL'.

  • Message for reselection of lines

IF itab_display-kalab LE 0.

MESSAGE i101(/..../pp).

EXIT.

ELSE.

*message for goods movement

IF itab_display-kalab GT 0.

MESSAGE i237(/....../pp).

ENDIF.

ENDIF.

  • Check for the allocation quantity

  • Clear itab_display.

Loop at itab_display where select = 'X'.

read table itab_display index sy-tabix.

Any suggestions and sample code on this will be helpfull..

vind.

Hi,

I have a de-allocate button on the ALV grid , on click

of this alv its pops up a message TYPE (I) (goods movement) when the user dont want to go ahead he click on 'x' on the pop message , it not comming back to the alv indeed its going ahaed with the deallocation process.

my code is like this :

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&DEALL'.

  • Message for reselection of lines

IF itab_display-kalab LE 0.

MESSAGE i101(/..../pp).

EXIT.

ELSE.

*message for goods movement

IF itab_display-kalab GT 0.

MESSAGE i237(/....../pp).

ENDIF.

ENDIF.

  • Check for the allocation quantity

  • Clear itab_display.

Loop at itab_display where select = 'X'.

read table itab_display index sy-tabix.

Any suggestions and sample code on this will be helpfull..

vind.

4 REPLIES 4
Read only

Former Member
0 Likes
566

try this

when 'CANCEL' or 'EXIT'.

leave to screen 0.

Read only

Former Member
0 Likes
566

TRy

LEAVE TO LIST PROCESSING.

Read only

Former Member
0 Likes
566

Hi,

since you are using the Information message it will behave like that only. But if you use 'POPUP_TO_CONFIRM'

data: p_ans type c.

CALL FUNCTION 'POPUP_TO_CONFIRM'
         EXPORTING
             TITLEBAR              = 'Confirm'(007)
             TEXT_QUESTION = 'Do you wish to continue?'(006)
             TEXT_BUTTON_1         = 'Yes'(008)
             ICON_BUTTON_1         = 'ICON_OKAY'
             TEXT_BUTTON_2         = 'No'(010)
             ICON_BUTTON_2         = 'ICON_CANCEL'
             DEFAULT_BUTTON        = '1'
             DISPLAY_CANCEL_BUTTON = 'X'
             START_COLUMN          = 25
             START_ROW             = 6
        IMPORTING
             ANSWER                = P_ANS
        EXCEPTIONS
             TEXT_NOT_FOUND        = 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.

based on p_ans you can proceed.

using this you can exit further processing,.

Regards

vijay

Read only

Former Member
0 Likes
566

Hi,

For this u have to free the ALV by using the method FREE n then u can write-

LEAVE TO TRANSACTION 'TCODE'.

TCODE will b the transaction u want...

Hope this helps u.

Seema