‎2009 Jan 07 10:10 PM
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
‎2009 Jan 08 4:54 AM
Hi
Did you specify file where read data will be written?
Check specify files step.
‎2009 Jan 08 4:14 PM
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
‎2009 Jan 09 5:01 AM
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.
‎2009 Jan 08 7:29 AM
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
‎2009 Jan 08 7:47 AM
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).
‎2009 Jan 08 9:34 AM
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.
‎2009 Jan 08 4:12 PM
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