2016 Jun 20 8:08 PM
Hi,
I am trying to create a function that can be passed a plant, old material #, and new material #.
The program will execute a read_text with the material # and plant and get the purchase order text. I will then want to write that text to the new material # as purchase order text.
I know what I want to do, but need a little direction as to how to begin, and how to write the text to the new material #.
Should this be done as a function? Can it be done as an executable program?
Thanks to anyone who can help.
Tony.
Hi,
I am trying to create a function that can be passed a plant, old material #, and new material #.
The program will execute a read_text with the material # and plant and get the purchase order text. I will then want to write that text to the new material # as purchase order text.
I know what I want to do, but need a little direction as to how to begin, and how to write the text to the new material #.
Should this be done as a function? Can it be done as an executable program?
Thanks to anyone who can help.
Tony.
2016 Jun 20 8:25 PM
Looking at the requirement, it seems like for a one time conversion/ data load program. Hence, I would suggest to write this as a standalone report.
Thanks,
Juwin
2016 Jun 21 4:56 AM
Dear Tony,
This requirement can be done using a function an executable report or a class .
The decision is based how this code will be used .
If this code will be called from multiple location then a class or a function is the way to go .
Using a function or a class depends if you will need screen interaction .
Regards.
Eitan.
2016 Jun 21 6:17 PM
The app will be used more than once, and this was my logic.
I was going to have in my select, the original material #.
Also ask for a material prefix that will be added to the material number, thus providing me with the new material #.
I will check MARA to see if it is a valid material, and if so, I will get the Purch Order text from the original material# and write to the new material # with the prefix.
I am leaning towards a report because the output can be saved and looked at to see what the new data looks like.
It will also come in handy in the event that one of the new material# is not in MARA.
My biggest hurdle now is how to write the text to the new material #'s.
Tony
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |