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: 

Reg ALV GRID

Former Member
0 Kudos

Hi,

i am getting data for MATNR,WERKS and few more fields in the ALV output.

in that for MATNR i put the edit option,so when i edit this matnr field and click on SAVE button the values should be saved in the output.

i wrote the function module popup_to_confirm but its going to dump.

how to write it? could you please help me out?

----


  • FORM it_out_user_command *

----


  • Description : Handling user commands

----


FORM it_out_user_command

USING

ucmd TYPE sy-ucomm " SY-UCOMM value

fieldinfo TYPE slis_selfield " Current ALV Cell & ALV Info

alv_fcat_dtel TYPE typ_t_fcat_dtel. " Table utilized by std ucmd

fieldinfo-refresh = c_x.

*--- User-commands

CASE ucmd.

WHEN 'SAVE'.

perform save_data.

WHEN 'EXIT'.

LEAVE SCREEN.

ENDCASE.

ENDFORM. "it_out_user_command

----


  • FORM it_out_pfstatus *

----


  • Description : Form to set PF status

----


FORM it_out_pfstatus USING rt_extab TYPE slis_t_extab.

DATA : lt_extab TYPE slis_t_extab,

lx_extab LIKE LINE OF lt_extab.

REFRESH lt_extab.

SET PF-STATUS 'ALV_MAIN' EXCLUDING lt_extab.

ENDFORM. " it_out_pfstatus

&----


*& Form DATA_OUTPUT

&----


*Download data to final internal table

----


FORM DATA_OUTPUT .

loop at it_ekpo into x_ekpo.

x_out_ekpo-ebeln = x_ekpo-ebeln.

x_out_ekpo-ebelp = x_ekpo-ebelp.

x_out_ekpo-matnr = x_ekpo-matnr.

x_out_ekpo-werks = x_ekpo-werks.

append x_out_ekpo to it_out.

endloop.

ENDFORM. " DATA_OUTPUT

*&----


*

*& Form SAVE_DATA

*&----


*

  • text

*----


*

  • --> p1 text

  • <-- p2 text

*----


*

FORM SAVE_DATA .

data: lv_answer type c.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

  • TITLEBAR = ' '

  • DIAGNOSE_OBJECT = ' '

TEXT_QUESTION = 'Do you want to save'

TEXT_BUTTON_1 = 'Yes'(001)

  • ICON_BUTTON_1 = ' '

  • TEXT_BUTTON_2 = 'No'(008)

  • ICON_BUTTON_2 = ' '

  • DEFAULT_BUTTON = '1'

  • DISPLAY_CANCEL_BUTTON = 'X'

  • USERDEFINED_F1_HELP = ' '

  • START_COLUMN = 25

  • START_ROW = 6

  • POPUP_TYPE =

  • IV_QUICKINFO_BUTTON_1 = ' '

  • IV_QUICKINFO_BUTTON_2 = ' '

IMPORTING

ANSWER = lv_answer

  • TABLES

  • PARAMETER =

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.

if lv_answer = '1'.

modify it_out.

endif.

ENDFORM. " SAVE_DATA

Regards,

Shalini

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

reddy/shalini

yesteday also you asked the same question. what happened to it.

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

reddy/shalini

yesteday also you asked the same question. what happened to it.

0 Kudos

Hi Vijay,

Yesterday i put the MATNR to EDIT option but it was not allowing me to edit that.

now iam able to do it and i am getting the popup option also.but after changing the MATNR field how to write the code so that it will get saved in the output.

Regards,

reddy

0 Kudos

search this Forum with the Function GET_GLOBALS_FROM_SLVC_FULLSCR as keyword.

MarcinPciak
Active Contributor
0 Kudos

Maybe he didn't get the answer yet;)

Please see this link: [Editable ALV grid|https://www.sdn.sap.com/irj/sdn/wiki]

Ups. it seems link was just to SDN Wiki. Type there Eidatble ALV. First article is what you need

Edited by: Marcin Pciak on Oct 16, 2008 11:27 AM