HRFORMS - print program error
Hi all,
I have developed a HR FORM for printing the employee remuneration statement. In that, i have designed the layout using Adobe form and activated this form. But when i try to activate the HR FORM, it returns the following error.
"Print program contains a syntax error."
Can anyone tell me the reason for this error and how to solve it?
Regards,
Shanthi
Hi,
try doub clicking on the error message and red the complete description.
or refer the link
Link:[http://help.sap.com/saphelp_nw04s/helpdata/en/c2/42c437004b4d74bd74100d327a3354/frameset.htm]
thanks
ravi
Similar Messages
-
Purchase order print program error
hi experts!
am facing a problem in my purchase order print program. the problem is that when i am trying to see the print preview the following dump error is throughing, which am not able to understand.
the P.O total amount should be change into words( like one million then thousand thirty three kuwait dinars)
but the total amount is not converting into as mentioned, instead the dump is encountered.
please give me solution,
thnaks
*DUMP*
Runtime Errors CONVT_NO_NUMBER
Exception CX_SY_CONVERSION_NO_NUMBER
Date and Time 05.05.2008 19:04:43
Short text
Unable to interpret "1760,778.71 " as a number.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZMM_SUBROUTINES" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CONVERSION_NO_NUMBER', was not
caught in
procedure "GET_AMT_IN_WORDS" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The program attempted to interpret the value "1760,778.71 " as a number, but
since the value contravenes the rules for correct number formats,
this was not possible.
How to correct the error
Whole numbers are represented in ABAP as a sequence of numbers, possibly
with an algebraic sign.
The following are the possibilities for the representation of floating
point numbers:
[algebraic sign][mantissa]E[algebraic sign][exponent]
[algebraic sign][whole number part].[fraction part]
For example, -12E+34, +12E-34, 12E34, 12.34
If the error occurred in your own ABAP program or in an SAP
program you modified, try to remove the error.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"CONVT_NO_NUMBER" "CX_SY_CONVERSION_NO_NUMBER"
"ZMM_SUBROUTINES" or "ZMM_SUBROUTINES"
"GET_AMT_IN_WORDS"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"GET_AMT_IN_WORDS" "(FORM)", or its possible occurrence must be declared in the
RAISING clause of the procedure.
To prevent the exception, note the following:
System environment
SAP-Release 700
Application server... "EHPAP1"
Network address...... "10.100.150.103"
Operating system..... "AIX"
Release.............. "5.3"
Hardware type........ "00C3B3F04C00"
Character length.... 16 Bits
Pointer length....... 64 Bits
Work process number.. 1
Shortdump setting.... "full"
Database server... "EHPDB"
Database type..... "DB6"
Database name..... "EHP"
Database user ID.. "SAPEHP"
Char.set.... "C"
SAP kernel....... 700
created (date)... "Mar 19 2007 20:40:49"
create on........ "AIX 2 5 005DD9CD4C00"
Database version. "DB6_81 "
Patch level. 102
Patch text.. " "
Database............. "DB6 08.02., DB6 09."
SAP database version. 700
Operating system..... "AIX 1 5, AIX 2 5, AIX 3 5"
Memory consumption
Roll.... 16192
EM...... 29328936
Heap.... 0
Page.... 1359872
MM Used. 19180992
MM Free. 1764848
User and Transaction
Client.............. 400
User................ "FADISULAIMAN"
Language key........ "E"
Transaction......... "ME22N "
Program............. "ZMM_SUBROUTINES"
Screen.............. "SAPLMEGUI 0014"
Screen line......... 22
Information on where terminated
Termination occurred in the ABAP program "ZMM_SUBROUTINES" - in
"GET_AMT_IN_WORDS".
The main program was "RM_MEPO_GUI ".
In the source code you have the termination point in line 398
of the (Include) program "ZMM_SUBROUTINES".
The termination is caused because exception "CX_SY_CONVERSION_NO_NUMBER"
occurred in
procedure "GET_AMT_IN_WORDS" "(FORM)", but it was neither handled locally nor
declared
in the RAISING clause of its signature.
The procedure is in program "ZMM_SUBROUTINES "; its source code begins in line
358 of the (Include program "ZMM_SUBROUTINES ".
Source Code Extract
Line SourceCde
368 DATA: lt_spell LIKE spell.
369
370 READ TABLE in_tab WITH KEY 'CURR'.
371 IF sy-subrc = 0.
372 lf_curr = in_tab-value.
373 ENDIF.
374
375 READ TABLE in_tab WITH KEY 'NETWR'.
376 IF sy-subrc = 0.
377 lf_netpr_01 = in_tab-value.
378 REPLACE ',' IN lf_netpr_01 WITH ' '.
379 CONDENSE lf_netpr_01 NO-GAPS.
380
381 IF lf_curr = 'KWD'.
382 lf_netpr_kwd = lf_netpr_01.
383
384 CALL FUNCTION 'SPELL_AMOUNT'
385 EXPORTING
386 amount = lf_netpr_kwd
387 currency = lf_curr
388 filler = ''
389 language = sy-langu
390 IMPORTING
391 in_words = lt_spell
392 EXCEPTIONS
393 not_found = 1
394 too_large = 2
395 OTHERS = 3.
396
397 ELSE.
>>>>> lf_netpr = lf_netpr_01.
399 CALL FUNCTION 'SPELL_AMOUNT'
400 EXPORTING
401 amount = lf_netpr
402 currency = lf_curr
403 filler = ''
404 language = sy-langu
405 IMPORTING
406 in_words = lt_spell
407 EXCEPTIONS
408 not_found = 1
409 too_large = 2
410 OTHERS = 3.
411 ENDIF.
412 IF sy-subrc <> 0.
413 * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
414 * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
415
416 ELSE.
417
Contents of system fields
Name Val.
SY-SUBRC 0
SY-INDEX 17
SY-TABIX 1
SY-DBCNT 18
SY-FDPOS 1
SY-LSIND 0
SY-PAGNO 0
SY-LINNO 1
SY-COLNO 1
SY-PFKEY NORMAL
SY-UCOMM PREVOUTPUT
SY-TITLE Held Imp. Pur. O r - ESG 5000000021 Created by Fadi Sulaiman
SY-MSGTY A
SY-MSGID TD
SY-MSGNO 426
SY-MSGV1 NEXTPAGE
SY-MSGV2 ZMEDRUCK_PO
SY-MSGV3
SY-MSGV4
SY-MODNO 0
SY-DATUM 20080505
SY-UZEIT 190441
SY-XPROG SAPCNVE
SY-XFORM CONVERSION_EXITHi Prasad,
Check the FM's
SPELL_AMOUNT --> for display in millions
HR_IN_CHG_INR_WRDS --> for display in lakhs and crores -
hi i am working on print tax invoice program.
every thing is fine but in the output i am getting duplicate values as below. values repeating again. hope i am clear with my doubt.
222 000 222
1234 000 1234
222 000 222
1234 000 1234Hi Ravi,
here i attached my code. can u go through it and suggest me..itz very urgent for me.
thanks wil reward the points
report zar0020." LINE-SIZE 80 LINE-COUNT 65 NO STANDARD PAGE HEADING.
Release : ECC 5.0
Module : FI-AR
Description : This program will print Tax Invoice on A4
paper
T A B L E S *
tables: t001,
bkpf,
kna1,
bsik,
tcurx.
S E L E C T I O N S C R E E N *
selection-screen begin of block bl1 with frame title text-101.
parameters: p_bukrs like t001-bukrs memory id buk obligatory,
p_gjahr like bkpf-gjahr default sy-datum(4).
select-options: s_monat for bkpf-monat default sy-datum+4(2),
s_kunnr for kna1-kunnr,
s_lifnr for bsik-lifnr,
s_blart for bkpf-blart,
s_belnr for bkpf-belnr memory id bln,
s_budat for bkpf-budat,
s_bldat for bkpf-bldat,
s_cpudt for bkpf-cpudt.
selection-screen end of block bl1.
selection-screen begin of block bl2 with frame title text-102.
parameters: p_hkont as checkbox.
selection-screen end of block bl2.
selection-screen begin of block bl3 with frame title text-103.
parameters: p_inter as checkbox.
selection-screen end of block bl3.
selection-screen begin of block bl4 with frame title text-104.
parameters: p_rep as checkbox.
selection-screen end of block bl4.
D A T A D E C L A R A T I O N *
constants:
c_formname like rsscf-tdform value 'ZTAXINVOICE'.
data: begin of t_inv_hdr occurs 0,
bukrs like bkpf-bukrs,
kunnr like bsid-kunnr,
gjahr like bkpf-gjahr,
belnr like bkpf-belnr,
bldat like bkpf-bldat,
budat like bkpf-budat,
waers like bkpf-waers,
hwaer like bkpf-hwaer,
gst_no like t001z-paval,
reg_no like t001z-paval,
bschl like bsid-bschl,
lifnr like bsik-lifnr,
inv_type(20),
end of t_inv_hdr.
data: begin of t_inv_item occurs 0,
belnr like bseg-belnr,
hkont like bseg-hkont,
bukrs like bseg-bukrs,
gjahr like bseg-gjahr,
buzei like bseg-buzei,
buzid like bseg-buzid,
bschl like bseg-bschl,
koart like bseg-koart,
mwskz like bseg-mwskz,
wrbtr like covp-wogbtr,
dmbtr like covp-wogbtr,
sgtxt like bseg-sgtxt,
tax_rate like covp-wogbtr,
sup_tot like covp-wogbtr,
gst_tot like covp-wogbtr,
pay_tot like covp-wogbtr,
slip_tot type p decimals 2,
total like covp-wogbtr,
shkzg like bseg-shkzg,
lifnr like bsik-lifnr,
qsskz like bseg-qsskz,
end of t_inv_item.
data:it_item1 like t_inv_item occurs 0 with header line.
data: g_company like t001.
data: it_wrbtr1(20).
data:it_pay_tot1(20).
data:it_mwskz like bseg-mwskz.
data:it_kbetr like bset-kbetr.
data:it_gst type p decimals 2.
data:sup_tot type p decimals 2 .
data:gst_tot type p decimals 2.
data:pay_tot type p decimals 2.
data:pay_tot1 type p decimals 2.
data:pay_tot3 type p decimals 2.
*data:pay_tot3(20).
data:v_pay_tot3 type p decimals 2.
data:v_pay_tot2 type p decimals 2.
data:v_gt_total type p decimals 2.
data:v_pay_total type p decimals 2.
data:sup_tot2 type p decimals 2.
data:gst_tot2 type p decimals 2.
data:pay_tot2 type p decimals 2.
***Revised
data:gst_tot3 type p decimals 2.
data:sup_tot3 type p decimals 2.
*data:gst_tot3(20).
*data:sup_tot3(20).
data:pay_tot11(20).
data:k type i.
data:final_sup_tot type p decimals 2 ,
final_gst_tot type p decimals 2,
final_pay_tot type p decimals 2 ,
slip_tot type p decimals 2,
act_total type p decimals 2.
data: final_sup_tot9(20),
final_gst_tot9(20),
act_total9(20),
tax_rate9(20),
pay_tot9(20),
slip_tot9(20).
data:item(3) type c.
data: l_addr_sel like addr1_sel.
data: l_gst_no like t001z-paval,
l_reg_no like t001z-paval.
data:it_adrnr like adrc-addrnumber.
data:begin of it_tax occurs 0,
belnr like bset-belnr,
gjahr like bset-gjahr,
mwskz like bset-mwskz,
hwste like bset-hwste,
fwste like bset-fwste,
fwbas like bset-fwbas,
hwbas like bset-hwbas,
end of it_tax.
data:
v_name1 like adrc-name1,
v_name2 like adrc-name2,
v_name3 like adrc-name3,
v_name4 like adrc-name4,
v_name1_new like adrc-name1,
v_name2_new like adrc-name2,
v_name3_new like adrc-name3,
v_name4_new like adrc-name4,
v_name5(80),
v_name6(80),
v_street5(80),
v_name7(160),
v_name8(160),
v_name9(160),
v_street like adrc-street,
v_street4 like adrc-str_suppl3,
v_city like adrc-city1,
v_post like adrc-post_code1,
v_tele like adrc-tel_number,
v_fax like adrc-fax_number,
v_uri like adr12-uri_srch,
v_regno like t001z-paval,
c_name1 like adrc-name1,
c_name2 like adrc-name2,
c_name3 like adrc-name3,
c_name4 like adrc-name4,
c_nam1 like adrc-name1,
c_nam2 like adrc-name2,
c_nam3 like adrc-name3,
c_nam4 like adrc-name4,
c_name5(80),
c_name6(80),
c_street5(80),
c_street like adrc-street,
c_street4 like adrc-str_suppl3,
c_city like adrc-city1,
c_city1 like adrc-city1,
c_post like adrc-post_code1,
c_tele like adrc-tel_number,
c_fax like adrc-fax_number,
c_country like adrc-country,
c_landx like t005t-landx,
c_country1 like t005t-landx,
c_cntry like t005t-landx,
v_remark like adrct-remark.
data:name like thead-tdname.
data:it_phone like tline occurs 0 with header line.
data:it_name like tline occurs 0 with header line.
data:it_account like tline occurs 0 with header line.
data:it_addi like tline occurs 0 with header line.
data:it_cheque like tline occurs 0 with header line.
data:it_item like tline occurs 0 with header line.
data:it_ben like tline occurs 0 with header line.
data: ls_faede like faede.
data:it_sgtxt like bseg-sgtxt.
data: ls_bkpf like bkpf,
ls_bseg like bseg,
it_duedate(10).
data:it_waers like t001-waers.
data:it_waers1 like t001-waers.
data:n1 type i.
data:diff1 type p decimals 2.
data:tax_rate type p decimals 5.
data:it_header(20).
data:it_bschl like bsid-bschl.
data:it_land like t001-land1.
data:it_landx like t005t-landx.
data:text(2000).
data:text1(200).
data:it_kbetr1 like bset-kbetr,
it_tax1(3) type c.
data:it_acctype(1).
data:it_cust like kna1-lifnr.
data:it_land1 like t001-land1,
it_kalsm like t005-kalsm,
it_text1(50).
data:it_kverm like knb1-kverm.
data: vari1(18),
v_flag(1) value 'F'.
data:it_fwbas(20),
it_fwste(20),
pay_tot19(20),
gst_tot29(20),
sup_tot29(20),
pay_tot29(20),
gst_tot39(20),
sup_tot39(20),
pay_tot39(20),
tax_rate99(20),
v_amt(20),
v_amt1(20),
v_fwbas type bset-fwbas,
v_taxamt(20),
v_total(20),
v_amount type bseg-wrbtr,
gt_amt type p decimals 2,
gt_taxamt type p decimals 2,
gt_netamt type p decimals 2,
gt_tax type p decimals 2,
gt_amt1(20),
gt_total type p decimals 2,
v_grpid like bkpf-grpid,
v_grpid1(3) type c,
v_text(100) type c,
v_text20(20) type c.
I N I T I A L I Z A T I O N *
*initialization.
A T S E L E C T I O N - S C R E E N *
at selection-screen on p_bukrs.
select single * into g_company
from t001
where bukrs = p_bukrs.
if sy-subrc ne 0.
message e398(00) with 'Company code' p_bukrs 'does not exist'."#EC *
endif.
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field p_bukrs
id 'ACTVT' field '03'.
if sy-subrc ne 0.
message e398(00) with 'You are not authorized to access company '
p_bukrs.
endif.
at selection-screen on p_inter.
if s_lifnr ne '' and p_inter = ''.
message e398(00) with 'Please select Interco check box'."#EC *
elseif s_kunnr ne '' and p_inter ne ''.
message e398(00) with 'Ple dont select Interco when you select Customer '."#EC *
endif.
S T A R T O F D A T A S E L E C T I O N *
start-of-selection.
item = '00'.
if p_inter eq ''.
it_acctype = 'D'.
else.
it_acctype = 'K'.
endif.
perform read_customer_invoices.
if t_inv_item[] is initial.
write ' No Records Found'.
endif.
perform form_print_out.
end-of-selection.
E N D O F D A T A S E L E C T I O N *
*& Form form_print_out
form form_print_out.
data: itab_options like itcpo occurs 0 with header line.
itab_options-tddest = 'LOCL'.
itab_options-tdpreview = 'X'.
itab_options-tdtitle = sy-title.
itab_options-tdiexit = 'X'.
itab_options-tdnewid = 'X'.
itab_options-tddelete = 'X'.
append itab_options.
call function 'OPEN_FORM'
exporting
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
device = 'PRINTER'
DIALOG = 'X'
form = c_formname
language = sy-langu
options = itab_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 t_inv_hdr.
clear sup_tot.
clear pay_tot.
clear gst_tot.
clear slip_tot.
clear act_total.
clear it_waers.
clear it_waers1.
clear it_duedate.
clear it_item.
refresh it_item.
clear it_phone.
refresh it_phone.
clear it_account.
refresh it_account.
clear it_name.
refresh it_name.
clear it_addi.
refresh it_addi.
clear it_ben.
refresh it_ben.
clear name.
clear it_cust.
clear it_header.
clear it_land1.
clear it_kalsm.
clear it_text1.
clear it_kverm.
clear pay_tot3.
clear it_item1.
refresh it_item1.
clear k.
clear v_flag.
clear : c_country1, c_cntry.
customer number
if p_inter eq ''.
it_cust = t_inv_hdr-kunnr.
else.
it_cust = t_inv_hdr-lifnr.
endif.
read customer address
if one time vendor
select single name1 name2 name3 name4 pstlz ort01 stras
into (c_name1, c_name2, c_name3, c_name4, c_post, c_city, c_street5)
from bsec where bukrs = t_inv_hdr-bukrs and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr.
if sy-subrc <> 0.
*Logic changed bsrao on 27.07.2006
if sy-subrc <> 0 or c_name1 eq ' '.
if p_inter eq ''.
select single adrnr from kna1 into it_adrnr where kunnr = t_inv_hdr-kunnr.
select single kverm from knb1 into it_kverm where kunnr = t_inv_hdr-kunnr and
bukrs = p_bukrs.
else.
select single adrnr from lfa1 into it_adrnr where lifnr = t_inv_hdr-lifnr.
select single kverm from lfb1 into it_kverm where lifnr = t_inv_hdr-lifnr and
bukrs = p_bukrs.
endif.
select single name1 name2 name3 name4 street str_suppl3 city1 post_code1 tel_number fax_number country
from adrc into (c_name1,c_name2,c_name3,c_name4,c_street,c_street4,c_city,c_post,c_tele,c_fax, c_country)
where addrnumber = it_adrnr.
select single landx from t005t into c_landx
where land1 = c_country
and spras = sy-langu.
***Revised
v_city1 = itab_cust-city1.
clear : c_cntry, c_country1.
c_city1 = c_city.
translate c_city1 to lower case.
c_cntry = c_landx.
translate c_cntry to lower case.
if c_city1 ne c_cntry .
c_country1 = c_landx.
endif.
read table itab_t005t with key lnd1 = itab_cust-country.
v_cntry = itab_t005t-landx.
translate v_cntry to lower case.
concatenate c_street(35) c_street4(35) into c_street5 separated by space.
endif.
concatenate c_name1(35) c_name2(35) into c_name5 separated by space.
concatenate c_name3(35) c_name4(35) into c_name6 separated by space.
***Revised
*clear : v_name7.
concatenate v_name5(70) v_name6(70) into v_name7 separated by space.
concatenate t_inv_hdr-bukrs t_inv_hdr-belnr t_inv_hdr-gjahr into name.
read singnature details
PHONE
call function 'READ_TEXT'
exporting
client = sy-mandt
id = 'Z001'
language = sy-langu
name = name
object = 'BELEG'
tables
lines = it_phone
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.
if sy-subrc <> 0.
select single ztel from ztarinv into it_phone-tdline where bukrs = p_bukrs.
endif.
read table it_phone index 1.
bank name
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = 'Z002'
language = sy-langu
name = name
object = 'BELEG'
tables
lines = it_name
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8
if sy-subrc <> 0.
select single zbankname from ztarinv into it_name-tdline where bukrs = p_bukrs.
endif.
read table it_name index 1.
Account no
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = 'Z003'
language = sy-langu
name = name
object = 'BELEG'
tables
lines = it_account
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8
if sy-subrc <> 0.
select single zbankacc from ztarinv into it_account-tdline where bukrs = p_bukrs.
endif.
read table it_account index 1.
Additional note.
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = 'Z004'
language = sy-langu
name = name
object = 'BELEG'
tables
lines = it_addi
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8
if sy-subrc <> 0.
endif.
read table it_addi index 1.
loop at it_addi.
text1 = it_addi-tdline.
concatenate text text1 into text .
endloop.
cheque payable to
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = 'Z005'
language = sy-langu
name = name
object = 'BELEG'
tables
lines = it_cheque
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8
if sy-subrc <> 0.
endif.
read table it_cheque index 1.
beneficiary
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = 'Z007'
language = sy-langu
name = name
object = 'BELEG'
tables
lines = it_ben
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8
if sy-subrc <> 0.
endif.
read table it_ben index 1.
header text
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = 'Z008'
language = sy-langu
name = name
object = 'BELEG'
tables
lines = it_item
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8
if sy-subrc <> 0.
endif.
read table it_item index 1.
if sy-subrc = 0.
concatenate p_bukrs t_inv_hdr-belnr t_inv_hdr-gjahr into vari1.
v_flag = 'T'.
endif.
due date
select single * from bkpf into ls_bkpf "because of 'BLDAT'
where bukrs = p_bukrs
and belnr = t_inv_hdr-belnr
and gjahr = t_inv_hdr-gjahr.
select single * from bseg into ls_bseg
where bukrs = p_bukrs
and belnr = t_inv_hdr-belnr
and gjahr = t_inv_hdr-gjahr
and zfbdt ne '00000000'.
move-corresponding ls_bkpf to ls_faede.
move-corresponding ls_bseg to ls_faede.
call function 'DETERMINE_DUE_DATE'
exporting
i_faede = ls_faede
importing
e_faede = ls_faede
exceptions
others = 1.
concatenate ls_faede-netdt6(2) '.' ls_faede-netdt4(2) '.' ls_faede-netdt+0(4) into it_duedate.
calculating tax amount
loop at t_inv_item where belnr eq t_inv_hdr-belnr and koart <> it_acctype.
clear it_gst.
clear it_kbetr.
clear it_mwskz.
select single mwskz from bseg into it_mwskz where bukrs = t_inv_item-bukrs and
belnr = t_inv_item-belnr and
gjahr = t_inv_item-gjahr and
buzei = t_inv_item-buzei .
select single kbetr from bset into it_kbetr where bukrs = t_inv_item-bukrs and
belnr = t_inv_item-belnr and
gjahr = t_inv_item-gjahr and
mwskz = t_inv_item-mwskz .
it_gst = it_kbetr / 1000.
it_gst = it_gst * t_inv_item-wrbtr.
t_inv_item-tax_rate = it_gst.
t_inv_item-pay_tot = t_inv_item-wrbtr + t_inv_item-tax_rate.
modify t_inv_item.
endloop.
caluculating actual amount
loop at t_inv_item where bukrs = t_inv_hdr-bukrs and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr and
koart eq it_acctype and buzid <> 'T' .
write t_inv_item-wrbtr to it_wrbtr1 currency t_inv_hdr-waers.
act_total = act_total + t_inv_item-wrbtr .
endloop.
act_total = 0 - act_total.
if click gl account check box
data : v_txt like bseg-sgtxt.
clear : v_txt.
sort t_inv_item by belnr.
sort t_inv_item by belnr hkont.
if p_hkont ne '' .
sort t_inv_item by belnr hkont.
loop at t_inv_item where belnr = t_inv_hdr-belnr .
delete t_inv_item where koart = it_acctype and belnr = t_inv_hdr-belnr .
at new hkont.
read table t_inv_item index sy-tabix.
move-corresponding t_inv_item to it_item1.
append it_item1.
endat.
if t_inv_item-koart ne it_acctype.
sup_tot = sup_tot + t_inv_item-wrbtr.
gst_tot = gst_tot + t_inv_item-tax_rate.
pay_tot = sup_tot + gst_tot.
at end of hkont.
k = k + 1.
it_item1-wrbtr = sup_tot .
it_item1-tax_rate = gst_tot .
it_item1-pay_tot = pay_tot.
modify it_item1 index k.
clear sup_tot.
clear gst_tot.
clear pay_tot.
clear it_sgtxt.
endat.
endif.
endloop.
delete t_inv_item where belnr = t_inv_hdr-belnr .
endif.
loop at it_item1 where belnr = t_inv_hdr-belnr.
move-corresponding it_item1 to t_inv_item.
append t_inv_item.
endloop.
if it_item-tdline ne '' and p_hkont ne 'X'.
clear sup_tot.
clear gst_tot.
clear pay_tot.
clear it_sgtxt.
loop at t_inv_item where belnr = t_inv_hdr-belnr .
if t_inv_item-koart ne it_acctype.
sup_tot = sup_tot + t_inv_item-wrbtr.
gst_tot = gst_tot + t_inv_item-tax_rate.
pay_tot = sup_tot + gst_tot.
delete t_inv_item .
endif.
endloop.
if v_flag = 'T'.
clear it_item-tdline.
endif.
t_inv_item-sgtxt = it_item-tdline.
t_inv_item-wrbtr = sup_tot .
t_inv_item-tax_rate = gst_tot .
t_inv_item-pay_tot = pay_tot.
append t_inv_item.
endif.
select belnr gjahr mwskz hwste fwste fwbas hwbas from bset into table it_tax where
bukrs = t_inv_hdr-bukrs and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr .
call function 'START_FORM'
exporting
ARCHIVE_INDEX =
form = c_formname
language = sy-langu
startpage = 'FIRST'
PROGRAM = ' '
MAIL_APPL_OBJECT =
IMPORTING
LANGUAGE =
exceptions
form = 1
format = 2
unended = 3
unopened = 4
unused = 5
spool_error = 6
codepage = 7
others = 8
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
if p_inter eq '' and p_rep eq ''.
select single bschl from bsid into it_bschl where bukrs = t_inv_hdr-bukrs and
kunnr = t_inv_hdr-kunnr and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr.
if it_bschl = '11'.
it_header = 'Credit Note'.
else.
it_header = 'Tax Invoice'.
endif.
elseif p_inter eq '' and p_rep eq 'X'.
select single bschl from bsad into it_bschl where bukrs = t_inv_hdr-bukrs and
kunnr = t_inv_hdr-kunnr and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr.
if it_bschl = '11'.
it_header = 'Credit Note'.
else.
it_header = 'Tax Invoice'.
endif.
elseif p_inter eq 'X' .
select single bschl from bsik into it_bschl where bukrs = t_inv_hdr-bukrs and
lifnr = t_inv_hdr-lifnr and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr.
if it_bschl = '31'.
it_header = 'Credit Note'.
else.
it_header = 'Tax Invoice'.
endif.
elseif p_inter eq 'X' and p_rep eq 'X'.
select single bschl from bsak into it_bschl where bukrs = t_inv_hdr-bukrs and
lifnr = t_inv_hdr-lifnr and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr.
if it_bschl = '31'.
it_header = 'Credit Note'.
else.
it_header = 'Tax Invoice'.
endif.
endif.
currency
call function 'WRITE_FORM'
exporting
element = 'INVOICE_HEADING'
function = 'SET'
type = 'BODY'
window = 'HEADER'
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.
loop at t_inv_item where bukrs = t_inv_hdr-bukrs and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr and
koart <> it_acctype and buzid <> 'T' .
if t_inv_item-qsskz+0(1) eq 'I'.
delete t_inv_item.
endif.
final_sup_tot = final_sup_tot + t_inv_item-wrbtr.
final_gst_tot = final_gst_tot + t_inv_item-tax_rate.
final_pay_tot = final_sup_tot + final_gst_tot.
slip_tot = slip_tot + t_inv_item-wrbtr + t_inv_item-tax_rate.
endloop.
describe table t_inv_item lines n1 .
if act_total ne final_pay_tot .
diff1 = act_total - final_pay_tot.
slip_tot = slip_tot + diff1.
final_gst_tot = final_gst_tot + diff1.
do n1 times .
read table t_inv_item index n1.
if t_inv_item-tax_rate <> 0.
exit.
endif.
n1 = n1 - 1 .
enddo.
t_inv_item-tax_rate = t_inv_item-tax_rate + diff1.
t_inv_item-pay_tot = t_inv_item-pay_tot + diff1.
modify t_inv_item index n1.
endif.
select local currency
select single waers land1 from t001 into (it_waers, it_land) where bukrs = p_bukrs.
select document currency
select single waers from bkpf into it_waers1 where bukrs = t_inv_hdr-bukrs and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr.
select local country name
select single landx from t005t into it_landx where spras = sy-langu and land1 = it_land.
write slip_tot to slip_tot9 currency t_inv_hdr-waers.
write pay_tot3 to pay_tot9 currency t_inv_hdr-waers.
call function 'WRITE_FORM'
exporting
element = 'SLIP'
function = 'APPEND'
type = 'BODY'
window = 'PAYMEN_D'
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.
delete t_inv_item where koart = it_acctype and belnr = t_inv_hdr-belnr.
loop at t_inv_item where bukrs = t_inv_hdr-bukrs and
belnr = t_inv_hdr-belnr and
gjahr = t_inv_hdr-gjahr and
koart <> it_acctype and buzid <> 'T' .
write t_inv_item-wrbtr to it_wrbtr1 currency t_inv_hdr-waers.
write t_inv_item-pay_tot to it_pay_tot1 currency t_inv_hdr-waers.
write t_inv_item-tax_rate to tax_rate9 currency t_inv_hdr-waers.
item = item + 1.
if v_flag = 'T'.
clear item.
call function 'WRITE_FORM'
exporting
element = 'HEAD_TEXT'
function = 'APPEND'
type = 'BODY'
window = 'MAIN'
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.
endif.
call function 'WRITE_FORM'
exporting
element = 'LINE_ITEM'
function = 'APPEND'
type = 'BODY'
window = 'MAIN'
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.
call function 'WRITE_FORM'
-
Syntax Error when generate print program in HRFORMS
Dear All,
I created form for payslip using HRFORMS, the name form is ZPS_TPI_01. When I activate the form, the error raised: Generated print program contains a syntax error
Diagnosis
Generated print program /PYXXFO/ZPS_TPI_01_PRNT conains a syntax error in line 9 of include /PYXXFO?ZPS_TPI_01_PAYR.
I have already apply note 878168 but it is not work.
Please advise me.
Thank you,hi,
can you let me know for which country are you trying to generate the HR form for payslip?
There are certain countries for which payslip isnt supported.
For such countries you get a similar error.
Thank you,
Jose -
ERROR HRFORMS011 : PRINT PROGRAM LINE 161
Hi Gurus,
I am trying to activate a copied HR FORM, using HRFORMS transaction. I get following error whenever I try to activate.
Generated print program contains a syntax error
Message no. HRFORMS011
Diagnosis
Generated print program /1PYXXFO/ZHRPY_BULLETIN_PRNT contains a syntax error in line 161 of include /1PYXXFO/ZHRPY_BULLETIN_PRNT.
In this include SAP says that field P_IPVIEW is unknown
I am unable to execute the form. Can someone help me on this?
Thanks in advance,
KHi K,
Go through SAP Note 878168.
You cannot fix this with an HR SP; use the database utility instead.
Start transaction SE11 for view V_HRF_SELFIELDS and then go to Utilities
-> Database Object -> Database Utility.
After applying the note, please go trough the following steps to
regenerate the forms:
1) Start transaction HRFORMS
2) Select menu Utilities - activate forms
3) Input the names of your forms
4) Press F8
Regards,
Carlos. -
HRFORMS Workplace Infotype 0008 in generated print program
Hi folks
We have a problem with generated print programs for time sheets. Generated by the HRFORMS workplace.
Even when the workplace generate the printprogram for the SmartForm, accordingly a code line is generated as the 1st in the PrintProg.
INFOTYPES: 0000, 0001, 0008.
The comment tells us that this will be necessarily for authority checks on the LDB for pay roll.
Due to company restrictions we don't want to give key users the authorization for info type 0008.
Has anybody an idea what's to do to eliminate the info type 0008 from the printprogram w/o a modification.
We would appreciate for any help to this subject, kindly.
Kind Regards
Dieter Koppe
KoppeConsulting
Edited by: Dieter Koppe on Sep 18, 2008 8:02 AMhi,
can you let me know for which country are you trying to generate the HR form for payslip?
There are certain countries for which payslip isnt supported.
For such countries you get a similar error.
Thank you,
Jose -
PhotoShop CS2 "Program Error" when printing
I am posting this to the Adobe Forums as well, but thought someone here might have some ideas. am having an intermittent problem printing from PhotoShop CS2 to an Epson 9800. When printing large files (200 MB average) to the Epson, PhotoShop will spool the job, taking about 50% longer than normal, and when complete, displays the following message..."The file XXXX.tif could not be printed because of a program error" No job ever gets to the print que. This happens about 80% of the time when printing. Quitting and restarting PhotoShop generally fixes the problem, and the file can be printed from another computer without issue, so this is not file specific. I have 8GB of RAM installed and PhotoShop running under 100% available memory, cache level at 8, with a dedicated 180GB scratch disk. Memory should NOT be the problem, though I do often have the full layered version of the file open in the background (I am printing from a flattened copy. I have observed that the problem is less likely to occur if no other files are open. I have a second G5 with the exact same software setup (OS, Print Driver and PhotoShop down to the decimal version #) that works perfectly every time. I have run all of the System utilities (Repair Permissions, FSCK, etc), reset the OSX printing system, reset PS preferences, trashed and re installed CS, as well as the Epson printer driver, all with no success. Any other trouble shooting ideas would be greatly appreciated. I would love to avoid a System reinstall.
See the Adobe Knowledge Base document"Error 'Could not complete your request...' or 'Could not create a new document...' (Photoshop CS2 on Mac OS X v10.4)"
I suggest whenever you have problems with third-party applications, the first place to start troubleshooting is with the application's documentation, then vendor's web site. Usually their sites have FAQs, lists of known bugs, or application-specific forums similar to these Discussions. Sometimes, unlike the Apple Discussions, the questions are even answered by employees of the vendor.
The document cited above was found in 10 seconds by searching the Adobe support site.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X -
"Program Error" While trying to print in PSE 9
Download and installed updates to PSE 9.0, Now 9.03. While in PSE mode I can no longer print images to Epson Photo R2880 or HP J4680. I can print to both printers using HP Media Smart Photo application, but if I attempt to print from PS Elements I get the following "could not print (image title) because of program error". I have since uninstalled the upgrade to PSE 9.03, I have also done a system restore all to no avail. I still can't print while in PSE. Any experience with this? Any resolution ? Help !!!
Please post Photoshop Elements related queries over at
http://forums.adobe.com/community/photoshop_elements -
When I try to print a Report, it works very Well with our HP LaserJet 2100, butr as soon as I try to print the Report on The HPC LaserJet 4550N, I have a Program Error ...
" PROGRAM ERROR :
RWBLD60.exe has generated errors and will be closed by Windows. You will need to restart the program.
An error log is being created. "
I need you help urgently ..
And do you know where is the error log created ?
Tx in advance,
Xavier.
nullhello,
there are some troubles with these printers. please contact oracle support services to get more information about that, or search oracle metalink for bug descriptions.
regards,
the oracle reports team -
Error when exexuting a smart form from print program
Hi,
I have created a Print Program & Layout Set [Smart Form].
Now when i executed Print program it is throwing following error.
As internal table that we are passing to F.M is not having any data i have appended some data in debug mode.
After htting Print Immediaely Button Following EXIT Error is coming.
No table is currently processed, switching lines is not possible.
Message no. SSFCOMPOSER 183
Diagnosis
You tried to switch to the next table line, but currently no table is open for output.
System Response
The system issues an error message.
Procedure
This is probably an internal error. Please contact the SAP hotline and report the problem.
Can anybody solve this issue!
Thanks in advance.
Thanks,
Deep.Make sure that you have proper definations of internal table in program and smartform.
Regards,
Amey -
Runtime error in print program of a smartform
Hi,
While trying to execute the print program of a smartform I am getting the following runtime error.
The reason for the exception is:
The call to the function module "/1BCDWB/SF00000288" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "IT_BOOKINGS".
Although the currently specified field
"IT_BOOKINGS" is the correct type, its length is incorrect.
In the form interface of the smartform under tables parameters I have declared like this.
IT_BOOKINGS LIKE SBOOK
IT_SCHEDULE LIKE SPFLI
Can anyone tell me why do we get this error?
Regards,
HemaHello,
program to call smartform is really simple :
-> function SSF_FUNCTION_MODULE_NAME give you the name of the function link to your sapscript.
-> function WFMC_PREPARE_SMART_FORM help your to prepare your options to your smartform.
-> function xxx to call your smartform (find with the first function).
Sometimes you have to play with values of NAST (for ex) to find the language (set in control_parameters) or for example if you want to print without display (when it ask you for print / print preview and the name of the print device) .....
Frédéric -
I keep getting message in cs3 "could not print (filename) due to program error!" why?
Not a clue, since you provide no information whatsoever.
Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
http://forums.adobe.com/thread/419981?tstart=0
Thanks! -
Cannot print due to program error
Hello there everyone,
One of our photoshop users has been having this issue on and off for about 2 weeks now.
Whenever she tries to print documents (Can be any random file) she get an error saying "Photoshop can not print this document because a program error occured." Now I've done some googleing and found that you can clear the cache by holding Shift+Alt+ctrl when PS boots up, I'm not sure whether this actually works or not since the issue is intermitent and it could just be that it decided to print.
She is using windows 7 32bit, alongside photoshop 32bit, the printer she uses is an epson stylus pro 7900 and has all the up-to-date drivers for both her pc/hardware and the printer.
If anyone can lend any help that would be fantastic,
Thank you for your time.
p.s a dxdiag of the pc can be found hereIt is normal. Apple stopped the PDF printer from working. There is still a way to use Acrobat via "print" but DON'T DO IT.
You have a PSD file. The correct way to convert PSD to PDF is via Save as ... Photoshop PDF. -
Update terminate error in va02 Z print program
Hi All,
I have an update terminate error in va02 Z print program when it encounters information message statement while printing the sales order.
I have changed it to status message then no error
This is happening only in precessing status 4(send immediately) in edit message in va02
Regards,
VenkatHi venkat,
Go to SM13 . there it gives the line no. where the termination has occured. You can debug the program from there and make relavent changes.
Amar -
I AM TRYING TO PUT TEXT ON A PHOTO USING THE T ON THE BOARD. I GET A MESSAGE SAYING PROGRAM ERROR AND IT DOSNT LET ME ADD TEXT.
There's something wrong with your Photoshop install.
BOILERPLATE TEXT:
If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
http://forums.adobe.com/thread/419981?tstart=0
Thanks!
Maybe you are looking for
-
Dear Experts, while making down-payments, we do mention Purchase Document number in field "Purchase Document number" in F-48. in the PO history i do find Down-payment made "DP". which report will display Open Purchase Documents with downpayments agai
-
I am having trouble with Powerpoint, when I select slideshow mode the program shuts down
Can someone help me? I am having troube with Powerpoint. When I select the slideshow mode the program shuts down.
-
Office Mac 2004 S and T edition - Word - formatting palette disappears!
Open word document, click on 'formatting palette' in the toolbar, and lo! it 'genies' down and disappears off the bottom of my screen! I've tried changing the screen settings, 'resetting' the toolbars, even uninstalling and reinstalling Office 2004,
-
Gap between columns in sql output
Dear all, We have the below query : column queue_name format a15 column max_processes format 999 column target_node format a10 column actual_processes format 999 column pending format 999 column running format 999 column onhold format 999 column sche
-
Hi must have switched on Mobile Data by Mistake while using Maps and now I can get rid of this symbol A GPRS Data connection is opening or closing "Can not Paste Picture " I have powered down Phone and still same plus been on to wif_Fi and ope