SAP Script & Dialog programming
Hi,
How Can u pass data to SAPScript other than using function modules?
How can u pass data from programs to screens in dialog progarmming?
Thanks in advance,
K P
Hi KP,
U can use form routines instead of using FMs to pass the data in Script layoutset.
For Ex:
u can write the ligic in Program-->
FORM XXXX(form name) TABLES INPUT STRUCTURE ITCSY
OUTPUT STRUCTURE ITCSY.
Script-->
/: DEFINE &XXX_XXXXX& = ' '.
/: PERFORM XXXX IN PROGRAM PROGNAME
/: USING &XXXX_XXXXX&
/: CHANGING &XXX_XXXXX&
/: ENDPERFORM
Hope it'll be helpfull.
Cheers.. ByE....suresh
Similar Messages
-
List of standard sap scripts/print programs in SAP MM and SD modules ??
Hi,
I have worked in medruck only. Can anyone give me a list of other standard sap scripts/print program names in SAP MM, FI/CO and SD modules, which often needs to be modified by the client ?
thankspress f4 in SE71
then press application heirarchy, expand the modules which ever u want.
regards.
santhosh reddy
Reward if useful -
Reg: SAP Scripts abap program
Hi experts,
i have requirement in QM report i need to show some additional fields in print out ,
here i know the form name but i don't no from which program in SAP Script form fetching values can any one suggest how to find out programs for SAP script form.
i know inside of SAP script we can c perform action but in my case there is no perform action written in script,
they are directly using call function open form in pgm .
Regards
Srinivasan.R
Moderator Message: Please search for available information before posting.
Edited by: kishan P on Jun 3, 2011 11:41 AMHi,
Your question is not very clear....
but if you want to Spell out a Number (Amount in your case) you can use the function Module
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = (Amount to be printed)
CURRENCY = ' '
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = (Amount in words)
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
Reward if useful !!
Regards,
Gaurav -
I CANNOT RUN ANY OF THE CODING ...........
hi
this is an ex.. but u definitely need to go through the links
REPORT ZPSAPSCRIPT.
TABLES : EKKO,
EKPO,
KNA1,
USR01,
MARA,
MAKT.
DATA : BEGIN OF ZOPTION.
INCLUDE STRUCTURE ITCPO.
DATA : END OF ZOPTION.
PARAMETERS: P_EBELN LIKE EKKO-EBELN,
P_EBELP LIKE EKPO-EBELP.
CLEAR EKPO.
SELECT SINGLE * FROM EKPO
WHERE EBELN = P_EBELN AND
EBELP = P_EBELP.
CLEAR KNA1.
SELECT SINGLE NAME1 FROM KNA1
INTO KNA1-NAME1
WHERE KUNNR = EKPO-KUNNR.
CLEAR MAKT.
SELECT SINGLE MAKTX FROM MAKT
INTO MAKT-MAKTX
WHERE MATNR = EKPO-MATNR AND
SPRAS = SY-LANGU.
CLEAR USR01.
SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.
ZOPTION-TDDEST = USR01-SPLD. "Output device (printer)
ZOPTION-TDIMMED = 'X'. "Print immediately
ZOPTION-TDDELETE = 'X'. "Delete after printing
ZOPTION-TDPROGRAM = 'ZPQRPRNT'. "Program Name
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = ' '
ARCHIVE_PARAMS = ' '
DEVICE = 'PRINTER'
DIALOG = ' '
FORM = 'Z_TESTSCRIPT'
LANGUAGE = SY-LANGU
OPTIONS = ZOPTION
IMPORTING
LANGUAGE = SY-LANGU
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADER'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'HEADER'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'MAIN'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'FOOTER'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'FOOTER'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
UNOPENED = 1
OTHERS = 2.
also you can check at
http://help.sap.com/saphelp_47x200/helpdata/en/d6/0dc169494511d182b70000e829fbfe/frameset.htm
http://www.sapmaterial.com/sap_scripts.html
regards
asha -
Problems with SAP Script print program
Hi,
I have the following scenario:
I have a workflow which prints a sapscript with data stored in the workflow container.
The workflow method 'executeform' populates a selection table and submits it to the print program using:
SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table
This print program then populates the form with data and calls the OPEN_FORM/WRITE_FORM/CLOSE_FORM FM's.
My problem is that some of the variables in the workflow container are CHAR255, when these get moved to the selection table (seltab-low) they get truncated as seltab-low is a CHAR45. Is there a way round this??
This is the first time I have used sapscript, I notice that the variables printed on the form correspond to the parameters defined in the Print Program. I assume therefore that this is why the
SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table
has been used and why the OPEN_FORM/WRITE_FORM/CLOSE_FORM was not coded directly in the workflow executeform method.
Any guidance on how to proceed with this would be appreciated.
Many Thanks,
PaulHi Paul,
In general, in the statement
SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table.
sel_table is an internal table with the structure RSPARAMS.
This variant allows you to set the names and contents of the parameters and selection options dynamically at runtime.
You can use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table seltab with the structure RSPARAMS. By using SUBMIT ... WITH SELECTION-TABLE seltab, you can then pass these values on directly.
The work around for the variables that cannot be passed using the submit statement, can be exported to Global memory ids and the same can be retrieved in the print progra.
The syntax for the export and import statements is something like this.
TABLES INDX.
TYPES: BEGIN OF ITAB3_TYPE,
CONT(4),
END OF ITAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
F1(4), F2 TYPE P,
ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH NON-UNIQUE
DEFAULT KEY INITIAL SIZE 2,
WA_INDX TYPE INDX.
Fill the data fields before CLUSTR
before the actual export
INDX-AEDAT = SY-DATUM.
INDX-USERA = SY-UNAME.
Export der Daten.
EXPORT F1 FROM F1
F2 FROM F2
ITAB3 FROM ITAB3
TO DATABASE INDX(ST) FROM WA_INDX ID INDXKEY.
*********************************************************TYPES: BEGIN OF TAB3_TYPE,
CONT(4),
END OF TAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
TAB3 TYPE STANDARD TABLE OF TAB3_TYPE WITH
NON-UNIQUE DEFAULT KEY,
WA_INDX TYPE INDX.
INDXKEY = 'INDXKEY'.
IMPORT F1 = F1
F2 = F2
TAB3 = TAB3 FROM DATABASE INDX(ST) ID INDXKEY
TO WA_INDX.
Regards,
Ravi -
F110_PRENUM_CHCK(SAP SCRIPT)
Hi,
For the form F110_PRENUM_CHCK(SAP SCRIPT) Print Program is RFFOUS_C.What is the Check Amount Field in this Form and Direct Deposit Amount Field name in this Form and also needText Element names For this Fields.
Thanks in Advance.Hi,
Iam also getting the same error while going for cheque printing through F-58, here is the detail of error.
F0 251 In form F110_PRENUM_CHCK / window CARRYFWD , the element 635 (Carry forward below) is missing
F0 251 In form F110_PRENUM_CHCK / window MAIN , the element 610-C (Text-C) is missing
F0 251 In form F110_PRENUM_CHCK / window MAIN , the element 615 (Heading) is missing
F0 251 In form F110_PRENUM_CHCK / window MAIN , the element 620 (Carry forward above) is missing
F0 251 In form F110_PRENUM_CHCK / window MAIN , the element 625 (Line items) is missing
F0 251 In form F110_PRENUM_CHCK / window MAIN , the element 630 (Total) is missing
F0 253 Output of the relevant forms is defective
Kindly guide me step by step how to over come with this problem/error.
Regards,
Amitabh -
F110_PRENUM_CHCK Form(SAP SCRIPT)
Hi,
For the form F110_PRENUM_CHCK(SAP SCRIPT) Print Program is RFFOUS_C.What is the Check Amount Field in this Form and Direct Deposit Amount Field name in this Form and also needText Element names For this Fields.
Thanks in Advance.Hi Madhavi,
Thanks For your Reply.Suppose if it is a Direct Deposit(Not Check Amount).Then in which field the Direct Deposit amount is stored? -
Hi All,
I am creating one report form using SAP Script, it is a replacement of standard SAP Script and which uses standard driver program. I am getting one dump while running SAP Script, it shows like "variable with name 'XXX' has not been used in so and so window".
In that window there is a code block like,
/: IF XXX == 'yes'
/: ENDIF
As I dont want this block I have commented this like,
/* IF XXX == 'yes'
/* ENDIF
Please let me know how to overcome this short-dump and provide solution why such dump is comming?
<<removed by moderator>>
Edited by: kishan P on Sep 13, 2010 4:19 PMHi,
This is one of the problem of Standard SAP Script driver program, we can over come easily, we no need to comment anything rather do follow the code you can easily solve your issue, I also face the same issue previously.
your code is,
/: IF XXX = 'Yes'
/: ENDIF
like this means, then change the code like this,
/: IF 1 = 2
/: IF XXX = 'Yes'
/: ENDIF
/: ENDIF
here, you didnt write any comment, also the code will never execute.
Why we are doing this means, driver program expects particular variable has to be used in particular window, but it never expects that variable has to be executed. By using this code you can use the variable also it will never be executed.
Hope it will be helpful. If you find any other solution please let me know, Thank you:) -
SAP SCRIPT F110_PRENUM_CHCK Form
Hi,
For the form F110_PRENUM_CHCK(SAP SCRIPT) Print Program is RFFOUS_C.What is the Check Amount Field in this Form and Direct Deposit Amount Field name in this Form and also needText Element names For this Fields.
Thanks in Advance.Hi Madhavi,
Thanks For your Reply.Suppose if it is a Direct Deposit(Not Check Amount).Then in which field the Direct Deposit amount is stored? -
Hi,
I am working on dunning. i need to find the driver program of the script. i went to insert->symbol->program symbol..theres no program..i went to TNAPR table and gave the form name..i get no entries...i went to NACE..but am not sure of the application area and the output type..can pls helpHi,
Plz check the following link :
PLS SEND ME A SAP SCRIPT DRIVER PROGRAM.........
Hope it will help you.
Thanks & Regards,
Sarita Singh Rathour -
Spool - restrict multiple sap script layouts into a single spool
Hi Experts,
I am writing a Sap SCRIPT print program for multiple number of customers with different layouts. But i am getting seperate spools for different customers. There fore i need to print out all customers in a single spool.
Can some one help me how to do this?
Thanks
DanyOPEN_FORM and CLOSE_FORM function module are used to open and close spool. When you have single form to create document then we specify form_name in OPEN_FORM function module itself. However when we have multiple forms or same form needs to be called multiple times and all document needed in same spool then we use START_FORM and END_FORM to explicitly open and close form.
Call function module in this sequence
OPEN_FORM "without specifying any form name, this will open spool
START_FORM " with form name
END_FORM
START_FORM "with (some other) form name
END_FORM
CLOSE_FORM "close spool request -
Purpose of RSTXTRAN program for SAP-Script ?? ??
Purpose of RSTXTRAN program for SAP-Script ?? ??
when it is required to run that program ?Hi sarit,
Purpose of RSTXTRAN program for SAP-Script Transfer of SAP script Texts to a Correction.
The report RSTXTRAN allows a set of SAP script texts (or the text key) to be transferred to a correction or repair of the transport system. The name of the correction/repair can either be transferred as a report parameter, or the correction/repair can be selected later in a selection window. The text key can be qualified generically using the asterisk character (*).
When the report has been executed, the list of selected texts appears. Individual texts can be deselected in this list. When the function "Continue" is executed, the final list of texts which are to be transferred is displayed. The transfer of texts to the correction/repair can now be activated by the appropriate function, and must be confirmed in a dialog box.The requirements for this as follows.
There is a correction/repair in which the selected text keys can be entered, if it is not being processed. The report can only insert text keys in corrections or repairs, not however in transport requests. However, the objects contained in a correction can be transferred to a transport request with the correction and transport system transaction.
It should also be noted that the report selects texts in the current client, but that the transport system generally exports texts from client 000.
When the report has been executed,the output can be a list of the selected texts. Information about whether transfer to the correction/repair was possible is displayed for each text key.
Reasons for failed transfer include
o the correction/repair is currently being processed
o the correction/repair does not exist
For Example
All German standard texts with the ID ST, whose names begin with SAPSCRIPT, are to be entered in the correction B20K009999. The report parameters are then assigned values as follows:
o Correction: B20K009999
o Text object: TEXT
o Text name: SAPSCRIPT*
Thanks,
Usha -
In sap scripts how to display the driver program
Hi,
I Want to know the sap scripts How to display the output to driver programHi,
Go to NACE Transaction.
Select application for ex: if sales V1.
Click on output types.
Select the output type for ex : BA00
Double click on Processing routines.
There you can find the Driver Program name and Script/smart form name.
Reward if useful.
Thanks,
Raju -
Driver program for the Dunning letter SAP Script
Hello All,
Can someone please tell me how to find the "Driver program for the Dunning letter SAP Script". I checked the Transaction OB96 but I dont find any Dunning scripts here i.e., the standard Dunning letter SAP Script F150_DUNN_01.
Is there any Transaction like NACE of logistics for FI module to find the Driver programs. My requirement is to find the Driver program for the Dunning letter SAP Script and have a new Driver program instead of the standard SAP given driver program. Example is in transaction NACE we can change the driver program for Invoice like from RVADIN01 to ZRVADIN01.
Thanks and Regards,
SNK.Yes you can, using FIBF, change the FM associated with event 1720 like when SapScript is replaced with SmartForms. Look at [Define Dunning Forms (with SAP Smart Forms)|http://help.sap.com/saphelp_46c/helpdata/es/7d/c7a0a535e1d311ba4d0800060d888b/content.htm] for reference.
But notice
- PRINT_DUNNING_NOTICE call many FM of the same FG which share the same global data area.
- During following upgrades of your system you will have to manage a copy of standard.
Regards,
Raymond -
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.
Maybe you are looking for
-
New Blackberry, huge increase in data usage
Hi, After 2 years with a Blackberry 8520, which I just used to keep track of emails and browse occasionally, I have upgraded to a Blackberry 9720. With the 8520, my data usage each month never went above 33MB, so the advisor I saw at EE said that I
-
Adjava hangs while signing jar files in the middle of patching
Hi, While applying patch 8815204 (11g/11i interoperability patch) "adjava -mx512m -nojit oracle.apps.ad.jri.adjmx @c:\oracle\testappl\admin\TEST\out\genjars.cmd" hangs for hours. Even I tried with "adjava -mx512m -nojit oracle.apps.ad.jri.adjmx @c:\o
-
I must be doing something wrong because none of the Adobe software can open my RAW files.
None of the adobe software recognize the RAW files from my Nikon D7100. I had no problems opening raw files from my D5000. I even tried to convert them to DNG but that didn't work either. I have used Lightroom, Photoshop CC, Bridge, Photoshop Eleme
-
I've tried everything and nothing has worked. I love FireFox and hate Internet Explorer--please help!!!
-
Hi all, What I would like to do is create a shortcut that, when clicked, launches Safari with 5 specific tabs opened. Possible? If so, how, please? Thanks! CB