cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Write an ABAP formula for a mass change

ygrandclement
Explorer
530

Hi 
I am struggling with the mass change pop-ups that allows to create formulas and ABAP formulas.
I am using transaction IP17 (change maintenance items), menu option "Goto" / "Carry out a mass change". I pick a field which contains free text (maintenance item text), and I want to create a formula to manipulate the content of this text field (i.e. remplace a part of the text, for example update "3MO Int Maint" into "1MO Int Maint") for many items.
I understand this is not the purpose of the "replace only" flag which is a filtering function for the selection and not a text content manipulation function, but it seems possible to use a formula, and write your own ABAP formula, which opens a pop-up to write ABAP code with the following template:

* X is the value you must return
form GET_NEW_MPLAN_MPOS_MASS_PSTXT
using segment structure MPLAN_MPOS_MASS
changing X.

endform.

I have tried many things but when I put a value in the X variable (as basic as X = 'TEST'), the formula check says it has no error, but then the mass change fails. Error message is: "Error@ Maintenance Item 63970 : Obligatory parameter PSTXT of maintenance item is not filled ( API Message MPLAN 214 )". Which I do not understand as PSTXT is the field I have selected for mass change (maintenance item text).

Screenshots of every step attached.

What I am doing wrong here?
Thanks in advance for nay idea.

Accepted Solutions (0)

Answers (0)