‎2005 Mar 17 3:25 AM
Besides using the function module READ_TEXT in the calling program, what alternatives are there if I don't want to modify the program but make changes in the sapscript only?
I've tried to use the include statement in the sapscript editor, but I don't know how to call the text object whose ID is GRUN, object is MATERIAL.
Should I use the include statement or any other ways to do it?
Thanks.
‎2005 Mar 18 12:25 PM
Macy,
If you get this error (4) it means that you haven't set up the text for your material.
Use MM02->Additional data/Basic data tab.
If you call the editor and Goto/Header it will display all the necessary information for you in order to extract this text. I found it very useful in many occasions.
Thanks,
Wojtek
‎2005 Mar 17 10:45 AM
Macy,
Try this:
INCLUDE &MY_MATNR& OBJECT MATERIAL ID 0001
Tag column must be set to '/:'
Thanks,
Wojtek
‎2005 Mar 17 10:38 PM
The statement should be
INCLUDE <b>&MARA-MATNR&</b> OBJECT MATERIAL ID GRUN LANGUAGE &SY-LANGU&
<b>MARA-MATNR</b> needs to be replaced with the variable that contains the material number at runtime.
Rishi
‎2005 Mar 18 1:55 AM
Thanks for replying this message.
But the problem is that the object is not found,
as I tried to print &SAPSCRIPT-SUBRC& and 4 is resulted.
I've tried:
/:INCLUDE &MARA-MATNR& OBJECT MATERIAL ID GRUN LANGUAGE &SY-LANGU&
and
/:INCLUDE &ISEG-MATNR& OBJECT MATERIAL ID GRUN LANGUAGE &SY-LANGU&
But nothing is displayed. Anything wrong?
‎2005 Mar 18 12:25 PM
Macy,
If you get this error (4) it means that you haven't set up the text for your material.
Use MM02->Additional data/Basic data tab.
If you call the editor and Goto/Header it will display all the necessary information for you in order to extract this text. I found it very useful in many occasions.
Thanks,
Wojtek
‎2005 Mar 19 6:45 AM
Wojtek,
Yes, Thanks!
I just found the solution.
I should have known the method to find the text name by going to the header to view it.
And it works well.
Another method is to create a program containing a subroutine for the sapscript to call.