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

Problem while Creating BOM using LSMW Direct Input

Former Member
0 Likes
1,144

Hi all ,

I am trying to create the BOM Using LSMW Direct Input Method .

I am getting problem at step 9 that is Read Data.

It is able to read the values from header and item files .

but it is not able to write , so the Written is 0 always .

I put the field names first in the flat file and correcponding values below it with tab delimited.

Please let me know where the Problem would be.... I am trying this from long time ..

Regards ,

Raj

7 REPLIES 7
Read only

Former Member
0 Likes
995

Hi

Did you specify file where read data will be written?

Check specify files step.

Read only

0 Likes
995

hi ,

Yes i am specify files i am attaching 2 files .

ones is header and the other is line item data .

my strucure is :

Hi ,

I am still getting problem while for writing the records after reading the data .....

my header structure :

STYPE

MATNR

WERKS

SELAL

STLAN

DATUV

ZTEXT

my item structure :

STYPE

MATNR

WERKS

SELAL

POSTP

MENGE

my header data :

STYPE MATNR WERKS SELAL STLAN DATUV ZTEXT

1 388 0110 20 1 06.01.2009 SAMPLE ZTEXT

my item data :

STYPE MATNR1 WERKS SELAL POSTP MENGE

1 388 0110 20 N 1234

1 382 0110 20 N 12345

Above text files are delimited by tabulator.

Please guide me . The files are reading but unable to write .....

Regards,

Raj

Read only

0 Likes
995

in the Maintain Field Mapping and Conversion Rules step

assign source fields to destination fields.

Also, line items must be stored in the table, yes?

transfer_record macro plays role of append statement .

So, you can fill tables.

Read only

Former Member
0 Likes
995

when the step7(Specify Files) afte assining the files in the block FILE STRCTURE---> you can tick the Field names at start of file and field order matches source strcture definition

Read only

Former Member
0 Likes
995

Hi

When you enter step "Specify files" in change mode, make sure filename is filled in for Read Data (application server). If this does not work, mark checkbox "Display Read Program" (accessible via Personal Menu), execute it in debug mode and put a breakpoint at the transfer statement (maybe write permissions on application server are not correct).

Read only

Former Member
0 Likes
995

Hi,

There may be one or more fields in header and line item structures which have same name. For example:

Header -> VBELN(key), NAME1 (let it be customer name)

Line -> VBELN(key), VBELP(line item no.), NAME1 (let it be vendor name)

Now while reading the files, the read program will read all the records from header as well as line item files.

However while writing in corresponding internal tables (of the LSMW program) if it does not find the combination of VBELN and NAME1 same in header and line files, then the write program will not write those unmatching records. Note that in this case instead of matching only VBELN it is also matching NAME1.

So the best way is to change the common field's (other then the linking one) name in header or line structures. For example you can give NAME1 as NAME1 in header structure but in line structure assign its title as NAME_1.

Dont forget giving rewards in case my answer helps.

Thanks.

Read only

0 Likes
995

Hi ,

I am still getting problem while for writing the records after reading the data .....

my header structure :

STYPE

MATNR

WERKS

SELAL

STLAN

DATUV

ZTEXT

my item structure :

STYPE

MATNR

WERKS

SELAL

POSTP

MENGE

my header data :

STYPE MATNR WERKS SELAL STLAN DATUV ZTEXT

1 388 0110 20 1 06.01.2009 SAMPLE ZTEXT

my item data :

STYPE MATNR1 WERKS SELAL POSTP MENGE

1 388 0110 20 N 1234

1 382 0110 20 N 12345

Above text files are delimited by tabulator.

Please guide me . The files are reading but unable to write .....

Regards,

Raj