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

Validation in LSMW

Former Member
0 Likes
520

Hi,

I am uploading Vendor Master data through LSMW. I want a validation that if the Vendor number is blank then that record will not be uploaded and that record will be send to the error file. How to do this validation. Plz help.

Hi,

I am uploading Vendor Master data through LSMW. I want a validation that if the Vendor number is blank then that record will not be uploaded and that record will be send to the error file. How to do this validation. Plz help.

2 REPLIES 2
Read only

Former Member
0 Likes
431

Hi

that can be done by TABLE CONTROL in LSMW

go through this and also check in the forum. there are many threads available to this query.

1)while recording u enter the data in the table control in the first row , second row etc.

The thing is ur flat file must be in correct format.

Eg

Consider ur table control is having fields like this

Fields1 fileld2 field3

Mr Suresh Peri

Mrs Peters Marry

Ur flat file must be like this.

ANRED_01 ANRED_02 NAMEV_01 NAMEV_02 NAME1_01 NAME1_02

Mr. Mrs. Suresh Peters Peri Marry .

2)*************

LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.

check that single charecter field, it that is X that means the header record is processed, and do the items.

and, this is another way, try this out also

YOu can do this in "Define Source Structures" step,

the HEADER is defined first,

then the DETAIL below the HEADER.

add the fields to the structures.

Both should have some common key field

Please take care that the name of the common field is the same.

Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.

<b>Reward if usefull</b>

Read only

Former Member
0 Likes
431

Hi,

For example if the source structure name is zsource. It has vendor number, lets say venno. So in begin of transaction u can check like this...

If zsource-venno is initial.

append error message to the string of the structure...

endif.

use

skip_transaction

transfer_transaction in end of transaction.

Reward if helpful.

Regards,

Karthick.

Message was edited by:

K@rthick

Message was edited by:

K@rthick