Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC problem

Former Member
0 Likes
436

Hi,

I am facing a problem when i am creating a BDC program for Transaction FV50.

How will i maintain more then one line items for a single header.

Thanks in Advance

3 REPLIES 3
Read only

Former Member
0 Likes
405

Hi anjali,

you will have to loop the all line item for one perticular header data.,append header data only once in BDCDATA table and append all the corresponding line items with the help of a loop.

You will also have to maintan index number for all line items.

Read only

former_member438956
Active Participant
0 Likes
405

hi,

just refer the code below.

loop at it_customer_3 into wa_customer2 where kunnr = mkunnr.

index = mytabix.

n = index.

condense n no-gaps.

CONCATENATE 'MV10A-MATNR(0' n ')' INTO tran.

perform bdc_field using tran

wa_customer-MATNR.

CLEAR tran.

CONCATENATE 'MV10A-KDMAT(0' n ')' INTO tran.

endloop.

take all the data in internal table then loop into internal table for all line items and populate the bdc tab accordingly.

Hope it helps u.

Regards,

Anil N.

Read only

Former Member
0 Likes
405

when u perform the recording, first u do recording for 1st line item. Then loop the data for more line items.

For eg: when do recording for line items u will see the recorded field as FILED(01) .

here if u notice the value (01). This is occured for first line item. The same way u need to handle for as many line items as u want.

Check the sample code below:

data: count(2) type n.

Loop at itab.

count = count + 1.

Here populate header data.

then Populate item data as below.

perform ......... fields(count).

endloop.