2008 Dec 10 12:02 PM
Hi All,
We have a requirement to write BDC on the ALV. Is it possible to write BDC on ALV Grid?
2008 Dec 10 12:07 PM
Hi,
Can you please let us know more about the requirement.A bdc is for batch input. how are you planning to upload data in an ALV report?
Viv
2008 Dec 10 12:07 PM
yes it is possible I do it in nuemrous occasions where users start an bdc depending on the selection they make in als but if you are not more specific in you're question than the answers can also not be very specific in detail
kind regards
arthur
2008 Dec 10 12:07 PM
2008 Dec 10 12:08 PM
HI,
You cannot record the any action on the ALV. But still the recording showing some values..as you run your BDC recording then there will no effect.
2008 Dec 11 3:46 AM
Hi All,
Requirement for my BDC is to record on ALV interactive. where from initial screen I am getting ALV output. and on that ALV I need to select line. and then process further for the output. I am having a doubt as the BDC Okcode is not getting line selection. Can we implement such requirement?
I have tried the same. But i could not get through.
2008 Dec 11 8:30 AM
you don't get line selection with bdc ok code but with the chk field in the alv structure
declare a field CHK type xfeld in you're alv structure
here the parts you need in the alv to make it work
with this example a user can select multiple tasks and click on a button to edit them. when 1 is saved or skipped then automaticaly the next one in the selection is executed
slayout-box_fieldname = 'CHK'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = h_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'WIJZ'.
LOOP AT ta_zcs_operatielijst_alv WHERE chk = 'X'.
REFRESH bdcdata.
PERFORM display_change_maintenance_ord USING
ta_zcs_operatielijst_alv-aufnr
ta_zcs_operatielijst_alv-vornr
con_change
CHANGING
h_transaction_code.
CALL TRANSACTION f_tcode USING bdcdata MODE 'E' UPDATE 'S'.
ENDLOOP.
COMMIT WORK.
endform.
FORM display_change_maintenance_ord USING p_aufnr
p_vornr
p_activity TYPE c
CHANGING p_transaction_code
LIKE sy-tcode.
DATA: flg_transaction_found TYPE flag.
PERFORM bdc_dynpro USING 'SAPLCOIH' '0101'.
PERFORM bdc_field USING 'CAUFVD-AUFNR' p_aufnr.
CHECK NOT p_vornr IS INITIAL.
PERFORM bdc_field USING 'BDC_OKCODE' 'VGUE'.
PERFORM bdc_dynpro USING 'SAPLCOIH' '3000'.
PERFORM bdc_field USING 'BDC_OKCODE' 'OBSE'.
PERFORM bdc_dynpro USING 'SAPLCO05' '2010'.
PERFORM bdc_field USING 'RCOLS-VORNR' p_vornr.
PERFORM bdc_field USING 'RC27X-OBJECT' 'O'.
PERFORM bdc_dynpro USING 'SAPLCOIH' '3000'.
PERFORM bdc_field USING 'RC27X-FLG_SEL(1)' 'X'.
PERFORM bdc_field USING 'BDC_OKCODE' 'VGD3'.
PERFORM bdc_dynpro USING 'SAPLCOIH' '3800'.
IF p_activity = con_change.
p_transaction_code = 'IW32'.
ELSEIF p_activity = con_display.
p_transaction_code = 'IW33'.
ENDIF.
flg_transaction_found = 'X'.
ENDFORM. " DISPLAY_CHANGE_MAINTENANCE_ORD
kind regards
arthur