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

ALV: multiple line selection ito a program

Former Member
0 Likes
817

Hello,

Can anyone tell me how to achieve the following?

I have an alv grid that allows for multiple line item selection. The user selects more that one line item. There is a custom button to update the data selected. This button will execute a background job that updates data using BDC.

Question: how can I pass multiple line data into a report program? I would prefer not to loop and call the program for each line item, but would like to pass an entire set of data to be processed only once by the program.

Is this possible?

Regards,

Anna-Liza

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
755

Hi Anna

Here is the code attached with this post. If there some problem presists do reply me.

<b>Code:-----</b>

report zprclose

no standard page heading

line-size 155

line-count 65(1).

include : zco_alvdata.

tables : eban.

data : bdcdata like bdcdata occurs 0 with header line.

data : messtab like bdcmsgcoll occurs 0 with header line.

data : begin of itab occurs 0,

banfn like eban-banfn,

bnfpo like eban-bnfpo,

bsart like eban-bsart,

lgort like eban-lgort,

werks like eban-werks,

afnam like eban-afnam,

frgkz like eban-frgkz,

badat like eban-badat,

frgdt like eban-frgdt,

bednr like eban-bednr,

matnr like eban-matnr,

ekgrp like eban-ekgrp,

statu like eban-statu,

erdat like eban-erdat,

ebakz like eban-ebakz,

menge like eban-menge,

preis like eban-preis,

waers like eban-waers,

peinh like eban-peinh,

bsmng like eban-bsmng,

del type i value 0,

s(1) type c,

end of itab.

data: ba1(12) type c.

data: banf(20) type c.

data: banfn1 like eket-banfn.

data : cnt type i,

n(3) type n,

cnt1 type i,

n1(3) type n,

s(1) type c,

pn type i.

data : var1(40) type c,

var2(40) type c,

var3(40) type c,

srlno type eban-bnfpo,

day(2) type c,

month(2) type c,

year(4) type c,

date1(10) type c.

selection-screen begin of block ex with frame title text-005.

select-options : banfn for eban-banfn.

select-options : bnfpo for eban-bnfpo.

select-options : bsart for eban-bsart.

select-options : werks for eban-werks.

select-options : afnam for eban-afnam.

select-options : frgkz for eban-frgkz.

select-options : badat for eban-badat.

select-options : bednr for eban-bednr.

select-options : matnr for eban-matnr.

select-options : matkl for eban-matkl.

select-options : ekgrp for eban-ekgrp.

select-options : statu for eban-statu.

select-options : erdat for eban-erdat.

select-options : ebakz for eban-ebakz.

selection-screen end of block ex.

start-of-selection.

perform select_data.

perform fill_fldcat.

perform build_layout.

perform display_output.

end-of-selection.

&----


*& Form select_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form select_data.

select banfn bnfpo bsart werks afnam frgkz badat frgdt bednr matnr

ekgrp statu erdat ebakz lgort menge preis waers peinh bsmng

into (itab-banfn,itab-bnfpo,itab-bsart,itab-werks,

itab-afnam,itab-frgkz,itab-badat,itab-frgdt,itab-bednr,

itab-matnr,itab-ekgrp,itab-statu,itab-erdat,itab-ebakz,

itab-lgort,itab-menge,itab-preis,itab-waers,itab-peinh,

itab-bsmng)

from eban

where banfn in banfn

and bnfpo in bnfpo

and loekz ne 'X'

and bsart in bsart

and werks in werks

and afnam in afnam

and frgkz in frgkz

and badat in badat

and bednr in bednr

and matnr in matnr

and ekgrp in ekgrp

and statu in statu

and erdat in erdat

and ebakz in ebakz.

append itab.

endselect.

loop at itab.

if itab-menge ge itab-bsmng.

itab-del = 1.

modify itab.

endif.

endloop.

delete itab where del ne 1.

sort itab by banfn bnfpo.

endform. " select_data

&----


*& Form fill_fldcat

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form fill_fldcat.

constants : key value 'X',

no_key value space,

check value 'X',

no_check value space ,

hot value 'X',

no_hot value space,

input value 'X',

no_input value space.

perform append_fldcat using 'S' 'ITAB' ' ' no_key

'CHK' check no_hot input 0 changing gt_fieldcat .

perform append_fldcat using 'WERKS' 'ITAB' 'EBAN' no_key

'PLANT' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'BANFN' 'ITAB' 'EBAN' key

'PR-NO' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'BNFPO' 'ITAB' 'EBAN' key

'PR-NO' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'BADAT' 'ITAB' 'EBAN' no_key

