‎2008 Dec 29 2:11 PM
Dear All,
Can we call a variable from SAPScript? For eg. standard text ZTEST has a text "My Name is &NAME&" in it. I want to pass value ATANU from SAPScript so that final output contains "My Name is ATANU". Is it possible?
Best wishes,
Atanu
‎2008 Dec 29 2:14 PM
I hope you can do that. Before calling standard text first you have the assign the value
Regards
Sasi
‎2008 Dec 29 2:14 PM
I hope you can do that. Before calling standard text first you have the assign the value
Regards
Sasi
‎2008 Dec 29 2:25 PM
Dear Sasikumar,
I am really looking for a quick solution. Do you have anything in mind that can be of help?
Best wishes,
Atanu
‎2008 Dec 29 2:29 PM
Just try,
Your standard text 'Nametxt' contains My name &Name&
In print program/ you define 'Name = 'xxxxxx' or in the sapscript
than call the standard text like include 'nametxt' lang......
Regards
Sasi
‎2008 Dec 29 2:37 PM
It has not worked. I have already tried that. You will have to give object ID. I am really interested how to pass the value to the standard text.
Best wishes,
Atanu
‎2008 Dec 29 2:44 PM
You try like this
/: PERFORM GETTOTVAL IN PROGRAM Z_TEST
/: CHANGING &FINAL&
/: ENDPERFORM
/: INCLUDE Z_TEST OBJECT TEXT ID ST LANGUAGE EN
In Se38 Program :
FORM GETTOTVAL TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY. "#EC CALLED
DATA : VAL(10) TYPE C.
SELECT SINGLE EBELN FROM EKKO INTO VAL .
READ TABLE OUT_TAB WITH KEY NAME = 'FINAL'.
IF SY-SUBRC IS INITIAL..
OUT_TAB-VALUE = VAL.
MODIFY OUT_TAB INDEX SY-TABIX.
ENDIF.
ENDFORM.
In SO10(Standard Text)
This is standard text &FINAL& only
O/P : This is standard text 8378377 onlyRegards
Sasi
‎2008 Dec 29 3:42 PM
Hi Sasi,
Just excellent. I will give you full 10 points.
Best wishes,
Atanu