SAP Script Query
Hi All,
There is an requirement to create an table in the form where there are around 5 columns.
This table displays the data from an internal table.
No. of records can vary.
I have two queries:
1)Is it possible to draw vertical line to separate the columns dynamically depending upon the records fetched.
2)After each line item(record) that is fetched, the other record should be separated by a horizonatal line.There is a column for description which can vary inlength.So is it possible to do something like a 'Wrapping the text in excel'.
Thanks And Regards,
Rupesh.
HI rupesh,
1. )Is it possible to draw vertical line to separate the columns dynamically depending upon the records fetched
| = pipe
at the most u can use some symbol like PIPE
(But as u require, ie, like GRID
its not possible)
2. After each line item(record) that is fetched, the other record should be separated by a horizonatal line.There
For that u just have to use UNDERLINE
3. There is a column for description which can vary inlength.So is it possible to do something like a 'Wrapping the text in excel'
Directly its not possible,
ie . for that particular cell, word wrapping takes place !
regards,
amit m.
Similar Messages
-
Tool for sap script form designing
Friends,
Is there any any tool or transaction available through which we can design the sap script form.
Apart from menu painter in se71.
Thanks,
Albert.Hi Albert,
Check these links,
http://www.sap-img.com/sapscripts.htm
Sapscript
http://help.sap.com/saphelp_47x200/helpdata/en/d6/0db74a494511d182b70000e829fbfe/frameset.htm
sap-script query
Hope this is useful. Reward if helpful.
Regards,
Tushar -
Dear Experts,
In printing of MB23n , I need to print STR_SUPPL1 and STR_SUPPL2 from ARDC table. I already have ADDRNUMBER.
We are using SAP SCRIPT.
Please guide me how to insert the following query in SAP SCRIPT.
tables: lfa1, adrc.
data: begin of it_test occurs 0 ,
str_suppl1 like adrc-str_suppl1,
str_suppl2 like adrc-str_suppl2,
end of it_test.
select str_suppl1 str_suppl2 into corresponding fields of table it_test from adrc addrnumber = lfa1-adrnr.
Please hekp me to solve the issue.
Thanks in advance.
Regards
AnkurHi,
In Script - Page Window -
PERFORM <form name> IN PROGRAM <Program Name>
USING &VBDKR-VBELN_VL&
USING &VBDKR-VBELN_VAUF&
CHANGING &ADDR_LINE1&
CHANGING &ADDR_LINE2&
CHANGING &ADDR_LINE3&
CHANGING &ADDR_LINE4&
CHANGING &ADDR_LINE5&
ENDPERFORM
&ADDr_line1&&ADDR_LINE3& &ADDr_line2&
&ADDR_LINE4&
PROTECT
&ADDR_LINE5&
ENDPROTECT
In SE38 - Create Prog as Subroutine pool --> Write a Form with same name
SELECT SINGLE adrnr INTO twlad-adrnr FROM twlad WHERE werks = lips-werks AND
lgort = lips-lgort.
IF sy-subrc = 0.
CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
EXPORTING
address_type = '1'
address_number = twlad-adrnr
IMPORTING
address_printform_table = lt_address. -
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. -
please give the step by step details . SAP Script and SAP Query .
Hi Krishna,
<b>SAP query</b>
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=how%20to%20create%20sap%20query&cat=sdn_all
<b>SAP Scripts</b>
http://www.sap-img.com/sapscripts.htm
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
http://www.sap-basis-abap.com/sapabap01.htm
http://www.sap-img.com/sapscripts.htm
http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
Regards
Aneesh.
~~The best practice is to search the forum before posting a thread. -
Hi friends
What's the functionality of 'CONTROL_FORM' function module in SAP-scripts.
Thanks
SurenHi
CONTROL_FORM function
The CONTROL_FORM function module alows you to create SapScript control statements from within
an APAB program.
Syntax:
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command =
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Example:
Protecting the text element ITEM_LINE
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'PROTECT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
TEXELEMENT = 'ITEM_LINE'.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'ENDPROTECT'. -
Hello Everyone,
I am a newbie to SAP Script.I have to find a way to display an alternative payee addrees on the cheque output, if specified in the vendor record rather than the actual vendor's address, Can any one please help me out here,Thanks.At the moment it is just printing the each line of the address as a separate fields from the REGUH table.Hi ,
You need to create a new Subroutine type program, with name which you will be giving in your PERFORM statement.
For that you write the PERFORM statement in IF and ENDIF statement.
Ex:-
/: IF ®UH-LIFNR& EQ ' '.
/: PERFORM ....
code
/:ENDPERFORM
address fields of Alternate Payee
/: ENDIF
Regards
Bala Krishna
Edited by: Bala Krishna on Sep 5, 2008 1:23 PM -
I have a normal report output with a field "HIDE" to make it interactive. When clicked on any of the values of this field(s), the value (say VBELN) has to be passed to SAP SCRIPT and all the SELECT QUERIES needs to be written in SAP SCRIPT to get the desired output.
How do i get this feature?hi
U have to call perform in SAP script '/:'.
In that u have to pass parameter and get(changing) parameter.
FORM get_value TABLES inpar STRUCTURE itcsy
outpar STRUCTURE itcsy.
u have to read value from inpar and append value in outpar into the form.
Hope thiw will be useful.
regards
vinod -
How to print line item 2times in two different main window in Sap Script
Hi,
I am designing check printing form using Sap script. I need to print line items 2times in different 2main window.can yu pls explain how print like this.
JKi cud not get ur query..pls elaborate
-
Sap script form perform statement
HI ALL ,
CAN ANYONE HELP ME WITH SAP-SCRIPT FORM AND PERFORM SYNTAX. THAT IS WHEN U NEED TO ADD A FIELD TO AN EXISTING SAPSCRIPT, BY USING AN EXTERNAL SUBROUTINE.
i NEED THE SYNTAX BOTH FOR PERFORM AND ENDPERFORM STATEMENT AND ALSO THE FORM STSEMENT. ANOTHER TRHING IS IF CAN LET ME KNOW HOW TO USE DEFINE STATEMENT IN SAPSCRIPT. WHATS ITS USE AND IS IT RELATED TO THE QUERY ABOVE.
else,
U PLZ LET ME KNOW ANY HELPFUL LINKS TO GO THROUGH.
THANLS IN ADVANCE,
ANUPMA.Hi anupma,
1. while calling subroutines from sapscripts,
there is a special technique,
which has got its own limitations.
2.
FORM abc
TABLES
in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
ENDFORM.
3. The perform in se38 program should be of the
above format only.
4. We cannot pass internal tables.
5. Rather we need to pass
VARIABLE NAME
VARIABLE VALUE
(see the structure of itcsy in se11)
6. In this form, we have to read
the internal table in_tab
to capture the variable name and its value.
7. Similary, to return the values,
we have to put one record (for each variable)
in out_tab.
regards,
amit m. -
How to change the font size in sap scripts?
hi friends,
i had a query regarding to SAPSCRIPT.
how to change the font size of a text in sap script form in which it should change it dynamically.
is it possible to change the font size dynamically in scripts.
one more query regarding to this only.
i need to get the hard copy of a script .
what is the transaction code to get the hard copy?Hi venkata,
You can specify the font size either in the Character format or pharagraph format.
You better decide it according to your requirement. If you want to apply the same font size for the entire form create the Paragraph format and give the paragraph format in the default paragraph format.
If you want to apply that to limited text, then create character format.
The process of creating it is just after going inside paragraph format click EDIT-> Create Element and give the font size.
This applies for character format also.
Reward points if useful.
Thanks,
karthik -
Text translation in sap-script
Hi
I am using sapscript for PO printing . I need to translate some texts in the PO depending upon the language . I have the translated text in all languages . How to go about it . putting condition on language would be a tedious job . Is there some better way to perform these translations .
Awaiting response . Would reward any sort of help .
ThanksInstead Create A TExt Element and euate the text element to the corresponding field which u r transferring to the S. Script.
Suppose ur displaying : &VA_DESCRIPTION& in the SAP Script...
Then Do like this:
VA_DESCRIPTION = TEXT-001.
Now using TRANSLATION TOOL LOAD THE TEXT-001 for all useful languages with the description u already have...
Hope this is clear... For any query write back to me....
Lastly: Don't forget to give POINTS.. as we are putting extra efforts by seating late in office and trying to help u...
Darshan Patel -
How to test the performed SAP SCRIPT
Hi friends can any one help for
how to test the performed SAP SCRIPT. What are the necessary codes or anything else for performing itPraveen,
Can you be much clear with your query? What do you mean by performing? Do you mean how to execute it ?
Regards,
Vinod. -
Need to restrict the form into one page with out second page in SAP Script
Hello Friends,
I have a query in SAP script form, I had created one form for confirmation request for FI, i had copied the standard form F130_CONFIRM_01 and made the changes as per the requirements and checked in f.17 which was perfect. I had removed all the lines except wherever the changes i had made in the form.
Here iam getting one problem, when iam printing the confirmation request it should give me in one page but here iam getting two pages of which one page iam getting the complete information and the second page iam getting the empty page.
It should not give the second page. i also checked by giving the condition if &page& eq 1 but no difference iam getting two pages.
Pl. let me know how to solve this problem since this is very very emergency issue.Hi Mark,
If i am not wrong is this Tcode for customer/vendor balance confirmation? In the standard script that u mentioned, the first page id the letter, and the second page contains the balance sheet.You would not be able to restrict the blank pages from coming, coz there are in all three scripts configured for the TCode F.17, so the blank pages are bound to come, even if the conditions for pages are maintained. I have faced similar problems in my development too....
Thanks & Regards
Nayan
SAP Consulatant.
Reward with points if useful -
Report ,sap-script,sreen painter,DDIC
Hi all ,
I have some query to ask.
1)How to transport sap-script.
2) print program of sap script are client-dependent or client-independent.
3)Database tables ( on se11) are client-dependent or client-independent. ( is sy-mandt will make dependent or independent)
4) how to create select-option on screen painter or with module pool programming.
5)performance tips while creating ABAP report.
6) How to generate new number whenever a new report is created.(e.g. when we create a customer or materia one new number ro name will be generated for customer or material).
points for all answers assured.
thanks.Hi Pillac,
Here is answers..
1)How to transport sap-script.
While creating sap-script form it will ask you for abap package (class), if you assign standard package then it will ask you for change request. After completing your development you need to release your request and transport across system.
2) print program of sap script are client-dependent or client-independent.
Print program is client independent.
3)Database tables ( on se11) are client-dependent or client-independent. ( is sy-mandt will make dependent or independent)
MANDT field indicates it is client dependent table.
4) how to create select-option on screen painter or with module pool programming.
Check out following link...
http://help.sap.com/saphelp_erp2005/helpdata/en/fc/eb2d81358411d1829f0000e829fbfe/frameset.htm
5)performance tips while creating ABAP report.
1. Do not use nested select statement.
2. Use joins if possible ( But with limited number of tables)
3. If you have more than 100-200 records do not use for all entries which degrades the performance.
4. Try to use primary keys while selecting data from tables.
5. If number of records too high in DB table and select is not on primary key...create secondary index with where clause..will imrpove performance.
6) How to generate new number whenever a new report is created.(e.g. when we create a customer or materia one new number ro name will be generated for customer or material).
Create Number Range. You can use function module GET_NEXT_NUMBER which will give you next number everytime whenever you execute it.
Cheers,
Nilesh
Message was edited by: Nilesh Kshirsagar
Maybe you are looking for
-
HT2311 How do I install a previous version of iTunes for MacBook Pro?
i'm trying to help out my friend who has recently purchased an old MacBook Pro ... he has a 2007 MacBook pro and everything works - done all updates etc ... BUT! (theres always a but isnt there ... ) I cant update the latest iTunes because the softwa
-
PC crashed, installed new HD, can't get songs
Our laptop crashed and required a new hard drive to be installed. I of course had to reinstall itunes and lost everything in my library. But I had music in my iphone from the previous computer. Now I cant get access to any of those songs. I can see t
-
I'm having problems with a PDF I'm generating, I'm using the presets, never have had the problem before, but some of the pages won't display, there's only a white page. Has anyone else had this problem before? How did you work around it? Thanks!
-
Digital signature on PDF file from C#
I want to add digital signature on PDF file from C# code. I understand from web that there are some third party license required, or I would need to use Adobe Acrobat to apply digital signature on PDF using acrobat APIs. What is the licensing mechani
-
WAP 121 support for RADIUS COA
Hi, I am looking into purchasing WAP121 AP product and understand it supports 802.1x RADIUS. For an intergration with NAC product from Bradford, I need to know if WAP121 supports RADIUS COA standard or at least there is a way to disassociate a client