'PR-DAT' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'ERDAT' 'ITAB' 'EBAN' no_key

'RELEASEDT' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'MATNR' 'ITAB' 'EBAN' no_key

'ITEMCODE' no_check no_hot no_input 0 changing gt_fieldcat.

perform append_fldcat using 'BEDNR' 'ITAB' 'EKPO' no_key

'TRACKING NO.' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'AFNAM' 'ITAB' 'EKPO' no_key

'REQUISITIONER' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'EBAKZ' 'ITAB' 'EKPO' no_key

'CLOSE STATUS' no_check no_hot no_input 0 changing gt_fieldcat .

endform. " fill_fldcat

&----


*& Form build_layout

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form build_layout.

gs_layout-f2code = p_f2code.

gs_layout-zebra = 'X'.

gs_layout-colwidth_optimize = 'X'.

gs_layout-totals_text = text-900.

gs_layout-subtotals_text = text-901.

gs_layout-key_hotspot = 'X'.

gs_layout-detail_popup = 'X'.

gs_layout-no_vline = ' '.

endform. " build_layout

&----


*& Form display_output

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form display_output.

g_repid = sy-repid.

call function 'REUSE_ALV_LIST_DISPLAY'

exporting

i_callback_program = g_repid

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'LINE_SELECTION'

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

tables

t_outtab = itab

exceptions

program_error = 1

others = 2.

endform. " display_output

*&----


*& Form append_fldcat

*&----


  • text

*----


  • -->P_0276 text

  • -->P_0277 text

  • -->P_0278 text

  • -->P_KEY text

  • -->P_0280 text

  • -->P_NO_CHECK text

  • -->P_NO_HOT text

  • -->P_NO_INPUT text

  • -->P_3 text

  • <--P_GT_FIELDCAT text

*----


form append_fldcat using par_fldname par_tabname

par_reftabname par_key

par_seltext par_checkbox par_hotspot par_input

par_outputlen

changing pit_fldcat type slis_t_fieldcat_alv.

clear ls_fieldcat.

ls_fieldcat-tabname = par_tabname.

ls_fieldcat-fieldname = par_fldname .

ls_fieldcat-ref_tabname = par_reftabname.

ls_fieldcat-key = par_key .

ls_fieldcat-seltext_m = par_seltext.

ls_fieldcat-checkbox = par_checkbox.

ls_fieldcat-hotspot = par_hotspot .

ls_fieldcat-input = par_input.

ls_fieldcat-outputlen = par_outputlen.

append ls_fieldcat to pit_fldcat.

endform. " append_fldcat

*----


  • FORM line_selection

*----


form line_selection using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&REL'.

clear r_ucomm.

sort itab by banfn bnfpo.

perform list_cl.

when '&SEL'.

clear r_ucomm.

perform list_sel.

when '&DSC'.

clear r_ucomm.

perform list_des.

when '&OTH'.

perform x1.

clear r_ucomm.

endcase.

endform.

*----


  • FORM set_pf_status

*----


form set_pf_status using rt_extab type slis_t_extab .

set pf-status 'CLOSE'.

endform.

form x1.

get cursor field ba1.

get cursor field banf.

if banf = 'ITAB-BANFN'.

get cursor field itab-banfn value banfn1.

call function 'MMPUR_REQUISITION_DISPLAY'

exporting

im_banfn = banfn1.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

endif.

endform.

form list_sel.

loop at itab.

itab-s = 'X'.

modify itab.

endloop.

endform.

form list_des.

loop at itab.

itab-s = space.

modify itab.

endloop.

endform.

form list_cl.

*****BDC for closeing the PR.

loop at itab where s = 'X'.

srlno = itab-bnfpo / 10.

var3 = srlno.

concatenate '0' var3 into var3.

concatenate 'EBAN-BNFPO' '(' var3 ')' into var1.

concatenate 'RM06B-TCSELFLAG' '(' var3 ')' into var2.

day = itab-frgdt+6(2).

month = itab-frgdt+4(2).

year = itab-frgdt+0(4).

concatenate day '.' month '.' year into date1.

******new addition for large number of pr item

perform bdc_dynpro using 'SAPMM06B' '0105'.

perform bdc_field using 'BDC_CURSOR' 'EBAN-BANFN'.

perform bdc_field using 'BDC_OKCODE' '=AB'.

perform bdc_field using 'EBAN-BANFN' itab-banfn.

perform bdc_dynpro using 'SAPMM06B' '0106'.

perform bdc_field using 'BDC_CURSOR' 'RM06B-BNFPO'.

