‎2008 Mar 17 9:53 AM
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
‎2008 Mar 17 10:02 AM
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
‎2008 Mar 17 10:04 AM
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
‎2008 Mar 17 10:08 AM
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
‎2008 Mar 17 10:08 AM
If it is of two different data from different table ,then u have to create a two different flat files.
‎2008 Mar 17 10:12 AM
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.