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 and BAPI

Former Member
0 Kudos

I am fairly new to LSMW's but I have been able to successfully use them with Batch Input Recordings. I have been really struggling for the last few days trying to figure out how to use them with BAPI's. I have several BAPI's I need to use them with, but I have been trying it with Business Object BUS1088/CHARACTERISTIC_CREATE to start out because it is the simplest. I am fairly confident the data itself is o.k. because I can run it manually with the BAPI test button. I am getting IDOC errors though and I have no knowledge of IDOC's at all. If I go into Create IDOC Overview I can see a status of 51 (application document not posted)on quite a few records with details such as Internal Error Message 061, Start Characteristics Message 101 and another 5 of them with status 51 as well. Then I get Status 62 (Direct call started), 64 (IDoc ready to be transferred to application) and then 50 (IDoc added). My characteristic does not get created.

Am I perhaps missing a step somewhere?

How do I troubleshoot these errors to find out what is wrong?

Do I need to somehow run the BAPI Commit --- shouldn't the LSMW do this though?

ANY help at all would be VERY appreciated -- I have run out of ideas.

4 REPLIES 4

Former Member
0 Kudos

Hi Ian,

I guess that LSMW always process BAPIs like IDocs. For that, you have to define the customizing to inbound IDocs in SAP. You only need to define the Partner Profile (WE20) indicating the idoc type and the operation inbound code. In the partner profile, you chave to set if you want that the IDoc is processed inmidiatly or you want to acumulate then (Status 64), and process of all then later with a program. Other thing that do that IDoc stay in status 64, is a dump when it is being processed. Look for dumps in ST22.

I hope help you !

Regards

PabloX

0 Kudos

thx for your reply. I checked ST22 and there were no related dumps. I had defined the partner profile (WE20), but and whenever I change it to Trigger Immediately I have even more problems -- when I click on Start Idoc Processing it says no data found. Currently it is set to Trigger by Background program.

Former Member
0 Kudos

I solved my own problem. I put a breakpoint on the BAPI and then ran the LSMW and stepped through the BAPI line by line. Turns out some of my data in the data files was in lowercase and SAP was expecting it in uppercase.

Former Member
0 Kudos

Hi, As I know, though the LSMW has BAPI and IDOC import way, It only can do local transfer.

Yes, you can fill the receive parnter type and number in the BAPI(ALE MESSAGE) mode. But when the lsmw do transfer, it will filter out all of the port, exclude file port, maybe that means it will be only transfer to local system.