Application Development 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: 

BADI / exit in ME59n

Former Member
0 Kudos

hi

we are using me59n to create the stock transfer orders from stock transport requisitions. the requirement is during the creation of STO we need to stop the creation of STO for some of the STR based on custom logic. how do i do that. is there nay badi / exit where i can put my code.

thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Following are the available user exists for ME59N:

MEDR001 Enhancements to print program

MELA002 Adopt batch no. from shipping notification when posting a GR

MELA010 Inbound shipping notification: Transfer item data from IDOC

MEQR001 User exit for source determination

MEXF001 Conditions in Purchasing Documents Without Invoice Receipt

WSUS001 Customer-Specific Source Determination in Retail

06B0001 Role determination for purchase requisition release

06B0002 Changes to comm. structure for purchase requisition release

06B0003 Number range and document number

06B0004 Number range and document number

06B0005 Changes to comm. structure for overall release of requisn.

06E0004 Changes to communication structure for release purch. doc.

06E0005 Role determination for release of purchasing documents

MPL0001 User subscreen for additional data on AMPL

E590001 Grouping of requsitions for PO split in ME59

EETA001 Define schedule line type (backlog, immed. req., preview)

EFLD004 Determine earliest delivery date f. check w. GR (only PO)

ELAB001 Gen. forecast delivery schedules: Transfer schedule implem.

EQUERY1 Enhancement to Document Overview ME21N/ME51N

EVME001 WE default quantity calc. and over/ underdelivery tolerance

M06E001 User exits for EDI inbound and outbound purchasing documents

M06E003 Number range and document number

M06E004 Control import data screens in purchase order

M06E005 Customer fields in purchasing document

M06E007 Change document for requisitions upon conversion into PO

M06E008 Monitoring of contr. target value in case of release orders

M06E009 Relevant texts for "Texts exist" indicator

M06E010 Field selection for vendor address

M06E011 Activation of PReq Lock

MAL0001 ALE source list distribution: Outbound processing

MMAL0002 ALE source list distribution: Inbound processing

MMAL0003 ALE purcasing info record distribution: Outbound processing

MMAL0004 ALE purchasing info record distribution: Inbound processing

MMDA0001 Default delivery addresses

MMFAB001 User exit for generation of release order

MRFLB001 Control Items for Contract Release Order

Check for the relevant one out of the above.

Regards,

Varna

Edited by: Varna17 on Sep 24, 2009 8:25 AM

Edited by: Varna17 on Sep 24, 2009 8:26 AM

10 REPLIES 10

Former Member
0 Kudos

Hi,

Following are the available user exists for ME59N:

MEDR001 Enhancements to print program

MELA002 Adopt batch no. from shipping notification when posting a GR

MELA010 Inbound shipping notification: Transfer item data from IDOC

MEQR001 User exit for source determination

MEXF001 Conditions in Purchasing Documents Without Invoice Receipt

WSUS001 Customer-Specific Source Determination in Retail

06B0001 Role determination for purchase requisition release

06B0002 Changes to comm. structure for purchase requisition release

06B0003 Number range and document number

06B0004 Number range and document number

06B0005 Changes to comm. structure for overall release of requisn.

06E0004 Changes to communication structure for release purch. doc.

06E0005 Role determination for release of purchasing documents

MPL0001 User subscreen for additional data on AMPL

E590001 Grouping of requsitions for PO split in ME59

EETA001 Define schedule line type (backlog, immed. req., preview)

EFLD004 Determine earliest delivery date f. check w. GR (only PO)

ELAB001 Gen. forecast delivery schedules: Transfer schedule implem.

EQUERY1 Enhancement to Document Overview ME21N/ME51N

EVME001 WE default quantity calc. and over/ underdelivery tolerance

M06E001 User exits for EDI inbound and outbound purchasing documents

M06E003 Number range and document number

M06E004 Control import data screens in purchase order

M06E005 Customer fields in purchasing document

M06E007 Change document for requisitions upon conversion into PO

M06E008 Monitoring of contr. target value in case of release orders

M06E009 Relevant texts for "Texts exist" indicator

M06E010 Field selection for vendor address

M06E011 Activation of PReq Lock

MAL0001 ALE source list distribution: Outbound processing

MMAL0002 ALE source list distribution: Inbound processing

MMAL0003 ALE purcasing info record distribution: Outbound processing

MMAL0004 ALE purchasing info record distribution: Inbound processing

MMDA0001 Default delivery addresses

MMFAB001 User exit for generation of release order

MRFLB001 Control Items for Contract Release Order

Check for the relevant one out of the above.

Regards,

Varna

Edited by: Varna17 on Sep 24, 2009 8:25 AM

Edited by: Varna17 on Sep 24, 2009 8:26 AM

0 Kudos

hi

that is the problem. we have so many enhancements. which one do u think will solve my problem.

0 Kudos

Hi ,

You may try:

MM06E008.

Put a break point in the exit and chck if it gets triggered on saving the STO.

Let em know if it works, else i could help you furtehr with it.

Cheers,

Varna

0 Kudos

hi

the point is even if this gets triggered i want to know how do i stop the saving of STO.

0 Kudos

hi

i have come across the BADI ME_PROCESS_PO_CUST. do u think any of the method will solve the problem.

0 Kudos

HI,

You amy try the "POST" method in the Badi.

Well for the above user exit that i gave, what you may do is, when it gets trigerred, chck for the custom condition. if the condition is not satisfied, how about having a error message dispalyed and terminating the Tcode.

Correct me if my understanding of ur problem not correct.

Cheers,

Varna

0 Kudos

hi

that may create a problem because lets say i have 100 STR to convert into STO and 50 the STR does not meet the condition, terminating the transaction will stop the processing of further documents.

0 Kudos

hi

i tried "check" method and it seems working. i was able to stop the creation of PO based on some condition. but, in the actual requirement i need to to know STR ( that is purchase requisition number ) number in the method. based on the values in STR i need to stop the PO creation. i have checked the impoer parameters of the method but could not find anything.

but when i went inside IM_HEADER associated type IF_PURCHASE_ORDER_MM i found a method IF_MESSAGE_OBJ_MM~GET_PARENT. I am not sure whether this will help? or is there any other way u think i can get the STR number in this method.

thanks

Former Member
0 Kudos

got the answer myself

Former Member
0 Kudos

Use Function Module MEPO_DOC_GET_TRANSACTION_STATE

  data: lv_aktyp like t160-aktyp.

  clear lv_aktyp.
  CALL FUNCTION 'MEPO_DOC_GET_TRANSACTION_STATE'
    IMPORTING
      ex_trtyp                    = lv_aktyp.