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 are the function modules used in a sap script driver program?

851


How do you document abap/4 programs? Do you use program documentation menu option?

932


WHY CLUSTER TABLE CALLED AS CLUSTER TABLE.

2000


What are different data types in abap/4?

748


What is the syntax of packed number?

895


what is call back in alv?

2230


What are the merits of its?-

835


What is the difference between retroactive accounting period, earliest retroactive accounting period? : sap abap hr

803


2)In production what is the user exit?

1767


What is direct input method ?

1704


hi,how to diable the popup window which is displayed afetr executing the SAP script program?

1837


What is the step-by-step process to create a table in data dictionary? : abap data dictionary

962


how do you transport lsmw data from one system to another?

899


Do you know any other patterns if yes.. explain

1086


Differentiate screen painter from menu painter.

802