Skip to Content
0
Former Member
Aug 11, 2016 at 11:05 AM

trigger bdc program on clicking button in oop alv

241 Views

hi,

i have created one custom button in oop alv using custom container.in the ouput i have check boxes..i have to select some checkboxes and when i click on the custom button i have to trigger some bdc call transaction code for fch5 transaction.my problem is, the fields in my alv ouput and the mandatory fields in the fch5 transaction are different.how should i co-relate them.

these are the fields in opp alv ouput..

BEGIN OF ty_final,

flag(1),

status(4),

chect TYPE payr-chect,

vblnr TYPE payr-vblnr,

n_chect TYPE payr-chect,

message(200),

style TYPE lvc_t_styl,

END OF ty_final.



these are fields in bdc

perform bdc_dynpro using 'SAPMFCHK' '0500'.

perform bdc_field using 'BDC_CURSOR' 'PAYR-CHECT'.

perform bdc_field using 'BDC_OKCODE' '=UPDA'.

perform bdc_field using 'PAYR-VBLNR' lt_payr-vblnr.

perform bdc_field using 'PAYR-ZBUKR' lt_payr-zbukr.

perform bdc_field using 'PAYR-GJAHR' lt_payr-gjahr.

perform bdc_field using 'PAYR-HBKID' lt_payr-hbkid.

perform bdc_field using 'PAYR-HKTID' lt_payr-hktid.

perform bdc_field using 'PAYR-CHECT' lt_payr-chect.

perform bdc_dynpro using 'SAPMFCHK' '0501'.

perform bdc_field using 'BDC_CURSOR' 'PAYR-RWBTR'.

perform bdc_field using 'BDC_OKCODE' '=UPDA'.

perform bdc_field using 'PAYR-RWBTR' lt_payr-rwbtr.



i have to place these bdc code withinn loop end loop where flag = 'X'.(here flag is checkbox).


pls help me