Application Development and Automation 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: 
Read only

script

Former Member
0 Likes
564

Hi ,

In script forms my problem is like this, when iam printing form with 2 line items( it is in main window) ,the totals and subtotals at the bottom are displaying perfectly( sub totals are given in footer window). If line items are '4 'than the subtotals part is printing in second page. What is the process to reduce the spaces between line items.

In form here for first line item they are printing some '%' calculations,For remaining line items there is no calculations. For that reason i dont need to reduce the space for first line item and i need to reduce the space to remaining line items .

Please can you help me in this.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
495

Hi,

Under each Line Item there will be some Condition Records which will be printed, ie. nothing but the data from KONV table.

So for some items they exist and some they may not be there.

Use the Paragraph format for printing these line itesm and put NO BLANK PAGE check in the attribute of that pragraph and use, so that if no data is there it will not take line space.

reward points if useful

regards,

ANJI

3 REPLIES 3
Read only

Former Member
0 Likes
496

Hi,

Under each Line Item there will be some Condition Records which will be printed, ie. nothing but the data from KONV table.

So for some items they exist and some they may not be there.

Use the Paragraph format for printing these line itesm and put NO BLANK PAGE check in the attribute of that pragraph and use, so that if no data is there it will not take line space.

reward points if useful

regards,

ANJI

Read only

0 Likes
495

This is main window which is having data to display line items.

*************************************************************

/E BOE_DETAILS

/* ,,,,,,,,,,,,,,,,,,A&PAGETOTAL1(CIZ)&,,B &DUTYRATCVD(CIZ)&

/* ,,C &cvdtotal1(CIZ)&,,D &ITEM_DUTY(CIZ)&UNIT CODE: &BEITM-MEINS(C)&

SF &IT_BEITM-DESCS(30C)&,,,,&BEITM-BOEITNO(CIZ)& ,,

= &BEITM-MENGE(C)&,,

= &BEITM-MATLDES(C)&,, &BEITM-CTHNO(C)&,, &BEITM-ASSVAL(CIZ)&,,

= &BEITM-DUTYRATBCD(CIZ)'%'&,, &BEITM-SYSVALUBCD(CI)&,,

/* Changes done by shaik.ali for CVD-16%

= &BEITM-CETNO(CIZ)&,, &VAR1(CIZ)&,,,,&'CVD -'VAR2(.0CIZ)'%'&,,&VAR3 >

= &VAR4(CIZ)&

/* End of changes

/* ,,,,,,,,&BEITM-MATLDES+16&

SF ,,,,,,,, &BEITM-MATNR(CIZ)&,,,,,,,,,,,,

/* &VAR5(CIZ)& commented for not displaying

/* Changes done by shaik.ali for EDU CESS-2%

= ,,&'EDU CESS -'VAR9(.0CIZ)'%'& ,,&VAR10(CIZ)&

/* End of changes

/* &BEITM-DUTYRATSAD(CIZ)&,,&SAD(CIZ)&

/* &VAR9&,,&VAR10&

/* &VAR7(CIZ)&,,&VAR8(CIZ)&

/* Changes done by shaik.ali for S&HE CESS-1% and for ADCD-4%

SF ,,,,,,,,,,,,,,,,,,,,&'S&HE CESS-'VAR15(.0CIZ)'%'& ,,&VAR16(CIZ)&

SF ,,,,,,,,,,,,,,,,,,,,&'EDU CESS -'VAR11(.0CIZ)'%'& ,,&VAR12(CIZ)&

SF ,,,,,,,,,,,,,,,,,,,,&'S&HE CESS-'VAR17(.0CIZ)'%'& ,,&VAR18(CIZ)&,,

&VAR21(CIZ)&

SF ,,,,,,,,,,,,,,,,,,,,&'ADCD -'BEITM-DUTYRATSAD(.0CIZ)'%'&,,,,

&VAR8(CIZ)&

/* End of changes

/E TOTAL

/* &BCDASSTOT(CIZ)&,,&DUTYRATCVD(.0CIZ)&% ,,

&Pcvdtot(CIZ)&,, &TOTDUTY(CIZ)&

/* &BATCVDTOT(CIZ)&,,&BEITM-DUTYRATSAD(.0CIZ)'%'&,&PSADTOT(CIZ)&

/* &DUTYPAID&,, &DUTYPAID1(CIZ)&

SF ,,,,,,,,,,,, -


,,,, -


,,,,,,,,,,

-


SF ,,,,,,,,,,,,&SALTOT(CIZ)&,,,,&SUBAMTBAS(CIZ)& ,,,,,,,,,,

= &SUBTOTDUTY(CIZ)&

/* &SUBTOTDUTY(CIZ)& "ON 120704,,,,,,,,,,,,&VAR14&

/* ,,,,,,,,&VAR14&

/E INTEREST

/: IF IT_BEHDR-ZZINTRST BETWEEN IT_BEHDR-BONDDAT AND BONDDAT1

/: AND IT_BEHDR-ZZINTRST <> 0

/* Added Interest 15% by shaik.ali

SF ,,,,,,,,,,,,,,,,,,,,,,,,,, Interest : 15% &IT_BEHDR-ZZINTR

SF ,,,,,,,,,,,,,,,,,,,,,,,,&IT_BEHDR-BONDDAT& to &bonddat1&

/* End of changes

/: ENDIF

***********************************************************

Please help me in this

Read only

Former Member
0 Likes
495

Hi Ali,

Try to this you can get the answer.

To calculate 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 whereever tat 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 it will be in footer window)

Then create subroutine pool program and you have to write the 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.

Rgds,