cancel
Showing results for 
Search instead for 
Did you mean: 

Address formatting in Cheque printing

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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 &REGUH-ZADNR&.

/: CHANGING &STREET1&.

/: CHANGING &STREET2&.

/: CHANGING &STREET3&.

/: ENDPERFORM.

A6 &SPACE(6)&&REGUH-ZNME1&

A6 &SPACE(6)&&REGUH-ZSTRA&

A6 &SPACE(6)&&STREET1&

A6 &SPACE(6)&&STREET2&&SPACE(1)&&STREET3&

A6 &SPACE(6)&&REGUH-ZORT1&-&REGUH-ZPSTL&&ADRC-POST_CODE1&

hope this helps u.

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

not sure....but there is a problem with datatype. try to define correct dataype. just do one thing. goto the programand debug it. and while debugging check the values of reguh-zadnr .

Former Member
0 Kudos

Hi Monika,

Thanks for your tip. My code is working perfectly fine. I din'nt check it properly, so i went to Tcode FCH7 to reprint checks and found that its working perfectly fine.Thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

I have tried with both REHUH-ZADNR and REGUH-ADRNR. Even then the script is passing the address no. as XXXXXXXXXX instead of the actual no. to the Z-program. I also tried conversion of that value in Z-program but it's still the same

Former Member
0 Kudos

Now you try to get the adress no from the vendor master for the vendor and get the address details from the ADRC table and try to print it.

Former Member
0 Kudos

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.

Former Member
0 Kudos

The address no. value i am sending from script to z-program appears as XXXXXXXXXX instead of 77689.

The value of lwa_input-value is showing as XXXXXXXXXX . so i am not able to retrieve the address. ithink its in some internal format.

Former Member
0 Kudos

Hi Amar J,

what is the value &GV_ADR& and how do you get this value.

Is &GV_ADR& is defined by you, if so in Script there will be a structure like &ADRC-ADDRNUMBER& or &ADRC-ADDRNUMBER& try to pass this value behalf of &GV_ADR&.

Regards,

Suneel G