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_CONTRACT_CREATE - problems when used in LSMW

Former Member
0 Likes
441

Hi,

I am working on a conversion program using lsmw for creating contracts from the flat file. Using LSMW idocs are created and using the BAPI_CONTRACT_CREATE contracts are created in SAP.

The data from the flat file is read and is converted as I thought and seems to consistent. But when the Bapi procesess, it is throwing an error of 51. The reason for the error is "ADDRESS DOES NOT EXIST'.

I checked the vendor number and addresses in the LFA1 and ADRC tables, there is data for that vendor. Infact I tried with different vendor numbers whose addresses are loaded in the tables.

However when I manually create the contract with the same data using ME31k, the contract gets created.

I have spent lot of time on this but could not solve it.

Is it looking for vendor or is there something missing.

Kindly help me out, it is very urgent and important.

Thanks & regards

pratyusha

Message was edited by: pratyusha vemuluri

Hi,

I am working on a conversion program using lsmw for creating contracts from the flat file. Using LSMW idocs are created and using the BAPI_CONTRACT_CREATE contracts are created in SAP.

The data from the flat file is read and is converted as I thought and seems to consistent. But when the Bapi procesess, it is throwing an error of 51. The reason for the error is "ADDRESS DOES NOT EXIST'.

I checked the vendor number and addresses in the LFA1 and ADRC tables, there is data for that vendor. Infact I tried with different vendor numbers whose addresses are loaded in the tables.

However when I manually create the contract with the same data using ME31k, the contract gets created.

I have spent lot of time on this but could not solve it.

Is it looking for vendor or is there something missing.

Kindly help me out, it is very urgent and important.

Thanks & regards

pratyusha

Message was edited by: pratyusha vemuluri

1 REPLY 1
Read only

Former Member
0 Likes
329

Just check if the program is looking at ADRR or ADRC. If you are using SAP system already, and upgraded to the higher version, you may face this problem where the program would be looking at ADRR but the new addresses are maintained in ADRC. The program needs to be changed depending on which table the data is maintained.

Hope this helps.

Thanks

Anil