cancel
Showing results for 
Search instead for 
Did you mean: 

PO Print SAP scripts:Grand total field -- High priority

Former Member
0 Kudos

Hi experts

In a PO print out, For example in one line item ,I have conditions printed as below

Line iem 1.

Gross price -- 1000

VAT% 40

Service Tax -


123.36

Net. Incl. Disc. 1163.36

Line iem 2.

Gross price -- 500

VAT% 20

Service Tax -


61.8

Net. Incl. Disc. 581.8

Grand total----


1500

(desired tgrand total 1163.36+581.8)

I have many line items like this and the total of all conditions at individual line item printed is correct.

But at the bottom of the PO print, in the "Grand Total" the sum of only the Gross values is printed (Not the total of the Net. Incl. vlaues of line items).

I got info from our developer that we are using SAP scripts (not smart forms).

Please guide me if anyone has come accros a issue like this and got the answer. This is urgent.

Thank you

MRao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In script its not possible to find the total using any commands, Please calculate the total in the Print Program and print in the Script.

Bye

Answers (3)

Answers (3)

Former Member
0 Kudos

Try maintaining update indi 'S' for ffective price in PO pricing

former_member196280
Active Contributor
0 Kudos

To calculate grand totals and sub totals in sap scripts you have to use subroutines.

Say if you have to add the unit price (KOMVD-KBERT) then in the main window where ever that value is picked write this routine

/: DEFINE &TOT_PRICE&

/: PERFORM F_GET_PRICE IN PROGRAM <subroutine prog name>

/:USING &KOMVD-KBERT&

/:CHANGING &TOT_PRICE&

/:ENDPERFORM

Then write the variable where ever you want it to be printed (mostly grant total will be in footer window)

Then create subroutine pool program and you have to write the following code.

FORM F_GET_PRICE tables int_cond structure itcsy

outt_cond structure itcsy.

data : value type kbert.

statics value1 type kbert.

Read int_cond table index 1.

value = int_cond-value.

value1 = value1 + value.

Read outt_cond table index 1.

outt_cond-value = value1.

Modify outt_cond index 1.

ENDFORM.

I have given a rough example,

Note:Int_cond-value and outt_cond-value are characters.

Close the thread once your question is answered.

Regards,

SaiRam

Former Member
0 Kudos

Hi,

1.Just use the ITCSY structure .

2.Write a form routine using net price and changing the grand total.

3.Or if there is any chance to change the driver program,then write the form within that and execute.

4.Simillarly,you can proceed for the Gross and net totals.

Regards,

Shiva Kumar