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

Question

Former Member
0 Likes
857

Hey all,

Can anyone solve this problem for me?

I have a basic list,in it i hav mara-matnr,mara-ekgrp(this in input enabled) and mara-werks in the list.I have a checkbox against each and every line.When I select a check box and change the value in EKGRP the corresponding value must get be modified in the corresponding database table.

Please help.

Thanks Sharmila.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
822

Can anyone help quickly please.Its urgent.

7 REPLIES 7
Read only

Former Member
0 Likes
822

In the at user-command event, you should use the bapi:

BAPI_MATERIAL_SAVEDATA

Regards,

ravi

Read only

Former Member
0 Likes
822

hi,

u have to handle in user comamnd of ALV.

hi,

u have to handle in user comamnd of ALV.

  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
*          I_INTERFACE_CHECK        = ' '
           I_CALLBACK_PROGRAM       = V_REPID
           I_CALLBACK_PF_STATUS_SET = 'FRM_PF_STATUS'
           I_CALLBACK_USER_COMMAND  = 'FRM_USR_COMMAND'
*          I_STRUCTURE_NAME         =
           IS_LAYOUT                = WA_LAYOUT
           IT_FIELDCAT              = IT_FLDCAT[]

       TABLES
            T_OUTTAB                 = IT_FINAL_SCMPO
       EXCEPTIONS
            PROGRAM_ERROR            = 1
            OTHERS                   = 2.
  IF SY-SUBRC <> 0.
FORM FRM_USR_COMMAND USING R_UCOMM LIKE SY-UCOMM
                        R_SELFIELD TYPE SLIS_SELFIELD.
  CASE R_UCOMM.
    WHEN 'CREATEPO'.
LOOP AT IT_FINAL_table WHERE CHECKbox = 'X' .
upadate database table.
endloop.
   ENDCASE.

ENDFORM.

Regards

Ashok P

Regards

Ashok P

Message was edited by: Ashok Parupalli

Read only

Former Member
0 Likes
822

This has to be handled in the reports.

Read only

Former Member
0 Likes
822

Wat I an doing is as follows,

I describe the internal table,get the no.of records.then do index times.

if checkbox = 'x'.

get the position of the Ekgrp.

then modify the d/b table.

endif.

enddo.

But its not working.

Read only

Former Member
0 Likes
823

Can anyone help quickly please.Its urgent.

Read only

0 Likes
822

Hi Sharmila,

do as folows:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = W_REPID

I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM

P_SELFLD TYPE SLIS_SELFIELD.

case p_ucomm.

when 'SAVE'.

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

modify ztable from table itab.

endcase.

ENDFORM.

<b>BUt do NOT update the standard sap tables directly. Use BAPI/BDC for the same.</b>

Regards,

Ravi

Read only

Former Member
0 Likes
822

Thanks Ravi