cancel
Showing results for 
Search instead for 
Did you mean: 

Designing the SAP Script for Cheque

Former Member
0 Kudos
170

Dear ABAPers,

I am working on Cheque Printing.

My Customers Requirement is based on the House Bank the Cheque will Differ and the alignment also Differs.So how i have to design the SAP Script to fulfill this Requirement.

Guide me how to do this.

Thanks & Regards,

Ashok.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

currently i m working on this. i am using standard program and i also use perform in program to get addtional data. please describe in detail so that i can help u.

Former Member
0 Kudos

Hi Monika,

I am also working on Cheque printing.

I am using the Standard Program RFFOUS_C.I have designed Customized SAP Script and i have assigned this Customized SAP Script in the Transaction FBZP.It is working Fine.

My Exact Requirement is Based on the House Bank the Cheque and Alignment is Differs.How to Align and Print the Values in Cheque.

Thanks & Regards,

Ashok.

Former Member
0 Kudos

Hi Ashok,

why don't you try creating different text elements for different cheque formats .

Regards,

Raghavendra

Former Member
0 Kudos

in that customized sapscript add windows as per your requirement.

and write code.

eg. i want total of gross amount , TDS amount , Net amount

so i write one subroutine program name as ZRFFOUS_FORM .

where i add code in sapscript :

DEFINE &GROSS_AMT&.

DEFINE &TDS_AMT&.

DEFINE &NET_AMT&.

PERFORM GET_DATA IN PROGRAM ZRFFOUS_FORM

USING &REGUP-SKFBT&.

USING &REGUD-QSTEU&.

USING &REGUD-WNETT&.

CHANGING &GROSS_AMT&.

CHANGING &TDS_AMT&.

CHANGING &NET_AMT&.

ENDPERFORM.

&ULINE(87)&

&SPACE(10)&&SPACE(1)&&SPACE(12)& TOTAL&SPACE(5)&&SPACE(1)&&GROSS_AMT(15CR)&&SPACE(1)&&TDS_AMT(15CR)&&SPACE(2)&&NET_AMT(15CR)&

&ULINE(87)&

and in program ZRFFOUS_FORM write a code :

TABLES : REGUP,t001.

  • added by monika

form get_data TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

DATA : GROSS_AMT LIKE REGUD-SSKFB,

TDS_AMT LIKE REGUD-QSTEU,

NET_AMT LIKE REGUD-WNETT.

DATA : SSKFB LIKE REGUD-SSKFB,

QSTEU LIKE REGUD-QSTEU,

WNETT LIKE REGUD-WNETT.

data : lv_sskfb LIKE REGUP-SKFBT.

data : lv_QSTEU LIKE REGUD-QSTEU.

data : lv_WNETT LIKE REGUD-WNETT.

READ TABLE IN_TAB INDEX 1.

replace all occurrences of ',' in IN_TAB-VALUE with ''.

CONDENSE IN_TAB-VALUE NO-GAPS.

MOVE IN_TAB-VALUE TO LV_SSKFB .

READ TABLE IN_TAB INDEX 2.

replace all occurrences of ',' in IN_TAB-VALUE with ''.

CONDENSE IN_TAB-VALUE NO-GAPS.

MOVE IN_TAB-VALUE TO LV_QSTEU .

READ TABLE IN_TAB INDEX 3.

replace all occurrences of ',' in IN_TAB-VALUE with ''.

CONDENSE IN_TAB-VALUE NO-GAPS.

MOVE IN_TAB-VALUE TO LV_WNETT.

IMPORT GROSS_AMT FROM MEMORY ID 'GRS'.

GROSS_AMT = GROSS_AMT + LV_SSKFB.

EXPORT GROSS_AMT to MEMORY ID 'GRS'.

IMPORT TDS_AMT FROM MEMORY ID 'TDS'.

TDS_AMT = TDS_AMT + LV_QSTEU.

EXPORT TDS_AMT to MEMORY ID 'TDS'.

IMPORT NET_AMT FROM MEMORY ID 'NET'.

NET_AMT = NET_AMT + LV_WNETT.

EXPORT NET_AMT to MEMORY ID 'NET'.

read table OUT_tab index 1.

*MOVE GROSS_AMT TO OUT_TAB-VALUE.

WRITE GROSS_AMT TO OUT_TAB-VALUE CURRENCY T001-WAERS.

CONDENSE OUT_TAB-VALUE.

MODIFY OUT_TAB INDEX 1.

read table OUT_tab index 2.

*MOVE TDS_AMT TO OUT_TAB-VALUE.

WRITE TDS_AMT TO OUT_TAB-VALUE CURRENCY T001-WAERS.

