cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Change Number manually for Engineering Record

former_member393433
Participant
0 Kudos

Hello Gurus,

I would like to know if there is any way to assign the change number externally in the engineering record. I have a scenario where I need to have the change number same as the Engineering Record#.

Kindly advise.

Thanks & Regards

Jo Pz

Accepted Solutions (1)

Accepted Solutions (1)

former_member214775
Contributor
0 Kudos

Hi Jo,

we are doing the same.

You can use the add_header method in class /plmi/cl_ecn_bo for this.

What you need is additionally a customized external number range in SNRO and then pass the ER ID to a similar structure as /plmi/s_ecn_hdr structure in the above method.

Best regards

Tamas

0 Kudos

Hi Tamas,

I am trying the same thing.

SNRO Number range is created for change number.

Trying to assing ER ID to Change number, but i am getting error like below

Kindly Advise.

Regards,

Divvi

former_member393433
Participant
0 Kudos

Hi Tamas,

Thanks for the response.

Also is it possible to capture the Object types from the change master to the Engineering Record ?

Kindly advise.

Thanks & Regards

Jo

former_member214775
Contributor
0 Kudos

Hi Jo,

yes, you can use the GET_OBJECT_TYPE method in the /PLMI/CL_ECN_BO class.

Best regards

Tamas

0 Kudos

Still i am getting the same error.

Is there any other way to do the same.

Regards,

Divvi

former_member393433
Participant
0 Kudos

Thank You Tamas,

That was helpful. We are getting a message regarding to Authorization or Change number does not exist.Have assigned the external number range as well.

Would really appreciate if you can elaborate on the below "

You can use the add_header method in class /plmi/cl_ecn_bo for this.

What you need is additionally a customized external number range in SNRO and then pass the ER ID to a similar structure as /plmi/s_ecn_hdr structure in the above method."

Kindly advice

Thanks & Regards

Jo Pz

0 Kudos

Hi Tamas,

I am trying to assign the Change number same as Engineering number, it is giving the error message like "Change number xxxxxxxxx does not exist or access authorizations are missing."

I am using the class same as you suggested in this thread.

class     : /PLMI/CL_ECN_BO

Method  : ADD_HEADER

We created Number range same as Engineering Record number range in SNRO and taking the Number by using Function module "NUMBER_GET_NEXT".

But still when i save the ER in PLM screen its giving the above error.

As we are putting ER and ECN both are same, so do we need the same external number range again for ECN number?

Please Kindly Advice on this...

Regards,

Divvi

former_member188458
Active Participant
0 Kudos

Hi Joe & Divvy,

Is your Change Number Existing in the system .

This error is thrown if the Change Number is not existing in the system or if user is not authorised to access the change number as per the ACC assigned.

From your comments above , I believe you are trying to auto-generate a new change number . In that case user shouldn't specify the value in the change number field and you have to do below steps.

1) Firstly , Please check if you have the configuration done to auto-generate the change number  at a particular ER status in the below SPRO path

Logists General-> PLM -> PLM WebUI-> Objects in in PLM Web UI-> Engineering Record -> Make SEttings for Engineerng Record -> <Select the ECR type> and click on "Change Number Handling at Header" (If you have change number in header or else select the next node for items)

 

Here you can set the configuration for auto-generating Change Number .

2) Now , further you want to enhance the SAP provided functionality , so that the Change Number value generated equals the ER external id .

To do that , you will have to write the code in

Class : /PLMI/CL_ECR_CREATE_ECN  : This is an implementation class for BADI /PLMI/EX_ECR_ENHANCEMENTS , but SAP only allows single implementation to be active for this )

