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

Print PO using Smartform

bzakaria
Participant
0 Likes
2,240

Hello,

In standard SAP we find in the edition of purchase orders the program 'SAPFM06P' and the sapscript 'MEDRUCK'.

In my case I would like to use a specific smartforms, and I am looking for how to find the equivalent of the program and the sapscript, especially the program and what do I have to change so that it is compatible with the smartform instead of the sapscript .

Stay Safe.

Hello,

In standard SAP we find in the edition of purchase orders the program 'SAPFM06P' and the sapscript 'MEDRUCK'.

In my case I would like to use a specific smartforms, and I am looking for how to find the equivalent of the program and the sapscript, especially the program and what do I have to change so that it is compatible with the smartform instead of the sapscript .

Stay Safe.

6 REPLIES 6
Read only

Sandra_Rossi
Active Contributor
0 Likes
2,053

Usually, SAP never maintains two identical things, so I think there's no existing Smart Form identical to MEDRUCK. You can create a smart form from scratch instead of MEDRUCK, but that will take you a lot of time. Alas, I recommend to continue with the SAPscript form MEDRUCK, copy it and adapt it.

Read only

Florian
SAP Champion
SAP Champion
0 Likes
2,053

This depends what kind of release you got and if you got best practise in your system. If you have the best practise installed you may have access to the namespace /KYK/... when I remember correct.

Otherwise you need to deliver a new form or even go direct to adobe.. which is in my eyes the better way.

And, before you ask, here are the names of the predelivered forms:

https://wiki.scn.sap.com/wiki/display/ABAP/IfBA+-+Standard+Driver+Programs%2C+Interface+and+Preconfi...

Read only

bzakaria
Participant
0 Likes
2,053

sandra.rossi I don't want a ready to use smartform, I can develop it. But I want to know what can I change in the standard program so that it can launch a smartform instead of the sapscript, and pass the order number to the smartform. because if I manage to pass the number of the order to a smartform and display it I can retrieve the rest of the data via select and display them.

Thanks!

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,053

If you want to launch a smartform instead of the sapscript, and pass the order number to the smartform, change the customizing in NACE from SAPscript MEDRUCK to your Smart Form Z.

Create your own Z "driver" program and subroutine with 2 parameters "display only?" (boolean ' ' or 'X' to know if it's to be printed or displayed/previewed) and "return code" (integer, return 0 if no error).

The other parameters are passed implicitly by simply declaring so-called "table work areas":

TABLES: NAST,                          "Messages
        *NAST,                         "Messages
        TNAPR,                         "Programs & Forms
        ITCPO,                         "Communicationarea for Spool
        ARC_PARAMS,                    "Archive parameters
        TOA_DARA,                      "Archive parameters
        ADDR_KEY.                      "Adressnumber for ADDRESS

(*NAST is optional, it's a copy of NAST)

For instance, the Smart Form name is TNAPR-SFORM (the one defined in NACE), the purchase order is in the 10 first characters of NAST-OBJKY.

Read only

krevuri
Explorer
0 Likes
2,053

Zakaria, do you have a limitation to not use Adobe forms?

Read only

bzakaria
Participant
0 Likes
2,053

Thank you for your help.

I did more research on the net, and I found a standard smartform in the SAP packages.

The smartform is: /SMB40/MMPO_L .