CONDENSE OUT_TAB-VALUE.

MODIFY OUT_TAB INDEX 2.

read table OUT_tab index 3.

*MOVE NET_AMT TO OUT_TAB-VALUE.

WRITE NET_AMT TO OUT_TAB-VALUE CURRENCY T001-WAERS.

CONDENSE OUT_TAB-VALUE.

MODIFY OUT_TAB INDEX 3.

ENDFORM.

hope u will get idea. <<text removed>>

Edited by: Matt on Mar 18, 2009 10:14 AM - email address must not be published on the forums

Former Member
0 Kudos

edited

Edited by: Amar J on May 9, 2009 2:43 PM

Edited by: Amar J on May 9, 2009 2:44 PM

Former Member
0 Kudos

Dear Mounika,

Can u please help me for check printing ? Actually i copied your code but not getting printed the gross amont, tds amount & net amount.

I want to print the multi invoice details with gross amount , tds amount & net amount.

I have code it in main window. But it is not printing multiple invoice. Program code is same as standard code. Somewhere i need to change it in standard program code or not please help.

I also create the zprogram that u given earlier. But it is not printing. Please help.

Regards

Nitin Varshney

Answers (2)

Answers (2)

Former Member
0 Kudos

Cheque Printing !!!! The best solution I can offer is to try and get the development assigned to someone else ....:)

Mathews

Former Member
0 Kudos

Hello,

i have done this before. It was my first Sap-script 8 years ago.

For every field in the cheque part i defined a seperate window.

With the statment /: PERFORM ....... in PROGRAM ........

/: USING and CHANGING

i gathered the data to be printed.

It worked very well.

If you want that old sapscript. I think i still have it.

Gr., Frank

Former Member
0 Kudos

Hi Frank,

Could you please Explain step by step procedure.

Thanks & Regards,

Ashok.

Former Member
0 Kudos

Hi Rashok,

What kind of cheque are you using.

e.g. an invoice with at the bottom a cheque

or only a cheque with no other data.

There is ofcourse an difference but not big. I hope you've a little experience with sap-script.

1. locate al the possible fields in the cheque.

1 For everyfield make 1 window.

2 Be very exact at real position (X,Y) i prefer to work with MM (millimeters)

3 Also the size of the window must be the size of the cheque field or a little bit bigger.

4 What kind of font is used. Try to use about the same in sap-script

if you use the bottom line for being read automatically by bank you have to use there an OCR font.

2.. Test this first with constant text to see if it is right

3. Study the desired fields and where the contents found in the tables ( this is mostly the diffult part)

if that data is already in varibles use that. Otherwise you have to get them manually.

you have 2 possibliies for that:

1. Get it in the controlprogram of the script. Put it in global variables

and you can use the variables in the script

OR

2. define variables in SCRIPT

make a abap subroutinepool program.

do in sapscript a call to functions in this pool with

example

/: DEFINE &OP_MAT_OMSCHR& := ' '

/: PERFORM BEPAAL_MAT_OMSCHRIJVING IN PROGRAM PROGA

/: USING &VBAP-MATNR&

/: CHANGING &OP_MAT_OMSCHR&

/: ENDPERFORM

example in the subroutinepool

&----


*& Form BEPAAL_MAT_OMSCHRIJVING

&----


  • text

----


  • Ophalen materiaaldescription

  • input: ip_matnr

  • output: op_mat_omschr

----


FORM bepaal_mat_omschrijving

TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy .

DATA: ip_matnr LIKE ltap-matnr,

op_mat_omschr LIKE makt-maktx,

wa_makt LIKE makt,

wa_objk LIKE objk.

CLEAR: op_mat_omschr.

  • read input-parameter 1.

READ TABLE in_tab INDEX 1.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = in_tab-value

IMPORTING

output = ip_matnr.

CLEAR op_mat_omschr.

SELECT SINGLE * FROM makt

INTO wa_makt

WHERE matnr EQ ip_matnr

AND spras EQ 'E'.

IF sy-subrc EQ 0.

MOVE: wa_makt-maktx TO op_mat_omschr.

ENDIF.

CLEAR out_tab.

MOVE: 'OP_MAT_OMSCHR' TO out_tab-name,

op_mat_omschr TO out_tab-value .

CONDENSE out_tab-value.

APPEND out_tab.

ENDFORM. "BEPAAL_MAT_OMSCHRIJVING

Mostly people are doing this calls in the concerning windows, but more sure is to do

it in the MAIN-window before the first item (/E).

I hope this information is enough. I you want more let me know.

Gr., Frank

note: all the banks can sent a sjablon to you with the exact measurements of the cheque.