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

report

Former Member
0 Likes
351

Hi,

MY requirement is like this.

A report is required to be developed to check the current values in specific fields of Material Master, and change these values if required.

When the report is executed, it will show the existing values for the materials, and will have a check box on the left of each record.

If the values are required to be changed for some records, then the check box on the left of these records will be flagged, and on clicking the change button, it will take us to the update screen, where the new values can be entered. These new values should be updated in the material master on clicking on the execute button.

Now how can I write the code for this?

2 REPLIES 2
Read only

Former Member
0 Likes
331

1.. add one more field checkbox of length 1 to ur final internal tabel

2. in ur fieldcatalg add this line

wa_fcat-fieldname = 'CHECKBOx'.

wa_fcat-checkbox = 'X'.

wa_fcat-outputlen = '1'.

wa_fcat-col_pos = '1'.

append wa_fcat to it_fcat.

3.in ur layout , add this line

wa_layout-box_fieldname = 'CHECKBOX'.

4.In th USER_COMMAND subroutine of ur REUSE_ALV_GRID_DISpLAy FM

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM

P_SELFLD TYPE SLIS_SELFIELD.

case p_ucomm.

Data ref1 type ref to cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

E_GRID = ref1.

call method ref1->check_changed_data

when 'SAVE'.

write ur code here

other wise

u can check this prg : BCALV_EDIT_05

Read only

Former Member
0 Likes
331

Hi Hema,

Use FM 'SWO_DIALOG_OBJECT_KEY_EDIT' to display material master screen in update mode.

The user van update the material and save it.

Example.

call function 'SWO_DIALOG_OBJECT_KEY_EDIT'

exporting

display = 'X'

objtype = object-_objecttypename

title = 'Objekt'(001)

objkey = Material number

Regards,

Gaurav.