Handle exception 'Program errors' for CL_GUI_ALV_GRID
Hi all,
I am displaying ALV in a dialogbox container, with first column for checkbox.
I have created a pushbutton named RELEASE in the toolbar. Pupose of the Release button is to further process the
rows selected by the user. But clicking on the Release button after checkboxes are selected throws error 'Program errors' which I guess is probably is an exception for method SET_TABLE_FOR_FIRST_DISPLAY of CL_GUI_ALV_GRID. If the button is clicked without touching any of the checkboxes everything works fine. Probably the reference to outtab is lost on clicking the button.
Appreciate any help.
Many thanks.
Vipin.
Hi vipin,
hard to say as you do not give any code detail. In a mixture of classic and oo ABAP a common reason for failure is the use of local (FORM routine) fields for controls and their contents: Entering a FORM routine, DATA is created on the stack, controls with grids may be created - they have their own lifetime, After leaving the Form routine, the stack is cleared. The control will not know this but as soon as a controls event tries to access data, it is a grip into emptiness.
Regards,
Clemens
Similar Messages
-
I get program error for shape tool and color selection, any clues please?
Hi, I cannot use my colour selection or my shape tool. I get a 'program error' pop-up. Can anyone help me with this please?
mikem
Go to Edit Menu/Preferences/Audio Hardware and ASIO tab and click on it.
Under the Input tab, make sure that you have your microphone selected.
Please let us know the outcome.
Thank you.
ATR -
BDC programming error for FF67
Hi guys,
I am working on FF67 BDC programming. When I am uploading data from excel, allthe values are getting passed correctly, except in the second screen value-date field (here the date is dispalying as 02.12.2020, though I have given it as 02.12.2008) And also it is displaying an error message as field FEBMKA-KWBTR(1) IS NOT AN INPUT FIELD. Am using ECC 6.0
And in the output it is displaying like below
statement/list is being updated atthe moment
Field FEBMKA-VGMAN(1) is not an input field
Field FEBEP-VALUT(1) is not an input field
Field FEBMKA-KWBTR(1) is not an input field
Warning: Values entered are ignored
Statement/list saved.
waiting for your reply guys.............
Thank you in advance..
KiranHi Avinash,
Thanks for the reply. I didn't get you. How can I use 'write to' statement?
I have written the code as follows
CONCATENATE 'FEBMKA-VGMAN(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
itab-transaction.
CALL FUNCTION 'CONVERSION_EXIT_PDATE_INPUT'
EXPORTING
INPUT = itab-value_date
IMPORTING
OUTPUT = date.
CONCATENATE 'FEBEP-VALUT(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
date.
CONCATENATE 'FEBMKA-KWBTR(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
itab-amount.
CONCATENATE 'FEBMKK-CHECT_KF(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
itab-bank_refchqno.
So, where shall I use the '' write to'' statement.
please suggest me.
bye,
Kiran -
ABAP program error for user EXIT
Hi, I wrote code in EXIT_SAPLRSAP_001
When check and active it there were no syntax errors but when go rsa3 and check it gives an error at the follwing line
it_mcekpo[] = c_t_data[].
Runtime error: The internal talbles are neither compitable nor convertable.
I have defined it_mcekpo as below:
DATA BEGIN OF IT_MCEKPO OCCURS 1.
include structure mcekpo.
DATA END OF IT_MCEKPO.
But when I double click on 'c_t_data[]' , I get a message "object not defined, do you want do define".
Can some one tell me how should I define this, what aption I should choose and what is the strcture.
I am trying to add afnam, banfn and bednr from ekpo table to MC02M_0ITM (2LIS_02_ITM).
And is there any naming convention for 'it_mcekpo' and 'c_t_data'?
Any help is appreciated.
(This is my first userexit)
data: begin of it_ekpo occurs 0,
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
afnam like ekpo-afnam,
banfn like ekpo-banfn,
bednr like ekpo-bednr,
bukrs like ekpo-bukrs,
end of it_ekpo.
when '2LIS_02_ITM'.
it_mcekpo[] = c_t_data[].
select ebeln ebelp afnam banfn bednr bukrs
from ekpo into table it_ekpo
for all entries in it_mcekpo
where ebeln = it_mcekpo-ebeln and
ebelp = it_mcekpo-ebelp.
performance imprv.
if not it_ekpo is initial.
sort it_ekpo by ebeln ebelp.
endif.
loop at it_mcekpo.
read table it_ekpo with key ebeln = it_mcekpo-ebeln
ebelp = it_mcekpo-ebelp
binary search.
if sy-subrc = 0.
it_mcekpo-zzafnam = it_ekpo-afnam.
it_mcekpo-zzbanfn = it_ekpo-banfn.
it_mcekpo-zzbednr = it_ekpo-bednr.
it_mcekpo-zzabukrs = it_ekpo-bukrs.
endif.
modify it_mcekpo.
endloop.Hi,
TRY the below code :
TYPES BEGIN OF TYPE_02ITM.
INCLUDE STRUCTURE MC02M_0ITM.
TYPES END OF TYPE_02ITM.
TYPES: BEGIN OF TYPE__ekpo,
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
afnam like ekpo-afnam,
banfn like ekpo-banfn,
bednr like ekpo-bednr,
bukrs like ekpo-bukrs,
end of type_ekpo.
CASE I_DATASOURCE.
when '2LIS_02_ITM'.
WHEN '2LIS_02_ITM'.
DATA:
ITAB_EKPO TYPE STANDARD TABLE OF TYPE_EKPO
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
DATA:
ITAB_02ITM TYPE STANDARD TABLE OF TYPE_02ITM
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
ITAB_02ITM[] = C_T_DATA[] .
select ebeln ebelp afnam banfn bednr bukrs
from ekpo into table itab_ekpo
for all entries in ITAB_02ITM
where ebeln = ITAB_02ITM-ebeln and
ebelp = ITAB_02ITM-ebelp.
performance imprv.
if not itab_ekpo is initial.
sort itab_ekpo by ebeln ebelp.
endif.
loop at ITAB_02ITM.
read table itab_ekpo with key ebeln = ITAB_02ITM-ebeln
ebelp = ITAB_02ITM-ebelp
binary search.
if sy-subrc = 0.
ITAB_02ITM-zzafnam = itab_ekpo-afnam.
ITAB_02ITM-zzbanfn = itab_ekpo-banfn.
ITAB_02ITM-zzbednr = itab_ekpo-bednr.
ITAB_02ITM-zzabukrs = itab_ekpo-bukrs.
endif.
modify ITAB_02ITM.
endloop.
c_t_data[] = ITAB_02ITM[].
With rgds,
Anil Kumar Sharma .P -
"Seeprom Not Programmed" error for WS-X4648-RJ45-E and unable to power on WS-C4507R-E
I have a problem with a line card WS-X4648-RJ45-E. It's caused error message "Seeprom Not Programmed".
I have tried to removed and re-insert this module but problem is persisted and cause the same error message.
However, I have taken this line card to insert on another chassis and it's working prpoerly.
So, I think this is a chassis problem. Am i right ? Please advice.Hi,
Yes, your issue looks like the backplane issue and slot could be the problem since you re-insert didnt help to fix the issue. At the same time, it is working on the different chassis.
This situation, the switch cannot read the serial EEPROM of the specified module, and the module will not boot because the EEPROM failed to identify the module type. The read might fail if the module is not seated correctly in the slot or slot is having any issue.
I would suggest you to replace the switch and check the performance.
Regards,
Aru
*** Please rate if the post is useful *** -
"Could not save as a PDF because of a program error"
Saving a Photoshop file as a PDF for emailing to someone else has always been complicated by the number of choices to be made, and now it's become impossible. Every time I try it now, I get this message, and I have to send a jpeg instead. I've tried different files, trashed the PS prefs, tried different settings in the dialog box that pops up after I hit "save", but it is no longer possible to save a PS file as a PDF. In spite of the fact that this just started happening for no reason I know, I presume that it's my fault. Every single file I try to save has "a program error", for some reason. So I'm going to have to read up on how to save a PS file as a PDF. Can anyone help or point me to a knowledgebase article on saving a PDF in Photoshop?
You have not provided any system information. That aside, rather than faulting Photoshop it's more likely a generic issue with Acrobat/ Adobe Reader and the shared PDF libraries. The pertinent question would therefore be if those apps actually function properly and can display PDFs, what updates they may have received recently, what their security settings are (sandboxing) and if other apps like e.g. Illustrator still save PDFs.
Mylenium -
Runtime exception for other than programming error.
In a conversation the question arose whether it could be a case of throwing a runtime exception for anything other than a bug. The tutorial on oracle site says "These Usually Indicate programming bugs" leading to think that can be used in situations in which there is no bug.
Anyone have a practical example of a runtime exception when there is no bug?
Thanks.937643 wrote:
Ok. But. Do you think that in these cases the use of a runtime exception could be considered a bad practice?That's actually a matter of some debate.
On the one hand, Java has defined two major kinds of exceptions since the very beginning (unchecked exceptions, which are RuntimeException, Error, and their descendants; and checked exceptions which are everything else). The intended use of those was that checked exceptions should be for things that can normally go wrong in the execution of a program, even without a bug or without a major internal JVM error, such as a failed attempt to persist something or a network connection dropping--stuff that a programmer might normally be expected to deal with; while unchecked exceptions were created for things that a programmer would not normally handle in his code (except possibly at major architectural boundaries), like buggy code or an internal JVM failure.
With the rule about having to catch or declare checked exceptions, but not unchecked ones, that makes it easy for programmers so say, "Okay, I know exactly what can go wrong here that I might be expected to handle and I can therefore choose what to do with it; there will be no surprises. But I don't have to deal with problems that are outside my normal responsibility, like somebody passing me a null when they shouldn't have." It gives a programmer a nice bit of control, and the ability to know he hasn't missed something, kind of like the type safety provided by a strongly typed language.
At least that's the theory.
In practice, most checked exceptions either just get bubbled up to the next layer (via a throws clause), or caught wrapped in a fairly generic layer-appropriate exception and rethrown. There's not a whole lot of use made of what checked exceptions provide, and there's a lot of ugly boilerplate code that doesn't do anything useful for the app but is just there to satisfy the compiler.
So, some people think that checked exceptions are useless, or mostly useless, and favor unchecked exceptions in most or all cases. I believe that's part of the philosophy of Spring, but I'm not totally sure.
The idea is that since most of the time you can't do anything about exceptions that might be thrown to you, it's wasteful and pointless to have all that code to catch and rethrow. In this viewpoint, it would be better if, for example, not providing a throws clause at all meant that you could throw any exception. Any given code can still catch specific exceptions that it knows it can handle, but we don't have to write a bunch of code notating something that we're not really doing anything about.
Personally, I used to be totally in the checked exception camp. However, all the pointless boilerplate is wearing me down. I'm still not completely convinced though, and here's why: If I'm calling a method, I'd like to at least be able to see what might go wrong, so that I can decide how to deal with it. If all exceptions were unchecked, and the throws clause were optional, a conscientious developer could still provide it, and list the unchecked exceptions his method might throw to me, and/or he could document them in the javadoc comments. But a lot of developers won't do that, or even if they start to, as their method evolves, without the compiler to enforce it, they won't keep it up to date.
So there are advantages to both approaches. I personally would to know that the information will always be available to me, but for the small percentage of the time where I actually use it (like handle one specific exception one way and some other exception differently), I'm not sure if it's worth the overhead. -
Handling exception logging in a Java task scheduler program?
I need to design a Task Scheduler Where
1) User should be able to schedule multiple task at the same time.
2) There should be proper error handling on failure of any task and should not affect the other running tasks.
I found the related programme at http://www.roseindia.net/java/example/java/util/CertainAndRepeatTime.shtml
My concern is about handling of point 2 in program provided at above link. Say I schedule a recurring mail send process in above program which will be run first time on 12 september 2011 at 2 am, and will be repeated after every 2 hours Say a one process fais at 8 am. I want to log it in log file with task name and time details. Now if I look at above programme i.e CertainAndRepeatTime.java. This program will exit once it schedules all the tasks. Where and how should handle the logging?
Posted at http://stackoverflow.com/questions/7377204/handling-exception-logging-in-a-java-task-scheduler-program but folks suggesting Quartz scheduler . My Limitation is that i can't for quartz because my project allows me to use only standard java library. Is there any way we can handle logging in the same programme in case of exception.Well, first of all I wouldn't trust any code from roseindia. So you might want to look for more reliable advice.
As for your logging, you can add it for example to the TimerTask itself. I don't recommend adding logging to that roseindia cr*p though. -
Handle submit program for background jobs in RFC FM to send email in ITS
Hi all
I am facing a problem in ITS, i.e. I have called a RFC Function Module on the page load event of one of the HTML template. In that FM I have used <b>submit program</b>. This RFC FM is working fine in background i.e. it is sending pdf as email to a particular email address
but in the frontend it is not responding.
I wanted to ask whether we can handle submit <program-name> in background job from ITS
<b>If you are unable to understand the problem i can share with you my code as well.</b>
Thanks
Ekta TuliHi Tobias
The Function Module <b>ZV_FUNC_CCK_EMAIL_PDF</b> is used to generate the email with pdf as attachement. it is generating email at backend but not in frontend.
thanks
ekta
please find the code below for the FM
FUNCTION zv_func_cck_email_pdf.
*"*"Local interface:
*" IMPORTING
*" VALUE(CONTRACT) LIKE VBAP-VBELN
*" VALUE(EMAIL) LIKE ADR6-SMTP_ADDR
*" EXPORTING
*" VALUE(RETURN) TYPE CHAR4
data: i_vbak like vbak .
DATA: v_cont(10) TYPE c.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = contract
IMPORTING
output = v_cont.
DATA: z_element(30) TYPE c.
DATA: gv_fb_addr_get_selection LIKE addr1_sel.
DATA: BEGIN OF mtab_contract OCCURS 0, "sap field
ordno(10), "vbeln (10)
terr(6),
vkorg LIKE vbak-vkorg,
vkgrp LIKE knvv-vkgrp,
repname(35),
repmailbox(10),
gueen(10), "expires dated -same as valid to
kunnr(10),
name1(35), "name1(35)
stras(35), "stras(35)
pstlz(10), "pstlz(10)
ort01(35), "ort01(35) city
regio(3), "regio(3)
kunnr2(10),
name2(35), "NUM?(35)
stras2(35), "stras(35)
pstlz2(10), "pstlz(10)
ort012(35), "ort01(35) city
regio2(3), "regio(3)
kit1 LIKE vbap-matnr, " currently 41315
kit1-qty(6), " like vbap-zmeng,
kit2 LIKE vbap-matnr, " currently 41316
kit2-qty(6), " like vbap-zmeng,
kit3 LIKE vbap-matnr, " currently 41317
kit3-qty(6), " like vbap-zmeng,
kit4 LIKE vbap-matnr, " currently 91869US
kit4-qty(6), " like vbap-zmeng,
med1 LIKE vbap-matnr, " currently 7408cp
med1-qty(6), " like vbap-zmeng,
med2 LIKE vbap-matnr, " currently 0211CP
med2-qty(6), " like vbap-zmeng,
med3 LIKE vbap-matnr, " currently 0578CP
med3-qty(6), " like vbap-zmeng,
med4 LIKE vbap-matnr, " currently 0068CP
med4-qty(6), " like vbap-zmeng,
med5 LIKE vbap-matnr, " currently 0069CP
med5-qty(6), " like vbap-zmeng,
med6 LIKE vbap-matnr, " currently other
dis6 LIKE makt-maktx, " currently other
med6-qty(6), " like vbap-zmeng,
med7 LIKE vbap-matnr, " currently other
dis7 LIKE makt-maktx, " currently other
med7-qty(6), " like vbap-zmeng,
med8 LIKE vbap-matnr, " currently other
dis8 LIKE makt-maktx, " currently other
med8-qty(6), " like vbap-zmeng,
med9 LIKE vbap-matnr, " currently other
dis9 LIKE makt-maktx, " currently other
med9-qty(6), " like vbap-zmeng,
med10 LIKE vbap-matnr, " currently other
dis10 LIKE makt-maktx, " currently other
med10-qty(6), " like vbap-zmeng,
END OF mtab_contract.
DATA: BEGIN OF mtab_material OCCURS 0,
ordno(10),
matnr LIKE vbap-matnr,
qty LIKE vbap-zmeng,
END OF mtab_material.
DATA: w-mm(4) VALUE ' MM '.
*SELECT-OPTIONS: s_vkorg FOR vbak-vkorg,
* s_vkgrp FOR knvv-vkgrp, "Sales Group
* s_terr FOR knvp-kunn2. "Territory Code
*PARAMETERS: p_parvw LIKE vbpa-parvw MEMORY ID par OBLIGATORY, "Partner ID
** DEFAULT 'Z1'.
* p_vbeln LIKE vbak-vbeln MEMORY ID aun,
* p_email LIKE adr6-smtp_addr MEMORY ID email. "Sales Document #
*SELECT-OPTIONS: "s_vbeln FOR vbak-vbeln MEMORY ID aun, "Sales Document #
* s_guebg FOR vbak-guebg, "Valid-From Date
* s_gueen FOR vbak-gueen, "Valid-To Date
* s_ship FOR vbpa-kunnr, "Ship-to customer
* s_bstzd FOR vbak-bstzd MEMORY ID bst ."DEFAULT 'CCK'. "P.O. # Supplement
DATA: i_otf TYPE STANDARD TABLE OF itcoo,
i_content_txt TYPE table of solisti1, "Content
i_content_bin TYPE solix_tab, "Content
i_content_bin1 TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
w_pdf TYPE solisti1, "For PDF
w_res TYPE itcpp, "SAPscript output
w_otf TYPE itcoo, "For OTF
w_transfer_bin TYPE sx_boolean, "Content
prog(60).
data : t_obj_bin type standard table of solisti1.
DATA: w_arc_params LIKE arc_params,
w_pri_params LIKE pri_params.
*DATA: lcl_cls TYPE REF TO cl_gui_frontend_services.
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN'. "BIN
DATA: v_name TYPE string ."Downloading File Name
DATA: v_len_in TYPE so_obj_len,
v_tempdir(50) TYPE c,
v_size TYPE i.
DATA : x_pdf_bag_tline TYPE rcl_bag_tline,
v_pdf_fsize TYPE i,
objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE,
doc_chng LIKE sodocchgi1,
tab_lines LIKE sy-tabix.
DATA : v_pnum LIKE usr21-persnumber,
v_anum LIKE usr21-addrnumber,
smtp_addr LIKE adr6-smtp_addr.
DATA: v_path TYPE string,
v_code TYPE i.
DATA : wa_obj_txt TYPE solisti1.
DATA : t_obj_txt TYPE STANDARD TABLE OF solisti1.
DATA : t_rec_list TYPE STANDARD TABLE OF somlreci1.
DATA : t_obj_pack TYPE STANDARD TABLE OF sopcklsti1.
DATA : wa_document_data TYPE sodocchgi1. "Mail data
DATA : wa_rec_list TYPE somlreci1.
DATA: reciever TYPE sadrud. "Email address of the receiver
DATA : wa_obj_pack TYPE sopcklsti1.
DATA: v_lines(10) TYPE n.
DATA: binfilesize TYPE i.
DATA : wa_obj_header TYPE solisti1.
DATA : t_obj_header TYPE STANDARD TABLE OF solisti1.
DATA : obj_id TYPE sofolenti1-object_id. "To send a file as attatchment
data: pdftab type table of tline with header line.
data : flag_sent_to_all type sonv-flag.
*START-OF-SELECTION.
* IF lcl_cls IS INITIAL.
* CREATE OBJECT lcl_cls.
* ENDIF.
CLEAR i_vbak.
SELECT * FROM vbak into i_vbak
WHERE
* guebg IN s_guebg AND "Valid-From Date
* gueen IN s_gueen AND "Valid-To Date
* vkorg IN s_vkorg AND
vbeln = v_cont AND
* AUART = 'LP ' AND "Converts to 'CO ' Scheduling A
auart = 'KM ' AND "Converts to 'CQ ' Qty contract
* VBTYP = 'E' AND "sales doc cat? JM
vbtyp = 'G' ."AND "sales doc cat "JM
* bstzd IN s_bstzd.
mtab_contract-kunnr = i_vbak-kunnr.
mtab_contract-ordno = i_vbak-vbeln.
mtab_contract-vkorg = i_vbak-vkorg.
WRITE i_vbak-gueen TO mtab_contract-gueen. "CHG014419
APPEND mtab_contract.
ENDSELECT.
LOOP AT mtab_contract.
* PERFORM get_contract. "CO sales orders line items
******Get Contract*********
* SELECT SINGLE kunnr "partner
* INTO vbpa-kunnr
* FROM vbpa
* WHERE vbeln EQ mtab_contract-ordno
* AND posnr EQ '000000'
* AND parvw EQ 'WE' "Ship-To's
* AND kunnr IN s_ship. "Ship-To ID added 04/01/99
* IF sy-subrc EQ 0 .
* MOVE vbpa-kunnr TO mtab_contract-kunnr2.
* MODIFY mtab_contract.
* ELSE.
* EXIT.
* ENDIF.
CLEAR knvp.
SELECT SINGLE kunn2 "territory
INTO knvp-kunn2
FROM knvp
WHERE kunnr EQ mtab_contract-kunnr2
AND vkorg EQ mtab_contract-vkorg
AND parvw EQ 'Z6'.
* AND kunn2 IN s_terr .
IF sy-subrc EQ 0 .
MOVE knvp-kunn2 TO mtab_contract-terr.
MODIFY mtab_contract.
ELSE.
EXIT.
ENDIF.
CLEAR kna1. "get rep name and mail box
SELECT SINGLE name2 FROM kna1 INTO (kna1-name2)
WHERE kunnr = knvp-kunn2.
IF sy-subrc EQ 0 .
SPLIT kna1-name2 AT w-mm INTO mtab_contract-repname
mtab_contract-repmailbox.
mtab_contract-repmailbox+3 = mtab_contract-repmailbox.
mtab_contract-repmailbox(3) = 'MM'.
MODIFY mtab_contract.
ENDIF.
CLEAR knvv.
SELECT SINGLE vkgrp
INTO knvv-vkgrp
FROM knvv
WHERE kunnr EQ knvp-kunn2
AND vkorg EQ mtab_contract-vkorg.
* AND vkgrp IN s_vkgrp.
IF sy-subrc EQ 0 .
MOVE knvv-vkgrp TO mtab_contract-vkgrp.
MODIFY mtab_contract.
ELSE.
EXIT.
ENDIF.
mtab_contract-med1-qty = '_______'.
mtab_contract-med2-qty = '_______'.
mtab_contract-med3-qty = '_______'.
mtab_contract-med4-qty = '_______'.
mtab_contract-med5-qty = '_______'.
mtab_contract-med6-qty = '_______'.
mtab_contract-med7-qty = '_______'.
mtab_contract-med8-qty = '_______'.
mtab_contract-med9-qty = '_______'.
mtab_contract-med10-qty = '_______'. "JM
mtab_contract-kit1-qty = '____'.
mtab_contract-kit2-qty = '____'.
mtab_contract-kit3-qty = '____'.
mtab_contract-kit4-qty = '____'.
mtab_contract-dis6 = 'OTHER _____________________'. "JM
mtab_contract-dis7 = 'OTHER _____________________'. "JM
mtab_contract-dis8 = 'OTHER _____________________'. "JM
mtab_contract-dis9 = 'OTHER _____________________'. "JM
mtab_contract-dis10 = 'OTHER _____________________'. "JM
* SELECT * FROM VBAP WHERE VBELN = MTAB_CONTRACT-ORDNO.
* IF VBAP-MATNR = '7408CP'.
* MTAB_CONTRACT-MED1 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '0211CP'.
* MTAB_CONTRACT-MED2 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '91865US'.
* MTAB_CONTRACT-MED3 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '0578CP'.
* MTAB_CONTRACT-MED4 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '0068CP'.
* MTAB_CONTRACT-MED5 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '0069CP'.
* MTAB_CONTRACT-MED6 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '92055CP'. "JM
* MTAB_CONTRACT-MED7 = VBAP-MATNR. "JM
* ELSEIF VBAP-MATNR = '90799CP'. "JM
* MTAB_CONTRACT-MED8 = VBAP-MATNR. "JM
* ELSEIF VBAP-MATNR = '41315'.
* MTAB_CONTRACT-KIT1 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '41316'.
* MTAB_CONTRACT-KIT2 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '41317'.
* MTAB_CONTRACT-KIT3 = VBAP-MATNR.
* ELSEIF VBAP-MATNR = '91869US'.
* MTAB_CONTRACT-KIT4 = VBAP-MATNR.
* ELSE.
* SELECT SINGLE MAKTX INTO MAKT-MAKTX
* FROM MAKT WHERE MATNR = VBAP-MATNR.
* ENDIF.
* MODIFY MTAB_CONTRACT.
* ENDSELECT.
MODIFY mtab_contract.
* IF.
** mtab_contract-terr IN s_terr AND
** mtab_contract-kunnr2 IN s_ship AND
** mtab_contract-vkgrp IN s_vkgrp.
** PERFORM get_address.
* ELSE.
* DELETE mtab_contract INDEX sy-tabix.
* ENDIF.
ENDLOOP.
SORT mtab_contract BY terr.
* PERFORM set_print_option.
* Print defaults should be immed and delete after print...
itcpo-tdimmed = ' '.
itcpo-tddelete = 'X'.
itcpo-tdnewid = 'X'.
itcpo-tdcopies = 1.
itcpo-tdnoprev = 'X'.
itcpo-tdgetotf = 'X'.
itcpo-tddest = 'LOCL'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LOCL'
no_dialog = 'X'
IMPORTING
out_archive_parameters = w_arc_params
out_parameters = w_pri_params.
*exit if cancel chosen*
IF sy-subrc NE 0.
EXIT.
ENDIF.
sadr-regio = 'CA'.
sadr-pstlz = '92620'.
LOOP AT mtab_contract.
* PERFORM check-for-values.
IF mtab_contract-ordno = space.
mtab_contract-ordno = '___________'.
ENDIF.
IF mtab_contract-terr = space.
mtab_contract-terr = '______'.
ENDIF.
IF mtab_contract-repname = space.
mtab_contract-repname = '___________________________________'.
ENDIF.
IF mtab_contract-repmailbox = space.
mtab_contract-repmailbox = '__________'.
ENDIF.
IF mtab_contract-kunnr = space.
mtab_contract-kunnr = '__________'.
ENDIF.
IF mtab_contract-name1 = space.
mtab_contract-name1 = '___________________________________'.
ENDIF.
IF mtab_contract-stras = space.
mtab_contract-stras = '___________________________________'.
ENDIF.
IF mtab_contract-pstlz = space.
mtab_contract-pstlz = '__________'.
ENDIF.
IF mtab_contract-ort01 = space.
mtab_contract-ort01 = '___________________________________'.
ENDIF.
IF mtab_contract-regio = space.
mtab_contract-regio = '___'.
ENDIF.
IF mtab_contract-kunnr2 = space.
mtab_contract-kunnr2 = '__________'.
ENDIF.
IF mtab_contract-name2 = space.
mtab_contract-name2 = '___________________________________'.
ENDIF.
IF mtab_contract-stras2 = space.
mtab_contract-stras2 = '___________________________________'.
ENDIF.
IF mtab_contract-pstlz2 = space.
mtab_contract-pstlz2 = '__________'.
ENDIF.
IF mtab_contract-ort012 = space.
mtab_contract-ort012 = '___________________________________'.
ENDIF.
IF mtab_contract-regio2 = space.
mtab_contract-regio2 = '___'.
ENDIF.
* PERFORM open_form.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
dialog = ' '
form = 'ZREV_CCK_AGREMT'
language = sy-langu
OPTIONS = itcpo
EXCEPTIONS
canceled = 1
device = 2
form = 3
OPTIONS = 4
unclosed = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE e000(zz) WITH 'Open Form Error. ' sy-subrc.
ENDIF.
z_element = 'MAIN'.
* PERFORM write_form.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = z_element
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
OTHERS = 7.
* PERFORM close_form.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000(zz) WITH 'Close Form Error. ' sy-subrc.
ENDIF.
*&---Convert OTF data to PDF data.
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = binfilesize
tables
otf = i_otf
lines = pdftab[].
data : name LIKE RLGRAP-FILENAME.
CONCATENATE 'C:Temp' mtab_contract-ordno '.pdf' INTO v_name.
*CALL FUNCTION 'DOWNLOAD'
* EXPORTING
* bin_filesize = v_size
* filename = name
* filetype = 'BIN'
* TABLES
* data_tab = pdftab[].
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = v_name
FILETYPE = 'BIN'
tables
data_tab = pdftab[].
* Downloading the PDF File
* CALL METHOD lcl_cls->gui_download
* EXPORTING
* bin_filesize = v_size
* filename = v_name
* filetype = c_bin
* CHANGING
* data_tab = pdftab[].
CALL METHOD cl_gui_cfw=>flush.
**Send PDF as Email.
* wa_obj_txt-line = 'CCK Contract Agreement'.
APPEND wa_obj_txt TO t_obj_txt.
CLEAR wa_obj_txt.
wa_obj_txt-line = 'Please find attatched PDF document for Contract'.
APPEND wa_obj_txt TO t_obj_txt.
CLEAR wa_obj_txt.
DESCRIBE TABLE t_obj_txt LINES tab_lines.
**Prepare document data
wa_document_data-obj_name = 'CCK Contract Agreement'.
wa_document_data-obj_descr = 'CCK Contract Agreement'.
wa_document_data-obj_langu = sy-langu.
wa_document_data-proc_type = 'R'.
wa_document_data-proc_name = 'CCK'.
wa_document_data-priority = c_x.
wa_document_data-obj_prio = c_x.
**Receiving list
wa_rec_list-receiver = sy-uname.
wa_rec_list-rec_type = 'B'.
wa_rec_list-com_type = 'INT'.
wa_rec_list-notif_del = c_x.
APPEND wa_rec_list TO t_rec_list.
CLEAR wa_rec_list.
wa_rec_list-receiver = '[email protected]'."p_email.
reciever = wa_rec_list-receiver.
wa_rec_list-rec_type = 'U'.
wa_rec_list-com_type = 'INT'.
wa_rec_list-notif_del = c_x.
APPEND wa_rec_list TO t_rec_list.
CLEAR wa_rec_list.
*Object packet
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
line_width_src = 134
line_width_dst = 255
TABLES
content_in = pdftab[]
content_out = t_obj_bin
EXCEPTIONS
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
OTHERS = 4
IF sy-subrc <> 0.
ENDIF.
DESCRIBE TABLE t_obj_bin LINES v_lines.
CLEAR wa_obj_pack-transf_bin .
wa_obj_pack-head_start = 1.
wa_obj_pack-head_num = 0.
wa_obj_pack-body_start = 1.
wa_obj_pack-body_num = tab_lines.
wa_obj_pack-doc_type = 'RAW'.
wa_obj_pack-doc_size = tab_lines * 255.
APPEND wa_obj_pack TO t_obj_pack.
CLEAR wa_obj_pack.
wa_obj_pack-transf_bin = 'X'.
wa_obj_pack-head_start = 1.
wa_obj_pack-head_num = 0.
wa_obj_pack-body_start = 1.
wa_obj_pack-body_num = v_lines.
wa_obj_pack-doc_type = 'PDF'.
wa_obj_pack-obj_name = 'ATTATCHMENT'.
wa_obj_pack-obj_descr = mtab_contract-ordno.
wa_obj_pack-doc_size = binfilesize.
APPEND wa_obj_pack TO t_obj_pack .
CLEAR wa_obj_pack.
**Object header
wa_obj_header-line = 'PDF'.
APPEND wa_obj_header TO t_obj_header.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_document_data
put_in_outbox = c_x
commit_work = c_x
IMPORTING
sent_to_all = flag_sent_to_all
new_object_id = obj_id
TABLES
packing_list = t_obj_pack
object_header = t_obj_header
contents_bin = t_obj_bin
contents_txt = t_obj_txt
receivers = t_rec_list
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
else.
return = 'true'.
ENDIF.
ENDFUNCTION.
<b> Flow Editor</b>
<flow>
<state name="Start">
<module name="<b>ZV_FUNC_CCK_EMAIL_PDF</b>" type="RFC" stateful="1">
<inputmapping source="Contract" target="CONTRACT"/>
<inputmapping source="email" target="EMAIL"/>
</module>
<module name="ZV_FUNC_CCK_VALIDATE_SHIPTO" type="RFC" stateful="1">
<inputmapping source="SHIP_TO" target="KUNNR"/>
<inputmapping source="USERNAME" target="USER"/>
<outputmapping source="CITY" target="CITY"/>
<outputmapping source="NAME" target="NAME"/>
<outputmapping source="POSTAL" target="POSTAL"/>
<outputmapping source="REGION" target="REGION"/>
<outputmapping source="RETURN" target="RETURN"/>
<outputmapping source="SD_CITY" target="SD_CITY"/>
<outputmapping source="SD_NAME" target="SD_NAME"/>
<outputmapping source="SD_POSTAL" target="SD_POSTAL"/>
<outputmapping source="SD_REGION" target="SD_REGION"/>
<outputmapping source="SD_STREET" target="SD_STREET"/>
<outputmapping source="SOLDTO" target="SOLDTO"/>
<outputmapping source="STREET" target="STREET"/>
</module>
</state>
<event name="onLoad" next_state="Start"/>
<event name="Check2" next_template="ZV_CCO_CONFIRMED_ORDER"/>
</flow> -
"Error for COM routine using application program (return code 1028514-)"
Hello Experts,
We have one issue in SAP SAP SCM 5.10.
When we are accessing the SNP Planing book, Now a days every often we are getting kicked out of the Planning book
with the error message "Error for COM routine using application program (return code 1028514-)"
How to rectify this,..Please advice /suggest
Regards,
RameshSorry, I copy the content as below:
Error -28514
Version Not Found
You attempted to access an OMS version, the liveCache infrastructure to store a Simulation Version, which does not exist (any longer).
On a productive system this error should only occur in exceptional situations because liveCache checks whether the simulation exists beforehand and returns an Error 17831 if this is not the case.
Reasons (=exceptional situation) for an error -28514 are:
a transactional simulation (Simulation Version) is older than liveCache parameter MaxRetentionTime (default: 8 hours). In this case, the OMS version (more precisely: the corresponding consistent view) can be deleted (asynchronously) by liveCache and an error -28514 will occur if the application tries to use the transactional simulation again.
a transactional simulation (Simulation Version) is older than liveCache parameter MinRetentionTime (default: 1 hour) and the data area usage exceeds 90%. In this case, the OMS version (more precisely: the corresponding consistent view) can be deleted (asynchronously) by liveCache and an error -28514 will occur if the application tries to use the simulation again.
If liveCache deletes an OMS version due to one of the reasons above, a corresponding notice can be found in liveCache's knlmsg file (cyclically overwritten!).
Error -28833
Error -28833 ("Consistent view has been cancelled") occurs instead of an error -28514, if the an OMS version is deleted while a parallel liveCache call is still using this OMS version.
Malfunction Test
If this error occurs during LCAPPS internal malfunction tests, it indicates that the preceeding provoked exception has not been handled correctly. During the handling of the provoked exception the OMS version is dropped automatically. As the malfunction test program catches the exception which would normally lead to a shortdump, it either has to recreate the current simulation in liveCache or to ensure that it is not used any more.
Error 17831 does not occur in this situation, because the keyed object representing the simulation (OMS version) is not deleted along with the version and can therefore still be accessed.
Best Regards,
Ada -
Can we handle exceptions for the expressions in select query?
Hi all,
Can we handle exceptions for the expressions in select query.
I created a view, there I am extracting a substring from a character data and expected that as a number.
For example consider the following query.
SQL> select to_number( substr('r01',2,2) ) from dual;
TO_NUMBER(SUBSTR('R01',2,2))
1
Here we got the value as "1".
Consider the following query.
SQL> select to_number( substr('rr1',2,2) ) from dual;
select to_number( substr('rr1',2,2) ) from dual
ORA-01722: invalid number
For this I got error. Because the substr returns "r1" which is expected to be as number. So it returns "Invalid number".
So, without using procedures or functions can we handle these type of exceptions?
I am using Oracle 10 G.
Thanks in advance.
Thank you,
Regards,
Gowtham Sen.SQL> select decode(ltrim(rtrim(translate(substr('r21', 2, 2), '0123456789', ' ' ), ' '), ' '), null, (substr('r21', 2, 2)), null) from dual;
DE
21
SQL> ed a
SQL> select decode(ltrim(rtrim(translate(substr('rr1', 2, 2), '0123456789', ' ' ), ' '), ' '), null, (substr('rr1', 2, 2)), null) from dual;
D
- -
Error Handling in table control for line item.
Hi,
Please how to do error handling in table control for line item in bdc,i have used format_message for header but i don't no fill decamps internal tabled and how to do background processing in call transaction.
ThanksBackground processing is not possible using call transaction method.
You can create an executable program which can have CALL TRANSACTION BDC code. And this can be run in background.
What do you exactly mean by Error handling for Items in table control. Can you give some more details. -
Run time error for program: RPCALCU0_CE
Hi Abapers,
When we execute the standard program: RPCALCU0_CE from SE38. Below run time error is getting trigerred before selection screen is displayed. Below are the run time error details -
Runtime Error UNCAUGHT_EXCEPTION
Exception CX_HRPA_INVALID_PARAMETER
Occurred on 08/04/2010 at 01:22:17
What happened?
The exception 'CX_HRPA_INVALID_PARAMETER' was raised but was not caught at any
stage in the
call hierarchy.
Since exceptions represent error situations, and since the system could
not react adequately to this error, the current program,
'CL_HRPA_RESOLVE_EXCEPTION=====CP', had to
be terminated.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_HRPA_INVALID_PARAMETER',
was neither
caught nor passed along using a RAISING clause, in the procedure
"RESOLVE_EXCEPTION" "(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
Invalid parameter EXCEPTION, value
The occurrence of the exception is closely linked to the occurrence of a
previous exception, "CX_HRPA_VIOLATED_PRECONDITION", which occurred in the
program "CL_HRPA_MASTERDATA_FACTORY====CP" -
specifically in line 6 of the (Include) program
"CL_HRPA_MASTERDATA_FACTORY====CM004".
The reason for the exception was:
Precondition violated
Please suggest the solution to overcome this.Hey,
I could not figure your exact problem. But you can go to the transaction ST22 to take a better look at the error that you got. This gives a detailed explanation of the exact error that you are getting. The moment you enter this transaction, you will see the number of runtime errors you got today. Just click on 'Today'. This will give you the list of runtime errors. Click on the relevent error and you can get a much more detailed explanation of the same.
Hope this helps. -
Handling exceptions for a event handler method.
Hi Mates,
I have two custom container in which i am displaying an alv grid usind objects. when a double click event is performed in one of the alv the other alv should be displayed. I now have to handle exceptions of the class CX_SY_DYN_CALL_ILLEGAL_TYPE. This is raised for an invalid parameter type when calling a method dynamically. I cannot use the keyword "RAISING" in the definition of the event handler method. i checked with the syntax of the method definition in abap dictionary, there were no addition "RAISING" for an event handler method. please provide me with the solution (a sample code would do.)Hello,
May be you should read about the TRY ... CATCH block which is used for handling exceptions.
Basic construct of your code should look like this:
TRY.
" Your Dynamic Method call
CATCH CX_SY_DYN_CALL_ILLEGAL_TYPE.
ENDTRY.
If you want to get the error message text:
DATA:
lcx_excp TYPE REF TO CX_SY_DYN_CALL_ILLEGAL_TYPE,
v_err_msg TYPE string.
TRY.
" Your Dynamic Method call
CATCH CX_SY_DYN_CALL_ILLEGAL_TYPE INTO lcx_excp.
v_err_msg = lcx_excp->get_text( ).
ENDTRY. -
Hi guys,
While getting the sales order from the JDE database. It is giving
Caught exception while handling request: deserialization error: java.text.ParseException: Unparseable date: "-11-JA-01T12:00:00-05".
can any one of you can guide me about this exception
Expecting a reply from any one ASAP.
Regards,
Chakrithe schema element for this field is having different datatype than what you are receiving the data. Can you check logs and see on which column it is failing? If we know the exact xsd datatype used for the element and and value that is stored in table then we can correct the xsd accordingly. Are you using dynamic sql query or select options to get values from DB.
Maybe you are looking for
-
Sales document report for all open documents
hi i need the code for sales document report for all open documents is sd ... can anyone help me out. thanks in advance
-
Hi Guru's, In transaction VA01 when we try to create memo by clicking on "create with reference" and giving the invoice no. there, it should copy all the line items of the invoice to that particular credit memo but it is not doing in my client but in
-
Only just bought my iPhone and having looked on the support pages cannot work out how to set up photo albums. Anyone help a complete technophobe?
-
hi.. i hava a problem in fileconnection.i cant able to write in txtfile."root is not accesible" error is showing while runtime. d code is given below. public boolean writefile() javax.microedition.io.Connection c = null; javax.microedition.io.file.Fi
-
No xServe system activity lights in 10.8 Server
Hi there, i have installed Mountain Lion Server on my xserve and everything is fine but the "System activity lights" do not come to live at boottime as the did in Lion server. I know they need a kext because by the time i was installing 10.7 server t