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 the function of the transport system and workbench organiser? : abap data dictionary

612


What application areas are you comfortable in?

878


What is sap abap data dictionary?

629


Proxy Programming with ABAP - How to develop the Proxy identification through programming

1883


Explain the types of bdc's?

593






What are the uses of secondary indexes?

545


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

578


What is narrow casting and wide casting?

1133


Explain the systems fields used for interactive lists and lists?

525


Can we handle two transaction codes in the same program using call transaction bdc input method? : abap bdc

646


I need the coding for BDC program to upload Purchase orders of known vendor (ME21) in Material Management

1756


How do you connect to the remote server if you are working from the office for the client in remote place?

587


In Smartforms or ADOBE Forms Can we get text from standard table in verticle form? if yes, How?

1808


What are the payroll related infotypes? : abap hr

573


Can you define a field without a data element? : abap data dictionary

619