on ‎2009 May 28 6:41 AM
Hi all,
I am writing a sapscript form to call a subrountine by passing the hardcode parameter 'ZXX_TSI_SHIPMENTS_FROM' shown as below: -
PERFORM GET_STANDARD_TEXT IN PROGRAM ZPXX_SHIP_INST
USING 'ZXX_TSI_SHIPMENTS_FROM'
CHANGING &ZXX_TSI_SHIPMENTS_FROM&
ENDPERFORM
My problem now is when I debugged in program ZPXX_SHIP_INST, the passing parameter is empty.
Could someone help me?
Thanks in advance.
Request clarification before answering.
Hi,
Put a debugg point in program ZPXX_SHIP_INST and check it.
Insted of this u can directly fetch the standard text by using 'INCLUDE TEXT'.
/: INCLUDE &OBJNAM& OBJECT 'EKPO' ID 'F03' LANGUAGE 'E' PARAGRAPH M3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
In program ZPXX_SHIP_INST write like this.
FORM GET_STANDARD_TEXT TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
READ TABLE in_tab WITH KEY name = 'INVAR_1'
IF sy-subrc = c_zero. "check for subrc
lv_ebeln = in_tab-value.
ENDIF.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = p_lc_f01
language = sy-langu
name = p_lv_ebeln
object = text-t28 "EKKO
TABLES
lines = it_tline
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> c_zero. "checking for subrc
"to avoid epc error
ENDIF. "IF sy-subrc <> c_zero
in it_tline[] u can get the text.
cocatenate this text into one variable and pass this to script.
Hi Wong,
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
So those parameters should be only the symbols, hard coded text should not be considered by perform statement in scripts.
Regards,
Vineel.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.