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: 

error message in BAPI_REQUISITION_CHANGE

Former Member
0 Kudos

Hi gurus .

I've got an error message :

Runtime Errors CALL_FUNCTION_UC_STRUCT

Exception CX_SY_DYN_CALL_ILLEGAL_TYPE

The reason for the exception is:

In the function "BAPI_REQUISITION_CHANGE", the STRUCTURE parameter

"REQUISITION_ITEMS_NEW" is typed in such a way

that only actual parameters are allowed, which are compatible in Uni

with respect to the fragment view. However, the specified actual

parameter " " has an incompatible fragment view.

Please , look at my code below . What is my problem ?

I don't see any error in data definition .

REPORT Z_CHANGE_REQ.

DATA : ZREQ TYPE BAPIEBAN-PREQ_NO VALUE '1000073060' ,

ZITEMO_TAB TYPE TABLE OF BAPIEBAN WITH HEADER LINE ,

ZITEMN_TAB TYPE STANDARD TABLE OF BAPIEBAN ,

LZITEMN_TAB TYPE BAPIEBAN ,

ZRETURN TYPE TABLE OF BAPIRETURN WITH HEADER LINE .

CLEAR : ZITEMO_TAB[] , ZITEMN_TAB[] , ZRETURN[] .

CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'

EXPORTING

NUMBER = ZREQ

TABLES

REQUISITION_ITEMS = ZITEMO_TAB .

.

READ TABLE ZITEMO_TAB INDEX 1 .

CHECK SY-SUBRC = 0 .

LOOP AT ZITEMO_TAB .

MOVE-CORRESPONDING ZITEMO_TAB TO LZITEMN_TAB .

LZITEMN_TAB-C_AMT_BAPI = LZITEMN_TAB-C_AMT_BAPI * '0.95' .

APPEND LZITEMN_TAB TO ZITEMN_TAB.

ENDLOOP .

CALL FUNCTION 'BAPI_REQUISITION_CHANGE'

EXPORTING

NUMBER = ZREQ

TABLES

REQUISITION_ITEMS_OLD = ZITEMO_TAB

REQUISITION_ITEMS_NEW = ZITEMN_TAB

RETURN = ZRETURN .

READ TABLE ZRETURN INDEX 1 .

Regards . Helena

1 ACCEPTED SOLUTION

nabheetscn
Active Contributor
0 Kudos

pass table new and old as type BAPIEBANV i just checked in bapi..

2 REPLIES 2

nabheetscn
Active Contributor
0 Kudos

pass table new and old as type BAPIEBANV i just checked in bapi..

Former Member
0 Kudos

you are wrong with the type of "ZITEMO_TAB and zitemn_tab"

it's should be typed of bapiebanv , not bapieban.

pls check.

tks.