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

What is the basic difference internal tables and database tables? : abap data dictionary

557


Can we set page headers to details lists?

581


What does hide statement do?

558


In SAP Script,How to display a single field(like matnr)at the right end of the form.

1971


What is the use of the raising exception? : abap modularization

505






HOW CAN YOU USE A PAGE COUNT IN CALLING A PAGE IN SMARTFORM?

1622


How to display or know if the value entered contains records or not?

571


What are the buffering options in abap?

556


Explain what are the different functions used in sap script? What are the parameters used in each function?

546


Different types of luws. What are they?

611


how to create view in bdc..??

2315


What is sequence of event triggered in report?

590


What are the differences between interactive and drill down reports?

532


What is the difference between skip and reserve?

598


What are the payroll related infotypes? : abap hr

565