Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Printing Cheques using SAPSCRIPT.

Former Member
0 Likes
809

Hi all,

I am trying to print cheques using script.

I have a standard program attched to my z-script.

Now the requirement is that I want to print same content on my MAIN window twice and also on the same page.

The data is coming from the standard program in the MAIN window.

I understand that we cannot write a text elemnt twice in a window and i am unable to call the same text element of main window in my new window without modifying standard program.

Can you please suggest me a possible way to solve this problem?

Thanks and Regards,

San

4 REPLIES 4
Read only

Former Member
0 Likes
763

Hi

<b>

What is the text element u want insert twice in your window??</b>

Have u converted standard script to Z???? If yes have u followed all the instructions correctly???

If no check this again

before changing standard script you must migrate into user defined script. for that one follow these steps...

1)goto SE71. 2)provide name for SCRIPT( begin with Z)

3)select CREATE option.

4)press ENTER.

5)select FORM option(u find this option on top of the screen).

6)from that choose MIGRATE option.

7)then it will displays dialog screen with required field like FORM( provide standard form name) and LANGUAGE( here provide in which language form exisisting).

8)press ENTER. 9)select SAVE and ACTIVATE.

or

1) goto SE71

2) menu..UTILITIES -> COPY FROM CLIENT.

procedure to add fields.

1)goto SE71.

2)provide FORM( which you migrated).

3)slect PAGE WINDOWS.

4)select EDIT option.

5)select WINDOW required for adding a field.

6)select EDIT option.

7)from that choose ELEMENT( also called TEXT ELEMENTS)

8)goto------>EDITOR.

Here you enter field as per your needs.

      • i give sample code

AS modifying layout <>

/: if &ekko-lifnr& > 50000

/ plant id is 300

/: endif.

9)after completion of entering element goto BACK.

10)choose SAVE.

11)ACTIVATE. regards

procedure to uploading LOGO

follow these steps for uploading logo which is exisisting in bitmap format.

In the form painter, you can either include directly to the form using menu

Edit->Graphic->Create or using the INCLUDEstatement in a window.

To use an INCLUDE statement, goto into the window scripteditor and use menu Include->Graphic. The include can looklike this for a bitmap:

/: BITMAP MYLOGO OBJECT GRAPHICS ID BMAP TYPE BMON

in this statement MYLOGO is name of the logo.

BMON mean's logo exisiting in black&white format, we can also pass

BCOL means logo exisiting in color format.

Go to transaction OMFE. Tell me what you see there for the output type you are interested in. Let me take the standard output type NEU. The entry looks something like this.

NEU Purchase order 1 SAPFM06P ENTRY_NEU MEDRUCK.

The first one is your output type, next is its description, next is the medium, then the program, routine, and the form name.

You already copied the layout MEDRUCK to ZMEDRUCK. Now copy SAPFM06P to ZZSAPFM06P. Now ENTRY_NEU routine is in the include FM06PE02. You need to make your changes here to accommodate for the new field. So copy this include to ZZFM06PE02 and make your changes. Also, in ZZSAPFM06P, change the line where it says INCLUDE FM06PE02 to INCLUDE ZZFM06PE02.

Now in this routine ENTRY_NEU, there is a function module call ME_READ_PO_FOR_PRINTING which reads in the PO data from the tables. We need to copy this function module as well as this is where you will do your extra selections for the new fields. You will do the same with the other function call ME_PRINT_PO, if you need to change anything on the print.

after this to define output type...

NACE

You can track the form and the print program used for that form

NACE is used to create output type while creating the output type you will mention forms, and driver program.

that will be maintained in the table TNAPR.if you create the output type using NACE then it will be automatically visible in table NAST and TNAPR.

so check in NAST, TNAPR table

http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1989fe43b111d1896f0000e8322d00/frameset.htm

EX--in simple terms..take a transaction say ME21N ( Purchase Order ), u can see a Print icon there. now when u click on this icon, it has to print the PO document. Now how does it do that? when u click Print, the control gets transffered to a print program, now which program gets triggered is decided by what program name u specify in NACE.

So in NACE>EF>Output Type>NEU>processing routine--> u can see some standard program already configured( maybe SAPFM06P n form MEDRUCK )..these are the programs n sapscript that gets executed wen u say "PRINT" in the transactrion...so u can customise the print program for customer changes over here by copying the standard program n form into a Z/Y one and replacing the program names in NACE.

check this link

http://www.sap-img.com/sapscripts/create-scripts-of-your-own-using-standard-scripts.htm

Reward all helpfull answers

Regards

Pavan

Message was edited by:

Pavan praveen

Read only

0 Likes
763

Hi Pawan,

Thanks for u r help, but I followed all the things that u have mentioned.

Read only

0 Likes
763

what is the text element u r trying to insert???

Regards

Pavan

Read only

Former Member
0 Likes
763

Hi Pawan,

I am trying to execute Text Element 525 of Standerd Cheque Printing which is for US.