cancel
Showing results for 
Search instead for 
Did you mean: 

LSMW For T-code ME21N

Former Member
0 Kudos

Hi,

There is an issue with the LSMW for T-code ME21N. I have completed 11 steps successfully. The 11 steps are as follows:

1. Maintain Object Attributes: - I am using Standard batch/direct input.

2. Maintain Source Structures: - I understand that it can work if I make two source structures on same level (1st for the header & 2nd for the line items).

3. Maintain Source Fields: - I am maintaining all compulsory fields of both structures.

4. Maintain Structure Relations: - In this way, there are two structures

a. MBEPOH

b. MBEPOI

I am mapping MBEPOH with header source structure and MBEPOI with line source structure.

5 Maintain Field mapping and Conversion Rules: - I am mapping all compulsory fields.

6 Maintain Fixed Values, Translations, And User- Defined Routines: - This step is executing successfully. 7 Specify Files: - I m specifying two-text one for header data and 2nd for line items.

8 Assign Files: - Then I assign it to respective structures.

9 Display Read Program: - This step is executing successfully.

10 Read Data: - This step is executing successfully.

11 Display Read Data: - This step is executing successfully. This means mapping is perfect.

12 Generate Conversion Program: - BUT It is giving an error, which I m not able to get the reason of it. The error is this: -

Generation cancelled. Reason: Invalid

Structure Relations

I have seen the relation’s b/w structures are perfect and unable to get the reason why this error is coming.

Would request you all, to help me to correct this error.

Regards,

Vakul

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vakul, in step one of your LSMW project instead of using the Standard batch/direct input, use BAPI option and specify the following:

Business Obj: BUS2012

Method: CREATEFROMDATA

Message type: PORDCR

Basic type: PORDCR05

Continue with steps 2 to 11.

Thank you.

Former Member
0 Kudos

Dear Vakul

Transcation ME21N is to create a purchase Order and this Tcode does not support LSMW.

WE cannot use LSMW to create Multiple PO.

There is standard BAPI available with this tcode we write an upload program and create multiple PO using BAPI structure.

regards,

Nimish Sheth