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

Extension Structure for EBAN

Former Member
0 Likes
2,182

I am trying to update the custom fields for the EBAN table using the bapi_te_requisition_item structure. When I move the values from my work area to the extension structure I get a syntax error stating u201Cwa_eban_ext+30(960) and wa_pr_itm_ext are not mutually convertible in a Unicode program.u201D I have tried using offsets but it wonu2019t let me grab more than 138 characters when the actually length is 482. The issue is that the field in the structure at position 139 is a decimal and the offset wonu2019t work with decimals. Is there any way to get these values into the wa_eban_ext structure?

DATA: wa_eban_ext LIKE bapiparex OCCURS 0 WITH HEADER LINE.

DATA: wa_pr_itm_ext LIKE bapi_te_requisition_item.

DATA: i_eban type TABLE OF eban WITH HEADER LINE.

select *

from eban

into table i_eban

where banfn = '0010008270'

MOVE-CORRESPONDING i_eban to wa_pr_itm_ext.

wa_eban_ext+30 = wa_pr_itm_ext.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,616

call method CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

EXPORTING im_value = wa_pr_itm_ext

IMPORTING ex_container = wa_eban_ext+30(240)

EXCEPTIONS illegal_parameter_type = 1

others = 2.

Iu2019ve also tried ex_container = wa_eban_ext and wa_eban_ext+30, they both donu2019t seem to work.

This causes a runtime error: Exception condition "INVALID PARAM VERB: SHOWQUICKINF" raised.

The exception occurred at the following function call.

CALL FUNCTION 'OLE_FLUSH_CALL' DESTINATION OLE_DESTINATION

EXPORTING IMPORT_XML = XML_DATA_STRING

SVARS = SVARS

IMPORTING EXPORT_XML = XML_DATA_STRING

EXCEPT_DESCRIPT = OLE_MESSAGE

SVARS = SVARS

TABLES VERBS = VERBS

PARAMS = PARAMS

VARS = VARS

SVARS = SVARS

RFC_QUEUE = RFC_QUEUE

XML_DATA_STREAM = XML_DATA_STREAM

ERROR_INFO = ERROR_INFO

EXCEPTIONS SYSTEM_FAILURE = 1 MESSAGE OLE_MESSAGE

CALL_METHOD_FAILED = 2

SET_PROPERTY_FAILED = 3

GET_PROPERTY_FAILED = 4

RFC_QUEUE_FAILED = 5

I am trying to update the custom fields for the EBAN table using the bapi_te_requisition_item structure. When I move the values from my work area to the extension structure I get a syntax error stating u201Cwa_eban_ext+30(960) and wa_pr_itm_ext are not mutually convertible in a Unicode program.u201D I have tried using offsets but it wonu2019t let me grab more than 138 characters when the actually length is 482. The issue is that the field in the structure at position 139 is a decimal and the offset wonu2019t work with decimals. Is there any way to get these values into the wa_eban_ext structure?

DATA: wa_eban_ext LIKE bapiparex OCCURS 0 WITH HEADER LINE.

DATA: wa_pr_itm_ext LIKE bapi_te_requisition_item.

DATA: i_eban type TABLE OF eban WITH HEADER LINE.

select *

from eban

into table i_eban

where banfn = '0010008270'

MOVE-CORRESPONDING i_eban to wa_pr_itm_ext.

wa_eban_ext+30 = wa_pr_itm_ext.

5 REPLIES 5
Read only

Former Member
0 Likes
1,616
wa_eban_ext+30 = wa_pr_itm_ext.

It looks your problem occurs with your above code just alter this like below or somthing like that.

wa_eban_ext-VALUEPART1+30 = wa_pr_itm_ext.

Read only

Former Member
0 Likes
1,616

I still get the same error.

Read only

former_member194669
Active Contributor
0 Likes
1,616

You need to use


call method CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
      exporting IM_CONTAINER = wa_pr_itm_ext " Fields in internal in which fields you want to move
      importing EX_VALUE = wa_eban_ext  " This may be your valuepart variable
      exceptions ILLEGAL_PARAMETER_TYPE = 1
      others = 2.

Read only

Former Member
0 Likes
1,617

call method CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

EXPORTING im_value = wa_pr_itm_ext

IMPORTING ex_container = wa_eban_ext+30(240)

EXCEPTIONS illegal_parameter_type = 1

others = 2.

Iu2019ve also tried ex_container = wa_eban_ext and wa_eban_ext+30, they both donu2019t seem to work.

This causes a runtime error: Exception condition "INVALID PARAM VERB: SHOWQUICKINF" raised.

The exception occurred at the following function call.

CALL FUNCTION 'OLE_FLUSH_CALL' DESTINATION OLE_DESTINATION

EXPORTING IMPORT_XML = XML_DATA_STRING

SVARS = SVARS

IMPORTING EXPORT_XML = XML_DATA_STRING

EXCEPT_DESCRIPT = OLE_MESSAGE

SVARS = SVARS

TABLES VERBS = VERBS

PARAMS = PARAMS

VARS = VARS

SVARS = SVARS

RFC_QUEUE = RFC_QUEUE

XML_DATA_STREAM = XML_DATA_STREAM

ERROR_INFO = ERROR_INFO

EXCEPTIONS SYSTEM_FAILURE = 1 MESSAGE OLE_MESSAGE

CALL_METHOD_FAILED = 2

SET_PROPERTY_FAILED = 3

GET_PROPERTY_FAILED = 4

RFC_QUEUE_FAILED = 5

Read only

0 Likes
1,616

Say your bapi_te_requisition_item have 5 fields

wa_pr_itm_ext

1. mandt - 3

2. docno - 10

3. quty - 17

4. text - 250

5. text1 - 250

then create a workarea this way say

wa_pr_itm_ext_t

1. text - 250

2. text1 - 250

then

move-corresponding wa_pr_itm_ext to wa_pr_itm_ext_t.

call method CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

EXPORTING im_value = wa_pr_itm_ext_t "<<<<

IMPORTING ex_container = wa_eban_ext

EXCEPTIONS illegal_parameter_type = 1

others = 2.