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 flat file

Former Member
0 Likes
836

HI gurus,

In my BDC program I'm using 2 structures.The first one is for the session method and the second one for the call transaction method. my doubt is do i need to create 2 flat files for it. if yes then how to create a flat file using these fields.this is very urgent please help.

Structure for session method:

----


DATA : BEGIN OF it_idata OCCURS 0,

ematn(18), "Material Number.

menge(13), "Qyantity.

netpr(11), "Net Price.

werks(4), "Plant.

ebelp(5), "Item Number.

END OF it_idata.

Structure for Call Transaction:

----


DATA : BEGIN OF it_me21 OCCURS 0,

lifnr(10), "Vendor A/c No.

bsart(4), "A/c Type.

bedat(8), "Date of creation of PO.

ekorg(4), "Purchasing Organisation.

ekgrp(3), "Purchasing Group.

x_data LIKE TABLE OF it_idata,

END OF it_me21.

regards,

abaper

Edited by: abaper sap on Mar 17, 2008 10:54 AM

5 REPLIES 5
Read only

Former Member
0 Likes
592

Hi,

If u have used two itab we want to create two flat file oterwise u can create singe flate file.

LIke this formate.

Regards,

S.Nehru

Edited by: Nehru on Mar 17, 2008 11:03 AM

Read only

dhruv_shah3
Active Contributor
0 Likes
592

Hi,

From wht you have given it seems that they are from different table,

so different data will be there.

So you have to create a tab delimited file for the data in sequence of the screen data.

If you dont want to give value then you can use 'X' in the flat file.

different files will be needed, go to table in which the data is stored and then accordingly put data in the flat file.

HTH

Regards,

Dhruv Shah

Read only

Former Member
0 Likes
592

HI

HERE YOUR USEING TWO DIFFRENT STRUCTURES FOR DIFF METHODS SO YOU NEED TO CREATE TWO FLAT FILES

JUST UPLOAD THE FILE WHICH EVER YOU WANT

Read only

nivaskumar2
Explorer
0 Likes
592

If it is of two different data from different table ,then u have to create a two different flat files.

Read only

vinod_vemuru2
Active Contributor
0 Likes
592

Hi,

We can do it with single structure itself.

Create a structure with all the fields used in both session method and call transaction method.

Create the flat file with all these fields.

While populating BDC data u can use what ever fields u want.

Loop at itab INTO wa.

If session method

Populate BDC data with required fields for session.

ELSE.

Populate BDC data with required fields for call transaction.

ENDIF.

ENDLOOP.

Thanks,

Vinod.