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 when call 'BAPI_REQUIREMENTS_CHANGE'

Former Member
0 Kudos
219

Dear all,

now my program problem ...

when i upload excel file and convert date from excel to sytem SAP

i call function 'CONVERT_DATE_TO_INTERNAL', this ok

but when i call funtion 'BAPI_REQUIREMENTS_CHANGE'

data: begin of SCHEDULE_IN occurs 0,

DATE_TYPE like BAPISSHDIN-DATE_TYPE,

REQ_DATE like BAPISSHDIN-REQ_DATE,

REQ_QTY like BAPISSHDIN-REQ_QTY,

end of SCHEDULE_IN.

READ TABLE i_upload INDEX 1.

CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'

EXPORTING

MATERIAL = i_upload-MATERIAL

PLANT = i_upload-plant

REQUIREMENTSTYPE = ' '

VERSION = '00'

REQMTSPLANNUMBER = ' '

VERS_ACTIV = 'X'

TABLES

REQUIREMENTS_SCHEDULE_IN = SCHEDULE_IN.

commit work.

ENDFORM.

ERROR with :

***The call to the function ***module "BAPI_REQUIREMENTS_CHANGE" is incorrect:

***In the function module interface, you can specify only

***fields of a specific type and length ***under "REQUIREMENTS_SCHEDULE_IN".

***Although the currently specified field

**"SCHEDULE_IN" is the correct type, its length is incorrect.***

pls help me solve

thanks so much/Tham.

2 REPLIES 2

Former Member
0 Kudos
75

Hai,

Declare SCHEDULE_IN as follows:

data: SCHEDULE_IN like BAPISSHDIN occurs 0.

Also pass the required parameters like Return table.

data: Return like BAPIRETURN1 occurs 0.

This will solve your problem.

Former Member
0 Kudos
75

Hi Sir ,

Please have a look below .Hope it is suitable and simpler solution for your question.

Please do reward if useful.

Thankx.

LINK for your problem--->

http://www.jt77.com/development1/programming-17989.html