2013 Dec 10 5:52 PM
hello all,
i need to print long text of accounting document in a form with script.
i written as below in main window of script
DEFINE &V_TEXT& = &STRING&
PERFORM GET_ITEM_TEXT IN PROGRAM ZRF1_SUBROUTINE
USING &BSEG-BUKRS&
USING &BSEG-BELNR&
USING &BSEG-GJAHR&
USING &BSEG-BUZEI&
CHANGING &V_TEXT&
ENDPERFORM
im getting text value in the perform 200 + characters but when i come out of the perform the v_text value is having only 80 characters
i declared it as sting.
Please help
Ujwal
2013 Dec 10 6:18 PM
Have you looked at ZRF1_SUBROUTINE to see how it is written? You are getting what it returns.
Neal
2013 Dec 10 8:40 PM
no it is returning a 200+ character value but getting only 80 characters into v_text
2013 Dec 10 9:14 PM
Try changing it to
PERFORM GET_ITEM_TEXT IN PROGRAM ZRF1_SUBROUTINE
USING &BSEG-BUKRS&
USING &BSEG-BELNR&
USING &BSEG-GJAHR&
USING &BSEG-BUZEI&
CHANGING &V_TEXT1&
CHANGING &V_TEXT2&
CHANGING &V_TEXT3&
CHANGING &V_TEXT4&
ENDPERFORM
and carving the return value into 4 - 80 long values. One would suspect that this is a limitation of sapscript.
Neal
2013 Dec 11 10:09 AM
Thanks Neal,
though i didnot get answer why sting variable value is truncating , your solution worked for me.
2013 Dec 11 2:10 PM
Ujwal,
Sapscript is a VERY old interface. They've never updated it. That's my expectation for the answer to why...
I'd imagine that SAP would say for you to translate your form to Smartforms or Adobe.
Neal
2013 Dec 10 10:04 PM
2013 Dec 11 2:36 PM
You can directly print long text in sapscript using INCLUDE command. No need to call subroutine to retrieve text.
See link below for syntax.
Including Other Texts: INCLUDE
Regards,
Pawan.