Application Development 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: 

LSMW for Vendor Contract (ME31K)

former_member598013
Active Contributor
0 Kudos
465

Hello Folks!!!

I am encoutering an issue while using 'Batch Input Recording ' in LSWN for the Vendor Contracts ( Transaction Code: ME31K). The problem is for one Vendor we can have multiple line items.. this is dyanamic not fixed So how would I store the line item corresponding to the Vendor in Contracts.

I would appreciate if you guys provide me some tips.. I have already gone through this SDN but I couldn't find any solution on this.. I know we can create two structure one for header and another for line item but how would I approach further in LSMW.

Or is there any other way where we can use some BAPI . I have already tried BAPI " BAPI_CONTRACT_CREATEFROMDATA " But it is for the customer contract not for the Vendor contract.

Thanks,

Chidanand

2 REPLIES 2

Former Member
0 Kudos
79

YVENDOR Header data Vendor Data

LIFNR C(010) Vendor

EKORG C(004) Purch. Organization

BUKRS C(004) Company Code

KTOKK C(004) Account group

YBANKDETAILS Item data

LIFNR C(010) Vendor

SWIFT C(011) SWIFT code

BANKS C(003) Bank Country

you have to create 2 strcture like above header and item with reference LIFNR.

in item strcture you have to pass multiple line items based on same vendor.

12345 -


0001---0300 Header strcture

12345 -


0001---0301

12345 -


0002---0302

12345 -


0003---0303

12345 -


0004---0304

here based on vendor it will read the LSMW program

in Step 4

you have to assing header strcutre ---> Header

item strcture -


> Item strcture

Former Member
0 Kudos
79

Hi

You can use the following BAPI in lsmw for creating a contract.

Business Object BUS2014

Method CREATE

Message Type PURCONTRACT_CREATE

Basic Type PURCONTRACT_CREATE01

Create header structure and then item structure as child to the header.

Regards,

Rakesh Ananthuni.