SAP Script help..pls
Hello Friends,
I want to display text with 132 charactors in form using this statement: &DEL_TEXT-TDLINE&
But currently the my form column can hold only 60 charactors in one line and remaining texts are overlaping in the same line. My question is how can I print remaining charactors in next line?
Please help me.
Thanks,
Shreekant
PH
PROTECT
ENDPROTECT
Hi,
Use
v_variable = wa_final-variable+0(60).
v_variable1 = wa_final-variable+61(60).
This will print first 60 characters in 1 line and rest in the next line.
regards,
pritha.
null
Similar Messages
-
Hi Experts,
I am printing 8 main windows in one page in a script. But the problem is whatever changes I make to one window it gets reflected in all the windows. So the allignment doesnt get proper at all for the printing. what is the resolution for this.Please help me out with.
Thank You.Please clarify your Question More, You are getting Problem in windows or in Pages.
check Utilities->Printing test.
Also,
Settings->form Painter->Tick Graphical form Painter->Remove tick from Graphical PC Editir=>continue
By this check the attributes and parametrs of all windows and pages -
SAP script help needed ..... urgent !!!
Hi friends,
I`ve assigned the script name and driver program in NACE tcode for ME21N transaction.
When I print preview from ME21N tcode and keep script debugging active it goes into debugging mode ...Here it shows script name same as what has been assigned in NACE but the contents which are being debugged are different than the actual script contents .. means the code which we can see while debugging the script are not matching with the code of the same named script in SE71.
Can anybody help me out regarding this issue .. ?
thanks .If your assignment is correct in NACE, and still if you face the problem.
1. As we know that scripts are language dependents, so please check while debugging in header of the screen ie., beside to layout set name you will find the language.
2. So, based on the language check your content.
Thanks -
How to use perform statements in sap scripts
how to use perform statements in sap scripts . and pls send me one progam for this
thnaks
rajaHi Raja,
<b>PERFORM</b> key work is used to include subroutine in sapscript form...
But the processing is lttle bit different form the one we use in ABAP.
Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
Check out the example below to see how this is used..
<b>Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
<b>Coding of the calling ABAP program:</b>
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this is clear to understand...
Enjoy SAP.
Pankaj Singh. -
Title should not appear in Ship to Address in SAP SCRIPT
Hi all,
Title Information should not appear in Ship to Address in SAP Script.
help me , what are the commands to be used in ADDRESS-ENDADDRESS.
Regards
R.RaguThats why I am asking you to not to print that PO tile field. Instead keep some dummy variable that does not have any value.
/: ADDRESS PARAGRAPH AS
/: TITLE &LFA1-ANRED&
/: NAME &LFA1-NAME1&, &LFA1-NAME2&, &LFA1-NAME3&, &LFA1-NAME4&
/: STREET &LFA1-STRAS&
/: POBOX &LFA1-PFACH& CODE &LFA1-PSTL2&
/: CITY &LFA1-ORT01&, &LFA1-ORT02&
/: POSTCODE &LFA1-PSTLZ&
/: COUNTRY &LFA1-LAND1&
/: REGION &LFA1-REGIO&
/: FROMCOUNTRY &T001-LAND1&
/: ENDADDRESS
in the above LFA1-ANRED will have some value right . so replace it with some other variable say v_dummy.
Reward points if useful.
Regards.
Nageswar -
Hi Friends,
I have a doubt in SAP SCRIPT..pls Clarify it..
i Got two times one and only first record while execute my Script... i don't know..
i i have done this without text element suppose if i am passing value with text element getting first record only ont time..
May i Know difference passing value with text element and without text element..
i have post my code also...
data: begin of itab occurs 1,
mandt like mara-mandt,
matnr like mara-matnr,
end of itab.
CLEAR ITAB.
select mandt matnr up to 7 rows from mara
into corresponding fields of table itab.
clear itab.
call function 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZS_SAP'
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at itab.
call function 'WRITE_FORM'
EXPORTING
ELEMENT = 'NAME '
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES = ITAB
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.
endloop.
call function 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.Your question can't be read. Please reformat your post, use PREVIEW before posting again. 2500 characters maxi.
Thx -
Hi
This is Lahari...Iam going to attend interviews...cud u pls give real time questions n answers on SAP Scripts? i didn't attend interviews before...I'd be thankful to u guys.
My id is [email protected]
Lahari.Hi Lahari,
Check these links.
http://www.sappoint.com/abap/ssintro.pdf
http://www.sappoint.com/abap/sscript.pdf
http://www.sappoint.com/abap/sscript.pdf
http://www.sappoint.com/abap/lsetssap.pdf
http://www.sappoint.com/abap/sscrtpex1.pdf
http://www.sap-img.com/sapscripts.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf
http://www.henrikfrank.dk/abapuk.html
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
http://www.sap-img.com/sapscripts.htm
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapuk.html
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://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
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://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
Hope this resolves your query.
Reward all the helpful answers.
Regards -
Hi all....... help in SAP SCRIPTS
pls help me out and tel me how to work with SAP SCRIPTS
i want complete detailed procedure for itHi Deepthi,
Sap Scripts can be created using the transaction code SE71.The Layout set consist of different elements like Pages, Windows, Page Windows, Character String and Paragraph. The contents to be displayed in the window are written in text elements. The Driver program should be created in SE38.The components of the driver program are
Table Statements- Here you will declare the table name from where the data has to be brought in.
Data Statements- Here you can declare the variables or the internal tables that you may use
Select Statements- After declaring the variables, internal table you use the select statement to select the required data from the table
Open_Form- After selecting the data you open the layout set in which you want to display the data. In the Open_Form Function you mention the layout set name open.
Write_Form- then you display the data in the layout set using the Write_Form function. Here you specify the Element Name and the window in which you display the data.
Close_Form- After displaying/Printing the Data you close the form. i.e. the layout set using the close form Function.
You can check this link to develop a simple sap script.
http://www.thespot4sap.com/articles/SAPscript_Introduction.asp
http://sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
Reward points if it is useful.
Thanks,
Geeta -
HI GURUS NEED HELP in CODING in SAP SCRIPT
Hi Gurus,
here i hav some complication for displaying data in output of a sap script form .In output I have to show characteristics(ysd-characteristics,,,, ysd is a customized tablehaving fields vbeln, matnr, posnr, characteristics......) of material with respect to sales document number(vbap-vbeln).
I am below SELECT statement for arry fetching----
select distinct
ysd~vbeln
ysdposnr ysdmatnr
ysd~characteristic
vbapposnr vbapmatnr
vbap~arktx
vbap~kwmeng
into corresponding fields of table itab1
from ysd_famd_chrctcs as ysd inner join vbap
on ysdvbeln = vbapvbeln
and ysdposnr = vbapposnr
where vbap~vbeln = p_vbeln.
For data to be write in the form's output im using below code
LOOP AT itab1.
PERFORM write_form USING 'ITEM_LINE' 'SET' 'BODY' 'MAIN'.
ENDLOOP.
using perform write_form i am calling function module " WRITE_FORM" for script.
After looping itab1 it is giving output like below.
-->>
Sr | MatNum | MatDesc | Charecteristics | Quantity
no | | | |
1 | 00000012 | CCslab | Moisture | 50
1 | 00000012 | CCslab | over size | 50
1 | 00000012 | CCslab | under size | 50
1 | 00000012 | CCslab | phos percnt | 50
1 | 00000012 | CCslab | chrome | 50
1 | 00000012 | CCslab | Ferrous | 50
but I want the output should be like below
-->>
Sr | MatNum | MatDesc | Charecteristics | Quantity
no | | | |
1 | 00000012 | CCslab | Moisture | 50
over size
under size
phos percnt
chrome
Ferrous
I tried using DELETE ADJACENT after PERFORM write_form USING 'ITEM_LINE' 'SET' 'BODY' 'MAIN'....... but it is deletin all characteristics from output.
I tried using below format ->>>
At new arktx
PERFORM write_form USING 'ITEM_LINE' 'SET' 'BODY' 'MAIN'.
ENDAT.
but it is keeping data upto arktx sfter that it is showing "*********" for characteristic field and all other remaining field.
I want to know what approach i should use before/after PERFORM write_form USING 'ITEM_LINE' 'SET' 'BODY' 'MAIN'.
to get my output like above
pls help...
Regard
Saifur rahamanThnx all for your kind co operation
i hav solved this problem just adding following code before ferform write_form using '' 'SET' 'BODY' 'MAIN'
DATA : lv_matnr LIKE mara-matnr.
DATA : itab2 LIKE itab1 OCCURS 0 WITH HEADER LINE .
DATA : itab3 LIKE itab1 OCCURS 0 WITH HEADER LINE .
DATA : index TYPE sy-index .
LOOP AT itab1 .
AT NEW matnr .
APPEND itab1 TO itab2 .
ENDAT .
ENDLOOP .
LOOP AT itab2 .
READ TABLE itab1 WITH KEY matnr = itab2-matnr .
IF sy-subrc = 0 .
index = sy-tabix .
index = index + 1 .
APPEND itab1 TO itab3 .
LOOP AT itab1 FROM index .
IF itab1-matnr <> itab2-matnr .
EXIT .
ENDIF .
CLEAR : itab1-posnr ,
itab1-matnr ,
itab1-arktx ,
itab1-kwmeng .
APPEND itab1 TO itab3 .
ENDLOOP .
ENDIF .
ENDLOOP .
REFRESH : itab1 .
itab1[] = itab3[] .
LOOP AT itab1.
PERFORM write_form USING 'ITEM_HEADER' 'SET' 'TOP' 'MAIN'.
SHIFT itab1-posnr LEFT DELETING LEADING '0'.
PERFORM write_form USING 'ITEM_LINE' 'SET' 'BODY' 'MAIN'.
ENDLOOP. -
Hi!
can any one help me regarding SAP SCRIPT. i unable to write a print program for sap script . can any one can send me sample code using ITCSY structure.
Thanks in advance.
Thanks & Regads,
DurgaPrasad.kHi,
refer this to write print program:
<b>The Print Program</b>
Structure of a print program
OPEN_FORM function
CLOSE_FORM function
WRITE_FORM
START_FORM function
END_FORM function
CONTROL_FORM function
The print program is used to print forms. The program retieves the necesary data from datbase
tables, defines the order of in which text elements are printed, chooses a form for printing and
selects an output device and print options.
<b>Function modules in a printprogram:</b>
When you print a form you must used the staments OPEN_FORM and CLOSE_FORM. To combine
forms into a single spool request use START_FORM and END_FORM.
To print textelements in a form use WRITE_FORM. The order in which the textelements are printed,
is determined by the order of the WRITE_FORM statements. Note: for printing lines in the body, you
can also use the WRITE_FORM_LINES function module.
To transfer control command to a form use CONTROL_FORM.
<b>Structure of a print program</b>
Read data
Tables: xxx.
SELECT *
FROM xxx.
Open form printing - Must be called before working with any of the other form function modules.
Must be ended with function module CLOSE FORM
call function 'OPEN_FORM'.....
To begin several indentical forms containing different data within a single spool request, begin each
form using START_FORM, and end it using END_FORM
call funtion 'START_FORM'.....
Write text elements to a window of the form
call function 'WRITE_FORM'.....
Ends spool request started with START_FORM
call funtion 'END_FORM'.....
Closes form printing
call function 'CLOSE_FORM'...
OPEN_FORM function
Syntax:
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = ' '
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>Some important parameters:</b>
FORM Name of the form
DEVICE PRINTER : Print output using spool
TELEFAX: Fax output
SCREEN: Output to screen
OPTIONS Used to control attrubutes for printing or faxing (Number of copies, immediate output....
The input for the parameter is structure ITCPO.
CLOSE_FORM function
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Paramerters:
RESULT Returns status information and print/fax parameters after the form has been printed.
RESULT is of structure ITCPP.
WRITE_FORM function
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = ' '
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Some important parameters:
ELEMENT Specifies which textelement is printed
WINDOW Specifies which window is printed
TYPE Specifies the output area of the main window. This can be:
TOP - Used for headers
BODY
BOTTOM - Used for footers
FUNCTION Specifies whether text is to be appended, replaced or added
Example of how to use the WRITE_FORM function module together with a script.
Form layout of the MAIN window
/E INTRODUCTION
Dear Customer
/E ITEM_HEADER
IH Carrier, Departure
/E ITEM_LINE
IL &SBOOK-CARRID&, &SPFLI-DEPTIME&
/E CLOSING_REMARK
<b>The print program</b>
Writing INTRODUCTION
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'INTRODUCTION'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8
Writing ITEM_HEADER
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ITEM_HEADER'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8
Set ITEM_HEADER into TOP area of main window for subsequent pages
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ITEM_HEADER'
FUNCTION = 'SET'
TYPE = 'TOP'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8
Write ITEM_LINE
LOOP AT .....
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ITEM_LINE'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8.
ENDLOOP.
Delete ITEM_HEADER from TOP area of main window
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ITEM_HEADER'
FUNCTION = 'DELETE'
TYPE = 'TOP'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8
Print CLOSING_REMARK
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'CLOSING_REMARK'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8
START_FORM function
CALL FUNCTION 'START_FORM'
EXPORTING
ARCHIVE_INDEX =
FORM = ' '
LANGUAGE = ' '
STARTPAGE = ' '
PROGRAM = ' '
MAIL_APPL_OBJECT =
IMPORTING
LANGUAGE =
EXCEPTIONS
FORM = 1
FORMAT = 2
UNENDED = 3
UNOPENED = 4
UNUSED = 5
SPOOL_ERROR = 6
OTHERS = 7
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
END_FORM function
CALL FUNCTION 'END_FORM'
RESULT =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SPOOL_ERROR = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
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'.
rgds,
latheesh
Message was edited by: Latheesh Kaduthara -
Please help for using perform in SAP script
As subject.
My sap script code as below:
/: PERFORM GET_CHAMT_DATE IN PROGRAM ZRAP004
/:USING &SPELL-WORD&
/:CHANGING &SPELL-WORD&
/:ENDPERFORM
My program ZRAP004 code as below:
FORM get_chamt_date USING u_iword TYPE spell-word
CHANGING u_oword TYPE spell-word.
CONCATENATE u_iword '元整'(t01) INTO u_oword.
endform.
This form is for check printing.
It's by standard function 'F110' to excute check printing.
But when i finished this transaction. System return error message as below:
<b>This routine contains 2 formal parameters, but the current call
contains 4 actual parameters.</b>
Please help. Thanks a lot!!Hiii
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. -
EXPERTS PLZ HELP ME IN SAP SCRIPT URGENT
Hi experts
plz help me
i m very new in sap scripts
i have a script WESCHEINVERS1 and the driver prog is SAPM07DR
i ill have to copy this script and have to add two more feild in the text element W1LGMAT
fields are :
CAWNT-ATWTB
EKPO-REVLV
now wat i think i cannot make changes to standard driver prog so it wud be better to call a subroutine 4 it
so plz guide me how i ill have to fetch data nd pass to the script
plz write the code if possible 4 u
FYI:
MSEG : Document Segment Material
MANDT Client
MBLNR Number of material Document
MJAHR Material Document Year
ZEILE Item in Material Document
MATNR Material Number
LIFNR Account number or vendor
EBELN Purchase order number
EBELP Item number of PO
EKPO : Purchasing document item
MANDT Client
EBELN Purchase order number
EBELP Item number of PO
MATNR Material Number
REVLV Revision Level
LFA1 : Vendor Master (General section)
MANDT Client
LIFNR Account number of vendor or creditor MSEG-LIFNR
SPRAS Language key
AUSP : Characteristic Values
MANDT Client
OBJEK Key of object to be classified MSEG-MATNR
ATINN Internal characteristic ZO-QUALITY-LEVEL
ATZHL Internal counter
ATWRT Characteristic Value
CAWNT : Value texts
MANDT Client
ATINN Internal characteristic ZO-QUALITY-LEVEL
ATZHL Internal counter AUSP-ATZHL
SPRAS Language Key LFA1-SPRAS
ATWTB Characteristic Value Description
thanks in advanceRefer the links to know about calling subroutines ins cript -
subroutine in script
How to call a subroutine in a script ?
EXTERNAL SUBROUTINE IN SAP SCRIPT
Regards,
Amit
Reward all helpful replies. -
PLZ HELP SAP SCRIPT ISSUE (DYNAMIC BOX)
Hi all
I want to include a dynamic text (means number of lines can vary) inside a box .
please guide me how i can create this box whose size would be dynamic according to this text.
plz help i am not able to find ne solution
Thanx in advance
Edited by: SARABPREET CHADHA on Mar 14, 2008 11:33 AMFollowing things to be done in Driver program.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = TEXT_ID
LANGUAGE = PRINT_LANGUAGE
NAME = TEXT_NAME
OBJECT = TEXT_OBJECT
IMPORTING
HEADER = TABLE_HEADER
TABLES
LINES = TABLE_LINES
EXCEPTIONS
ID = 01
LANGUAGE = 02
NAME = 03
NOT_FOUND = 04
OBJECT = 05
REFERENCE_CHECK = 06.
then
CALL FUNCTION 'WRITE_FORM_LINES'
EXPORTING
HEADER = TABLE_HEADER
WINDOW = WINDOW
IMPORTING
FROMPAGE = FROMPAGE " not interested ?
TABLES
LINES = TABLE_LINES
EXCEPTIONS
FUNCTION = 01
TYPE = 02
UNOPENED = 03
UNSTARTED = 04
WINDOW = 05.
and then in sap script.
/: INCLUDE &THEAD-TDNAME& OBJECT &THEAD-TDOBJECT& ID &THEAD-TDID&
/: PARAGRAPH T6 LANGUAGE
Your text will apper in sapscript.
Award points if useful... -
Moved to correct forum. Please use an informative subject in future.
Hi,
can some one help in knowing whether can we write the text elements from sub routine being called from Sap script.
Actually i have to develop a script for check printing and in the table data i have to print 3 colums:REGUP-BUDAT,REGUP-XBLNR,REGUP-DMBTR in two section on the same window with 25 line each so that total 50 lines can be printed,Standard print prg is RFFOUS_C.can some one help in the same..
Thnxs
Edited by: Matt on Apr 9, 2009 10:06 AMHi Hemant,
use like this
<B0>Three Thousand only</>,, <B4>&Name& </> <B8>&TOTAL& </>
HR Dept.
Thanks & regards,
Dileep .C -
Help reqd for finding TAXES & CONDITIONS FOR GIVEN PO IN SAP-SCRIPT
HI ALL,
Currently iam working on SAP-SCRIPT developing PO in that i displayed fields like EMATN TYPE EKPO-EMATN,( material no. )
TXZ01 TYPE EKPO-TXZ01, ( long text )
MEINS TYPE EKPO-MEINS, ( units )
MENGE TYPE EKPO-MENGE (quantity)
now i want to display taxes & conditions for given ematn no.( material no . ) so from which tables i should get the data how to display. plz help me.
thanks in advance.
Regards,
mahesh dudamHi !!
for this please study teh following extract :
All pricing values are maintained in the KONV table for the respective pricing condition . Extract these values from KONV table by passing EKKO-KNUMV values for the Purchase order number from the EKKO purchase order header table .
************************************************************************88
FORM GET_PRICING_DATA USING P_KNUMV.
SELECT * INTO TABLE I_KONV
FROM KONV
WHERE KNUMV = WA_EKKO-KNUMV.
IF SY-SUBRC = 0.
SORT I_KONV.
ENDIF.
ENDFORM. " GET_PRICING_DATA
*& Form get_tax_details
extract Tax item details.
-->P_EBELp for purchase order item.
FORM GET_TAX_DETAILS USING P_EBELP.
DATA : L_OCTROI LIKE KONV-KWERT,
L_BASE LIKE KONV-KWERT,
L_OTHERS LIKE KONV-KWERT,
L_DISCOUNT LIKE KONV-KWERT,
L_PFORWARD LIKE KONV-KWERT,
L_INSU LIKE KONV-KWERT,
L_NUM LIKE I_KONV-KUMZA VALUE 1,
L_DENO LIKE I_KONV-KUMNE VALUE 1,
L_KPEIN LIKE KONV-KPEIN VALUE 1,
L_FRT LIKE KONV-KWERT,
L_CHAR(15).
*-- getting numerator and denominator for base value.
READ TABLE I_KONV WITH KEY KSCHL = 'PBXX'.
IF SY-SUBRC = 0.
L_NUM = I_KONV-KUMZA.
L_DENO = I_KONV-KUMNE.
L_KPEIN = I_KONV-KPEIN.
ELSE.
READ TABLE I_KONV WITH KEY KSCHL = 'PB00'.
IF SY-SUBRC = 0.
L_NUM = I_KONV-KUMZA.
L_DENO = I_KONV-KUMNE.
L_KPEIN = I_KONV-KPEIN.
ELSE.
READ TABLE I_KONV WITH KEY KSCHL = 'P001'.
IF SY-SUBRC = 0.
L_NUM = I_KONV-KUMZA.
L_DENO = I_KONV-KUMNE.
L_KPEIN = I_KONV-KPEIN.
ELSE.
READ TABLE I_KONV WITH KEY KSCHL = 'P000'.
IF SY-SUBRC = 0.
L_NUM = I_KONV-KUMZA.
L_DENO = I_KONV-KUMNE.
L_KPEIN = I_KONV-KPEIN.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
CLEAR : V_OCTROI,V_OTHERS, V_DISCOUNT,V_PFORWARD,V_INSU,V_FTR.
LOOP AT I_KONV WHERE KPOSN = P_EBELP.
*-- Considering the numerator denominator and UOPricing
IF I_KONV-KPEIN = 0 .
I_KONV-KUMZA = 1. " Numerator
I_KONV-KUMNE = 1. " Denominator
I_KONV-KPEIN = 1. " Unit of pricing
ENDIF.
IF NOT I_KONV-KWERT IS INITIAL .
IF I_KONV-KRECH = 'C' AND I_KONV-KSCHL <> 'PB00'
AND I_KONV-KSCHL <> 'PBXX'.
I_KONV-KWERT = ( I_KONV-KWERT * I_KONV-KUMZA )
* L_KPEIN / ( I_KONV-KUMNE * I_KONV-KPEIN ).
ELSEif I_KONV-KRECH = 'C' AND I_KONV-KSCHL = 'PB00'
AND I_KONV-KSCHL = 'PBXX'.
I_KONV-KWERT = ( I_KONV-KWERT * L_NUM * L_KPEIN ).
/ ( L_DENO ).
elseif I_KONV-KRECH = 'A' AND I_KONV-KSCHL = 'PB00'
AND I_KONV-KSCHL = 'PBXX'.
I_KONV-KWERT = ( I_KONV-KWERT * L_NUM * L_KPEIN )
/ ( l_deno ).
ENDIF.
ENDIF.
CASE I_KONV-KSCHL.
*-- For base price
WHEN 'PB00'.
L_BASE = L_BASE + I_KONV-KWERT.
WHEN 'PBXX'.
L_BASE = L_BASE + I_KONV-KWERT.
WHEN 'P000'.
L_BASE = L_BASE + I_KONV-KWERT.
WHEN 'P001'.
L_BASE = L_BASE + I_KONV-KWERT.
*-- For octroi
WHEN 'JOCM'.
L_OCTROI = L_OCTROI + I_KONV-KWERT .
*-- For discount calculation
WHEN 'ZDT%'.
L_DISCOUNT = L_DISCOUNT + I_KONV-KWERT .
WHEN 'ZDN%'.
L_DISCOUNT = L_DISCOUNT + I_KONV-KWERT.
WHEN 'ZDTV'.
L_DISCOUNT = L_DISCOUNT + I_KONV-KWERT .
WHEN 'ZDNV'.
L_DISCOUNT = L_DISCOUNT + I_KONV-KWERT.
*--- For packing forwarding .
WHEN 'ZPNV'.
L_PFORWARD = L_PFORWARD + I_KONV-KWERT.
WHEN 'ZPN%'.
L_PFORWARD = L_PFORWARD + I_KONV-KWERT.
*--- For frieght .
WHEN 'ZFTV'.
L_FRT = L_FRT + I_KONV-KWERT.
WHEN 'ZFT%'.
L_FRT = L_FRT + I_KONV-KWERT.
WHEN 'ZFNQ'.
L_FRT = L_FRT + I_KONV-KWERT.
**-----for others
WHEN 'ZOTV'.
L_OTHERS = L_OTHERS + I_KONV-KWERT.
WHEN 'ZOT%'.
L_OTHERS = L_OTHERS + I_KONV-KWERT.
WHEN 'ZOTP'.
L_OTHERS = L_OTHERS + I_KONV-KWERT.
WHEN 'ZONV'.
L_OTHERS = L_OTHERS + I_KONV-KWERT.
WHEN 'ZON%'.
L_OTHERS = L_OTHERS + I_KONV-KWERT.
WHEN 'ZONP'.
L_OTHERS = L_OTHERS + I_KONV-KWERT.
*--- for insurance
WHEN 'ZINV'.
L_INSU = L_INSU + I_KONV-KWERT.
WHEN 'ZIN%'.
L_INSU = L_INSU + I_KONV-KWERT.
WHEN OTHERS.
CONTINUE.
ENDCASE.
CLEAR I_KONV.
ENDLOOP.
Maybe you are looking for
-
I'm using a SB Audigy SE card on my XP machine. In the past, I've made good music files from CDs and records (remember those?), but I have not used the thing in about 18 months, and now I'm having a weird problem. I get output only on the LEFT channe
-
Webservice concepts . Pls help
Hi All, In PI 7.0 in Integration Configuration: we create the WSDL for Sender/Outbound Interface using --- Select Tools --- Define Web Service -- fill all information and send that wsdl to consumer and use soap sender adapter similarly In PI 7.0 in I
-
(10g) 자동 통계정보 수집(AUTOMATIC OPTIMIZER STATISTICS COLLECTION)
제품 : ORACLE SERVER 작성날짜 : 2006-07-21 PURPOSE 이 문서는 10g의 new feature인 자동 통계정보 수집(Automatic Optimizer Statistics Collection)에 대한 소개와 기능에 대한 자료이다. Explanation 1. 개요 Optimizer statistics는 GATHER_STATS_JOB에 의해서 자동으로 수집된다. 이 JOB은 SYS 소유로서 OBJECT_TYPE이 JOB이
-
Hi , I need to get the quarter from posting date.. Please let me know the function module to get the quarter from the date. Thanks Vishal
-
Labview 2010 vi using too much RAM and causing Crashes
hello everyone, I was given a LV 2010 vi to integrate with another functionality.This Vi is used for a long time on XP and Windows 7 platform having various RAM size.it still runs fine on those PCs. This Vi has functionality that it waits for user to