Method : CREATE_ECN_AT_ECR_HEADER ( If your case is for Header Change number  /

     CREATE_ECN_AT_ECR_ITEM ( If your case is for Change Item Change number)

Check the code in these methods and you would have to probably write an overwrite exit for the above mentioned methods , to specify the external number for Change number i.e. you need to copy the SAP std code in overwrite and plugin ur specific code when ADD_HEADER is called to specify the external change number .

Hope this helps.

Best Regards

P.S : Please reward points if helpful .

0 Kudos

Hi Rini,

Thanks for your Answer, it was very help full.

I have one more requirement here, like below.

we are creating drawing number with change number now we need to add these drawing numbers in PLM WEBUI screen which is related to the change number.

Is there any class/method to do the same.

i kept the break point at get_object_types and other methods in class /PLMI/CL_ECN_BO but this break point is not stopping.

Please kindly advice on this.

Regards,

Divvi

former_member223190
Participant
0 Kudos

Hello Divvi

Can you try by using the method GET_CHANGE_ITEMS_ALL of class /PLMI/CL_ECR_BO.

From this you can find the DIR numbers, and then passing this numbers in the DRAO to find if any orignals

are assigned to them.

Thanks & Regards

Satish

0 Kudos

Thank you Satish for quick response.

The method which you gave that will retrieve the DIR numbers which is mapped on PLM WEBUI Screen but i want to Assign DIR's which is maintained in ECC screen.

in my requirement first i will create DIR's in CV01N txn by assigning the Engineering Change number.

so this DIR's i want Display in PLM WEBUI Screen.

Thanks in Advance,

Divvi.

former_member223190
Participant
0 Kudos

Hello Divvi

So I assume you need to get the relation between Change number and DIR.

You can get this in table DRAW. Pass the document number in the field DOKNR

to get the change assigned to it. Also you pass the change number in the field AENR

in the table DRAW to get the documents assigned to it.

Cheers

Satish

0 Kudos

Hi Satish,

Yes when we creates the DIR by assigning change number it will store in DRAW with change number.

But i need to update the DIR's in PLM WEBUI screen from the Change Master objects to ER.

How can we update the DIR's in PLM WEBUI screen.

Thanks in Advance,

Divvi

former_member188458
Active Participant
0 Kudos

Hi Divvi ,

Could you please confirm on below :

1) Do you want to see the DIR's in ECM  in Objects tab  in ECM Web UI?

2) If answer to above is yes , Are the DIR's added as object links  as OMR ( Object Management Record - Objects in CC tcodes) in ECM ?

As if they are added as objects in ECM , you dont need to do anything as the ECm in Web UI use the same apis to retrieve the data and show

3) If you want to see in "Documents" tab in ECM , which is like additional docs ,

ensure you have the ECM added as object links in DIR ; As if you do so , it will be automatically shown in "Documents" tab in ECM WUI .

to allow adding ECM as object link add objec ttype PLM_ECN as object type for your DIR type in DC10 .

The above way is the standard way without doing any coding / calling api's . There are API's but i would suggest to try the standard way first.

Hope this resolves your issue.

Regards,

Rini

former_member393433
Participant
0 Kudos

HI Rini


As I mentioned to Tamas I want all my objects from my Change Master to be populated in the Engineering Record under Items tab (Document/BOM/Material mastertel) and not under Docinvents tab of the Engineering Record.

By this way both the change master and Engineering Record are in Sync.


THanks & Regards

Jo

former_member188458
Active Participant
0 Kudos

Hi Jo ,

To do that you can use the below api's :

1) To get the Objects linked to ECM use the Api

Class : /PLMi/CL_ECN_BO

Method : GET_OBJECT_TYPE

2) To add it to the engineering record , d call below methods of class  /PLMI/CL_ECR_BO as per the below sequence :

1) LOCK

2) CREATE_CHANGE_ITEMS ; pass the object type key  obtained from above (point1)in IT_INTERNAL_ID parameter field INTERNAL_KEY.

Note you will have to convert it from key structure , for which u can use /plmi/cl_ecr_services=>key_to_internal_item

3) CHECK_BEFORE_SAVE

4) SAVE

5) CLEANUP

6) DO Commit if required

This should resolve your issue .

Regards,

Rini

former_member223190
Participant
0 Kudos

ok,  where in PLM WEB UI you want to update ?

former_member223190
Participant
0 Kudos

Hello Divvi

ok,  where in PLM WEB UI you want to update ?

Is that you are looking documents assigned to ECN which inturn is assigned to any ER ?

