Quantity Field Display in Sap Scripts
Hi,
I am displaying the quantity field in the sap script layout.But in the quantity field having 3 decimal places.
Ex: 3.400 is there i want to display 3.4
3.000 only i want to display 3
3.740 -
3.74 like that i want.
I want to omit the zeros after decimal places.
Please give me the solution.
Regards,
Jenny
As it is quantity field, it will print even the decimal points...U can try this...move the value to a char variable and use truncating to remove zeros by deleting them and use this value in ur script to print the value.
Similar Messages
-
Hi,
I am displaying the quantity field in the sap script layout.But in the quantity field having 3 decimal places.
Ex: 3.400 is there i want to display 3.4
3.000 only i want to display 3
3.740 -
3.74 like that i want.
I want to omit the zeros after decimal places.
Please give me the solution.
Regards,
JennyHi Janardhan,
Do one thing in your print program make us of following line of code
shift wl_local right deleting trailing '0'.
where wl_local will containing your quantity..
This will solve your prob...
Enjoy SAP.
Pankaj Singh. -
How to clear fields used in SAP SCRIPT
hi all,
i want to clear all fields which i have printed on my sap script.
i have passed the values to these fields by useing function module
'TEXT_SYMBOL_SETVALUE' in se38 abap program.
i have also used clear statement in my abap program to clear those fields but it cant working. is there any statement in SAPSCRIPT to clear fields.
if so then please give me its an urgent.
thanks in advance.
Vinod.hey,
I understand that in a text-symbol when u set the values once, then u print them. for the second time when u want to print with diff values, then it will automatically get refreshed when u open it again.
So use code like this.
PERFORM OPEN_FORM USING FORMNAME.
PERFORM WRITE_FORM USING TEXT_SYM.
PERFORM CLOSE_FORM
for the next run...
at this instant all the text elements will get refreshed.
PERFORM OPEN_FORM USING FORMNAME.
PERFORM WRITE_FORM USING TEXT_SYM.
PERFORM CLOSE_FORM
Cheers,
Sam -
ABAP QUERY PROGRAM OUTPUT SHOULD DISPLAY FROM SAP SCRIPT.
THIS IS MY URGENT REQUIREMENT ...
I DONT KNOW ABAP QUERY PROGRAM ..
PLEASE SUGGEST ME A WAY ON THIS ....
Functional requirements
Introduction
The wish of the customer is a printable customer overview. All desired fields will be shown in a new query called ZZADDRSS_CO. Double entries are taken for granted because of the data taken from the sales area and because of multiple contact persons. The customer accepts this. It should be made possible that the user creates and saves its own variant.
A second overview is needed, another ABAP will be developed for this requirement. This ABAP will show all the customer data and this list will have the possibility to be printed.
Solution
New Query ZZADDRESS_CO
The desired fields of attachment 1 need to be shown in the query.
The selection criteria are shown in attachment 2.
The column names of the additional data have to changed in the query.
Customer Overview.
Functional specification.
On behalf of this customer overview a standard SAP transaction will be used (transaction VC/2).This transaction will be extended.
The fields are shown on screen with the described headers. Printing of the overview will be done via SAP script. The script makes use of a fixed layout of the data.
The selection criteria are specified in attachment 2.
The layout of the customer overview and the SAP Script are specified in attachment 3.
Specification.
The next steps need to be performed.
1. A routine per infoblock need to be created in Include RV77UNNN. In this routine the data is retrieved and written down to the screen and script,
Example LST1_901 . In include RV77SNNN you can find the standard infoblocks.
2. Adapt via transaction SE16 table TFRM.
3. Create a new view in the customizing (sales and distribution- Sales support-sales summary-Assign Reporting Views).Assign the new view to the infoblocks.(Example view 001 is assigned to block 901).
4. In customizing it is not possible to assign the correct window and element to the infoblock .so this is done via SE16 in table T182A.
5. Adapt script. Copy script SD-SALES-SUMMARY to a Z-SALES_SUMM.
Assign this new version to the new view in customizing. Create in the main window the element who writes the data on behalf of the print.
Attachment 1 Desired fields
Header: Address
~ Customer number KNA1-KUNNR
~ Title KAN1-ANRED
~ Name1 ADRC-NAME1
~ Name2 ADRC-NAME2
~ Name3 ADRC-NAME3
~ Name4 ADRC-NAME4
~ PO Box ADRC-PO_BOX
~ PO Box POSTAL CODE ADRC-POST_CODE2
~ PO Box city ADRC-PO_BOX_LOC
~ Telephone no1 ADR2-TEL_NUMBER 1ST RECORD
~ Telephone no2 ADR2-TEL_NUMBER 2ND RECORD
~ Fax number1 ADR3-FAX_NUMBER 1ST RECORD
~ Fax number2 ADR3-FAX_NUMBER 2ND RECORD
~ E-mail ADR6-SMTP_ADDR
~ Search item ADRC-SORT1
~ Notes ADRT-REMARK
Header: control data
~ VAT registration number KAN1-STCEG
Header: Payment transactions
~Bank country key KNBK-BANKS
~Bank key KNBK-BANKL
~Bank Account number KNBK-BANKN
Header: Marketing
~ Industry key KNA1-BRSCH
~ Industry code 1 KNA1-BRAN1
~ Industry code 2 KNA1-BRAN2
~ Industry code 3 KNA1-BRAN3
~ Industry code 4 KNA1-BRAN4
~ Industry code 5 KNA1-BRAN5
~Annual sales, currency, year KNA1-UMSA1, KNA1-UWAER, KNA1-UMAH
~ Yearly no of employees, year KAN1-JMZAH, KNA1-JMJAH
~ Fiscal year variant KNA1-PERIV
~Legal status KNA1-GFORM
Header: Correspondence
~ Our account number at customer KNB1-EIKTO
Header: sales
~ Sales office KNVV-VKBUR
~ Customer group KNVV-KDGRP
~ ABC-classification KNVV-KLABC
Header: Invoice
~Tax classification KNVI-TAXKD
~Terms of payment key KNVV-ZTERM
~
Header: Contact Persons
~Title KNVK-ANRED
~Name KNVK-NAME1
~Advertising material KNVK-NMAIL
~Martial Status KNVK-FAMST
~Notes KNVK-PARAU
~Function KNVK-PAFKT
~Department KNVK-ABTNR
Header: Partnerroles
~Personnel Number KNVP-PERNR
~Name of employee PA0001-ENAME
Header: Additional Data
~Attribute 1 KNA1-KATR1
~Creation date KNA1-ERDAT
~Attribute 2 KNA1-KATR2
~Change date of field KNA1-KATR2 CDHDR-UDATE
~Attribute 3 KNA1-KATR3
~Attribute 4 KNA1-KATR4
~Attribute 5 KNA1-KATR5
~Attribute 6 KNA1-KATR6
Attachment 2 Selection fields
~Customer number
~Sales office
~Personnel Number
~Sales Organization (default NL01)
~Industry key
~Industry codes (1 till 5)
~ABC- classification
~Creation date
~Attribute 1
~Attribute 2
~Attribute 3
~Attribute 4
~Attribute 5
Attachment 3 Customer overview + SAP Script
Customer master data sheet: 11490 Page1
Requested by karen Dunnewold Date: 25.08.2004
Address
(Default SAP script ADDRESS statement)
Title
Name1
Street + number
PO Box city
Country
Search term: ADRC-SORT1
Telephone 1: ADR2-TEL_NUMBER 2: ADR2-TEL_NUMBER
Fax 1: ADR3-FAX_NUMBER 2: ADR3-FAX_NUMBER
E-mail: ADR6-SMTP_ADDR
Notes: ADRT-REMARK
PO BOX
ADRC-PO_BOX
ADRC-POST_CODE2 ADRC-PO_BOX_LOC
T005T-LANDX (T005T-LAND1 = ADRC-COUNTRY)
Control data
VAT registration number: KNA1-STCEG
Payment transactions
Country: KNBK-BANKS Bank-key: KNBK u2013 BANKL Bank account: KNBK-BANKN
Marketing
Industry KNA1-BRSCH Industry Description
Industry code1 KNA1-BRAN1 Industry Description
Industry code2 KNA1-BRAN2 Industry Description
Industry code3 KNA1-BRAN3 Industry Description
Industry code4 KNA1-BRAN4 Industry Description
Industry code5 KNA1-BRAN5 Industry Description
Figures
Annual Sales KNA1-UMSA1, KNA1-UWAER in KNA1-UMAH
Employees KNA1-JMZAH in KNA1-JMJAH
Legal status KNA1-GFORM description
Customer master data sheet 11490 Page 2
Requested by karen Dunnewold Date: 25.08.2004
Contact Persons
KNVK-ANRED
Mailings: KNVK-NMAIL Notes: KNVK-PARAU
KNVK-ANRED
Mailings: KNVK-NMAIL Notes: KNVK-PARAU
Correspondence
Our account number at customer KNB1-EIKTO
Sales
Sales office KNVV-VKBUR Description
Customer group KNVV-KDGRP Description
ABC-classify KNVV-KLABC
Currency KNVV-WAERS
Invoice
Terms of payment key KNVV-ZTERM Tax classification KNV1-TAXKD
Description
Partner (Leave SAP default)
Partnerrole Number Name
KNVP-PARVW KNVP-KUNNR NAME1
KNVP-PARVW KNVP-KUNNR NAME1
Additional data
Attribute1 kna1-katr1 Description
Attribute2 kna1-katr2 Description
Attribute3 kna1-katr3 Description
Attribute4 kna1-katr4 Description
Attribute5 kna1-katr5 Description
Attribute6 kna1-katr6 Descriptionhi narayana
i think u need to write a driving program and a provided with a smatform u sit along with the SD consultant.
ur further views can be shared.
Rgs,
Venkat. -
Item level display in SAP script
Hi All,
I am trying to show the line items of sales invoie in the invoice layout using SAP script. But it displays just one line item. It overwrites the same line on every call. How can I instruct it to print it on the next line. I've even tried printing the line using '/' (line feed) but to no effect.
Please help,
Regards,
MadhurHi Vinod,
I am doing the same thing as you suggested. Here's the code I am using. This is for the disclaimer text that is being picked up and consists of multiple lines.
SAP Script for window DISCLAIM->
/E DISCLAIMER
C1 Disclaimer
P1 &W_DISLINES&
Program Code ->
Print Disclaimer
LOOP AT I_T_LINES.
W_DISLINES = I_T_LINES.
PERFORM WRITEFORM USING 'DISCLAIMER' 'DISCLAIM'.
ENDLOOP.
FORM WRITEFORM USING VALUE(P_ELEM)
VALUE(P_WIND).
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = P_ELEM
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = P_WIND
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "WRITEFORM -
Currency field in PERFORM, -- SAP Script
Hi,
I am calling a zperform from SAP Script and sending two currency values as input and after doing subtraction , I want the result value from the Zperform.
When I send 1,000,000.00 as input to PERFORM. I am getting a dump when I try to assign the in_par-value to a currency field in FORM.
The error is "Unable to interpret "1,000,000.00 " as a number." Please let me know how to handle this case. I mean is there any converstion routine to convert the external currency value to internal format?You must remove the commas.
Warren -
Hi All,
I want to execute the sapscript form MEDRUCK.I want to check how the SAP Script form medruck looks like. I even check its print program but it is not executable program. Then how can I display its output ie how it look.
Thanks
harpreet
Message was edited by: harpreet SinghHi,
If you want to see the output of the form MEDRUCK..you need to execute the transaction with some billing Document ot invoice number.
Here for your understanding you can execute the transaction VF03 and give any billing document. Then goto Menu Billing document->Issue Output to->Printer. Here you need Output type to see the layout of the same. So pass the output type defined to this billing document. In order to see the output type..pass the billing document and press enter. In the menu Goto->header->output and see the output types defined for the same.
Once you pass the output type and click on print preview you will see the layout of that particular billing document.
For getting the Driver Program and output type you can goto table NACE and pass the form name and you get the program name and output typr for that form.
Regards,
Ram Mohan
Pls reward points if useful.. -
How to display in sap-script the data which is input in selection screen by the user.
Hii,
I want to display the data in sap-script that has been input by the user in selection screen.
Suppose the the user has done input for posting date from 25.1.2001 to 25.1.2005,what i want is to display this date in sap script.
How can i do it.
please help asap.
Regards.Hi,
If select-option name is s_erdat.
then from value will be s_erdat-low and to value will be s_erdat-high.
Arivazhagan S -
ALV: Quantity field displays both blank and 0 value.
Hi,
My ALV has a quantity field. The requirement is for the first time displaying the value of this column always blank but once user change it to 0, it should keep 0 value.
I implemented the first requirement by setting the property Display Leading Zeros in Formatting area to "Zeros as Blanks" for the corresponding attribute/node in context. The problem is whenever I key in 0 then enter --> the value of this field is always set back to null.
I have another solution is using type char instead of type quantity. But this is the last choice because I don't want to validate and make the char field works as the numeric field.
Please help.
Thanks,
Khanh
Edited by: khaliachika on Jul 16, 2010 12:36 AMHi Anu,
One question from my side.
U have displayed the ALV.In that grid u have quantity field.U have changed the value of that field to 45.
When u press enter the value has been changed to .045.Is this u r problem.
U can do onething anu.
Declare one varaible with the local field.
Pass u r quantity field value into that variable.
While displaying thriugh SET_TABLE_FIRST_DISPLAY in your internal table pass this variable.
It will solve u r problem.I think.
Let me if yu have any problem
IF u want u can refer to the program BCALV_EDIT* in se38.
There also u have needful info
Thanks, -
Quantity field display only in ME52N
Dear Experts,
Our requirement is to restrict any change in PR qty through ME52N.
I have done the changes in field selection group ME52, but still the field is not in display mode.
Kindly siggest what all field selection groups involved when ME52N transaction is executed.
As per my understanding;
I checked AKTV-Optional,ME52-Display and NBB-Mandatory...result should be display but the result is still optional.
Also as per rule combination of display field with any other mode results display only(except suppressed).
Is it getting overruled through hard coded standard programs...kindly advise.
RegardsSAP-MM wrote:
Dear Experts,
> Our requirement is to restrict any change in PR qty through ME52N.
> I have done the changes in field selection group ME52, but still the field is not in display mode.
>
> Kindly siggest what all field selection groups involved when ME52N transaction is executed.
> As per my understanding;
> I checked AKTV-Optional,ME52-Display and NBB-Mandatory...result should be display but the result is still optional.
>
> Also as per rule combination of display field with any other mode results display only(except suppressed).
> Is it getting overruled through hard coded standard programs...kindly advise.
>
> Regards
hi,
please change in me52n not in me51.
and come to me52n
select other purchase requsion
given your requsion number and click on change / display option then it displiedin change mode
Thanking you. -
Standard text display in sap script
Hi Experts,
The standard text will be stored in Name = ORDCONF_TEXT_(sales org)_(distributionchannel)_(division)
Text ID = ZSD
Examples: ORDCONF_TEXT_4000_01_01 , ORDCONF_TEXT_4000_01_80 , ORDCONF_TEXT_1000_01_01.
Requirement :
The print program /form will need to pick up the appropriate standard text based on the Sales Area (combination of Sales Org / Distribution Center / Division) of the sales order [VBAK-VKORG / VTWEG / SPART], provided a standard text has been created for that Sales Area. Itu2019s not required that every sales area have a standard text, so if one is not found, this step should be skipped and the rest of the print program executed.
The new text should print after 2 blank lines after the Printable Notes text (which is after the line items and the Total Net Price prints).
The font should be the same size as the Printable Notes, but bolded rather than italicized.
The text should print in the same columns as the Printable Notes currently print in (Material Description / Scheduled Ship Date / Quantity) .
So the logic i have used is this below code:
I used a subroutine in the layout of the main window becoz i need to print it in the main window below after 2 blank lines of line items.
This is logic in the layout:
/: DEFINE &ORDCONF_TEXT& :='ORDCONF_TEXT_&VBDKA-VKORG&_&VBDKA-VTWEG&_
/: &VBDKA-SPART&'
/:PERFORM GET_OBJECT IN PROGRAM ZSDRP001_ORD_CONF_IRE
/:USING &VBDKA-VBELN&
/:CHANGING &ORDCONF_TEXT&
/:ENDFORM
/:INCLUDE &ORDCONF_TEXT& OBJECT TEXT ID ZSD PARAGRAPH A1
I called this subroutine in the print program:
Logic in the print program:
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
But still its not getting printed .Plz tell me where i am going wrong.
Thanks,
Suman
Edited by: Rob Burbank on Nov 13, 2009 4:18 PMHi sirisha
I have clarification
The standard text will be stored in Name =COCDADDR_TEXT_(paying company)
Text ID = ADRS
Examples: COCDADDR_TEXT_0500, COCDADDR_TEXT_1000, COCDADDR_TEXT_2401,COCDADDR_TEXT_2405,COCDADDR_TEXT_7600,COCDADDR_TEXT_7700
Requirement :
The print program /form will need to pick up the appropriate standard text based on the paying companycode of the REGUH-ZBUKR, provided a standard text has been created for that paying companycodes. Itu2019s required that every sales area have a standard text (ADDRESS of company), so if one is not found, this step should be skipped and the rest of the print program executed.
I need the steps similar to ur issue.
Thanks in advance
Senthilkumar -
Deleting zeros in Quantity field in Sap Script
Hi,
I have a Quantity(FKIMG) field in Invoice (Sap Script), It is showing as 1.000 ,I want to show this as 1 ,By removing all zeros and point.
how can i do this in Script?
Thanks in advance,
fractalHi,
Use <b>TRUNC</b> "Interger part of x
ex:
TRUNC(FKIMG) to get integer part of the quantity.
or
declare an integer variable and pass quantity to this variable , use the same variable for print.
Regards
Appana -
Adding Fields to New Hire SAP Script, Text ID PAMA
Hi there,
I have successfully created a sapscript email to be sent via Dynamic Actions for the notification of New Hires and Terminations. This has been accomplished via feature M0001 (we have created two new features u2013 M00NH & M00TM), dynamic action (T588z), Business Workplace, distribution lists, etc. All are working correctly, and an email is being generated and forwarded to appropriate parties.
Now we have been asked to add extra fields to the SAP Script text for New Hire and Termination. These are text fields for Employee Group, Employee Subgroup, among others.
Our syntax has been set up as follows:
&'Employee Group: 'P0001-PERSG(02)&
&'Employee Group Text: 'T501T-PTEXT(20)&
&'Employee Subgroup: 'P0001-PERSG(02)&
&'Employee Subgroup Text: 'T503T-PTEXT(20)&
For the New Hire action, we are getting the Employee group and Employee subgroup codes to display but we are NOT getting the Employee Group or Employee Subgroup texts to display. To confuse the issue, we ARE getting these text fields to display for the Termination script. Our ABAP'er is also having difficulty determining how to bring in these fields to the New Hire script.
We have researched this website have tried the instructions given by one user..... which states that we needed to go to our SAPscript text and make the following changes:
" To get other HR data into your standard text (from SO10):
Insert > Symbols > Program symbols (now you'll see a list of print programs, and i guess this is where the ABAP grabs the data).
Highlight the one for HR Master data, and click the DDIC button.
Double click the table you need data from (e.g P0000, P0001 or P0002).
Finally select the field you want."
I have done this, but when I get to the Program symbols, I do not see a print program for HR Master Data. I only see RPUCOB02 - Processing of Qualifying COBRA Events and Letters & SAPMSSCE - SAPscript Standard Text Maintenance.
I tried to use the RPUCOB02 and inserted the text for Employee Subgroup as a test. But it did not work as the text still did not display.
The other oddity is that for the Termination sapscript text, the Employee Group and Employee Subgroup text displays correctly. To test our syntax, we then connect the Termination sapscript text to the 'New Hire' action and reran the New Hire action. The Employee Group and Employee Subgroup text fields then disappeared. So it worked when the action was a termination, but did not work when the action was New Hire.
The difference between these two actions is that the feature for the sapscript generation for New Hires is being generated upon saving of I0002 (which is created AFTER I0001) - we needed the Employee's name in the text. For the Termination action, the feature is set to generate the mail upon saving of I0001. This is the only difference between the two. But as I need the employee name to display, it seemed the best approach. I did try to generate the New Hire sapscript after saving of I0008, but had the same problem.
Does anyone know how we can add text fields to our New Hire sapscript text and actually get them to display? We would also like to display the Org Unit text (&'ORGEH_2nd_TEXT(40)&) or even the Supervisor (from the OM relationship). But they do not display for the New Hire sapscript either. And our ABAP'er is able to insert the Supervisor logic, but the field still does not display.
Thanks very much for any help.
Edited by: Cathryn Westgarth on Nov 17, 2009 6:23 PM
Edited by: Cathryn Westgarth on Nov 17, 2009 6:24 PMI am going to repost this question to the HR forum as it may be more appropriately an HR forum questions.
Thanks
Cathryn -
The next page in not displaying in the SAP Script
Hello,
I had one SAP script. There were two pages in the script and i mentioned the next page also for the FIRST and NEXT page as
First - next page --> next
and next -- next page --> next
Now, I am having 3 items which needs to be gets displayed using SAP script.
The first two items displayed properly but the third item is not getting displayed, as of the size of main window is small.
Whenver i am increasing the size of main window the third item gets displayed propely.
But i guess whenever the data will get overflow in main window then it should gets displayed in the next page, this is not happening in my case.
Can any one tell me, how to display the next page whenver the data will get overflow in main window?
Please help me with this.
Thanks in advance
Regards,
DarshanaHi Darshana,
if you use text element for the item output, you will need same text element on NEXT page. Check for Typos. Switch on sapscript debugger and check what happens.
Regards,
Clemens -
Text display issue in SAP script
Hi All,
I have developed a sap script (Invoice) which is having a Footer window.
The footer window should display page number and some text (address of company). The address data is stored in an internal table and the same will be made to display in sap script.
Now my problem is the address data is displaying correctly in the second page. But no data is getting displayed in the first page. If the Invoice is of single page, the address data in Footer window is getting printed properly.
The problem occurs only, when the invoice is of multiple pages....
What might be the problem in this regard...??????
Please help me, as this bug need to be fixed as early as possible....
Regards
PavanThe size of MAIN and FOOTER window are not getting truncated. Both window have designed properly.
In the first page, the footer window will display Page No data and the address data will be invisible. In debig mode, i can see the value of address will be passed to text symbols of sap script.
There are no conditions set in the sap script for Footer window.
one more observation is that after execution (at print preview screen), if i go back and again click for print preview, the address data is getting printed in the first page...!!!
Regards
Pavan
Maybe you are looking for
-
FaultPolicy is not working for mediatorFault.
Hi , I am facing issue in invoking faultPolicy for MediatorFault. Below are fault-bindings.xml and fault-policies.xml fault-bindings.xml <?xml version="1.0" encoding="UTF-8"?> <faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel
-
Info record mandatoey in scheduling agreement
CoulD some tel me how to make the inforecord mandatory in scheduling agreement . though i have controlled or made the inforecord feild as required in field selection it is not asking for inforecord while creating scheduling agreemnt could some one te
-
Downloading XI pro trial when I'm already running XI standard?
Hi, I currently own XI standard (Windows 8) and would like to try XI pro, primarily for pdf --> ppt. However, when I try to download the XI pro trial the download assistant states that I'm already running a more updated version and the XI pro trial d
-
Sequence/Procedure does not work
Hello guys! I have a huge question. I am working on a database that someone developed a couple of years ago. Today I stumbled across a table and tried to insert data via an Apex frontend. The data was saved properly into the respective Table "TBL_TOT
-
How much should I offer Cascade Capitol ?
Hi all, If you could give me some advise. CASCADE CAPITOL purchased my debt from Santander for a car repo and referred it to this collection agency (Stoneleigh Recovery Associates ),the amount owed is 7700.00 . I am still within the SOL for anoth