Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reg ALV GRID

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

Tags:
replied

search this Forum with the Function GET_GLOBALS_FROM_SLVC_FULLSCR as keyword.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question