Calculation of total in sap script
Hi All,
Please help me out for this requirement.
I have an amount field reguh-rbetr. I need to show the sum of this field as TOTAL.
How can we do it? Please let me know. Is there any function in the script itself or do we need to calculate it in the program? Pl gimme example code.
Regards,
Priya
Hi
see the sample codes of the Subroutines and do accordingly
How to call a subroutine form SAPscripts
The Form :
/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
REPORT zkrpmm_perform_z1medruck .
DATA : BEGIN OF it_input_table OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
déclaration de la table output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
FORM CDE_CENT
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table INDEX 1.
MOVE it_input_table-value TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX 1.
output[] = it_output_table[].
ENDFORM.
/: PERFORM
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
Example:
In script form
/: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
/: USING &EKKO-EKORG&
/: USING &EKPO-WERKS&
/: USING &EKKO-EKGRP&
/: USING &EKKO-BSTYP&
/: CHANGING &COMPNAME&
/: CHANGING &SENDADR&
/: CHANGING &INVCADR&
/: CHANGING &COMPADR&
/: CHANGING &COVERLTR&
/: CHANGING &SHIPADR&
/: CHANGING &REMINDER&
/: CHANGING &REJECTION&
/: CHANGING &POSTADR&
/: CHANGING &LOGO&
/: ENDPERFORM
In program
FORM Read_texts - To extract the standard texts from the table *
FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA : L_EKORG TYPE EKORG,
L_WERKS TYPE WERKS_D,
L_BSTYP TYPE BSTYP,
L_EKGRP TYPE BKGRP.
READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
CHECK SY-SUBRC = 0.
L_EKORG = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
CHECK SY-SUBRC = 0.
L_WERKS = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
CHECK SY-SUBRC = 0.
L_EKGRP = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
CHECK SY-SUBRC = 0.
L_BSTYP = IN_PAR-VALUE.
CLEAR Z08M1_ORG_TEXTS.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = L_BSTYP.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = SPACE.
ENDIF.
READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SENDADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'INVCADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COMPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REMINDER'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REJECTION'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'POSTADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'LOGO'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
REPORT ZMPO1 .
form get_freight tables in_par structure itcsy out_par structure itcsy.
tables: ekko,konv,t685t.
data: begin of itab occurs 0,
ebeln like ekko-ebeln,
knumv like ekko-knumv,
end of itab.
data: begin of itab1 occurs 0,
knumv like konv-knumv,
kposn like konv-kposn,
kschl like konv-kschl,
kbetr like konv-kbetr,
waers like konv-waers,
kwert like konv-kwert,
end of itab1.
data: begin of iout occurs 0,
kschl like konv-kschl,
vtext like t685t-vtext,
kbetr like konv-kbetr,
kwert like konv-kwert,
end of iout.
data v_po like ekko-ebeln.
read table in_par with key 'EKKO-EBELN'.
if sy-subrc = 0.
v_po = in_par-value.
select
ebeln
knumv
from ekko
into table itab
where ebeln = v_po.
if sy-subrc = 0.
loop at itab.
select
knumv
kposn
kschl
kbetr
waers
kwert
into table itab1
from konv
where knumv = itab-knumv and
kappl = 'M'.
endloop.
loop at itab1.
if itab1-kposn <> 0.
select single * from t685t
where kschl = itab1-kschl
and kappl = 'M'
and spras = 'EN'.
iout-vtext = t685t-vtext.
iout-kschl = itab1-kschl.
iout-kbetr = itab1-kbetr.
iout-kwert = itab1-kwert.
append iout.
clear iout.
endif.
endloop.
sort itab1 by kposn.
loop at iout.
sort iout by kschl.
if ( iout-kschl eq 'GSDC' OR
iout-kschl eq 'GSFR' OR
iout-kschl eq 'GSIR' ).
at end of kschl.
read table iout index sy-tabix.
sum.
write:/ iout-kschl,iout-vtext,iout-kwert.
out_par-name = 'A1'.
out_par-value = iout-vtext.
append out_par.
out_par-name = 'A2'.
out_par-value = iout-kwert.
append out_par.
endat.
endif.
endloop.
endif.
endif.
endform.
IN THE FORM I AM WRITING THIS CODE.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:ENDPERFORM
&A1&
&A2&
This Code is to be written in the PO form under ADDRESS window.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:DEFINE &A3& = ' '
/:DEFINE &A4& = ' '
/:DEFINE &A5& = ' '
/:DEFINE &A6& = ' '
/:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:CHANGING &A3&
/:CHANGING &A4&
/:CHANGING &A5&
/:CHANGING &A6&
/:ENDPERFORM
&A1&
&A2&
&A3&
&A4&
&A5&
&A6&
Regards
Anji
Similar Messages
-
This is regarding totals and sub totals in sap-scripts
Hi to all...............
1...How to print totals and subtotals in sap-scripts? where we have to code the logic.what sort of logic is needed to print the same?
regards,
swaminath.Hi
HI,
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.
To know more, have a look at this thread ..
Re: SAP Script: Display Total calculated on page 2 in page 1
<b>Reward if usefull</b> -
Calculate sub totals in SAP Script
Hi Friends, In Sapscript, I want to print as follows. Please help.
Empno Name Dept. Salary
A1 AAAA DP01 1000.00
A2 BBBB DP01 1500.00
2500.00
A3 CCCC DP02 2000.00
A4 DDDD DP02 2200.00
4200.00Hi
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.
PLZ REWARD POINTS -
How to print the Totals in SAP Scripts..?
Hi,
I have an SAP Script layout. Currently I am displaying the Line items in the layout. The new requirement has come up to display the TOTAL of the amount value in the layout at the end of the line items. Can someone tell me how to display the Sum of the Amount value at the end of the Line items in an SAP Script.
The Print program for this layout is standard program. Can this be handled within the layout..? Someone please provide me some sample code if available.
Thanks in advance.
Best regards,
Paddu.Hi,
Thank you for your reply.
My Standard print program doesn't provide the total value. Could you please tell me where exactly we need to write the logic in the Layout. I mean, do we need to write under separate element..? and in the External subroutine, how would be the logic. It would be greatful if you provide some sample code.
Thanks & Regards,
Paddu. -
Calculation in header in sap script!
friends...
i have designed a form z_pm_common..which i have copied from standard.pm_common. i have made some changes to the layout.
now at the header i have a field :
DURATION OF JOB :&AFVGD-ARBEI& &AFVGD-ARBEH&
AFVGD-ARBEI IS WORK DURATION.I.E 6.3
AFVGD-ARBEH IS UNIT. IN HOURS.
THE WORK ENTERED IN IW33 ARE 1.0 , 2.0 , 6.3 AND UNIT IS H(hours)
WHEN IAM USING &AFVGD-ARBEI& &AFVGD-ARBEH&
IAM GETTING ONLY THE LAST WORK I.E ( 6.3 H ).
WHT I WANT TO DO IS CALCULATE 1.0 + 2.0 + 6.3 = 9.3. AND I WANT THE UNIT TO BE IN MINUTES. I.E THE O/P SHOULD BE LIKE 09:03 M(MINUTES).
NOW HOW DO I MAKE THIS POSSIBLE ALSO HOW DO I PERFORM SUBROUTINE IN THIS CASE..PLZ TELL ME THE COMPLETE STEPS WITH CODING.
I GUESS IT WOULD BE PERFORM Z_PM_COMMON IN PROGRAM ZPMINCLUDE USING &WHAT& CHANGING &WHAT?&
THEN IN SUBROUTINE IT WOULD BE
FORM Z_PM_COMMON WORKCONV_UNIT
TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
NOW WHT DO I DO....
PLEASE SEND ME THE COMPLETE CODE....WHICH WORKS.......I WOULD BE GREATFULLL.
I'LL GIVE U FULL POINTS IF I GET THE RIGHT SOLUTION..PLEASE HURRY.
REGARDS
ESSAM ([email protected])Hi
You can try the following
Code in Sapscript
PERFORM Z_PM_COMMON IN PROGRAM ZPMINCLUDE USING &AFVGD-ARBEI& CHANGING &AFVGD-ARBEI& &AFVGD-ARBEH&..
&AFVGD-ARBEI& &AFVGD-ARBEH&.
code inside the perform
data : temp type AFVGD-ARBEI,
value type AFVGD-ARBEI.
clear temp.
FORM Z_PM_COMMON tables int_cond structure itcsy
out_cond structure itcsy.
Read int_cond table with KEY name = AFVGD-ARBEI.
clear value.
value = int_cond-value.
temp = temp + value.
Read out_cond table with KEY name = AFVGD-ARBEI.
out_cond-value = temp.
Modify out_cond index 1.
Read out_cond table with KEY name = AFVGD-ARBEH.
out_cond-value = 'M'.
Modify out_cond index 2.
ENDFORM.
If your query is resolved kindly close the thread and award points
cheers
shafiq -
PO Print SAP scripts:Grand total field -- High priority
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
MRaoTo 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 -
Hi All,
I am modifying a sap script.
when i open the PC editor in sap script (where i can find PERFORM statements), i dont find the page with signs " /: ".
Instead i am observing plane white screen with PERFORM statements.
what might be the reason for this..????
PavanHi,
You have to WRITE PERFORM statements in the script explicitley for your requirement, when you wants to get some extra data displayed on your script output.
They are not predefined in script.
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.
regards,
Anji -
Calculation of values in a dunning form (SAP Script)
Hi Experts!
I want to add values to a sum (dunning-amount + dunning-fee + interest) in a dunning form (SAP Script; Z150_DUNN_02).Therefore I'm using a subroutine (Z_FI_KX_DUNN_02_INTEREST) to summarize. Problem is the format of the output-field &Z_FAEBT&. It's not similar to field &MHNK-FAEBT& which was formerly printed (without calculation of interest and dunning-fees.
/: DEFINE &Z_FAEHW& := &MHNK-FAEHW&
/: DEFINE &Z_ZINHW& := &MHNK-ZINHW&
/: DEFINE &Z_MHNGH& := &MHNK-MHNGH&
/: DEFINE &Z_FAEBT& := &MHNK-FAEBT&
/: PERFORM ZFAEBT IN PROGRAM Z_FI_KX_DUNN_02_INTEREST
/: USING &Z_FAEHW&
/: USING &Z_ZINHW&
/: USING &Z_MHNGH&
/: CHANGING &Z_FAEBT&
/: ENDPERFORM
/: ENDIF
A3 &MHNK-WAERS& &Z_FAEBT(C)&
It would be fine to get a hint how to format the field &Z_FAEBT& correctly. Must be done in the subroutine Z_FI_KX_DUNN_02_INTEREST by a special WRITE-command? Is it possible to add these values only in the form?
Thanks for support!
Regards, Berndhi!
I defined the field like you said! After moving this field to a numeric field to add the different amounts the
following error occurred:
Runtime errors CONVT_NO_NUMBER
Exception CX_SY_CONVERSION_NO_NUMBER
Occurred on 16.06.2009 at 15:15:25
Unable to interpret " 1.316,59" as a number.
Definition:
FORM zfaebt TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
TABLES: mhnk.
DATA: z_faehw_num LIKE mhnk-faehw,
z_zinhw_num LIKE mhnk-zinhw,
z_mhngh_num LIKE mhnk-mhngh,
z_faebt_num LIKE mhnk-faebt.
DATA: z_faehw TYPE string,
z_zinhw TYPE string,
z_mhngh TYPE string,
z_faebt TYPE string.
statement:
READ TABLE in_par WITH KEY 'Z_FAEHW'.
CHECK sy-subrc = 0.
z_faehw = in_par-value.
z_faehw_num = z_faehw.
I suppose a type-conflict.
Regard, Bernd -
System symbol for total number of pages in SAP Script
Hello All,
I need to display the total number of pages in a SAP Script. Say there are 4 pages and I want to display "Page 1 of 4" at the footer of first page.
Is there any system symbol to get the total number of pages in SAP Script?
Many thanks in advance for your help.
Regards
Indrajit ChakrabortiHi,
In the Footer window, use this fields
&Page& of &SAPSCRIPT-FORMPAGES&
&PAGE& --> Current page No
&SAPSCRIPT-FORMPAGES& --> Total No of pages Regards
Regards
Sudheer
Message was edited by:
Sudheer Junnuthula -
Find total no of pages in a sap script
Hi,
How do i find the no of pages that is generated in SAP script, with out generating a spool.
thanks.Dear friend
new system symbols (note upper case) were therefore introduced:
&SAPSCRIPT-FORMPAGES&
Total page number based on the current output layout set:
&SAPSCRIPT-JOBPAGES&
Total page number based on all output layout sets created with the function modules OPEN_FORM, START_FORM .. ENDFORM, START_FORM .. END_FORM, ..., CLOSE_FORM
Examples:
Page &PAGE& of &SAPSCRIPT-FORMPAGES(C)&
Specifies the current page number and total page number. The additional specification (C) outputs the symbol in a compressed form, that is the leading blanks are omitted in the 4-character output (default).
Number of all output pages: &SAPSCRIPT-JOBPAGES(C)&
Outputs the total number of output pages. Caution: When using this symbol, all output pages must be held in the main storage so that the total page number can be inserted at the end of the output. Larger outputs can affect performance. -
How to print a window (ex:total)only after end of main window in SAP Script
How to print a window(ex: total) only after end of main window in SAP Script
Thank you.Create a total window and place it after your main window, get the number of lines in your main window and place counter
Ex,&SAPSCRIPT-COUNTER_1(+)&,
IF SAPSCRIPT-COUNTER_1& EQ <number of lines in main window>
**print total
ENDIF.
Regards,
Sairam -
How to create table in the sap script
Hi,
How to create a table in the sap script layout, i Have to use table in the main window with 7 columns. can any one send sample code.
How to calculate the number of line items which are displaying in the main window, if the number of line items are exceed in the main window then the amount has to be calculate and print as "BALANCE FORWARD" and the next page had to be displayed as "CARRY FORWARD" that amount. if this is the last page not subsequent page the amount had to be calculated the carry forward amount and total amount and print as "TOTAL AMOUNT". i am creating the new layout and the program is the standrad driver program i have to use and i have to use the standard Text elements only, can any one help me on this issuehi
good
there is no "pattern" option in SAPscript. All you have at your disposal are the following SAPscript commands: BOX, POSITION and SIZE. Not only are these commands both confusing and tedious to implement, they also are limited in what they can achieve. For instance, although you can suppress a box during printout (by making it conditional), there is no simple way to adjust it dynamically instead. Thus, to divide sequential line items, you may wish to use an underline (ULINE) or simply white space.
thanks
mrutyun -
Hi,
I'm using standard program for my Purchase Order calculation in SAP Script in 4.6B. this is the stucture of my program
ZIND_MM_PO(main Program) => INCLUDE ZFM06PE02_IND(one of the includes) =>Form entry_neu(one of the forms inside the include)=>Z_ME_PRINTPO(one of the function modules inside the form) =>vt_atotal(one of the varables used for total calculation inside the FM)
i need to print the vt_atotal variable in my PO(which is the sum of all tax values which is calculated based on some condition types).
i've tried taking out the variable by assigning it in the export variable.
and in the editor screen of the script i've calle the particular perform Form entry_neu using the variable vt_atotal.
I'm not getting the value.....
the problem is... it is having the value inside the function module but not bringing it outside...
is there any other way to print the variables in my PO output?
thanks in advance
JegadeshHi
It appears that you have copied the STd driver program of SAP SAPMF06P into Zprogram and you are using
Have you attached the std one in NACE tcode for the Output type NEU against the form ZMEDRUCK (Copy of MEDRUCK) correctly.
I think you are not using external subrotuine PERFORM in the script?
If you wrote the code correctly for the Total it will come into script
Check where the data of that code is coming into script? I mean in which TEXT ELEMENT is triggering for that code
you have to write under that TEXT ELEMENT only in script.
Regards
Anji -
Where do we find a box command in sap script
Hai,
where do we find a box command in sap script, how to create box command ,
its urgent help outHi
SAPScripts
POSITION WINDOW
SIZE WIDTH '160' MM HEIGHT '140' MM
BOX FRAME 10 TW
Box
BOX HEIGHT '11' MM WIDTH '160' MM FRAME 10 TW INTENSITY 35
linessssssss
BOX XPOS '20' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
BOX XPOS '45' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
BOX XPOS '80' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
BOX XPOS '120' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
Boxes, Lines, Shading: BOX, POSITION, SIZE
Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.
The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.
Syntax:
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
BOX Command
Syntax
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
Effect: draws a box of the specified size at the specified position.
Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT, and FRAME, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter as a percentage between 0 and 100.
XPOS, YPOS
Upper left corner of the box, relative to the values of the POSITION command.
Default: Values specified in the POSITION command.
The following calculation is performed internally to determine the absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
WIDTH
Width of the box. Default: WIDTH value of the SIZE command.
HEIGHT
Height of the box. Default: HEIGHT value of the SIZE command.
FRAME
Thickness of frame.
Default: 0 (no frame).
INTENSITY
Grayscale of box contents as %.
Default: 100 (full black)
Measurements: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period as the decimal point character. See also the examples listed below.
Units of measurement: The following units of measurement may be used:
TW (twip)
PT (point)
IN (inch)
MM (millimeter)
CM (centimeter)
LN (line)
CH (character).
The following conversion factors apply:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = height of a character relative to the CPI specification in the form header
1 LN = height of a line relative to the LPI specification in the form header
/: BOX FRAME 10 TW
Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
/: BOX INTENSITY 10
Fills the window background with shading having a gray scale of 10 %.
/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line across the complete top edge of the window.
/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line along the complete height of the left hand edge of the window.
/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
POSITION Command
Syntax
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).
Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
XORIGIN, YORIGIN
Origin of the coordinate system.
WINDOW
Sets the values for the left and upper edges to match those of the current window (default setting).
PAGE
Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
/: POSITION WINDOW
Sets the origin for the coordinate system to the upper left corner of the window.
/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
SIZE Command
Syntax
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).
Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
WIDTH, HEIGHT
Dimensions of the rectangle or line.
WINDOW
Sets the values for the width and height to the values of the current window (default setting).
PAGE
Sets the values for the width and height to the values of the current output page.
/: SIZE WINDOW
Sets WIDTH and HEIGHT to the current window dimensions.
/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
/: POSITION WINDOW
/: POSITION XORIGIN -20 TW YORIGIN -20 TW
/: SIZE WIDTH +40 TW HEIGHT +40 TW
/: BOX FRAME 10 TW
A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
Regards
anji -
Use of IF statement in SAP Scripts
Can u tell me how to use IF statement in SAP Scripts.
The problem is
if &sy-tabix& eq '1'
total
else
total1.
endif.
this sy-tabix is not workingi think sy-tabix will not work here....
do like this..
data : vtabix type i.
loop at itab.
vtabix = sy-tabix.
write_form...for the text element..
endloop.
in form layout
/: if &vtabix(c)& eq 1
/:endif
regards
shiba dutta
Maybe you are looking for
-
Memory item as shift registers
Hello, I am new in LabVIEW Programming. Can I use memory item to make a large array of shift register inside a SCTL in LabVIEW FPGA? Large array of shift register consumes a lot of slices when i compile it. Can data be read and written(in different a
-
New custom field in MCVBAK not available for selection in RSA5
I added a custom field to the communication structure MCVBAK. When I go to RSA5 and select the Maintenance button to select it, it is not visible in the list. Do I need to do something other than add to MCVBAK to make it available for selection? Th
-
Get rid of the skin for DW flv embed
Using DW CS4... So embedding FLV files is really easy in DW. I just need to get rid of the skin!!! How do I do that? And I'd prefer to NOT convert the FLV to an SWF because then the whole thing needs to download before it starts playing....
-
Where is the link for downloading LR6
How can I download LR6 - not CC.
-
in the pivot view i have a requirement where the country name should be displayed for each row rows measures sales country sta