how to handle multiple line items in bdc??

Answer Posted / raju

Table control is used to handle multiple input records.
example for creating customer we use screen xd01.
initial screen we have address details,most of the fields on
this screen are fixed. But when you select payment
transactions you find customer bank details.Now we can see
customer can have multiple bank accounts (bank keys,bank
account no)In the table control row no for each record is
dynamic i.e for 1st record the fields are knbk-banks(01),
knabk-bankl(01)..here 01 specifies the row no and row no
keeps on increasing with every new record.

In bdc we declare a internal table t_knb1 type knb1 customer
bank details.

declare index
data v_index(2) type N.
declare string
data v_enam like bdcdata_fnam
loop at it_banks into wa_banks.
v_index = sy-tabix."loop counter

concatenate 'knbk-banks(' v_index ')'into v_fnam.
wa_bdcdata-fnam = v_fnam.
wa_bdcdata-fval = wa_banks-banks.
append wa_bdcdata to it_bdcdata.

repeat this procedure for all fields.

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to upload more than 2GB file from External Source to SAP?

1079


What are the 3 methods that we use in sequence in a batch input session method? : abap bdc

818


What is a view in sap? : abap data dictionary

817


What will you code in start-of-selection & end-of-selection ?

831


Use SET PF_STATUS which is in the FM reuse_alv_grid_display to set the button

2042


What is a view? : abap data dictionary

891


What is the different type of projects? : sap abap hr

704


What is the use of enqueue function module? : sap abap data dictionary

855


What is the Difference between At Line selection and At user-command?

891


How to eliminate duplicate entries in internal tables?

914


On which even we can validate the input fields in module progams?

800


What are the advantages and disadvantages of different types of bdc's?

776


What should be declared explicitly in the corresponding abap/4 statements to access internal tables without header lines & why?

804


Explain the difference between domain and data element?

813


How can I make a differentiation between dependent and independent data? : abap hr

816