09-18-2008 6:17 AM
There is a requirement from client that
They want to see an hierarchical ALV. This ALV needs to be editable in the line item level for the balnk lines. On click of a button, a pop window will appear in which if if they enter say 5 and the customer code then 5 blank lines should be appended at the customer's line item level where the user can enter values. Is this possible. Will the inserted/ appended lines get refreshed on the ALV. For eg:
(----
represent the blank lines)
Header--> Customer Code Customer Name
011101 XYZ
Item--> Material Quantity Unit Amount
14589 125.00 KG 145.50
12569 45.00 KG 100.00
15899 105.00 KG 120.50
-
-
-
-
-
PLZ Help!
09-23-2008 6:47 AM
Hi ,
Yes it will be refreshed .You have call the refresh_table_display method .as you are just changing the output table and not the fields structure.
09-24-2008 1:43 AM
Hi,
I've done similar thing. Here is the code for my method for handling double click.
METHOD handle_node_double_click.
CALL METHOD sender->get_outtab_line
EXPORTING
i_node_key = node_key
IMPORTING
e_outtab_line = gs_idoc_s
EXCEPTIONS
node_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.
* Get data
* <code for changing value>
CALL METHOD sender->change_node
EXPORTING
i_node_key = node_key
i_outtab_line = gs_idoc_s
EXCEPTIONS
node_not_found = 1
OTHERS = 2.
READ TABLE gt_idoc_s WITH KEY pos = gs_idoc_s-pos
TRANSPORTING NO FIELDS.
MODIFY gt_idoc_s FROM gs_idoc_s
INDEX sy-tabix TRANSPORTING value_low value_high.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL METHOD tree1->frontend_update.
ENDIF.
ENDMETHOD. "handle_node_double_click
The important methods are get_outtab_line. change_node and frontend_update.
09-24-2008 6:30 PM
Hi Annie,
Please go through the following standard program.
See BCALV_EDIT_01 for an overview
EDIT of the fieldcatalog, see BCALV_EDIT_03.
Regards,
Dheeraj Soni