FRom ER you want to know the change number, and then find the documents assigned to this ECN.

So after getting these where do you want to be displayed ??


Thanks & Regards

Satish

0 Kudos

Hi Rini,

Thanks for your Response..

Could you please help little  bit more on this.

in this class

Class : /PLMi/CL_ECN_BO

Method : GET_OBJECT_TYPE

i am trying to pull the methods which you mentioned above.

what we need to pass to this method CREATE_CHANGE_ITEMS of class /PLMI/CL_ECR_BO

from GET_OBJECT_TYPE i am getting the Documents in different different tables.

Need Help on 2 point which you mentioned above.

Regards,

Venu Divvi

former_member188458
Active Participant
0 Kudos

Hi divvi,

Sorry , I mentioned the wrong method to fetch OMR from ECM , te good method is GET_OMR.

PFB the code snippets . NOTE : this is for copying DIR objects from ECM , you can do the same like wise for other objects:

1) Fetch the OMR , you can use as below

  go_ecn_bo->get_omr(

     EXPORTING

       iv_change_no        =   iv_chgno  " Change Number

*    it_omr_all_id       =     " OMR All - ID table

     IMPORTING

       et_omr_dir      lt_omr_dir   " Object Management Record - Document Structure - BO table

       et_message          =   et_message  " Message

       ev_severity         = ev_severity    " Severity

   ).

   IF ev_severity CA /plmb/if_spi_c=>gs_c_severity_category-error_or_worse.

     RETURN .

   ENDIF.


2) Convert  the Key of the object type to ecr change item internal key , do as below


