cancel
Showing results for 
Search instead for 
Did you mean: 

Copy and clear Comments in one

Former Member
0 Kudos

Hello,

I want to do the Copy Comments and Clear Comments in one Package . User wants to have a button in the Excel to Copy comments(From Selection and To Selection) and then it should also clear the FROM Selection. I tried creating a custom package and copied both the standard COPY and CLEAR DM scripts . This will not work because I am locking the record and it won't do both the task at the same time.

Any suggestions?.

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Thanks Vadim , it works now.

former_member186338
Active Contributor
0 Kudos

Please accept the correct answer: "Try to create a custom chain"

Former Member
0 Kudos

When I run the Package attached to the Custom Process Chain . I get the error Below:

Package Script:

Former Member
0 Kudos

I am trying that Approach . One question regarding that how can I commit the Copy comments first and then run clear comments step in the PC. Because both cannot be triggered at the same time.

former_member186338
Active Contributor
0 Kudos

Please show the screenshot of the custom chain.

Former Member
0 Kudos

Below is screenshot:

former_member186338
Active Contributor
0 Kudos

Incorrect chain.

First copy copy comments chain then add clear comment step.

Former Member
0 Kudos

Still not sure ,something like this

former_member186338
Active Contributor
0 Kudos

Incorrect!

Insert Clear step immediately after copy step.

Former Member
0 Kudos

Changed it to

former_member186338
Active Contributor
0 Kudos

Try to create a custom chain.

Former Member
0 Kudos

Hi Vadim,

Can I use any BADI to achieve this functionality .

former_member186338
Active Contributor
0 Kudos

Have you created a custom chain?

Former Member
0 Kudos

One option I think is to copy the standard Process chain /CPMB/COPYCOMMENTS and create a custom chain . Then add the steps of Clear Comments Process chain(/CPMB/CLEARCOMMENTS) to the custom Chain . Let me know if there is any other better solution?.

Former Member
0 Kudos

Chain for this is COPY Comments as I created the custom DM by copying the COPY Comments package . After that I added the Clear Comments Task . Let me know if I am able to explain what I am trying to do.

former_member186338
Active Contributor
0 Kudos

And how clear comments tasks are related to this chain?

Former Member
0 Kudos

Thanks Vadim.

I copied both the DM scripts of COPY and CLEAR comments and created a new custom Package with the script below :

PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Select the members to COPY and where to",%DIMS%) PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when copy comments.",1,{"Yes, check work status settings when copy comments","No, do not check work status settings"},{"1","0"}) 'PROMPT(DELIMITER,%SELECTION%,) TASK(/CPMB/COPY_COMMENTS,SELECTION,%SELECTION%) TASK(/CPMB/COPY_COMMENTS,TOSELECTION,%TOSELECTION%) TASK(/CPMB/COPY_COMMENTS,CHECKLCK,%CHECKLCK%)

PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when deleting comments.",1,{"Yes, delete comments with work status settings","No, do not delete comments with work status settings"},{"1","0"}) TASK(/CPMB/CLEAR_COMMENTS,SELECTION,%SELECTION%) TASK(/CPMB/CLEAR_COMMENTS,ENABLETASK,%ENABLETASK%) TASK(/CPMB/CLEAR_COMMENTS,CHECKLCK,%CHECKLCK%)

Thanks.

former_member186338
Active Contributor
0 Kudos

Please post text with correct line breaks! Impossible to read.

former_member186338
Active Contributor
0 Kudos

P.S. And what is the chain for this package?

former_member186338
Active Contributor
Former Member
0 Kudos


PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Select the members to COPY and where to",%DIMS%)
PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when copy comments.",1,{"Yes, check work status settings when copy comments","No, do not check work status settings"},{"1","0"})
TASK(/CPMB/COPY_COMMENTS,SELECTION,%SELECTION%)
TASK(/CPMB/COPY_COMMENTS,TOSELECTION,%TOSELECTION%)
TASK(/CPMB/COPY_COMMENTS,CHECKLCK,%CHECKLCK%)

PROMPT(RADIOBUTTON,%ENABLETASK%,"Do you want to clear comments associated with data regions?",1,{"Yes","No"},{"1","0"})
PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when deleting comments.",1,{"Yes, delete comments with work status settings","No, do not delete comments with work status settings"},{"1","0"})
TASK(/CPMB/CLEAR_COMMENTS,SELECTION,%SELECTION%)
TASK(/CPMB/CLEAR_COMMENTS,ENABLETASK,%ENABLETASK%)
TASK(/CPMB/CLEAR_COMMENTS,CHECKLCK,%CHECKLCK%)







former_member186338
Active Contributor
0 Kudos

"I tried creating a custom package and copied both the standard COPY and CLEAR DM scripts" - please explain what you have done!

What do you mean by "custom package"?