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

BAPI - Using LSMW Create Contract

Former Member
0 Likes
458

I'm using BUS2014 - PURCONTRACT_CREATE to create contracts with LSMW. My problem is to create more than an item for the same contract. My structure is:

BURKS/LIFNR/EVART/VEDAT/EKORG/EKGRP/WERKS/VPER_START/KDATE/SPRAS/KTWRT/

EVRTP/EPSTP/KNTTP/EMATN/KTMNG/NETPR/Currency/PEINH/LGORT2/MWSKZ/BSTAE

Fore example in my excel file I want to create 3 itens for one contract then my archive will be:

.../ 200(vendor) /...../ 00010 (item) / 300 (material)/...

.../ 200(vendor) /...../ 00020 (item) / 301 (material)/...

.../ 200(vendor) /...../ 00030 (item) / 302 (material)/...

In this way, SAP is creating 3 contracts. Could anyone give me how should I create my structure/archive to upload?

If I create 2 structures (Headr and Item) How can I do the reference to the vendor and itens?

Thanks,

Guiza

1 REPLY 1
Read only

Former Member
0 Likes
355

you have to 2 strctures like HEADER and ITEM.

for reference you need to create one field in the starting of you strcture.

HEADER Strcture.

INDENT/BURKS/LIFNR/EVART/VEDAT/EKORG/EKGRP/WERKS/

ITEM Strcture:

INDENT/ Item strcture fields

Test data:

HEADER Strcture.

00001/ DE01/12345/ like your fields data

00002/ DE01/12345/ like your fields data

00003/ DE01/12345/ like your fields data

ITEM Strcture:

00001/ your item strcture fields data

00001/ your item strcture fields data

00001/ your item strcture fields data

00002/ your item strcture fields data

00002/ your item strcture fields data

00002/ your item strcture fields data

00003/ your item strcture fields data

00003/ your item strcture fields data

00003/ your item strcture fields data