2010 Aug 06 6:48 AM
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.
2010 Aug 06 8:40 AM
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
2010 Aug 06 6:55 AM
Hi,
Use the enhancement component "EXIT_SAPMM06E_012". Refer to the internal table structure TEKPO to get PO Item releated information.
Regards
Vinod
2010 Aug 06 9:34 AM
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.
2010 Aug 06 9:39 AM
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
2010 Aug 06 9:47 AM
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.
2010 Aug 09 11:23 AM
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.
2010 Aug 06 8:40 AM
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