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

Please help with this function module

Former Member
0 Likes
736

Hi,

I am trying to use function module "SD_KNVP_READ" but it is going to dump and giving the below error.

-


The call to the function module "SD_KNVP_READ" is incorrect:

In the function module interface, you can specify only

fields of a specific type and length under "FES_KNVP".

Although the currently specified field

"IT_FES_KNVP" is the correct type, its length is incorrect.

-


The way I declared the tables are as below:

DATA: it_fet_knvp TYPE STANDARD TABLE OF knvp.

DATA: it_fes_knvp TYPE STANDARD TABLE OF knvp.

DATA: w_fef_knvp_records_read TYPE i.

-


I think this is something to do with the way I declare the tables only. Please help with this error as soon as possible.

Thanks a lot.

Krishen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
653

Hi,

Check this..

DATA: it_fet_knvp TYPE STANDARD TABLE OF knvp.

<b>DATA: w_fes_knvp TYPE knvp.</b>

DATA: w_fef_knvp_records_read TYPE i.

parameters: p_kunnr type kunnr.

CALL FUNCTION 'SD_KNVP_READ'

EXPORTING

FIF_KUNNR = p_kunnr

IMPORTING

FES_KNVP = w_fes_knvp

FEF_KNVP_RECORDS_READ = w_fef_knvp_records_read

TABLES

FET_KNVP = it_fet_knvp

EXCEPTIONS

PARAMETER_INCOMPLETE = 1

NO_RECORD_FOUND = 2

OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Thanks,

Naren

4 REPLIES 4
Read only

Former Member
0 Likes
653

hi,

Check

Regards,

Santosh

Read only

Former Member
0 Likes
653

DATA: it_fet_knvp TYPE knvp.

DATA: it_fes_knvp TYPE knvp.

DATA: w_fef_knvp_records_read TYPE i.

Try this way. They should not be internal tables. Just structures.

Regards,

Ravi

Read only

Former Member
0 Likes
654

Hi,

Check this..

DATA: it_fet_knvp TYPE STANDARD TABLE OF knvp.

<b>DATA: w_fes_knvp TYPE knvp.</b>

DATA: w_fef_knvp_records_read TYPE i.

parameters: p_kunnr type kunnr.

CALL FUNCTION 'SD_KNVP_READ'

EXPORTING

FIF_KUNNR = p_kunnr

IMPORTING

FES_KNVP = w_fes_knvp

FEF_KNVP_RECORDS_READ = w_fef_knvp_records_read

TABLES

FET_KNVP = it_fet_knvp

EXCEPTIONS

PARAMETER_INCOMPLETE = 1

NO_RECORD_FOUND = 2

OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Thanks,

Naren

Read only

Former Member
0 Likes
653

Krishen,

Try this:

DATA: IT_FET_KNVP LIKE KNVP OCCURS 0.

DATA: IT_FES_KNVP LIKE KNVP OCCURS 0.

DATA: W_FET_KNVP_RECPRDS_READ TYPE I.