cancel
Showing results for 
Search instead for 
Did you mean: 

PO does not require mandatory field

former_member328731
Participant
0 Kudos

Dear colleagues,

Even I marked purchase requisition as a mandatory field in Define Screen Layout at Document Level for PO, and assignee this field selection to PO type, system do not requires purchase requisition as mandatory field during creation of PO. In this field selection Outline agreement is also mandatory and with it everything is ok (system ask for entering of outline agreement during creation of PO). Do you know what can be the issue?

Thanks,

Harry

Accepted Solutions (1)

Accepted Solutions (1)

BijayKumarBarik
Active Contributor
0 Kudos

Hi,

You want to restrict PR number only for particular PO document type,then you need to use the BADI: ME_PROCESS_PO_CUST

Refer a similar requirement where BADI used for a T.code

http://scn.sap.com/community/erp/manufacturing-pp/blog/2012/03/22/program-to-display-exits-and-badi

Regards,

Biju K

Answers (12)

Answers (12)

former_member210560
Active Contributor
0 Kudos

Dear Harry,

You cannot make it mandatory from screen layout customizing but it could only be done if you use

function authorization, parameter EFB

This can be done via function authorization customizing, transaction SPRO

path: Material Management-  Purchasing-     Authorization Management

  - Define Function Authorizations for Buyers

  In here choose: Function Authorizations: Purchase Order

tick ref. to PReq X and leave others indicator blank.

Then in transaction SU3, maintain the parameter tab:

Parameter ID = EFB

Parameter value = The valur you maintain in function authorizations customizing.

Regards,

ian Wong Loke Foong

Former Member
0 Kudos

Hi Harry,

Kindly check assignment of PR document type to PO document type.

1) path: In SPRO->MM->Purchasing->Define Default Values for Document type for the tcode ME21N you can set the default document type.

2) while creating po In PO personal settings from the tab default values also can set the default document type.

3) You can maintain the document type combination in SPRO-MM-Purchasing-PR/PO-Document types

Here, maintain required document type combination

Regards

Sanjeet Kumar

Former Member
0 Kudos

It has been our experience also that screen layout somehow does not work for making PR mandatory. You need to use ABAP code only for this restriction.

Regards.

Satish.

Former Member
0 Kudos

Hi Harry,

You can set such kind of conditions in BADI: ME_PROCESS_PO_CUST

Regards,
Anoop Singh

Former Member
0 Kudos

Harry,

If you do settings for fields at screen layout Document level, only for certain fields this functionality work but not for all. For your issue the solution can be resolved by technical consultant through enhancement.

Thanks,

Chandru.

Former Member
0 Kudos

Create a new field selection group, with PR as mandatory.  Assign to your specific doc. type

former_member197616
Active Contributor
0 Kudos

Hi,

I am not sure what is your business requirement or process for making PR as mandaotry .

It is standard functionality that PO can be created with out a PR as mandatory .How ever if a PR is there PO can always be created with referencing to PR .

Use the functionality of converting PRs into EITHER Assign and Process or automatic .

Regards,

Former Member
0 Kudos

HI

You can use include ZXM06U42 to restrict PR number only for particular PO document type

Regards,

Srini

Former Member
0 Kudos

Hi Harry,

this functionalty is possoble through "Function Authorization".

follow path : MM->Purchasing->Authorization Management->Define Function Authorizations for Buyers

Create with your own new entry and tick on "Ref. purchase requisition" - Indicates whether a PO item may be created with reference to a PR.

Maintain this Function Authorization at user level with user parameter EFB - enter your F.A.

Hope this is clear.

Regds,

Nilesh

former_member328731
Participant
0 Kudos

Dear Nilesh,

It is clear, but what I know with this I cannot differentiate per document type. And I need to differentiate per document type.

Regards,

Harry

Former Member
0 Kudos

Hello Harry,

If this is required for a perticular document type and some other parameters take the help of ABAP member to identify the User /Screen exit to make PR field mandatory.

Hope this will work in your case .If so please confirm.

Regards

KK

ajitkumar
Active Contributor
0 Kudos

You can make PR mandatory thru OMET txn and parameter EFB. refer the help texts in configuration for exact procedure

former_member328731
Participant
0 Kudos

Dear Ajit,

Parameter EFB will influence on all document types. But I need Purchase requisition as mandatory field just in one particular PO document type. As I wrote before I tried to make it with Layout at Document Level but it doesn’t work in case of Purchase requisition (in case when RFQ is mandatory it works properly).

Regards,

Harry

Former Member
0 Kudos

Hi Harry ,

For the PO , we can go to the define teh screenlayout at document leavel and maintain as mandatory /Required Option .

If it is satisfied then during PO creation system will show as PR is mandatory/Required.

If not then discuss with the ababper and make changes .

former_member328731
Participant
0 Kudos

Dear Anil,

I, already, did what you suggest. Problem is because it does not work. And for other type, for example, RFQ or Outline agreement it works. Just in case of purchasing request it does not work. And I do not know why?

Regards,

Harry

jaheer_hussain
Active Contributor
0 Kudos

Hi,

For this you can try the following:

Pls try this ME_PROCESS_PO_CUST

put logic like:

it_ekpo = im_header->get_items( ).

  wa_ekko = im_header->get_data( ).

if wa_ekko-aedat gt v_date.

loop at it_ekpo into wa_ekpo.

  clear tmp.

  ls_mepoitem = wa_ekpo-item->get_data( )..

  if ls_mepoitem-werks = '1000'.

  •   check PR document

  if ls_mepoitem-banfn is initial and ls_mepoitem-retpo is initial and ls_mepoitem-umson is initial.

   concatenate 'No reference to PR document number in item' ls_mepoitem-ebelp into tmp separated by space.

  •     message W001(ZM) with tmp.

    mmpur_message_forced 'E' 'XX '01' tmp '' '' ''.

    CH_FAILED = 'X'.

    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'

       EXPORTING

        TITLE              = 'ERROR!!! '

         textline1          = tmp

        TEXTLINE2          = 'TERMINATE! '