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: 

problem in PO SAP Script, producing a PDF format.

Former Member
0 Kudos

Hi,

Description: We have developed a Purchase Order script. Both the Print Program and SAP Script are customised i.e., we are no longer using the standard MEDRUCK. The print preview is fine and when we take a print out the output looks good.

Problem: When the output type is changes to External Send using the Messages tab in the transaction ME23N, the output is given to a PDF file. In this output the vertical lines are not coming properly. The vertical lines are printed using the VLINE statement of sap script.

Solution Required for: Could any one please tell me why are we getting this problem and a possible solution for this.

Code:

M9   &VLINE&,,&GT_EKPO-EBELP(Z)&,,&VLINE&,,<TX>&GT_EKPO-IDNLF(C14)&</>    
=    ,,&VLINE&,,<TX>&GT_EKPO-TXZ01(C40)&</>,,&VLINE&,,&GT_EKPO-MENGE(C.0)&
=    ,,&GT_EKPO-MEINS(3)&,,&VLINE&,,
=  &GT_EKPO-NETPR(9.2)&                  
=    ,,&VLINE&,,&GT_EKPO-NETWR(9.2)&,,&VLINE&                            

Thanks and Regards,

Raghavendra Goutham.

NOTE: Helpfull answers will be rewarded definitely.

5 REPLIES 5

former_member480923
Active Contributor
0 Kudos

Hi

What i can suggest from here without getting a look at the code within the SAPScript you can use the POSITION command with in the SAPScript for getting the exact location of the box, otherwise replace the vline command with BOX command which will be i think best solution for the problem.

Anirban

0 Kudos

its advisable to use BOX commands for vertical lines rather than using sy-vline.. sy-vline generally gives problems wen we use different outputs or outputs in diff printers and the like.

Regards,

Bikash

former_member181962
Active Contributor
0 Kudos

Hi,

What is the value stored in VLINE? Is it sy-VLIne?

Try giving Sy-vline in place of Vline. Or try giving syst-vline.

Regards,

Ravi

Former Member
0 Kudos

Hi,

Best practise is 1st you FRAME the window with boxes.........

Example.....

/* BEGIN OF CHANGE LDEEPAK 09/12/2005.

/: IF &VBDKR-VBTYP& = 'O' OR &VBDKR-VBTYP& = 'S' OR &VBDKR-VBTYP& = '6'.

/: BOX YPOS '0.0' CM WIDTH '25.4' CM HEIGHT '0.85' CM FRAME 4 TW

/: BOX YPOS '0' CM XPOS '4.4'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW

/: BOX YPOS '0' CM XPOS '8.35'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW

/: BOX YPOS '0' CM XPOS '11.6'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW

/: BOX YPOS '0' CM XPOS '19.65'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW

B <K>CUSTOMER NO.</> <K> CONTRACT NO. / SALES ORDER NO.</>

= <K> ORIGINAL INVOICE NO.</> ,,<K> CUSTOMER PO.</>

= ,,,,<K>TERMS</>

/: BOX YPOS '3.25'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8

/: BOX YPOS '5.1'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8

/: BOX YPOS '6.95'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8

/: BOX YPOS '8.85'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8

/: BOX YPOS '10.6'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8

Like this you can give commands.

Later you can code for getting the values in to window.

Here while populating the values you need to use TABS to place the value in correct position.

Thanks.

If this helps you reward with points.

Message was edited by: Deepak333 k

Former Member
0 Kudos

Hi,

Thanks for your esteemed replies. I think i haven't explained my problem well. In the "Messages" push-button in the Appliation Toolbar in ME23N transaction when ever i am creating a message with output type 5 the Print Preview is not proper and when the output type is 1 the print preview has no problem.

We are using TIMES font by default. Is it the font problem. Any input in this regard is highly appreciated.

Thanks and Regards,

Raghavendra Goutham P.