perform bdc_field using 'BDC_OKCODE' '/00'.

perform bdc_field using 'RM06B-BNFPO' itab-bnfpo.

perform bdc_dynpro using 'SAPMM06B' '0106'.

perform bdc_field using 'BDC_CURSOR' 'EBAN-BNFPO(01)'.

perform bdc_field using 'BDC_OKCODE' '=DETA'.

perform bdc_field using 'RM06B-BNFPO' itab-bnfpo.

perform bdc_field using 'RM06B-TCSELFLAG(01)' 'X'.

perform bdc_dynpro using 'SAPMM06B' '0102'.

perform bdc_field using 'BDC_CURSOR' 'EBAN-EBAKZ'.

perform bdc_field using 'BDC_OKCODE' '=BU'.

  • perform bdc_field using 'EBAN-LGORT' itab-lgort.

  • perform bdc_field using 'EBAN-MENGE' itab-menge.

  • perform bdc_field using 'RM06B-EEIND' '30.11.2004'.

  • perform bdc_field using 'RM06B-LPEIN' 'D'.

  • perform bdc_field using 'EBAN-AFNAM' itab-afnam.

  • perform bdc_field using 'EBAN-BEDNR' itab-bednr.

  • perform bdc_field using 'EBAN-FRGDT' '30.11.2004'.

perform bdc_field using 'EBAN-EBAKZ' 'X'.

perform bdc_field using 'EBAN-REPOS' 'X'.

******end of addition

call transaction 'ME52' using bdcdata mode ''

messages into messtab.

refresh bdcdata.

endloop.

refresh itab.

clear itab.

perform select_data.

perform fill_fldcat.

endform.

----


  • Start new screen *

----


form bdc_dynpro using program dynpro.

clear bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

append bdcdata.

endform.

----


  • Insert field *

----


form bdc_field using fnam fval.

clear bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

append bdcdata.

endform.

6 REPLIES 6
Read only

abdul_hakim
Active Contributor
0 Likes
755

hi

have a look at the program <b>BCALV_GRID_05</b>.

Cheers,

Abdul Hakim

Read only

Laxmana_Appana_
Active Contributor
0 Likes
755

Hi,

Pass 'A' to IS_LAYOUT parameter of the ALV grid and use

GET_SELECTED_ROWS method to get the selected rows into internal table.

or

make the first column as checkbox , then user will select the checkboxces.

check this link :

Regards

Appana

Read only

former_member195698
Active Contributor
0 Likes
755

Use export/import to/from database to pass multiple lines to the program

or try using export/import to/from shared buffer.

Read only

Former Member
0 Likes
755

Hi Anna. You can make a checkbox column in addition of all coulmns. User will select the rows by checking the checkbox. Then you can read out which rows user have selected. If problem presits, I can send you the code of exactly such requirement in which it runs BDC of PR Close.

Read only

0 Likes
755

Hello Varun,

Yes, I would be interested in the code. Can you please share it?

Thank you.

Regards,

Anna-Liza

Read only

Former Member
0 Likes
756

Hi Anna

Here is the code attached with this post. If there some problem presists do reply me.

<b>Code:-----</b>

report zprclose

no standard page heading

line-size 155

line-count 65(1).

include : zco_alvdata.

tables : eban.

data : bdcdata like bdcdata occurs 0 with header line.

data : messtab like bdcmsgcoll occurs 0 with header line.

data : begin of itab occurs 0,

banfn like eban-banfn,

bnfpo like eban-bnfpo,

bsart like eban-bsart,

lgort like eban-lgort,

werks like eban-werks,

afnam like eban-afnam,

frgkz like eban-frgkz,

badat like eban-badat,

frgdt like eban-frgdt,

bednr like eban-bednr,

matnr like eban-matnr,

ekgrp like eban-ekgrp,

statu like eban-statu,

erdat like eban-erdat,

ebakz like eban-ebakz,

menge like eban-menge,

preis like eban-preis,

waers like eban-waers,

peinh like eban-peinh,

bsmng like eban-bsmng,

del type i value 0,

s(1) type c,

end of itab.

data: ba1(12) type c.

data: banf(20) type c.

data: banfn1 like eket-banfn.

data : cnt type i,

n(3) type n,

cnt1 type i,

n1(3) type n,

s(1) type c,

pn type i.

data : var1(40) type c,

var2(40) type c,

var3(40) type c,

srlno type eban-bnfpo,

day(2) type c,

month(2) type c,

year(4) type c,

date1(10) type c.

selection-screen begin of block ex with frame title text-005.

