cancel
Showing results for 
Search instead for 
Did you mean: 

print a PO with a SMARTFORM

former_member480606
Participant
0 Kudos

Dear all,

I have to print a Purchase Order from transaction ME21N/ME22N/ME23N' with a SMARTFORM linked to Output type "NEU".

I already made the following steps:

- I copy standard sapscript MEDRUCK to ZMM_MEDRUCK in which I add my custom LOGO

- I migrate sapscript ZMM_MEDRUCK to a smartform ZMM_MEDRUCK_SF

- In customizing (Material Management -> Purchasing -> Messages -> Output Control ->

Messages Types -> Define Message Types for Purchase Order [at POPUP I choose

"Maintain Message Types for PO"])

- Setting Output Type = NEU and navigating to "Processing Routines"

Medium : 1 Print output

Program : SAPFM06P

FORM routine : ENTRY_NEU

Form :

PDF/Smartform Form : ZMM_MEDRUCK_SF

Type : 1 SmartForm

But It doesn't work, I mean the output is the standard sapscript MEDRUCK.

I tried also to use the standard transaction NACE -> EF -> Output types -> NEU -> "Processing Routines" but the system send you to the same point.

I'm working on ECC6 with these Support Packages:

SAP_BASIS 700 0017 SAPKB70017

SAP_ABA 700 0017 SAPKA70017

PI_BASIS 2006_1_700 0007 SAPKIPYM07

ST-PI 2005_1_700 0002 SAPKITLQI2

SAP_BW 700 0019 SAPKW70019

SAP_AP 700 0014 SAPKNA7014

SAP_HR 600 0007 SAPKE60007

SAP_APPL 600 0014 SAPKH60014

Do you have any help?

Best regards

Gino Bonfiglioli

Accepted Solutions (1)

Accepted Solutions (1)

former_member480606
Participant
0 Kudos

No Vishwa,

I already wrote you that I don't want to create a Z program copied by the standard program SAPFM06P. I know how a smartform can be called by a program (Z or standard).

Here the problem is that also if I set my Z smartform I'm not able to call it als if I set it in NACE transaction.

do you have any other hints?

Gino

Former Member
0 Kudos

>

> No Vishwa,

> I already wrote you that I don't want to create a Z program copied by the standard program SAPFM06P. I know how a smartform can be called by a program (Z or standard).

> Here the problem is that also if I set my Z smartform I'm not able to call it als if I set it in NACE transaction.

>

> do you have any other hints?

>

> Gino

Gino, I have little trouble in understanding your point here. If you copy into the Z program and use that for smartform, you can assign the same replacing the standard program with your one. But only thing, that you need to take care is..all your code should between form entry_neu and endform..

form entry_neu.
"all the code should be here.

endform.

This is because, If you see in NACE, there is a form routine entry_neu..so when this output is assigned in the PO, then the form routine triggers first, triggering the print program which there in calls the smartform.

Vishwa.

former_member480606
Participant
0 Kudos

Hi Vishwa,

maybe I didn't (and now I don't) understand your help:

May you explain me the whole process, please?

Gino

former_member480606
Participant
0 Kudos

Ok,

I've got it. Thank you for your help. Now I'm working on my SMARTFORM

Bye

Gino

jjay
Participant
0 Kudos

Hi Gino,

Good day!!

I am actually doing a similiar requirement whereby I will need to copy the existing PO Print Program to be tied to my SMARTFORM.

How did you achieve it, did u copy over the SAPFM06P to a Z program or did a whole new Print Program from scratch?

Hoping to hear from you real soon.

Thanks a ton!!!

Regards,

Neesha

nagarjun_kalletla
Participant
0 Kudos

Please any one from the post reply ... I copied the Medruck form to zform and what are all the things I should do please let me know clearly ...

My requirement is I ll replace the Medruck in NACE and use my zform for O/p ...
am new to Smartforms ...

Thanks in advance

Former Member
0 Kudos

Hello Everyone,

I am new to the forum and also to abap.
Excuse me if it is a basic question.

I am taking care of the output types.
This is 1st time SAP will be implemented .

For purchase order , I go to NACE ---EF----NEU---Processing routines

print output---SAPFM06P---ENTRY_NEU----MEDRUCK
FAX-----------SAPFM06P---ENTRY_NEU----MEDRUCK
EDI------------RANASTED--EDI_PROCESSING
DISTRIBUTION(ALE)---RANASTED---ALE_PROCESSING

Are the above settings fine ?
What are the standard programs for the PO outputs . I am looking for the smartforms and the driver program .

I searched and found that IN ECC 6 , we have to install OSS notes .

Gurus, please help  me . Let me know what all oss notes be implemented and how to proceed from here .

Any help will be greatly appreciated ,

Monalisa

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Gino,

There are some clarifications I need from you, to help you out:

1. You said, you migrated the script to smartform, did you make changes inside the smartform accordingly??

Example: ULINE in script, does not work in smartform.

You have to use tables to display line item details.

2. I see that you are assigning the program :SAPFM06P which is the Print Program for Script. You cannot use the same program for smartform

What you can do is, copy the program and comment all Open_forms, write_forms etc...related to the script.and then Call SSF_FUNCTION_MODULE_NAME Fm..and assign the FM generated by the Smartform.

Vishwa.

former_member480606
Participant
0 Kudos

Hi Vishwa,

you' re right:

1. When I migrate the custom ZMM_MEDRUCK to smartfrom ZMM_MEDRUCK_SF i found a lot of errors: I removed them inside the smartforms transaction but I didn't see if it is ok or if (as I suppose) there are some data that disappered in migration.

2. Here I have a question: Does exist a standard program to link my SMARTFORM instead the copy of SAPFM06F and then comment all OPEN_FORMS, WRITE_FORMS, ... as you suggest me in your answer?

Thank you

Gino

Former Member
0 Kudos

Hi

This is an option, I suggested you because...you can pass the same internal tables used in the Print Program of the script and pass the data to the Functional Module generated by Smartform.

The other option is, you can create a new Print Program on your own right from scratch..and then Populate the internal tables with the data and then pass on those tables to Smartform FM. In the form interface of the smartform, you have the Tables tab,here you can declare the internal tables whose data your passing from the print program.

Also, If you are looking for sample code, then use search option in SCN with the search term: SSF_FUNCTION_MODULE_NAME. You will get an idea on how it works.

And after the migration, dont delete the text elements straight away... You have to make changes like create a table..create a line type for the items and then put the fields in it.

For example in script you have line items like this right:

&var1&,,&var2&,,&var3&,,

Now, in smartform you have to put them in a table...under the cells...

Vishwa.

Vishwa.

former_member480606
Participant
0 Kudos

Hi Vishwa,

thank you for your replies:

I don't like to create a new print program because I want to use the standard program SAPFM06P and then pass tables to my smartform. My problem is where do I have to set my smartform?

In NACE transaction I set my smartforms but the system doesn't take it.

thanks in advance

gino

Former Member
0 Kudos

OK. in that case, copy the standard program to a Z program and comment all the open forms, write_forms used in the program,as these are used for scripts, but not required for smartform. Now, in the Tables tab in the Form Interface of the Smartform, declare tables whose data you are going to pass from the print program.

Now, for example itab in the print program has all the data you want to print in the smartform, then in form interface> tables tab>declare an internal table whose structure should be same as itab. Now, when you activate the smartform, it will generate an FM which can be taken from(in the Menu)> Environment>Function Module. Copy the FM and then call it in print program.

Also, check this thread on how to use SSF_FUNCTION_MODULE_NAME:

Vishwa.