2011 Jul 20 4:54 PM
Hi,
I am creating a custom sapscript and the driver program is the standard one....i have some text elemenst which are used in the driver program but i am not able to link the text elements in the sapscript...By linking i mean that i dont know in which window should i call the text elements....i am clear abt the main window and the text element for the item details....but there are other 6 to 7 windows where i am calling the dat ...Is it feasible to write the code in the sapscript window without writing the sapscript...If it is possible,,what is the sequence of display....
thanks
kanishak
2011 Jul 20 7:01 PM
use '
open_form "opens up a spool job
'write_form' "pass the text_elements name (according to the windows, there can be multiple text_ element per window)
close_form "closes the spool job
for main window, loop at internal table and use the text_element used for the main window.
make a copy of the standard driver program with all its includes. but its a tedious process. if time permits make a custom driver program.
2011 Jul 21 9:43 AM
2011 Jul 21 9:56 AM
hi,
the concept of sapscript is any text elements created in the script need to be called in driver program.
You donot want to use a custom program.. ? so you havent even copied standrad program to a z program?
in that case you cannot us enew text elements. Because you will have to call them from driver program.
2011 Jul 21 11:46 AM
Sorry wiz,
but your experience may be limited.
It is not advisable to copy sapscript driver programs to z programs. In modules like purchasing it is almost impossible because it is integrated in the module pool. In Sales, many companies do so by copying RVORDER to ZVORDER programs. This may help you enhancing performance and making programming easier, still it is not necessary and can definitely cause trouble in release changes.
Yes, you can include any text in any SAPSCRIPT window if you have the keys available
/: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW- PARAGRAPH np]
Open the text using SO10 or respective transaction, i.e. VA03, Goro header/item text. In the text, goto-header. See name object ID. If the name is equal to object name, i.e. &VBAK-VBELN& this is available in the sapscript form, obejct and ID can be suplied as constants, i.e. object 'TEXT'.
If you can not derive the text name directly from the variables present, you can still use sapscript external perform.
Regards,
Clemens
2011 Jul 21 11:59 AM
hi,
thanks for clearing on that.
but the issue is to add text elements and not standard text.And if we create a new text element it has to be explicitly called in the driver program.I am sure you can google that.
unfortunately /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW- PARAGRAPH np] helps to add a standarad text and not a text element.
2011 Jul 21 12:38 PM
Hi Kanishak (and wiz),
yes. I was confused. Text elements are triggered by the driver program. Every window has a so-called default text element, that is anything not preceded by /E (in sapscript editor). Here you can use any symbols &table-field& that are used as global fields in the driver program and enclose thgis in individual text and formatting.
Activate Sap script debugger and check what is available when your individual (VAR or CONST) windows are processed.
Regards,
Clemens