****  Add it to change items

   LOOP AT lt_omr_dir INTO ls_omr_dir.

     CLEAR :ls_dir_id , ls_ecr_otype_data.

     MOVE: ls_omr_dir-document_type TO ls_dir_id-documenttype ,

       ls_omr_dir-document_number TO ls_dir_id-documentnumber ,

       ls_omr_dir-document_part TO ls_dir_id-documentpart ,

       ls_omr_dir-document_version TO ls_dir_id-documentversion

       .

     """convert Dir key structure to internal key

     /plmi/cl_ecr_services=>key_to_intern_itm(

       EXPORTING

         is_key          ls_dir_id   " Key structure

       IMPORTING

         ev_internal_key ls_ecr_otype_data-internal_key

     ).

 

   ENDLOOP.


3) Finally call the ECR class methods as mentioned in my previous reply in the sequence mentioned ;

For Create change Items ,


CALL METHOD lo_ecr_bo->create_change_items

         EXPORTING

           is_ecr_id             = ls_ecr_id ""Pass the ECR GUID here

           iv_otype_name         = ls_chg_items-otype_name ""PASS the object type e.g. PLM_DIR

           it_internal_key_intid = lt_internal_key_intid ""table of internal key created above

*          it_ecr_attrib         = <lt_ecr_attrib> ""pass this if you have any ecr attrib if no dont pass

         IMPORTING

*         et_internal_key_intid = lt_internal_key_intid

           et_message            = lt_message

           ev_severity           = ev_severity.



Hope this resolves your issue .


Best regards,

Rini


P.S: Please mark the answer as correct/helpful .

0 Kudos

Thanks for your reply Rini, one more quick question.

Where we can add all this logic? means in which method we can add/change the logic as you explained?

in the below method can we pass like below.

CALL METHOD lo_ecr_bo->create_change_items

         EXPORTING

           is_ecr_id                     = ls_ecr_id ""Pass the ECR GUID here

           iv_otype_name          = ls_chg_items-otype_name ""PASS the object type e.g. PLM_DIR (Can we pass Document type as Object type here)

           it_internal_key_intid = lt_internal_key_intid ""table of internal key created above  ( do we need to pass this data here by passing into an itab

                                                       ex: DWG#D-00248#000#00 )

*          it_ecr_attrib                = <lt_ecr_attrib> ""pass this if you have any ecr attrib if no dont pass

         IMPORTING

*         et_internal_key_intid = lt_internal_key_intid

           et_message                = lt_message

           ev_severity                  = ev_severity.

ThanksDivvi

0 Kudos

Hi Rini,

Its working and updating the Objects but when i opened ECN from ER screen then only its updating the Objects at ER level.

is there any trigger methodology to update these with out selecting Engineering Change Number?

Thanks,

Divvi.

former_member188458
Active Participant
0 Kudos

Hi Divvi ,

What is your trigger point ?

If it is at ECM Save , then you can put this code in ECM_UPDATE BADI .

I didn't get ur last question .

Best Regards,

Rini

P.S: Please mark the answer as correct/helpful .

0 Kudos

Hi Rini,

Thanks for your Valuable Inputs.

My Question is :

After clicking on Engineering Change number button if i click on refresh on Engineering record screen then only those Objects are updating at Engineering Record Level.

I want to update this when i enter engineering record in the PLM WEBUI from ECM screen.

Regards,

Divvis

former_member188458
Active Participant
0 Kudos

Hi Divvi,

1) Where do u have the Engg Record in the ECM ; Basic Data ?

If so you can put the code in SP BADI /PLMB/*SP*APPL*ACC(Look for the exact name in SE18) ,

, method UPDATE , for the NODE_NAME - For BAsic Data ( Which you can check in /PLMI/CL_ECN_MP)

2) Or ir-respective of where you have the Engg Record in ECM ,  you can put your code on Save as I mentioned bedore in ECM_UPDATE , AFTER_SAVE or AFTER_CHECK_BEFORE_SAVE method .

3) Regarding the Objects not getting refreshed in Engg Record . This could be a snenario if you have the Engg Record also open in another window . In that case until you dont refresh the screen it will not get refreshed , and this is the correct sequence as until application is not refreshed , it can not re-load the modified data from backend .


Best Regards,

Rini

0 Kudos

Hi Rini,

Every thing is updating fine in ER from ECM.

But only problem with Material BOM for this i am using structure /PLMB/S_ECN_OMR_BOM_MAT_ID, in this we have only 3 fields i.e Material, plant, bom usage but we do not have alternative Bom field in this to pass.

if i do manually the same its not accepting with out alternative BOM is there any other structure to use to create new entry in BOM MATERIAL Catergory (PLM_BOMMAT).

Please update me.

Regards,

Divvis

0 Kudos

Hi Rini,

Now  i am able to update my alll data in Engineering Record but for this i need to open Change number from Engineering Record.

Is there any Method to update ECM objects in Engineering Record Level with out opening ECM from ER.

Please help me on this...Thank you

Divvi

former_member188458
Active Participant
0 Kudos

Hi Divvi ,

What is your triiger point to update data ?Is it from ECM ?


And at What  event/user action you wanna do it ?

Regards,

Rini

former_member393433
Participant
0 Kudos

Hi Rini,

It would be helpful to have trigger point from the ER upon Refresh in ER.

Is it possible? or if there is any better way,kindly advise.


Thanks & Regards

Jo

0 Kudos

Hi Rini,

Trigger point is when i click on Refresh Button in ER from ECM.

or any other way is there?

Thanks,

Divvi

former_member188458
Active Participant
0 Kudos

Hi Jo & Divvy ,

As I understand you want to sync up the ECM OMR data with ER Change Items.

I am not very clear on your scenario though but I suspect any of the below 2 scenarios

you are trying :

1) Auto-Update the ER Change Items once ECM OMR data is updated

If so your trigger point should be ECM save i.e. when the ECM is saved you sync up the ECM OMR data with the linked ER change items data . Which can be done using ECM_UPDATE BADI

2) You want to do the sync up from ECM to ER on some user action which you are saying is on ER "Refresh" , in that case you need to keep all your code in the BADI ,/PLMU/EX_FRW_CONSUMER_APPCC,Process Event  method.

Regards,

Rini

0 Kudos

Thanks Rini,

Thanks for your help/contribution.

I used ECM_UPDATE BADI to sync the ER's from ECM, it is working but one more thing this badi will work only if we create the change master from ECC not from WEBUI.

In this BADI directly i am creating the Entries for ER.

Regards,

Divvi

former_member188458
Active Participant
0 Kudos

Hi Divvi,

The BADI should also get called from ECm Web UI .As the BADI is called from FM CCAP_ECN_MAINTAIN ,which should also called from the ECM wUI on ECM save , from /PLMI/CL_ECN_Bo , method  CHECK_BEFORE_SAVE / SAVE (check either of the 2 should have the Fm call for CCAP_ECN_MAITNAIN)

Best Regards,

Rini

Former Member
0 Kudos

This message was moderated.

former_member188458
Active Participant
0 Kudos

Hi Milind,

This error is thrown at many instances .

If it is the first time you are creating an ECR in the system , the most possible cause of error is

missing authorizations . So I would suggest to check missing authorization in tcode Su53 in GUI  once you get the error in Web .

In case you dont get any clue , you can do a where used on the message from t-code se91 , message class - /PLMI/ECR_BO , message number 000 and put a break-point in the where used points and debug where is it failing.

Hope this helps.

Thanks,

Rini

P.S : suggest you to create a separate thread for it , as this post is already answered and could confuse others referencing. A small suggestion 🙂

Former Member
0 Kudos

Thanks Rini.
I am creating the ECR for the first time. The header table /PLMI/ECR_HDR is blank.
I checked in SU53. There is no authorization error.

Now the error is changed to webdynpro_RT 014 - Fill all required entry fields
But since we are creating it for the first time, there should be nothing to be filled.

Please find the screenshots.

In the config, the standard setting for PLM is not available.
Unable to assign the element type to link the case type.

Creating a separate thread as well.

former_member188458
Active Participant
0 Kudos

Hi Milind,

1) For the first part , for internal number assignment select the required number range , defined in Spro PLM->PLM WUI->Objects in PLM WUI ->Eng Record-> Define Number Range Intervals for Engineering Record,with no external no assignment .

2) For the second part , please  try to assign below and check if it worrks

SRM_MOD02 801CC417619A1DEEA39972CB16A8CD82

/PLMI/ECR_SPS_CASE

/PLMI/ECR_SPS_CASE_RECORD

/PLMI/ECR_SPS_CASE_NOTE

BR,

Rini

Former Member
0 Kudos

Thanks Rini. This is really helpful.

Now the error changed to /PLMI/ECR_BO  000

Technical error; contact your system administrator.

No further sap help is available in sap support or the
message details.Debugging this FPM is very difficult. No clear headway yet.

It seems we are missing some BC sets as well.

  • /PLMI/WEBUI2_SCMGVC_STATPROF_C
  • /PLMI/WEBUI2_SCMGVC_CASE_TYPE_C
  • /PLMI/WEBUI2_SCMGVC_ATTRREASON_V
  • /PLMI/WEBUI2_/PLMI/VC_ECR_FC_C

Checking, it is possible to manage this manually? Any thought?

   I updated the internal no. range. But still the same problem. Please find the screenshots.

The following changes are done manually in Record management.

But the system is looking for  RMS id - /PLMI/ECR_SP_RECORD but the available RMS id is /PLMI/ECR_SPS_CASE

former_member188458
Active Participant
0 Kudos

Hi Milind ,

Sorry for the delay . Hope you got some clue to move further.

And one thing to keep in mind is until you have the underlying case type for the ER type configured correctly in system , you would keep getting the error in Web UI.

I am not sure but i guess you are missing some business functions to be activated .

I would need to check in the system to get the exact details .For now , probably you can check below business functions are activated in ur system or not

/PLMU/WEB_UI

/PLMU/WEB_UI2

/PLMU/WEB_UI3

/PLMU/ER_1/


BR,

Rini

Former Member
0 Kudos

Thanks Rini.

All these business functions are activated. We are using standard configuration, so didn't change/update the delivered badi's.

The Case/Record management functionality is not available by default. Maintained it manually thru organizer transaction. Still the same error /PLMI/BO_ECR 000. System trace,system dump, authorization trace etc. didn't get any error so far.

former_member188458
Active Participant
0 Kudos

Hi milind,

Please check the below note if it helps.

1782757

BR,

Rini

Answers (0)