cancel
Showing results for 
Search instead for 
Did you mean: 

invoice details display on the modified standard medruck script form

Former Member
0 Kudos

i have copied standard MEDRUCK form to z form and modified.

now i would like to display the tax details on the output of this form.

in me22n transaction, we have invoice tab which has tax code and details. how do i get these details on my script.

help requiredddd,,,

thanks in advance...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Krishna,

The tax code was stored in the table EKPO-MWSKZ.

If print program is custom then write the code in that or if it is standard one then use subroutine in your Zscript .

Thanks

Phani

Former Member
0 Kudos

my print program is standard 'sapfm06p'

please tell me how to extract details from database table from form level. i mean about subroutine.

how will it run. where am i supposed declare the variables.

any sample code for reference.

its urgent

thanks

Edited by: krishna chaitanya on Dec 24, 2007 12:59 PM

Former Member
0 Kudos

Hi Krishna,

Write the code in your script and in which window u want display.

In script

/: DEFINE &XEBELN& = &EKKO-EBELN&

/: DEFINE &XEBELP& = &EKPO-EBELP&

/: PERFORM yroutine IN PROGRAM ZSUB

/: USING &XEBELN&

/: USING &XEBELP&

/: CHANGING &XTAX&

/: &XTAX&

Cretae the ZSUB program

FORM yroutine TABLES inpar STRUCTURE itcsy

outpar STRUCTURE itcsy.

DATA : p_ebeln like ekpo-ebeln,

p_ebelp like ekpo-ebelp,

p_tax like ekpo-mwskz.

CLEAR inpar.

READ TABLE inpar INDEX 1.

MOVE inpar-value TO p_ebeln.

READ TABLE inpar INDEX 2.

MOVE inpar-value TO p_ebelp.

Select single mwskz from ekpo into p_tax

where ebeln = p_ebeln

and ebelp = p_ebelp.

CLEAR outpar.

READ TABLE outpar INDEX 1.

MOVE p_tax TO outpar-value.

MODIFY outpar INDEX sy-tabix.

ENDFORM.

Former Member
0 Kudos

Dear phani,

thanks a lot for your replies. but i am still having problem

i have tried the code you have given, but the value is not printed.

i have debugged using rstxdbug program the script.

the control is not shifting from perform statement in the script to the subroutine type program 'zsub'

I observed that no value is coming into &XTAX&

i have created zsub program of type subroutine.

is that fine.

what could be the reason,

please suggest.

Edited by: krishna chaitanya on Dec 24, 2007 3:57 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear phani,

thanks a lot for your replies.

Edited by: krishna chaitanya on Dec 26, 2007 5:32 AM

Former Member
0 Kudos

Hey,

u just copy the standard priont program and create a new custom program.

In the Print Program u have to check whether the Tax details are coming or not?

if it is coming means no problem. u can access directly.

Otherwise y should write a code for Tax details in the custom Print Program.

Hope it is enough for you.

- Selva