Exceptions in the function module
Hi,
I declared exceptions in the function module. But those exceptions not trigger in the abap editor.
Regards
Srinu
Hi
use RAISE EXCEPTION...
RAISE KEY WORD IT WILL DEFENETELY RAISE THE EXCEPTION..
REWARD IF IT USE FUL
Similar Messages
-
How do we trap exception inside the function module?
How do we trap exception inside the function module?
Use ABAP Help - CATCH, RAISE for starters. Or take a look at an existing function module, for example.
-
How to catch exception i defined in the function module
I defined the exception 'no_value_found' in the function module, now, the problem is how to catach it in the program calling it
Hi Atish
I have used sy-subrc to handle it in the program, howerver, it is still encounter runtime error:
Error message -
A RAISE statement in the program "SAPLZERC" raised the exception
condition "NO_OBJECT_INFO_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
No object information found
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
Errors is at following position:----
39 ELSE.
>> RAISE NO_OBJECT_INFO_FOUND.
41 ENDIF. -
Customer 9000AAAE : Exception 7 in function module VIEW_KUAG2
Hi,
Hi all,
When I do the intercompany billing for STO (vf01), I got the system message attached below. The customer 9000AAAE is a ship to party and assigned to the ordering plant. It has the partner function SH. So can anybody kindly tell me where is wrong in the custmer master data or somewhere else according to the following message? Or where to find the VIEW_KUAG2? What does it mean?
Customer 9000AAAE: Exception 7 in function module VIEW_KUAG2
Diagnosis
During the attempt to read customer master record 9000AAAE,
an error occured which is not handled separately.
System Response
The billing document for this business transaction was not
created.
Procedure
If the error occured during a background job, you should try
to create the billing document online. If the error occured
online, the billing document can be created online. In any
case, you should check the customer master record. If you
cannot find any error in the master data, contact SAP.
Technical data
Tech. data details
Client 002
Group Number
Sales Document Number 0080100090
Item Number of the SD Document 000000
Schedule Line Number 0083
Counter in Control Tables 00
Message Identification VF
System Message Number 083
Output Type E
Message Variable 01 9900AAAE
Message Variable 02
Message Variable 03 VIEW_KUAG2
Message Variable 04
Group Type F
In our Intercompany, our ship to party is different from the Sold to, bill to and Payer. The configuration done as follows -
a. Defined Ship to Party as 9000AAAE
b. Define Sold to, Bill to, Payer as 9000AAAA
c. Assignd Ship to Sold to
d. Assigned Ship to customer to plant assignment in STO configuration in MM
e. Assigned internal customer of sales organization as 9000AAAA
Please help in this
Best Regards
GouthamHi,
Thanks for ur reply
I check the partner determination and the settings are as below -
a. Defined new account group for Sold to, Bill to and Payer
b. Defined new account group for Ship to
c. In the Ship to party account group, system only determine the ship to partner function
d. Customer defined in Sold to is assined as interneal customer to sales org
e. Customer defined in Ship to is assigned as customer for plant in Shipping data configure for STO in MM Configuration
Please provide more insights
Best Regards
Goutham -
Uncatchable exception: BSP calling Function Module
Hi all,
currently i'm facing a very weird problem. My application class calls function module
HR_INFOTYPE_OPERATION. Normally, in case of an error, the function module gives you back a return parameter. But if i call it from my BSP, the processing doesn't leave the function module. It directly throws an exception ERROR_MESSAGE_STATE instead of writing the message into parameter return.
If i call the function module with the same parameters from a report, it works fine and the error message is written to return parameter without throwing an exception.
What am i doing wrong? I don't want that exception and need to go on with filled parameter result.
Regards
Mark-AndréHi MA,
try using ERROR_MESSAGE in the exceptions list, like this.
CALL FUNCTION 'func_name'
EXPORTING
string = text
pos = position
IMPORTING
string1 = text1
string2 = text2
EXCEPTIONS
string1_too_small = 1
string2_too_small = 2
ERROR_MESSAGE = 3
OTHERS = 4.
Cheers
Graham Robbo -
Not able to use Commit after the function module STATUS_OBJECT_CREATE
I am using function module STATUS_OBJECT_CREATE
CALL FUNCTION 'STATUS_OBJECT_CREATE'
EXPORTING
CHGKZ = 'X'
CLIENT = SY-MANDT
OBJNR = LV_OBJNR3
OBTYP = 'IWE'
STSMA = 'ZS_RE_01'
IMPORTING
OBJNR = LV_OBJNR3.
STONR = LV_STONR.
IF SY-SUBRC = 0.
COMMIT WORK.
ENDIF.
i am getting error after the COMMIT WORK .
I am not getting any issue in the function module .after the function module i am using the COMMIT WORK and i am getting the following error message
Category ABAP Programming Error
Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC
Except. CX_SY_OPEN_SQL_DB
ABAP Program SAPLBSVU
Application Component CA-GTF-TS-SMT
Date and Time 03/17/2014 07:01:29
|Short text |
| The ABAP/4 Open SQL array insert results in duplicate database records. |
|What happened? |
| Error in the ABAP Application Program |
| |
| The current ABAP program "SAPLBSVU" 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_OPEN_SQL_DB', was not caught |
| in |
| procedure "STATUS_UPDATE" "(FUNCTION)", 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: |
| If you use an ABAP/4 Open SQL array insert to insert a record in |
| the database and that record already exists with the same key, |
| this results in a termination. |
| |
| (With an ABAP/4 Open SQL single record insert in the same error |
| situation, processing does not terminate, but SY-SUBRC is set to 4.) |
|How to correct the error |
| Use an ABAP/4 Open SQL array insert only if you are sure that none of |
| the records passed already exists in the database. |
| |
| 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: |
| |
| "SAPSQL_ARRAY_INSERT_DUPREC" "CX_SY_OPEN_SQL_DB" |
| "SAPLBSVU" or "LBSVUU01" |
| "STATUS_UPDATE" |
| |
| 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 |
| "STATUS_UPDATE" "(FUNCTION)", 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..... 702 |
| SAP Basis Level. 0010 |
| |
| Application server... "sds6ci" |
| Network address...... "11.224.101.53" |
| Operating system..... "Linux" |
| Release.............. "2.6.18-194.el5" |
| Hardware type........ "x86_64" |
| Character length.... 16 Bits |
| Pointer length....... 64 Bits |
| Work process number.. 17 |
| Shortdump setting.... "full" |
| |
| Database server... "gctsdb01lds.hsi.hugh" |
| Database type..... "ORACLE" |
| Database name..... "DS6" |
| Database user ID.. "SAPDS4" |
| |
| Terminal.......... "GCTEMP02VDI" |
| |
| Char.set.... "C" |
| |
| SAP kernel....... 720 |
| created (date)... "Sep 14 2013 05:28:14" |
| create on........ "Linux GNU SLES-9 x86_64 cc4.1.2 use-pr130820" |
| Database version. "OCI_102, 10.2.0.5.0, V2, default" |
| |
| Patch level. 500 |
| Patch text.. " " |
| |
| Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*" |
| SAP database version. 720 |
| Operating system..... "Linux 2.6, Linux 3" |
| |
| Memory consumption |
| Roll.... 1317248 |
| EM...... 0 |
| Heap.... 0 |
| Page.... 0 |
| MM Used. 1242912 |
| MM Free. 53400 |
|User and Transaction |
| Client.............. 160 |
| User................ "DV018458" |
| Language key........ "E" |
| Transaction......... "SE38 " |
| Transaction ID...... "5323C30FC9364665E10000000BE06533" |
| |
| EPP Whole Context ID.... "002655EE0F241ED3ABB7D81260A28C44" |
| EPP Connection ID....... 00000000000000000000000000000000 |
| EPP Caller Counter...... 0 |
| |
| Program............. "SAPLBSVU" |
| Screen.............. "RSM13000 3000" |
| Screen Line......... 2 |
| Debugger Active..... "none" |
|Information on where terminated |
| Termination occurred in the ABAP program "SAPLBSVU" - in "STATUS_UPDATE". |
| The main program was "RSM13000 ". |
| |
| In the source code you have the termination point in line 60 |
| of the (Include) program "LBSVUU01". |
| The program "SAPLBSVU" was started in the update system. |
| The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in |
| procedure "STATUS_UPDATE" "(FUNCTION)", but it was neither handled locally nor |
| declared |
| in the RAISING clause of its signature. |
| |
| The procedure is in program "SAPLBSVU "; its source code begins in line |
| 1 of the (Include program "LBSVUU01 ". |
|Source Code Extract |
|Line |SourceCde |
| 30| LOOP AT jsto_upd WHERE chgkz = 'X'. |
| 31| CHECK: jsto_upd-chgnr > '000', |
| 32| jsto_upd-stsma NE jsto_upd-stsma_old. |
| 33| CLEAR jcdo_tab. |
| 34| MOVE-CORRESPONDING jsto_upd TO jcdo_tab. |
| 35| MOVE-CORRESPONDING chdat TO jcdo_tab. |
| 36| jcdo_tab-stsma_new = jsto_upd-stsma. |
| 37| APPEND jcdo_tab. |
| 38| ENDLOOP. |
| 39|* Änderungen zu Einzelstatus (Insert) |
| 40| LOOP AT jest_ins WHERE chgkz = 'X'. |
| 41| CHECK jest_ins-chgnr > '000'. |
| 42| CLEAR jcds_tab. |
| 43| MOVE-CORRESPONDING jest_ins TO jcds_tab. |
| 44| MOVE-CORRESPONDING chdat TO jcds_tab. |
| 45| jcds_tab-chind = 'I'. |
| 46| APPEND jcds_tab. |
| 47| ENDLOOP. |
| 48|* Änderungen zu Einzelstatus (Update) |
| 49| LOOP AT jest_upd WHERE chgkz = 'X'. |
| 50| CHECK jest_upd-chgnr > '000'. |
| 51| CLEAR jcds_tab. |
| 52| MOVE-CORRESPONDING jest_upd TO jcds_tab. |
| 53| MOVE-CORRESPONDING chdat TO jcds_tab. |
| 54| jcds_tab-chind = 'U'. |
| 55| APPEND jcds_tab. |
| 56| ENDLOOP. |
| 57|* Verbuchung Statusobjekte |
| 58| DESCRIBE TABLE jsto_ins LINES sy-tabix. |
| 59| IF sy-tabix > 0. |
|>>>>>| INSERT jsto CLIENT SPECIFIED |
| 61| FROM TABLE jsto_ins. |
| 62| ENDIF. |
| 63| DESCRIBE TABLE jsto_upd LINES sy-tabix. |
| 64| IF sy-tabix > 0. |
| 65| field-symbols <fs_jsto_line> like jsto_upd. |
| 66| loop at jsto_upd assigning <fs_jsto_line>. |
| 67| IF <fs_jsto_line>-chgnr = '000'. |
| 68| <fs_jsto_line>-chgnr = '999'. |
| 69| ENDIF. |
| 70|* on change of status profile delete user status related to old profile |
| 71| IF <fs_jsto_line>-STSMA NE <fs_jsto_line>-STSMA_OLD. |
| 72| DELETE FROM JEST CLIENT SPECIFIED WHERE |
| 73| MANDT = <fs_jsto_line>-MANDT AND |
| 74| OBJNR = <fs_jsto_line>-OBJNR AND |
| 75| STAT LIKE 'E%'. |
| 76| DELETE FROM JCDS CLIENT SPECIFIED WHERE |
| 77| MANDT = <fs_jsto_line>-MANDT AND |
| 78| OBJNR = <fs_jsto_line>-OBJNR AND |
| 79| STAT LIKE 'E%'. |i tried with out using commmit but it is not creating Status.
When i see the function module help and they are trying to COMMIT
FU STATUS_OBJECT_CREATE
Short Text
Create Status Object
Functionality
The function module generates a status object.
Take the object number from the object number management (function modules OBJECT_NUMNBER_GET_xx).
If no object number is given, the module takes a temporary object number that must be replaced later (function module STATUS_OBJECT_SWITCH_NUMBER).
Example
Creating an internal order with number 100123 (object type "ORC") for status profile "STATSCHEM" with final object number
call function 'OBJECT_NUMBER_GET_OR'
exporting
aufnr = '100123'
importing objnr = objektnummer.
call function 'STATUS_OBJECT_CREATE'
exporting
objnr = objektnummer
obtyp = 'ORC'
stsma = 'STATSCHEM'.
commit work.
Creating the same order with a temporary object number
data: objectkey like ionra.
* TBO00-REFSTRUCT for object type 'OR' is 'IONRA'
objectkey-aufnr = '100123'.
call function 'STATUS_OBJECT_CREATE'
exporting
i_objectkey = objectkey
obtyp = 'ORC'
stsma = 'STATSCHEM'.
importing
objnr = objektnummer.
call function 'OBJECT_NUMBER_GET_OR'
exporting
aufnr = '100123'
importing objnr = objektnummer_neu.
call function 'STATUS_OBJECT_SWITCH_NUMBER'
exporting
objnr_old = objektnummer
objnr_new = objektnummer_neu.
commit work.
Notes -
Error while using the function module GUI_UPLOAD
Hi,
My requirement is to upload the data from .txt file into internal table.
I have given my code like this
PARAMETERS: p_fname LIKE rlgrap-filename.
data: begin of gt_string occurs 0,
record type char255,
end of gt_string.
AT SELECTION-SCREEN ON VALUE-REQUEST for p_fname.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = 'X'
MASK = ' '
CHANGING
file_name = p_fname
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_fname
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = gt_string
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Here I am getting dump error as 'Type conflict when calling a function module.
The function module interface allows you to specify only fields
of a particular type under "FILENAME". The field "P_FNAME" specified here has a different field type'.
What would be the reason for this error?
Can anyone help me?
Regards,
Hemasee this sample program for F4 help
*& Report ZSD_EXCEL_INT_APP
REPORT ZSD_EXCEL_INT_APP.
parameter: file_nm type localfile.
types : begin of it_tab1,
f1(20),
f2(40),
f3(20),
end of it_tab1.
data : it_tab type table of ALSMEX_TABLINE with header line,
file type rlgrap-filename.
data : it_tab2 type it_tab1 occurs 1,
wa_tab2 type it_tab1,
w_message(100) TYPE c.
at selection-screen on value-request for file_nm.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = 'X'
MASK = ' '
CHANGING
file_name = file_nm
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
start-of-selection.
refresh it_tab2[].clear wa_tab2.
file = file_nm.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = file
i_begin_col = '1'
i_begin_row = '1'
i_end_col = '10'
i_end_row = '35'
tables
intern = it_tab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 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.
loop at it_tab.
case it_tab-col.
when '002'.
wa_tab2-f1 = it_tab-value.
when '004'.
wa_tab2-f2 = it_tab-value.
when '008'.
wa_tab2-f3 = it_tab-value.
endcase.
at end of row.
append wa_tab2 to it_tab2.
clear wa_tab2.
endat.
endloop.
data : p_file TYPE rlgrap-filename value 'TEST3.txt'.
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*--- Display error messages if any.
IF sy-subrc NE 0.
MESSAGE e001(zsd_mes).
EXIT.
ELSE.
*---Data is downloaded to the application server file path
LOOP AT it_tab2 INTO wa_tab2.
TRANSFER wa_tab2 TO p_file.
ENDLOOP.
ENDIF.
*--Close the Application server file (Mandatory).
CLOSE DATASET p_file.
loop at it_tab2 into wa_tab2.
write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.
endloop. -
How to use Exceptions for a function module
Hi folks,
I have created a new function module.Its working fine, but i am not aware of using exceptions for a function module. I hav just declared an exception in the 'exception' tab. Could any body explain me how to use that in my FM source code....Thanks...Hi Shyam,
Have a look at this,
START-OF-SELECTION.
gd_file = p_infile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gd_file
has_field_separator = 'X' "file is TAB delimited
TABLES
data_tab = it_record
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc NE 0.
write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
skip.
endif.
Regards,
Sai -
Hi there,
I´m trying to launch NWCE 7.1 Webdynpro applications accessing ABAP function with no success.
The landscape consists of an SAP NWCE 7.1 EHP1 (Trial) and an SAP NW 2004s ABAP (Licensed). NW2004s is configured as Gateway and Message Server for the SLD. I can ping/test JCOs successfully and the SLD seems to work fine. RZ70 and SM59 show no errors in the "R3" side and both systems seem to be well-registered as Technical Systems.
I have done some simple examples in Developer Studio to ensure that the conection between both stacks is going well, but I have allways the same issue regardless using ARFC/ARFC2, new projects/old existing projects, etc.
When I test for first time the application, the following exception is thrown:
Caused by: com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: The function module "DD_DTEL_GET" cannot be used for 'remote' calls.
at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:456)
at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1416)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:4168)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3596)
at com.sap.mdi.jco6.Destination.execute(Destination.java:29)
... 136 more
If I refresh the page the last exception disappears and a new one is thrown:
#2# local/prjWD_Acceso_ABAP/FlightListApp#java.lang.NullPointerException
at com.sap.mdi.ddtypes.DDDataelement.getDescription(DDDataelement.java:305)
at com.sap.dictionary.types.mdi.util.TextServices.getDescription(TextServices.java:165)
at com.sap.dictionary.types.mdi.util.TextServices.getQuickInfo(TextServices.java:145)
at com.sap.dictionary.runtime.DdDataType$TextService.getQuickInfo(DdDataType.java:220)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:385)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:355)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.getDisplayText(MappedAttributeInfo.java:292)
at com.sap.tc.webdynpro.progmodel.view.ViewElement._getText(ViewElement.java:818)
at com.sap.tc.webdynpro.progmodel.view.UIElement.getTooltip(UIElement.java:515)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter$OrdinaryField.getTooltip(InputFieldAdapter.java:8201)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter$OrdinaryField.getParameter(InputFieldAdapter.java:7496)
at com.sap.tc.ls.renderer.ie6.LSInputFieldRenderer.render(LSInputFieldRenderer.java:160)
at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:152)
at com.sap.tc.webdynpro.clientimpl.html.client.RenderManager.render(RenderManager.java:519)
at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:130)
at com.sap.tc.ls.renderer.ie6.LSColumnLayoutRenderer.renderColumnLayoutCellFragment(LSColumnLayoutRenderer.java:1882)
at com.sap.tc.ls.renderer.ie6.LSColumnLayoutRenderer.renderColumnLayoutRowFragment(LSColumnLayoutRenderer.java:1715)
at com.sap.tc.ls.renderer.ie6.LSColumnLayoutRenderer.renderColumnLayoutFragment(LSColumnLayoutRenderer.java:1600)
Then, editing the application in Dev. Studio, if I delete tables and/or single fields binded to model context, the last exception doesn´t appear any more but the application enter in the catch section executing the BAPI call:
try
wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();
catch(Exception ex)
wdComponentAPI.getMessageManager().reportException("Execute error."+ex.toString()+ex.getMessage());
StackTraceElement errores[] = ex.getStackTrace();
String errorSTR = new String();
for (int i = 0; i < errores.length; i++){
errorSTR += errores<i>.toString() + "
wdComponentAPI.getMessageManager().reportException(errorSTR);
wdComponentAPI.getMessageManager().reportSuccess("After catch.");
// Resynchronise the data in the context with the data in the model
wdContext.nodeOutput().invalidate();
The first two exception seem to be related each other, and it is true that FM "DD_DTEL_GET" is not RFC enabled in R3. Should it be RFC enabled?
As far as I know, one of the JCO conectors is used for retrieving metadata, that is, data related to types, lenghts, etc. The FM "DD_DTEL_GET" is used for that kind of operations and the second exception is related to that aswell (com.sap.mdi.ddtypes.DDDataelement.getDescription).
I don´t know what else should I test in order to launch an RFC function from WDJ and the trial version is about to expire!
Does anyone know about any oss note or any other tips related to this issue, please?
I am going to test the conectivity via Visual Composer and see whether it´s possible :S
Let me know if you need anymore info about the situation.
Thanks a lot!Hi again,
The issue hasn´t been solved yet :(.
After applying Note 1244067 the function module has the RFC flag checked but the Null Pointer exception are still there.
java.lang.NullPointerException
at com.sap.mdi.ddtypes.DDDataelement.getReptext(DDDataelement.java:166)
at com.sap.dictionary.types.mdi.util.TextServices.getColumnLabel(TextServices.java:115)
at com.sap.dictionary.runtime.DdDataType$TextService.getColumnLabel(DdDataType.java:212)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:379)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:355)
at com.sap.tc.webdynpro.progmodel.view.ViewElement._getText(ViewElement.java:818)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.Caption.getText(Caption.java:369)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter$HeaderCell.getHeaderText(TableAdapter.java:11441)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter$HeaderCell.getParameter(TableAdapter.java:11043)
at com.sap.tc.ls.renderer.ie6.LSSapTableHeaderCellRenderer.renderSapTableHeaderCellFragment_iteration(LSSapTableHeaderCellRenderer.java:2421)
at com.sap.tc.ls.renderer.ie6.LSSapTableRowRenderer.renderSapTableRowFragment(LSSapTableRowRenderer.java:223)
at com.sap.tc.ls.renderer.ie6.LSSapTableRowRenderer.render(LSSapTableRowRenderer.java:122)
at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:152)
at com.sap.tc.webdynpro.clientimpl.html.client.RenderManager.render(RenderManager.java:519)
at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:130)
at com.sap.tc.ls.renderer.ie6.LSSapTableDefaultBodyRenderer.renderSapTableDefaultBodyFragment(LSSapTableDefaultBodyRenderer.java:301)
at com.sap.tc.ls.renderer.ie6.LSSapTableDefaultBodyRenderer.render(LSSapTableDefaultBodyRenderer.java:119)
at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:152)
at com.sap.tc.webdynpro.clientimpl.html.client.RenderManager.render(RenderManager.java:519)
at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:130)
Language resources data in the webdynpro are: Current locale = "es", Default VM locale = "es_ES". The backend default language is "EN". Could this be a problem in order to retrieve descriptions or any other language dependent data?
Thank you
Vicente. -
System_failure error with the function module HTTP_POST
Hi Friends,
While executing the function module "HTTP_POST" ,sometime we are getting the error "System_Failure" exception.
Can anyone tell what could be the reason for this exception,any configurations need to be done on SAP???
For this FM we are passing the RFC destination"SAPHTTPA" as one of the paratmeter and
The two import paramters we are passing to this FM are
URI :
http://10.74.40.31:8686/ArchiveBridge/?informaticaArchive&contRep=IA&sumFile=MYTA_SUMMARY_20090820063258.sum
Destintion : SAPHTTPA
Thanks all in advance.
Regards
DharmarajuHi,
Check if any proxy is maitained in the client by going into transaction
SICF-> Goto-> HTTP Client Proxy -> HTTP LOG TAB.
If there is anything maintained under Host name and port, if yes you need to specify the IP address while calling FM HTTP_POST
under PROXY as
192.168.0.1:8080 where first part is IP address & 2nd part(8080) is port.
Also test connection for SAPHTTPA under SM59 to see if its properly configured.
Regards,
Amit -
Getting error in the function module
Hi everybody.
I have created one function module in se37 and i am calling that function module in the se38 report, when i am executing the report it is throwing me an error.
here in my report i am having the select option fields ex matnr, in the function module importing i have given the parameter matnr over there and when i am running the report it is through an error that
"The function module interface allows you to specify only
fields of a particular type under "MATNR".
The field "S_MATNR" specified here is a different
field type "
IF i am giving the parameter instead of select-options in the report and executing, then the function module is getting triggered and receiving the data what ever the code is available in the source code.
can anyone help me out in this issue so that i can get the data while using the select-option instead of parameter.
Thanks in advanceHi,
Actually, I wouldn't recommend the use of that tables parameter...
From sap help:
Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
Exceptions
So i definitely would go with either importing or changing parameter...
Cheers,
m. -
Doubt in the function module POPUP_GET_VALUES
Hi,
i am using the function module POPUP_GET_VALUES. I am giving the table name and field name but the field name shows in display mode i am not able to enter any values in the given popup. What is the problemHi,
U can go through the FM documentation:
Dialog box for the display and request of values, without check
Preliminary comment
This function module has been released.
The documentation is being revised so that it conforms to the requirements for released function modules.
Function
This function module sends a dialog box and includes the fields specified in the FIELDS interface table. The fields specified in the FIELDS table must be defined in the ABAP Dictionary.
If no text is specified for a field, the ABAP Dictionary key word is displayed. The key words and fields can be displayed normally or highlighted. You must also define whether the fields are ready for input or not, and whether they are mandatory or not. Defaults can be defined for the fields.
After the display, the values entered by the user in the date and time fields are checked for formatting and plausability. Otherwise, the values entered are returned to the user unchecked.
The function module can be used, for example, to:
Display information
Request values which do not need to be checked
Request values to limit data accesses ( from - to)
Support prototyping
Examples
For examples, see the program RSSPO410.
Notes
Conversion exits are handled normally.
References from CURR and QUAN fields are handled if the reference fields are also specified. The display of the reference fields can be suppressed.
If a currency field (type CURR) is specified, then the field assigned in the ABAP Dictionary for the currency key (type CUKY) must also be specified. The display of the currency key field can be suppressed (if filled initially).
Dates are checked according to the definition in the user master data.
Times must be entered using the '__:__:__' template.
F1 help and F4 help are supported.
Each field can be specified once only. Repeated fields or field groups are not supported. Table names preceded by an asterisk are an exception to this.
Only fields wih the ABAP type C, N, T, D, P, or Integer are permitted.
No updates are performed.
A maximum of ten fields can be displayed in a dialog box. If there are more than ten fields, a dialog box with a scroll bar is sent. You can use the POPUP_GET_VALUES_SET_MAX_FIELD function module to change the maximum number of fields in a dialog box.
If you use this function module, remember that ABAP Dictionary tables are sent implicitly using variables. A cross-reference across tables used in programs cannot determine these tables. For this reason, declare the tables under TABLES in the calling program.
Hope this helps. -
How to use the Function Module RH_READ_INFTY_1001...
Hi,
Can any one Tell me .. How to do the same functionality .. given below (select).
Using the Function Module RH_READ_INFTY_1001...
*reads CP (Central Person) based on BP (Business Partner)
Select single objid (Object ID)
from hrp1001
into gv_sobid
where subty eq 'B207'
and sclas eq 'BP'
and sobid eq is_header-partner.
*reads P (Person) Based on determined BP (Business Partner)
select single sobid (ID related Object)
from hrp1001
into gv_sobid
where subty eq 'B209'
and otype eq 'CP'
and objid eq gv_sobid.
*determines UserID from IT0105 for determined personell ID
select single usrid
from pa0105
into gv_usrid
where pernr eq gv_sobid
and subty eq '999'.
Reply ASAP....
Answers will be Rewarded...objects-plvar = l_plvar.
objects-otype = 'S '.
objects-sobid = l_positions-objid.
APPEND objects.
CLEAR i1001_itab. REFRESH i1001_itab.
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
* AUTHORITY = 'DISP'
* WITH_STRU_AUTH = 'X'
istat = '1'
* EXTEND = 'X'
subty = 'A008'
begda = l_keyda
endda = l_keyda
* CONDITION = '00000'
* SORT = 'X'
* WITH_EV = ' '
* ADATA = 'X'
TABLES
i1001 = i1001_itab
objects = objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
IF sy-subrc <> 0.
CLEAR i1001_itab. REFRESH i1001_itab.
CLEAR mngr_nr.
ELSE.
READ TABLE i1001_itab WITH KEY sclas = 'P'.
IF sy-subrc = 0.
mngr_nr = i1001_itab-sobid.
ELSE.
THis is the sample code to use function module using this function module you can get upto HRP1001 selection for userid you need to use same select you write for PA0105 -
How to use the function module ....
hi
how to use the function module ssf_function_module_name in smartformsHi..
If you are using this Function module, you can get the generated function module name of smartform dynamically. It is good progrmaming practice to get the fucntion module name dynamically because there might be some problems if you are hard coding in program.
This will return the name of the function module and then from the exporting parameters you can use the fucntion module name to pass parameters to Smartforms.
Check this link.I am expalining here how to use this function module.
https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
<b>Reward points if useful</b>
Regards
Ashu -
Regarding how to use the function module *control_form* in scripts
HI friends,
Can any one tell why and where do we use the function module control_form in scripts. Can you give me a small scenario how to use in scripts.hi satish,
by using this function module we can pass the control
commands to FORM THROUGH ABAP/4 PROGRAM.
see the following example:
TABLES: kna1.
DATA: BEGIN OF it_kna1 OCCURS 0,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
land1 LIKE kna1-land1,
END OF it_kna1.
DATA:records TYPE i,
window TYPE i value 1.
select-options:s_kunnr for kna1-kunnr.
SELECT kunnr name1 ort01 land1 FROM kna1 INTO TABLE it_kna1
where kunnr in s_kunnr.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'ZSCRIPT4'
language = sy-langu.
LOOP AT it_kna1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ELE1'
function = 'SET'
type = 'BODY'
window = 'MAIN'.
DESCRIBE TABLE it_kna1 LINES records.
IF window lt records.
window = window + 1.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-WINDOW'
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
OTHERS = 3
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.
ENDIF.
thanks,
raji
Maybe you are looking for
-
Extract text from PDF without opening PDF in window C#
Hello, I'm creating a application for searching text in PDF's. I found some code wich uses the SDK from Acrobat (Installed on my system). But all the snippets I find seem to open a PDF window and then extract the text. Is it possible to extract the t
-
HI, My scenario is like this i have a package/function in db which returns a custom type. Now i want to transform this custom type into a flat file. Here is my procedure : Declare v_return_value XXTLN_EMP_ASSG_DATA_TAB := XXTLN_EMP_ASSG_DATA_TAB ();
-
on my Mac, using the Finder, on my folder, I don´t have the library folder as I should. I think it is strange. When I go to the time machine, the Library folder it is there, but the folder has not the same colour as the other folders (it is light gre
-
This is my first try using Encore DVD. I have designed a menu, then transcoded my project. However, when I play the resulting DVD, the menu I designed does not appear. Instead the DVD autoplays. How can I make my menu appear? Thanks.
-
UCS C240 M4 with Cisco UCS VIC1227 VIC MLOM - Dual Port 10Gb SFP+
Hi All, Have a few UCS C-series questions: If I have a UCS C240 M4 rack server with Cisco UCS VIC1227 VIC MLOM - Dual Port 10Gb SFP+, but do not have fabric interconnect(s), I cannot use the UCS VIC1227 for anything, can I? The VIC ports HAVE to be c