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

Need sample code for Using BADI ME_PROCESS_REQ_CUST

Former Member
0 Likes
3,965

Dear all,

Initially my requirement is to Validate the Document Type of Purchase Request ion as per material.

I have created a implementation for BADI : ME_PROCESS_REQ_CUST .

im new to OOPS-ABAP, so pls send *sample code for how to use these methods PROCESS_ITEM,

like declarations, assignment of data into internal table for further validation*.

Regards,

NIranjan.G

1 ACCEPTED SOLUTION
Read only

Former Member
2,244

Hi,

get the item data ....

*DATA : lt_item TYPE MEREQ_ITEM,

ls_item liek line of it_item*

CALL METHOD im_item->GET_DATA

RECEIVING

RE_DATA = lt_item .

you will get the data in lt_item.. table

Thanks,

Shailaja Ainala.

9 REPLIES 9
Read only

Former Member
2,245

Hi,

get the item data ....

*DATA : lt_item TYPE MEREQ_ITEM,

ls_item liek line of it_item*

CALL METHOD im_item->GET_DATA

RECEIVING

RE_DATA = lt_item .

you will get the data in lt_item.. table

Thanks,

Shailaja Ainala.

Read only

0 Likes
2,244

Hi,

just use this

DATA : lt_item TYPE MEREQ_ITEM.

CALL METHOD im_item->GET_DATA

RECEIVING

RE_DATA = lt_item .

you will get the data in lt

Thanks,

Shailaja Ainala.

Read only

Former Member
0 Likes
2,244

Hi Shailaja Ainala.,

Thanks for ur reply,but when i write the exact code im getting syntax errors,

can u clearly explain me how to write the code exactly

Regards,

Niranjan.G

Read only

0 Likes
2,244

Hi,

In PROESS_ITEM ... you need to write....can you tel me the error...

Thanks,

Shailaja Ainala.

Read only

Former Member
0 Likes
2,244

HI shailaja,

i wrote the code in the method process_item method only and

Error is :

1. it_item is unknown (can be eliminated by Commenting declaration of is_item as like line of it_item)

2. ->get_data is not expected(major error which i was not able to understand)

Regards,

Niranjan.G

Read only

0 Likes
2,244

Hi ,

Check the example class for badi CL_EXM_IM_ME_PROCESS_PO_CUST(which is for PO). Here check the method PROCESS_ITEM and use accordingly in your implementation.

DATA : data: ls_MEREQ_ITEM type MEREQ_ITEM.

ls_MEREQ_ITEM = IM_ITEM->GET_DATA( ).

Regards,

Ashok.

Edited by: Ashok Murugaiah on Mar 4, 2010 1:38 PM

Edited by: Ashok Murugaiah on Mar 4, 2010 1:42 PM

Edited by: Ashok Murugaiah on Mar 4, 2010 1:43 PM

Read only

Former Member
0 Likes
2,244

Hi Shailaja,

Thanks for ur quick response, ur reply is very usefull and solve my problem.

Regards,

Niranjan.G

Read only

Former Member
0 Likes
2,244

Hi Shailaja,

ur way of explanation is good, can u explain the basics regarding OOPS ABAP

if possible to u...

Regards,

Niranjan.G

Read only

0 Likes
2,244

Hi,

Thanks,

you can go through ....scn there are many ....articles

Thanks,

Shailaja Ainala.