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

LSMW using one file

Former Member
0 Likes
879

Hi All,

I have to perform the below LSMW with Direct method only.

We have only one data file with one row containging header and item data. i.e. each row from data file will create one header record and item records.

Each row will have some columns corresponding to header data and some corresponding to Item data.

Now the problem is:

In the data file, we will get one record/line, but we need to create 2 or more items/lines for the same line(of data file).

Letu2019s say: we get this record in the extract:

16 1256 AB 67999 C

When we map this record to SAP structures we will have:

BBKPF u2013 Header

BBSEG u2013 1st Item, we can map this

BBSEG u2013 2nd Item, we need to create this second item structure programmatically. [how to do this ???? any idea]

Regards,

Pankaj

Hi All,

I have to perform the below LSMW with Direct method only.

We have only one data file with one row containging header and item data. i.e. each row from data file will create one header record and item records.

Each row will have some columns corresponding to header data and some corresponding to Item data.

Now the problem is:

In the data file, we will get one record/line, but we need to create 2 or more items/lines for the same line(of data file).

Letu2019s say: we get this record in the extract:

16 1256 AB 67999 C

When we map this record to SAP structures we will have:

BBKPF u2013 Header

BBSEG u2013 1st Item, we can map this

BBSEG u2013 2nd Item, we need to create this second item structure programmatically. [how to do this ???? any idea]

Regards,

Pankaj

5 REPLIES 5
Read only

JL23
Active Contributor
0 Likes
817

How does this one line with header and item data look?

I think somehow the item part must appear several times.

Does that mean that your line has a flexible length?

Read only

Former Member
0 Likes
817

Data file will be some what like:

Col1 Col2 Col3 Col4 Col5 Col6 [just an example]

Where, Col1 =, Col2 and Col6 are for header data and Col3 and Col4 for Item data. Based on header data value on Col2 we have to create multiple Items.

e.g. If Col2 is inbetween 0 to 100, then Create only 1 Item

If Col2 is inbetween 101 to 1000, then Create 2 Items

If Col2 is iabove 1000, then Create only 3 Items

There is another logic (Based on some other Header fields) to fill different values for different Items

Hope this expalins the scenerio.

Regards,

Pankaj

Read only

JL23
Active Contributor
0 Likes
817

If you have a fix number of columns then I dont see any problem.

SAP calls this manipulating data records:

see docu here:

http://help.sap.com/saphelp_nw70/helpdata/en/ba/0d533f57073e78e10000000a114084/frameset.htm

Read only

Former Member
0 Likes
817

as Jürgen L. said ( i mean thru the link )

transfer_record will do it

regards

Prabhu

Read only

Former Member
0 Likes
817

Thanks!