Application Development 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: 

Printing PO Using SAPScript

Former Member
0 Kudos

Dear Members,

I am very new to ABAP and I have been asked to develop PO using SAP Script. Though I am able to call the supplier details & PO details in the form, but I am not able to call the materials details & Terms & Conditions in the form.

Someone please provide me the correct inner join code or tell me the website where I can found the examples regarding this.

I have used various database tables like: lfa1, ekko, ekpo & makt.

Waiting for your reply,

Regards,

Nishant

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Most of what you need some be in the standard form. Have you looked at the standard form and driver program?

The standard driver program is the function group MEDRUCK

Regards,

Rich Heilman

0 Kudos

Nishant,

Rich is correct. Try starting from the existing SAPscript and Print Program. This can be found from transaction SPRO.

Hit the "SAP Reference IMG" button and go to the following path:

SAP Customising Imp Guide->Material Management->Purchasing->Messages->Output Control->Message Types->Define Message Types for Purchase Order

This is the configuration settings for PO SAPscript.

When you hit the Execute button for this activity, a pop up window should come up. Double Click on the "Maintain Message Types for PO" option. Now you should see a list of "Output Types". The Output Type for PO is 'NEU'. Select this Output Type and click on the "Processing Routines" folder (this should be in the left hand side "tree" structure).

Now you should see that the Print Program (or driver program) is SAPFM06P and the subroutine within this Print Program that calls the SAPscript is 'ENTRY_NEU'. You can go to this program via SE80. The SAPscript is called 'MEDRUCK' and you can see it via SE71.

Would recommend using 'MEDRUCK' as a starting point. Copy MEDRUCK into your own SAPscript, and make sure that you change the config to look at your SAPscript instead of MEDRUCK.

This should get you started on the right track. Let us know if you need further info.

Cheers,

Pat.

Former Member
0 Kudos

Hi Nishant,

Rich and Patric are right, with their experience they are telling you the most important seceret of development in SAP environment (also applies to other environments). Use SAP standard as much as possible.

Other option you can try is called the preconfigured SAP SCRIPTS/ SMARTFORM available at -

https://websmp201.sap-ag.de/bestpractices

( Choose Corss-Industry Packages-> Pre-configured Smartform )

But I think Patric has given you enough details to start using standard solution that SAP provides.

Cheers,

Sanjeev