Skip to Content
author's profile photo Former Member
Former Member

module pool program

Hi,

I am working on a dialog program.Here in the o/p there are many records.Beside each record,there is a checkbox.When the user clicks a checkbox beside a particular record of which he wants to change some fields data and click on the change button which is present on top of the o/p screen,the control should should go to the update screen.

In the update screen,after changing the values and clicking on the accept button,the values should get stored in the material master table.

How can I pick up a particular recordwhich the user selected and change the values for only that record in the update screen?

Regards,

HEMA

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 08:43 AM

    Hema,

    Are you displaying your output in table control or

    clasical output?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 09:11 AM

    Hema,

    If it is ALV GRID display see the below code.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = ws_repid

    i_callback_pf_status_set = 'GUI_STAT'

    i_callback_user_command = 'STAT'

    is_layout = gs_layout

    it_fieldcat = i_fieldcat[]

    TABLES

    t_outtab = i_zaw_pol_plan.

    IF sy-subrc <> 0.

    ENDIF.

    **--Here you can add your buttons in PF status

    FORM gui_stat USING rt_extab TYPE slis_t_extab.

    SET PF-STATUS 'STANDARD' EXCLUDING rt_extab.

    SET TITLEBAR text-005.

    ENDFORM.

    FORM stat USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.

    DATA selfield TYPE slis_selfield.

    CASE r_ucomm.

    **--When change Button Pressed

    WHEN 'DETL'.

    LOOP AT i_zaw_pol_plan WHERE flag EQ c_x.

    Here you can catch the selected records.....

    ENDLOOP.

    IF sy-subrc NE 0.

    **--Please select a Reocrd to change

    MESSAGE i000(zmamic) WITH text-030.

    EXIT.

    ENDIF.

    CLEAR v_sel_re.

    **-- Calling update screen

    CALL SELECTION-SCREEN 510.

    ENDCASE.

    Don't forget to reward if useful....

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I have written a read statement to capture the selected record.

      READ TABLE gt_output INTO gs_output WITH KEY sel = c_x.

      IF sy-subrc = 0.

      CLEAR v_flag.

      REFRESH gt_output1.

      But this read statement is not working.What would be the reason?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.