‎2006 Feb 28 3:06 PM
Hello:
I must say that I did try to solve it, but I lack the correct focus for this. I have this code but I can't get the commented part to work:
FUNCTION Z_SAP_GET_CREDIT.
*"----------------------------------------------------------------------
*"*"Interfase local
*" IMPORTING
*" VALUE(CLIENT_ID) TYPE Z_CLIENT_ID OPTIONAL
*" EXPORTING
*" VALUE(CREDIT_LIMIT) TYPE KNB1-WEBTR
*" VALUE(CONDITIONS) TYPE KNB1-ZTERM
*" EXCEPTIONS
*" USER_DOES_NOT_EXIST
*"----------------------------------------------------------------------
TYPES: BEGIN OF credit_eq_type,
WEBTR LIKE KNB1-WEBTR,
ZTERM LIKE KNB1-ZTERM,
END OF credit_eq_type.
DATA: credit_eq TYPE credit_eq_type.
CONSTANTS BU LIKE KNB1-BUKRS value 'FSMX'.
CONSTANTS LANGUAGE LIKE T005T-SPRAS value 'S'.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = CLIENT_ID
IMPORTING
OUTPUT = CLIENT_ID.
SELECT SINGLE WEBTR ZTERM
FROM KNB1
INTO credit_eq
WHERE KUNNR = CLIENT_ID.
CREDIT_LIMIT = credit_eq-WEBTR.
CONDITIONS = credit_eq-ZTERM.
*CALL FUNCTION 'FI_PRINT_ZTERM'
*EXPORTING
*I_ZTERM = credit_eq-ZTERM
*I_LANGU = LANGUAGE
*I_XT052U = 'X'
*TABLES
*T_ZTEXT = MY_TEXT.
ENDFUNCTION.
How should I define the MY_TEXT table for me to be able to retrieve the results of the 'FI_PRINT_ZTERM' function?
Thanks
Alejandro
‎2006 Feb 28 3:09 PM
‎2006 Feb 28 3:08 PM
Hi,
declare like this,
DATA: BEGIN OF MY_TEXT OCCURS 5,
LINE(50),
END OF MY_TEXT.
Regards,
GSR.
‎2006 Feb 28 3:09 PM
‎2006 Feb 28 3:10 PM
‎2006 Feb 28 3:11 PM
‎2006 Feb 28 3:14 PM
Hi Alejandro,
Define table like this:
data: T_ZTEXT TYPE STANDARD TABLE OF TTEXT,
and if you need, create a work area to proccess data:
data: WA_ZTEXT LIKE LINE OF T_ZTEXT.
regards
‎2006 Feb 28 3:18 PM
report zrich_0003.
<b>
data: itext type table of ttext.
data: xtext type ttext.</b>
call function 'FI_PRINT_ZTERM'
* EXPORTING
* I_ZTERM =
* I_LANGU = SY-LANGU
* I_XT052U = ' '
* I_T052 =
tables
t_ztext = itext
exceptions
zterm_not_found = 1
others = 2.
<b>loop at itext into xtext.
write:/ xtext.
endloop.</b>
Regards,
Rich Heilman
‎2006 Feb 28 3:25 PM