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

Adding validation on requirement tracking no in T-code ME21N

Former Member
0 Likes
1,240

I want to validate requirement tracking no(EKPO-BEDNR) on Purchase order creation (ME21N) according to Purchase order type. now the problem is i have found out its Enhancement name(MM06E005),but which function module to use for proper working of validation . Can someone share ideas where and how to do it.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,089

Hi Ishita,

FM - EXIT_SAPMM06E_012

Include : ZXM06U43

Use the Tables structure TEKPO STRUCTURE BEKPO OPTIONAL

CHeck sy-tcode = Me21n

LOOP AT pt_ekpo INTO ls_ekpo .

CHECK ls_ekpo-loekz = ' ' .

IF ls_ekpo-BEDNR = your condition.

Vlaidation code here

ENDIF.

ENDLOOP.

Let me know If you still have any queries

I want to validate requirement tracking no(EKPO-BEDNR) on Purchase order creation (ME21N) according to Purchase order type. now the problem is i have found out its Enhancement name(MM06E005),but which function module to use for proper working of validation . Can someone share ideas where and how to do it.

6 REPLIES 6
Read only

Former Member
0 Likes
1,089

Hi,

Use the enhancement component "EXIT_SAPMM06E_012". Refer to the internal table structure TEKPO to get PO Item releated information.

Regards

Vinod

Read only

0 Likes
1,089

Hi,

Thanks Vinod to help me out , but i have even to use EKKO-BSART(po header table- po document type)but structure TEKPO contains line item. how can we use that if possible if u share sample codes.

Read only

0 Likes
1,089

Hi,

This enhancement component also have other sturctures such as I_EKKO which stores the header information. You can refere to I_EKKO-BSART for Po header document type.

Regards

Vinod

Read only

0 Likes
1,089

Hi Ishita,

The code can be like this inside the above include.

IF ekko-bsart EQ 'NB'
     AND NOT ekpo-pstyp EQ '5'

* ---Code


   ENDIF.

Read only

0 Likes
1,089

Hi,

As per rquirement , i wrote this code in INCLUDE ZXM06U43

, but still its not working in new line item.

can someone tell me why?

DATA : err_txt(255).

IF i_ekko-bsart = 'RMUB'.

IF tekpo-bednr IS INITIAL.

CONCATENATE 'Blank Tracking No is not Accepted at Line Item '

tekpo-ebelp INTO err_txt SEPARATED BY space.

MESSAGE e001(00) WITH err_txt.

ELSE.

SELECT SINGLE bednr

FROM ekpo INTO ekpo

WHERE bednr = tekpo-bednr.

IF sy-subrc = 0.

CONCATENATE 'Tracking No ' tekpo-bednr

'Already Exist at Line Item' tekpo-ebelp

INTO err_txt SEPARATED BY space.

MESSAGE e001(00) WITH err_txt.

ENDIF.

ENDIF.

ENDIF.

Read only

Former Member
0 Likes
1,090

Hi Ishita,

FM - EXIT_SAPMM06E_012

Include : ZXM06U43

Use the Tables structure TEKPO STRUCTURE BEKPO OPTIONAL

CHeck sy-tcode = Me21n

LOOP AT pt_ekpo INTO ls_ekpo .

CHECK ls_ekpo-loekz = ' ' .

IF ls_ekpo-BEDNR = your condition.

Vlaidation code here

ENDIF.

ENDLOOP.

Let me know If you still have any queries