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

Hi All

Former Member
0 Likes
847

I activated the User Exit MEREQ001 to add Customer Own Fields in ME51N/ME52N/ME53N And written the coding as follows in EXIT_SAPLMEREQ_001.

data:i_mereq_item type im_req_item.

if im_req_item is initial.

*clear: ci_ebandb.

else.

i_mereq_item = im_req_item->get_data( ).

move-corresponding i_mereq_item to ci_ebandb. "Screen Fields

endif.

IF NOT im_req_item IS INITIAL.

gf_aktyp = im_req_item->GET_ACTIVITY( ).

endif.

<i>I m getting Following error </i>

<b>The Type "im_req_item" is Unknown.</b>

Please anyone of u can correct me .

Thanks in Adavance

Sriram

5 REPLIES 5
Read only

Former Member
0 Likes
802

Hi

it is referring to the interface

IF_PURCHASE_REQUISITION_ITEM

give that name and see

also see the parameters of the individual method and use them

data:i_mereq_item type IF_PURCHASE_REQUISITION_ITEM.

Regards

Anji

Read only

0 Likes
802

Hi Anji

Thanks for ur help .

If i declare as below

data:i_mereq_item type ref to IF_PURCHASE_REQUISITION_ITEM.

if im_req_item is initial.

else.

i_mereq_item = im_req_item->get_data( ).

move-corresponding i_mereq_item to ci_ebandb. "Screen Fields

endif.

IF NOT im_req_item IS INITIAL.

gf_aktyp = im_req_item->GET_ACTIVITY( ).

endif.

I am ending up with other error .

<b>The result type of the function method cannot be converted into the type of I_MEREQ_ITEM

</b>

Sriram

Read only

Former Member
0 Likes
802

Hiii Sriram,

You are using

data:i_mereq_item type im_req_item.(TYPE im_req_item is not there.,.,)

But you should use

DATA: l_mereq_item TYPE mereq_item.(This is the way i m doin it in for the same exit )

then the following

l_mereq_item = im_req_item->get_data( ).

This get DAta will giv a structure.,.,.,so depending on which field you need proceed further/./

This error of your will Not be shown any more.

Regards

Debasish

Read only

0 Likes
802

Hi Debashish,

Thanks for The Help .

I changed the code accordingly

data:i_mereq_item TYPE mereq_item.

if im_req_item is initial.

else.

i_mereq_item = im_req_item->get_data( ).

move-corresponding i_mereq_item to ci_ebandb. "Screen Fields

endif.

IF NOT im_req_item IS INITIAL.

*gf_aktyp = im_req_item->GET_ACTIVITY( ).

endif.

But I am ending up with Following error .

<b>Field CI_EBANDB Is Unknown .It is neither one of the specified tables nor Defined by a 'DATA' Statement </b>

Sriram

Read only

0 Likes
802

Hi All ,

Thanks for the Help ...

I didn't declare the data in Global Include,So I got Errors

Now i have corrected and its Working fine ..

Regards,

Sriram