Q

Printing multiple line items in a box for a purchase order

What could cause a box command to print line items only once instead of multiple times? Expert Mark Smithson surmises the answer.

I am working on a SAPscript (copied from medruck form). I have to print line items of a purchase order in boxes. Now my problem is I have written the following code, which is in main window, and text-element is under loop of ekpo table. The boxes are printing only once - this is not working for multiple line items.

ITEM_LINE_3F_PRICE(Text element) BOX XPOS '0.0' CM YPOS '1.0' CM WIDTH '1.5' CM HEIGHT 2 CM FRAME 10 TW BOX XPOS...

'1.5' CM YPOS '1.0' CM WIDTH '2.5' CM HEIGHT 1 CM FRAME 10 TW BOX XPOS '4.0' CM YPOS '1.0' CM WIDTH '3.0' CM HEIGHT 1 CM FRAME 10 TW BOX XPOS '7.0' CM YPOS '1.0' CM WIDTH '3.0' CM HEIGHT 1 CM FRAME 10 TW BOX XPOS '10.0' CM YPOS '1.0' CM WIDTH '3.0' CM HEIGHT 1 CM FRAME 10 TW BOX XPOS '13.0' CM YPOS '1.0' CM WIDTH '1.8' CM HEIGHT 1 CM FRAME 10 TW BOX XPOS '14.8' CM YPOS '1.0' CM WIDTH '1.5' CM HEIGHT 1 CM FRAME 10 TW BOX XPOS '16.3' CM YPOS '1.0' CM WIDTH '3.0' CM HEIGHT 1 CM FRAME 10 TW &EKPO-EBELP& &EKPO-EMATN& &EKPO-TXZ01& &EKET-EINDT& &EKET-UZEIT& &EKPO-MENGE& &EKPO-MEINS& &EKPO-KONNR&&EKPO-KTPNR&

As you have discovered the hard way, I would advise against having a BOX command in a conditional text element in a MAIN window. There are limitations on how this command works, particularly as relates to information which can print anywhere on a page. Generally, boxes belong either in a secondary window or in a default text element (i.e. at the top) of the MAIN window. I imagine you will need to redesign your form to accommodate these restrictions.

That being said, if you are determined to draw dynamic boxes in the MAIN window, take a look at SAP-provided print program 'PSFC_OBJECT_LIST' and SAPscript form 'PSFC_PRINT_LAY'. Here the print program tracks precisely where each text element begins and ends so that it can accomplish this, but it requires a rigidly built form. I'll leave it to you to decide whether the trade-off in design flexibility is worth it.

This was last published in January 2007

Dig Deeper on SAPscript and Smart Forms

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close