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

posting in FB01 thru LSMW Direct Input Method.

Former Member
0 Kudos

Hi friends.,

I would like to know how to post the multiple line items in FB01, whether i have to use headerdata(flat file) and item data( in another flat file )in 2 different flat file or i have to use single flat file. i'm using direct input method thru lsmw to posting the data in FB01.


Active Contributor
0 Kudos


If your document contains only one line item for every header, then you can have one data file. Else if you have multiple positions for a header line, you need both header and the line items in different data files.

Hope this helps you.

Best Regards, Murugesh AS

Former Member
0 Kudos

Hi, As you mentioned using Direct Input FB01.

I think you can find a program RFBELS00 in the setting of the first step of the LSWM.

Actually, this PG will be called by LSMW and input the file content into system.

Now you want to know the structure of the input file.

Check this link:

Hope it will be helpful.

Former Member
0 Kudos

It basically up to how you do config of your LSMW project. All your data can be in one file than in every record (line) you must specify whether this line is header data or line data. Or all header data can be in one file and all item data in another one - in this case you must specify a link between header data and item data.


Former Member
0 Kudos

Some additional thing to my formerly reply.

If you set a direct input in the first step of LSMW, then randomly create a source target of yourself. When move to the step 'Maintain structure relations', 'Maintain field mapping and conversion rules', you can see the target structure.

I believe that target structure is for the File be read by Direct Input Report.

So you don't need to concern the difference of Direct Input mode in LSMW.

Just create your source structure, and maintan the relation and mapping.

Hope it will be helpful.

Former Member
0 Kudos


I think you are using program RFBIBL00 as Direct input Method in LSMW ( Try to execute program independently by uploading the data into application server) in the selection-screen of this program just mention the file path of application server & also mention the datatransfer type (B-Session,D-Direct Input method,C-Call transaction)

Better to use only one flat file.

I am given here internal logic for

1st line for BBGR0( Header data)

2nd Line for BBKPF( Header data)

3rd onwards for line item BBSEG( LIne item level data)

- based on how many lineitems you are inserting

Next for Line item BBTAX(Line item)

Here with i am sending internal psudo logic it may help you





loop at tl_bbseg.

t_file = tl_bbseg.

append t_file


loop at tl_bbtax.

t_file = tl_bbtax.

append t_file


Just remember if you are not passing the data just give as slash.

if you find it is useful kindly reward me the points.

Active Contributor
0 Kudos

Hi Nisar,

both alternatives are possible

a) 1 file -> you need a record type at pos. 1:

(H = head and I = item) to identify head and item

b) 2 files -> you need a key to link Head and items

regards Andreas