on 05-09-2009 10:43 AM
I am doing an enhancement on Cheque printig to change the address format.I coded a perform to call a subroutine to which i am giving the address number and retrieving the address as ADDRESS-END ADDRESS is causing some issues .but when the subroutine is called it passes address no. in some different format( like XXXXX) rather than actual value.I debugged script and in the particular window the adress no. is displayed as XXXX.i also used CONVERSION_EXIT_ALPHA_INPUT.Any suggestion is highly appreciated.Below is piece of my code
/: DEFINE &GV_NAME& = ' '
/: PERFORM GETADD IN PROGRAM ZRFI_FI110_CHCK_CA
/: USING &GV_ADR&
/:CHANGING &GV_NAME&
/: ENDPERFORM
REPORT ZRFI_FI110_CHCK_CA.
types : gtt_itcsy type standard table of itcsy .
&----
*& Form GETADD
&----
*&
*&
&----
form getadd tables xt_intab type gtt_itcsy
xt_outab type gtt_itcsy.
data: lv_name1 type NAME1,
lv_adrnr type ADRNR,
lwa_input type itcsy,
lwa_output type itcsy,
zadrc type adrc.
read table xt_intab into lwa_input index 1..
lv_adrnr = lwa_input-value. ( here i am getting value of address no. from script as XXXXXXX)
select single * into zadrc from adrc
where addrnumber = lv_adrnr and
date_to >= sy-datum and
nation = space.
lv_name1 = zadrc-name1.
read table xt_outab into lwa_output index 1.
lwa_output-value = lv_name1.
modify xt_outab from lwa_output index 1.
endform.
hi amar,
this is my subroutine. i fetch requiredvalues like this and not using address---endaddress.
form get_ADDRESS TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA : STREET1 LIKE ADRC-STR_SUPPL1,
STREET2 LIKE ADRC-STR_SUPPL2,
STREET3 LIKE ADRC-STR_SUPPL3.
DATA : ZADNR LIKE REGUH-ZADNR.
DATA : LV_ADRNR TYPE AD_ADDRNUM.
DATA : IT_ADRC TYPE ADRC OCCURS 0 WITH HEADER LINE.
*BREAK MTABAP.
READ TABLE IN_TAB INDEX 1.
CONDENSE IN_TAB-VALUE.
MOVE IN_TAB-VALUE TO ZADNR.
MOVE ZADNR TO LV_ADRNR .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = LV_ADRNR
IMPORTING
OUTPUT = LV_ADRNR .
SELECT * FROM ADRC INTO TABLE IT_ADRC
WHERE ADDRNUMBER = LV_ADRNR .
READ TABLE IT_ADRC WITH KEY ADDRNUMBER = LV_ADRNR.
STREET1 = IT_ADRC-STR_SUPPL1.
STREET2 = IT_ADRC-STR_SUPPL2.
STREET3 = IT_ADRC-STR_SUPPL3.
read table OUT_tab index 1.
MOVE STREET1 TO OUT_TAB-VALUE.
CONDENSE OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 1.
read table OUT_tab index 2.
MOVE STREET2 TO OUT_TAB-VALUE.
CONDENSE OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 2.
read table OUT_tab index 3.
MOVE STREET3 TO OUT_TAB-VALUE.
CONDENSE OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 3.
ENDFORM.
in in sapscript , i added,
/: DEFINE &STREET1&.
/: DEFINE &STREET2&.
/: DEFINE &STREET3&.
/: PERFORM GET_ADDRESS IN PROGRAM ZRFFOUS_FORM
/: USING ®UH-ZADNR&.
/: CHANGING &STREET1&.
/: CHANGING &STREET2&.
/: CHANGING &STREET3&.
/: ENDPERFORM.
A6 &SPACE(6)&®UH-ZNME1&
A6 &SPACE(6)&®UH-ZSTRA&
A6 &SPACE(6)&&STREET1&
A6 &SPACE(6)&&STREET2&&SPACE(1)&&STREET3&
A6 &SPACE(6)&®UH-ZORT1&-®UH-ZPSTL&&ADRC-POST_CODE1&
hope this helps u.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi monika,
I used similar logic like yours but the script is still passing XXXXXXXXXX instead of reguh-zadnr value into the z-program.Here's the link to the issue http://www.scribd.com/doc/15225535/Address. I am trying various other options like declaring as string and conversion but still no clue
Amar
Hello,
You need to find out how &GV_ADR& is getting updated in your script.
Address no is stored in the standard structure REGUH-ADRNR field while processing the payment process. Instead of GV_ADR use REGUH-ADRNR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try like this.
After Select statement
read table xt_outab WITH KEY name = 'GV_NAME'. (Script Changing Parameter)
lwa_output-value = lv_name1. (this value should be character data type)
modify xt_outab from lwa_output index 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.