Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Date in cheque printing for f-58

hello ,

I have to print a cheque in which which i m getting date in 16.09.2008 format

but i want these dates to be printed in boxes of the cheque like 16 in first box

09 in second box...

how can i do it?

thanks and regards

replied

Hi anshul dave,

Try this...if not let me know your ID could send you screen shots....

let say in script the date is Script_date...

then in Script Window where your are print the date...

*Write In Script

PERFORM SEPARATE_DATE ZPROGRAM USING &SCRIPT_DATE&

CHANGING &DATE&

CHANGING &MONTH&

CHANGING &YEAR&

ENDPERFORM

*Write In ZPROGRAM

FORM SEPARATE_DATE tbl_input structure itcsy "structure

tbl_output structure itcsy.

data: v_date(2) type n,

v_month(2) type n,

v_year(4) type n,

v_totdate type string.

  • Get Date from Script

read table tbl_input with key 'SCRIPT_DATE'.

check sy-subrc = 0.

v_totdate = tbl_input-value.

split v_totdate at '.' into v_date v_month v_year.

*check how its getting read in debugging mode.

loop at tbl_output.

case tbl_output-name.

when 'DATE'.

tbl_output-value = v_date.

modify tbl_output.

when 'MONTH'.

tbl_output-value = v_month.

modify tbl_output.

when 'YEAR'.

tbl_output-value = v_year.

modify tbl_output.

endcase.

endloop.

ENDFORM.

Regards,

sg

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question