cancel
Showing results for 
Search instead for 
Did you mean: 

CO01: Mandatory fields in component overview

Former Member
0 Kudos

Hi all,

We are facing the problem of setting some fields (specifically the storage location) as mandatory in the component overview screen of production order creation or update transactions (CO01/02). We found many discussions in SCN regarding this, but none of them arrives to an effective solution, so we start trying some alternatives, none of them working as we wish far now:

  • Screen or transaction variants (trn. SHD0): Despite we can set the fields as mandatory with this tool, if the user doesn't goes through the component overview screen the control just doesn't applies, allowing production orders without these data being saved.
  • User exit PPCO0007: Components data is not received in the user exit interface.
  • User exit PPCO0001: Components data is received in the user exit interface, but as then user exit is performed after the order commit process starts, we aren't able to raise an error message on the screen (that will cause a system dump)
  • BADI WORKORDER_UPDATE, method AT_SAVE: Same as UE PPCO0007.
  • BADI WORKORDER_UPDATE, method IN_UPDATE: We can't get where this method is being called...
  • BADI WORKORDER_UPDATE, method IN_UPDATE: Same as UE PPCO0001.
  • BADI WORKORDER_UPDATE, method AT_RELEASE: As last alternative, we have implemented the control in this method. It doesn´t have components infomation in its interface, but as the production order is already saved when is released, we can get components data from the data base and make the controls. The problem of this alternative, is that changes the user behaviour for production orden creation and, in some cases, the response they see from the system doesn't match with the data in the screen.

Any other ideas to achieve this control?

Thanks in advance!

Regards,

mr.

Accepted Solutions (1)

Accepted Solutions (1)

Anupam1143
Active Contributor
0 Kudos

Hi,

Just Change your business process, instead of maintaining the Sloc in CO01/CO02, maintain it either in BOM and Material master for component and header material  in production storage location and then make variant of CO01/CO02 for non editing of component overview.Also you can use BAdi WORKORDER_GOODSMVT in CO11N in order to that storage location cannot be changed in confirmation or you can use the SHD0 for CO11N also.

Give a try and let us know.

Regards,

Anupam Sharma

Former Member
0 Kudos

Anupam,

Despite i recognize your suggestion as valid, it doesn't fit our original requirement: it is to make storage location mandatory, not unchangeable.

Thanks for the response!

Regards,

mr.

ArturoSenosain
Advisor
Advisor
0 Kudos

Hola Manuel.

With this code, you can access fields in RESB component tab.

DATA: LT_RESBB TYPE STANDARD TABLE OF RESBB ,

L_TABLE_NAME(20) TYPE C VALUE '(SAPLCOBC)RESB_BT[]'.

FIELD-SYMBOLS: <TAB> TYPE ANY,

                             <WA>  TYPE RESBB.

BREAK-POINT.

ASSIGN (L_TABLE_NAME) TO <TAB>.

LT_RESBB = <TAB>.

...

...

MESSAGE E208(00) WITH 'ErrorErrorError'.

I test in exit PPCO0007 and work OK.

Arturo.

former_member184737
Active Contributor
0 Kudos

Hi Manuel,

           As per Anupam Sharma suggestion, you have to maintain storage location at material level. You also add that these fields are mandatory at creation of materials like Production/Issue storage location (MARC-LGPRO), Storage location for EP (MARC-LGFSB). This storage location will be automatically copied into your production order's component list. If you want to restrict the user that they won't change the storage location means, you have to create screen variant for the transaction CO01/CO02.

Thanks

Former Member
0 Kudos

Notable Arturo, it works great!

I was trying to achive something like this, but i haven't find the correct internal table. (SAPLCOBC)RESB_BT[] is the correct one because it remains with data also in the header screen of CO01/02.

Thanks!

mr.

Former Member
0 Kudos

SKA,

As i replied Anupam, that doesn't fit our original requirement of making storage location mandatory, not unchangeable.

Thanks for the response!

Regards,

mr.

ArturoSenosain
Advisor
Advisor
0 Kudos

Hola Manuel.

This table is nice, you can also modify (of course at your own risk ) some fields and the update task of the PP order consider the changes.

Arturo.

Answers (0)