Thursday, May 3, 2007

Questions on PO SapScripts MEDRUCK

1. When do you modified MEDRUCK? ( IF I SAID I HAVE WORKED ON SCRIPTS).

Generally, we modify existing sap scripts provided by SAP rather than creating one. Unless you have to do something new for your client like Labels or Packaging card, etc., MEDRUCK is the form for PO.

2. I want to know the procedure to create a purchase order using MEDRUCK.
You don't create a PO using MEDRUCK. MEDRUCK is the form used to print a PO that has been created.

3. What are the usual changes to be done on MEDRUCK?
Goto SE71, there is an option in Utilities as COPY ffrom Source client (000). Copy the from MEDRUCK into a Zname form. The common changes wud b inserting a logo, using Std text for Terms and Conditions, alignment of windows as per client requirement, get xtra data if client is asking for somethign more.

4. How can I access my data from DB to SCRIPTS?
There are structures used in Scripts which hold the data entered by the user. These structures are used to get data from Database.

5. Please send me the one examples in full length.
Look at MEDRUCK form and it would have a print program. you can find in tcode NACE.

SapScript Question

1) How do you backup script layout sets?

2) What type of variables normally used in script to o/p data?

3) How do you use tabsets in layouts?

1) Use this Std program RSTXSCRP.

i) First Export to Presentation file(.doc).

ii) Whenever you need that Export into SAP.

2) Normally we call them as Program symbols. Those are defined in Driver program. We can use in Script as for exp. &itab-matnr& Other variables ---System symbols : ex &page& ---Std symbols : ---Text symbols :We define them in script editor itself. Ex : /: Define &mysymbol& = 'XX'

3) We can control the tab feed in a paragraph with tab positions. The tab stops us define in the paragraph format replace the tab spacing we defined in the header data of the form. However, this depends on the extent to which we have defined tab stops in the paragraph format. If there are fewer tabs in the paragraph formats than in the header data, the tab stops of the header data are used for the rest of the line.

Q: We get the total number of pages as expected by using 'SAPSCRIPT-FORMPAGES' in a duplex layout. In our case duplex case is always 'Terms & Conditions'. We do not want the number of pages as in duplex printing. What is the best possible solution?

A: On the Terms & Conditions page, Change the Page counter mode to 'HOLD' to keep the page counter from incrementing when you print the Term & Conditions.

Q: Can I Print a logo on an Invoice?


A: Save a Logo using Paintshop Pro or Corel Draw as Tiff file. Use RSTXLDMC to convert the logo to standard text in SapScript. When the program is executed, the path and file name have to be correctly specified.
Process could be like the following: Run RSTXLDMC Enter file name C:\MAIL\COMPLOGO.TIF Resolution for Tiff file Absolute X-position Absolute Y-position Absolute positioning Reserved height Shift to right UOM = CM Text title Line width for text = 132 Text name ZHEX-MACRO-COMPLOGO Text ID ST Text language = E Postscript scaling Width & Height according to PS scaling Number of Tiff gray levels (2,4,9) 2 Then Create a new window 'COMP' with attributes; Window COMP description Company Logo Window type CONST Left margin 7.00 CH window width 10.00 CH Upper margin LN window height 8.00 LN
Finally in the text element , mention /: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.
Please note that if object name is not indicated as 'ZHEX...', the logo may not be printed!
You will not be able to see the logo in a test print. The same will be printed in actual printout.
If you are using two logos in the same layout, the names of the logos should be unique. Say 'ZHEX-MACRO-LOGO1' and 'ZHEX-MACRO-LOGO2'. Else all the information will be overwritten.
If the logo is not EXACTLY TIFF 6.0, the same will not be printed.
See OSS notes 5995, 18045, 39031 for some inputs.

Details information about SAP Barcodes

What I need to do to print a barcode in sapscript?

A barcode solution consists of the following:
- a barcode printer
- a barcode reader
- a mobile data collection application/program

A barcode label is a special symbology to represent human readable information such as a material number or batch number
in machine readable format.

There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.

You can print barcodes from SAP by modifying an existing output form.

Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.

Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.

The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.

Not to fear though, there are two ways to get around this:
- You can have your IT department do some research -
most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
- Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes.
- Thirdly, you can buy a third party software like Barcode.dll and install on your frontend PC connected to the laser printer.

Now you have a barcode printed - what next?
Well there are two options, depending on your business requirements:
- You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
- Another solution is to use SAPConsole transactions
or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor.

These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated

Free Certification Material