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: 

Sales Order BAPI Extension

Former Member
0 Kudos

Hi,

We would like to pass custom fields data to Custom screens in VA01 Standard Sales Order. For that we are extending standard BAPI BAPI_SALESORDER_CREATEFROMDAT2 using EXTENSION parameter. We have appended custom structures to VBAKKOZ. VBAKKOZX, BAPE_VBAK,BAPE_VBAKX and able to pass information from portal upto 480 characters using

valuepart1 and valuepart2.

But when we are trying to extend it further, standard sales order BAPI

BAPI_SALESORDER_CREATEFROMDAT2 is going to dump at :

CALL METHOD cl_abap_container_utilities=>fill_container_c

EXPORTING

im_value = da_bape_vbap

IMPORTING

ex_container =

ch_parex+lenstruc(da_length_bape_vbap)

EXCEPTIONS

illegal_parameter_type = 1

OTHERS = 2.

We need to extend it up to 900 chars.

Any help on this will be greatly apprecited.

Thanks

Kalyan

3 REPLIES 3

Former Member
0 Kudos

We have run into the same problem.

We applied the following notes to get over the original problem, which was a Unicode conversion error, and then got the same error as you have here.

1091771 Problems when filling data containers II

1092829 BAPI terminates w/ runtime error UC_OBJECTS_NOT_CONVERTIBLE

Since lenstruc is defined as a constant in LVBAKTOP, there is a syntax error.

Have you found a solution for this yet?

Are there additional notes?

Brian

Edited by: Brian Sammond on Jul 22, 2008 11:07 AM

0 Kudos

Hi Brian,

after a long struggle also we did not found solution.So, right now we are processing the data update directly using field symbols. Right now it is working!!! we know that this is not a right solution, but what to do, there is no other way in front of us. If you have any solution, Please let us know.

0 Kudos

I found shortly after posting my message that the notes had not been correctly applied as the Notes Assistant ended with an error, and the error that resulted in this failure had not been corrected. The basis folks failed to inform me that this error had occured in applying the notes. I discovered it through testing. Had you applied the notes and run into the same error?

When we subsequently corrected for this, the issue with lenstruc went away and everything appears to be OK. The real problem was that due to the error in the Notes Assistant the updated version of LVBAKTOP with the definition of lenstruc did not get activated. It was left in a state where it needed an SSCR key to be applied manually, which should all have been handled automatically with SNOTE.

Once this was done and the source was activated, the original error went away. The two notes seem to have solved the original Unicode issue as well.

We still have this update in the development area only since the CRM enhancements that caused the original problem with an append to the VBAK structure are also still in development. We will be testing those changes together before moving everything up. If there are any further issues that come up, I'll let you know.

What I am wondering is if you had a similar problem applying the above notes, since the problem went away for us when the notes to handle the Unicode conversion were properly applied.

Brian

Edited by: Brian Sammond on Jul 24, 2008 10:55 AM