select-options : banfn for eban-banfn.

select-options : bnfpo for eban-bnfpo.

select-options : bsart for eban-bsart.

select-options : werks for eban-werks.

select-options : afnam for eban-afnam.

select-options : frgkz for eban-frgkz.

select-options : badat for eban-badat.

select-options : bednr for eban-bednr.

select-options : matnr for eban-matnr.

select-options : matkl for eban-matkl.

select-options : ekgrp for eban-ekgrp.

select-options : statu for eban-statu.

select-options : erdat for eban-erdat.

select-options : ebakz for eban-ebakz.

selection-screen end of block ex.

start-of-selection.

perform select_data.

perform fill_fldcat.

perform build_layout.

perform display_output.

end-of-selection.

&----


*& Form select_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form select_data.

select banfn bnfpo bsart werks afnam frgkz badat frgdt bednr matnr

ekgrp statu erdat ebakz lgort menge preis waers peinh bsmng

into (itab-banfn,itab-bnfpo,itab-bsart,itab-werks,

itab-afnam,itab-frgkz,itab-badat,itab-frgdt,itab-bednr,

itab-matnr,itab-ekgrp,itab-statu,itab-erdat,itab-ebakz,

itab-lgort,itab-menge,itab-preis,itab-waers,itab-peinh,

itab-bsmng)

from eban

where banfn in banfn

and bnfpo in bnfpo

and loekz ne 'X'

and bsart in bsart

and werks in werks

and afnam in afnam

and frgkz in frgkz

and badat in badat

and bednr in bednr

and matnr in matnr

and ekgrp in ekgrp

and statu in statu

and erdat in erdat

and ebakz in ebakz.

append itab.

endselect.

loop at itab.

if itab-menge ge itab-bsmng.

itab-del = 1.

modify itab.

endif.

endloop.

delete itab where del ne 1.

sort itab by banfn bnfpo.

endform. " select_data

&----


*& Form fill_fldcat

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form fill_fldcat.

constants : key value 'X',

no_key value space,

check value 'X',

no_check value space ,

hot value 'X',

no_hot value space,

input value 'X',

no_input value space.

perform append_fldcat using 'S' 'ITAB' ' ' no_key

'CHK' check no_hot input 0 changing gt_fieldcat .

perform append_fldcat using 'WERKS' 'ITAB' 'EBAN' no_key

'PLANT' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'BANFN' 'ITAB' 'EBAN' key

'PR-NO' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'BNFPO' 'ITAB' 'EBAN' key

'PR-NO' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'BADAT' 'ITAB' 'EBAN' no_key

'PR-DAT' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'ERDAT' 'ITAB' 'EBAN' no_key

'RELEASEDT' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'MATNR' 'ITAB' 'EBAN' no_key

'ITEMCODE' no_check no_hot no_input 0 changing gt_fieldcat.

perform append_fldcat using 'BEDNR' 'ITAB' 'EKPO' no_key

'TRACKING NO.' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'AFNAM' 'ITAB' 'EKPO' no_key

'REQUISITIONER' no_check no_hot no_input 0 changing gt_fieldcat .

perform append_fldcat using 'EBAKZ' 'ITAB' 'EKPO' no_key

'CLOSE STATUS' no_check no_hot no_input 0 changing gt_fieldcat .

endform. " fill_fldcat

&----


*& Form build_layout

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form build_layout.

gs_layout-f2code = p_f2code.

gs_layout-zebra = 'X'.

gs_layout-colwidth_optimize = 'X'.

gs_layout-totals_text = text-900.

gs_layout-subtotals_text = text-901.

gs_layout-key_hotspot = 'X'.

gs_layout-detail_popup = 'X'.

gs_layout-no_vline = ' '.

endform. " build_layout

&----


*& Form display_output

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form display_output.

g_repid = sy-repid.

call function 'REUSE_ALV_LIST_DISPLAY'

exporting

i_callback_program = g_repid

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'LINE_SELECTION'

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

tables

t_outtab = itab

exceptions

program_error = 1

others = 2.

endform. " display_output

*&----


*& Form append_fldcat

*&----


  • text

*----


  • -->P_0276 text

  • -->P_0277 text

  • -->P_0278 text

  • -->P_KEY text

  • -->P_0280 text

  • -->P_NO_CHECK text

  • -->P_NO_HOT text

  • -->P_NO_INPUT text

  • -->P_3 text

  • <--P_GT_FIELDCAT text

*----


form append_fldcat using par_fldname par_tabname

par_reftabname par_key

