Logic for using table controls in BDC?

Answer Posted / vandan

data : count type i value 1.
data : var type i value 1.
types : begin of header ,
firstfield(1),
flg(2),
.........
.........
end.
types : begin of item ,
firstfield(1),
flg(2),
.........
.........
end.
Loop at header table.
loop at item table.
if header-firstfield = 'H'.
Pass coun to header-flg.
count = count +1.
else.
pass count to item-flg.
endloop.
endloop.

loop at header data .
header BDC recording.
loop at item data where item-flg = header-flg.
item BDC recording.
var = var + 1.
if var > 3.
put click recording.
var= 1.
endif.
put save recording.
endloop.
endloop.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pass by value and what is pass by reference? Which is better?

1097


What has to be done to the packed fields before submitting to a BDC session.

944


Explain the types of bdc's?

783


Define subtype ? : abap hr

785


In delivery processing which step comes first picking, packing, posting goods issue ?

1869


If I want to execute a program only in background not in foreground is there any option for this? : abap bdc

752


What is repository info. Systems?

826


What kind of BDC programs are written ?

795


What are the advantages of logical databases?

814


In select-options, how to get the default values as current month first date and last date by default?

840


How do you use tab sets in layout sets?

869


How can we access the correction and transport system?

757


What are the different methods of passing data? : abap modularization

784


If I have put commit in badi implementation class after update, is it allowed? Also if some standard functionality already implemented an update and now i m doing update and if it fails, what will be the impact of commit?

1584


how to Implement a BADI in which it restricts the access when purchase order is created against contract using definition ME_PURCHDOC_POSTED. please tell me the answers if any one knows. thanks in advance. :ravikiran

2268