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: 

BAPI BAPI_REQUISITION_CREATE with LSMW

Former Member
0 Kudos

Hi!

We try to create PRs using BAPI BAPI_REQUISITION_CREATE. Can someone explain, how to make Automatic Source Determination to work?

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

Hi,

you mean Auto field mapping.....

1. fill the attributes.

2. create source structure

3. Maintain Source fields

here you can do in many ways..

i.create field

ii. copy

iii. table control

i suggest you to use copy option

here create a tab delimited text file in your PC, the file order should be like this..

fieldname <tab> fielddesc <tab> type <tab> length

example..

Bukrs	Company code	c	4	
ekorg	Purchasing Org	c	4	
ktokk	Vendor accountgroup	c	4	
anred	title	c	15	
name1	name1	c	35	
sortl	sort field	c	10	
land1	country	c	3	
spras	language key	c	2	
akont	reconcilation	c	10	
fdgrv	planning group	c	10	
waers	purchase order currency	c	5	

4. maintain the structure relation ships by choosing the relevant structures.

5.field mapping

Auto field mapping CTRLSHFTF3

and now check any fields left (unmapped) using Unassigned fields CTRLSHFTF2

and then forcefully Assign it to the field you want.

here you have to assign TCODE also select the TCODE field and then click on constant. then Give TCODE in the popup.

and once all mapping etc over then click on Check Syntax SHFT+F2 this will generate conversion program...

and rest of the steps are simple...

get back if you have any issues ...

Regards

vijay

0 Kudos

In the Field Mapping step "Source determination" is hidden. Therefore it is impossible to mark it.

When LSMW ir processed, system asks for data, that should be determined automatically.

Former Member
0 Kudos

Hi Maris,

You can make automization of LSMW, you must have to use, LSMW generation program (normal SE38 Program).

Take file name as '*/pr_req.txt'

First, you must have to finish your LSMW. Choose 'Display Conversion Program'. It will display name of the Conversion program for your LSMW.

So pick the name and run in SE38 by providing corresponding parameters. You must have to provide a path for wildchar * in the selection screen.

regards.

ram