par_seltext par_checkbox par_hotspot par_input

par_outputlen

changing pit_fldcat type slis_t_fieldcat_alv.

clear ls_fieldcat.

ls_fieldcat-tabname = par_tabname.

ls_fieldcat-fieldname = par_fldname .

ls_fieldcat-ref_tabname = par_reftabname.

ls_fieldcat-key = par_key .

ls_fieldcat-seltext_m = par_seltext.

ls_fieldcat-checkbox = par_checkbox.

ls_fieldcat-hotspot = par_hotspot .

ls_fieldcat-input = par_input.

ls_fieldcat-outputlen = par_outputlen.

append ls_fieldcat to pit_fldcat.

endform. " append_fldcat

*----


  • FORM line_selection

*----


form line_selection using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&REL'.

clear r_ucomm.

sort itab by banfn bnfpo.

perform list_cl.

when '&SEL'.

clear r_ucomm.

perform list_sel.

when '&DSC'.

clear r_ucomm.

perform list_des.

when '&OTH'.

perform x1.

clear r_ucomm.

endcase.

endform.

*----


  • FORM set_pf_status

*----


form set_pf_status using rt_extab type slis_t_extab .

set pf-status 'CLOSE'.

endform.

form x1.

get cursor field ba1.

get cursor field banf.

if banf = 'ITAB-BANFN'.

get cursor field itab-banfn value banfn1.

call function 'MMPUR_REQUISITION_DISPLAY'

exporting

im_banfn = banfn1.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

endif.

endform.

form list_sel.

loop at itab.

itab-s = 'X'.

modify itab.

endloop.

endform.

form list_des.

loop at itab.

itab-s = space.

modify itab.

endloop.

endform.

form list_cl.

*****BDC for closeing the PR.

loop at itab where s = 'X'.

srlno = itab-bnfpo / 10.

var3 = srlno.

concatenate '0' var3 into var3.

concatenate 'EBAN-BNFPO' '(' var3 ')' into var1.

concatenate 'RM06B-TCSELFLAG' '(' var3 ')' into var2.

day = itab-frgdt+6(2).

month = itab-frgdt+4(2).

year = itab-frgdt+0(4).

concatenate day '.' month '.' year into date1.

******new addition for large number of pr item

perform bdc_dynpro using 'SAPMM06B' '0105'.

perform bdc_field using 'BDC_CURSOR' 'EBAN-BANFN'.

perform bdc_field using 'BDC_OKCODE' '=AB'.

perform bdc_field using 'EBAN-BANFN' itab-banfn.

perform bdc_dynpro using 'SAPMM06B' '0106'.

perform bdc_field using 'BDC_CURSOR' 'RM06B-BNFPO'.

perform bdc_field using 'BDC_OKCODE' '/00'.

perform bdc_field using 'RM06B-BNFPO' itab-bnfpo.

perform bdc_dynpro using 'SAPMM06B' '0106'.

perform bdc_field using 'BDC_CURSOR' 'EBAN-BNFPO(01)'.

perform bdc_field using 'BDC_OKCODE' '=DETA'.

perform bdc_field using 'RM06B-BNFPO' itab-bnfpo.

perform bdc_field using 'RM06B-TCSELFLAG(01)' 'X'.

perform bdc_dynpro using 'SAPMM06B' '0102'.

perform bdc_field using 'BDC_CURSOR' 'EBAN-EBAKZ'.

perform bdc_field using 'BDC_OKCODE' '=BU'.

  • perform bdc_field using 'EBAN-LGORT' itab-lgort.

  • perform bdc_field using 'EBAN-MENGE' itab-menge.

  • perform bdc_field using 'RM06B-EEIND' '30.11.2004'.

  • perform bdc_field using 'RM06B-LPEIN' 'D'.

  • perform bdc_field using 'EBAN-AFNAM' itab-afnam.

  • perform bdc_field using 'EBAN-BEDNR' itab-bednr.

  • perform bdc_field using 'EBAN-FRGDT' '30.11.2004'.

perform bdc_field using 'EBAN-EBAKZ' 'X'.

perform bdc_field using 'EBAN-REPOS' 'X'.

******end of addition

call transaction 'ME52' using bdcdata mode ''

messages into messtab.

refresh bdcdata.

endloop.

refresh itab.

clear itab.

perform select_data.

perform fill_fldcat.

endform.

----


  • Start new screen *

----


form bdc_dynpro using program dynpro.

clear bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

append bdcdata.

endform.

----


  • Insert field *

----


form bdc_field using fnam fval.

clear bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

append bdcdata.

endform.