cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I was trying to see if the data I entered in the different structures for the BAPI were ok (not very easy to find where data should be entered, as the data in the different structures don't have the same name as in VTTK, VTTP, VTSP tables).

But though I get a success message telling me that a shipment was created, I can't find any shipment with the number in the message.

Am I missing anything?

Thanks for the help

Kind regards

Yan

0 Likes
View Entire Topic
HakanHaslaman
Product and Topic Expert
Product and Topic Expert
0 Likes

If you're having trouble locating the shipment with the provided number, consider following these steps:

1. Remember to call 'BAPI_TRANSACTION_COMMIT' after using the BAPI. This action will save any changes you've made. If you forget to do this, the shipment will be created, but it won't be saved.

2. Make sure you're looking in the correct transaction. For instance, VT03N is the transaction for creating a shipment.

3. Ensure you're looking in the correct system and client where the BAPI was executed.

4. Even if you received a success message, there might be warnings or errors that are preventing the shipment from being saved. Check the return table of the BAPI for any messages.

5. The shipment number could be within a range that isn't displayed in your transaction. Verify the number range for shipments in your system.

6. Make sure the data you've entered into the BAPI is correct. If it's not, this could be preventing the shipment from being saved.

7. If you've tried everything else and are still having issues, you might need to debug the BAPI to find the problem.

yan3
Explorer
0 Likes

Hi,

As I said, everything was telling me that a shipment was creared, meaning then that the data I entered were correct.

The only thing that missed in the FM was the COMMIT, what surprized me as it's not always the case when you test an FM in SE37.

But telling this isn't really helpful to a non-developer, so, here is the trick:

Display the source code of the FM in SE37.

Go to the 'Function Module' menu, submenu 'Execute' and 'Test Sequences'.

Enter as first sequence the BAPI_SHIPMENT_CREATE, as second one BAPI_TRANSACTION_COMMIT and validate the sequence.

The test screen is then displayed, either you populate the values for the different structures there ot you go to the test data diretory to retrieve your's.

Execute then the BAPI_SHIPMENT_CREATE.

When finished, look for the number of the shipment that was created.

Then, press the back arrow to go tho the BAPI_TRANSACTION_COMMIT and execute it.

Once finished, you can see in VT03N the shipment that was created.

Ask a Question