Xpath error in calling function module through jco
Hello Experts,
We have a production XMII system which was running fine when suddenly it started giving the xpath errors in the log file.
The error that we got was -
Uncaught exception from SAPJCOInterface_0, No nodes found in variable 'SAPJCOInterface_0.Request' and xpath:
I checked the XML found that the structure was there but values were missing in the XML. We restarted the server and the error stopped coming.
Has anyone faced similar issue ? What should be look at to find the root cause of this problem ?
Thanks,
SB
Hi,
While using the form interface variables, don't use them directly in the smartforms because form interface variable, workareas and tables are read only (in ur case g_vbeln,g_age,g_mahza). Instead of that declare a global variable in the smartform of the same type and In the initiialization tab assign print parameter values to global fields and use them in the smartform. This case holds good when u are passing tables and work areas to smartforms from print program.
Revert back if u face any problem.
Regards,
Gautham Paspala
Similar Messages
-
Type error while calling function module with in FOX formula
Hi,
I am getting following error while calling function module from FOX Formula:
"Types of parameter DAY_IN () and variable J_CALDAY(D) are inconsistent"
Following is the code:
DATA I_CALDAY TYPE 0CALDAY.
DATA N_CALDAY TYPE 0CALDAY.
DATA KYF TYPE KEYFIGURE_NAME.
FOREACH I_CALDAY, KYF.
CALL FUNCTION SLS_MISC_GET_LAST_DAY_OF_MONTH
EXPORTING
DAY_IN = I_CALDAY
IMPORTING
LAST_DAY_OF_MONTH = N_CALDAY.
{KYF, N_CALDAY} = {KYF, L_CALDAY}.
ENDFOR.
Import parameter DAY_IN is of type sy-datum (that inturn is data element SYDATUM of data type DATS - same as 0CALDAY). Not sure why error is being thrown. Any idea? Thanks.
Edited by: SAP_BOY on Dec 4, 2009 5:26 PMHi,
I think It will not identify ,though you have (data element SYDATUM of data type DATS - same as 0CALDAY).Check it out by assigning it through a variable of type D.
Data I_CALDAY TYPE D.
Hope it may work out.
Regards,
Indu -
Error while calling function module to start form
Hello Experts .
First i make my data selection. Then i will get the name of the generated function module. Then i call FP Job open. up to here all is ok. But when i call the generated function module. There comes the popup error message. The text on this popup is SAP <SystemID>:System message, Workprocess restarts. Session deleted" (or similar, I only get the german text "PBI: SAP-Systemnachricht: Workprozess druchgestartet (Modus abgebrochen)).
I dont know why.
Can anybody help?
Regards
Chris-> Executing Test Report FP_TEST_00 works correct. i see a pdf.
->Excecuting Test Report FP_CHECK_DESTINATION_SERVICE works correct
FP_JOB_CLOSE is not called in my report.
-> Executing Testreport:FP_TEST_IA_01 I get the error message:'
ADS: com.adobe.ProcessingException: Could not retrieve a password for credential: ReaderRights(200.101).' -
Third party system call function module/BAPI through RFC to update Z table
Dear Friends,
We have a third party system which directly inserts a Z table in SAP through its programming, which is an auditing issue.
We want the third party system should call function module/BAPI through RFC so that the Z table gets updated.
waiting for inputs..
Thanks,
Kumarif third party system is capable of making Remote Function call, then writing a Function module & making it remote enable is not difficult task in ABAP.
You may have to prepare specifications first to decide if third party system is going to Read, insert, update, delete records from Zee table. -
Error BT616 when calling function module SXPG_COMMAND_EXECUTE in background
Hi All,
We use function module SXPG_COMMAND_EXECUTE with a custom command we defined in SM69 to move files in unix (mv command).
The function module call has worked fine for almost a year and recently we have been seeing an error (BT616) in our job lob (SM37) when the program is run in background. We have not been able to reproduce the error in foreground mode and it seems to be occuring only periodically in the background. (The appropriate SAP authorization objects where assigned to the batch job ID and the steps on the batch job.) We are in the process of setting up the trace flag and performing analysis on the trace log via ST11 to help identify the issue.
After perform analysis on SXPG_COMMAND_EXECUTE, the error is occurring when calling function module SAPXPG_END_XPG for exception 2, system failure, yet function module SAPXPG_END_XPG does not exist. I assume this is a program at the operating system level and is just a signature of the parameters to be passed to the operating system program.
Below is part of the SAP function module SXPG_COMMAND_EXECUTE that is failing.
* Now we have to wait for the termination of the external
* command if the caller wants us to.
IF TERMINATIONWAIT = 'X'.
CALL FUNCTION 'SAPXPG_END_XPG'
DESTINATION DESTINATION
IMPORTING EXITSTAT = STATUS
EXITCODE = EXITCODE
TABLES LOG = LOG
EXCEPTIONS COMMUNICATION_FAILURE = 1 MESSAGE MSG
SYSTEM_FAILURE = 2 MESSAGE MSG.
I performed a where used on function module SXPG_COMMAND_EXECUTE, and most of SAP programs call the function module with the parameter TERMINATIONWAIT = 'X', so I assume we should pass X as well.
Any ideas on what could be causing this issue?
Mike VondranI also remember I have this kind of issue, as I have some UNIX script at OS( UNIX) level . The problem was with the ID , as it dont have proper authorization at OS level ( UNIX ) . Please check this ID authorization. This could be the one of reasons if youre sure from SAP standpoint.
Hope thisll give you some guide line..
Thanks
Bye -
How to capture errors when a Function module is called as BACKGROUND TASK
How to capture errors when a Function module is called as BACKGROUND TASK?.Please advise.
FUNCTION ZRPM_DELETE_PROJECT_DATA_API.
""Local interface:
*" IMPORTING
*" VALUE(IV_EXTERNAL_ID) TYPE RPM_TV_EXTID OPTIONAL
*" VALUE(IV_PROJECT_GUID) TYPE RPM_TV_GUID OPTIONAL
*" VALUE(FLAG) TYPE BOOLEAN OPTIONAL
*" EXPORTING
*" VALUE(EV_RC) TYPE I
*" VALUE(EV_MSG) TYPE STRING
*" VALUE(ET_MSG) TYPE RPM_TT_MESSAGES
IF flag = cl_rpm_co=>sc_true.
Call function 'RPM_DELETE_PROJECT_DATA' IN BACKGROUND TASK
EXPORTING
IV_EXTERNAL_ID = IV_EXTERNAL_ID
IV_PROJECT_GUID = IV_PROJECT_GUID
IMPORTING
EV_RC = EV_RC
EV_MSG = EV_RC
ET_MSG = ET_MSG.
COMMIT WORK.
ELSE.
CALL FUNCTION 'RPM_DELETE_PROJECT_DATA'
EXPORTING
IV_EXTERNAL_ID = IV_EXTERNAL_ID
IV_PROJECT_GUID = IV_PROJECT_GUID
IMPORTING
EV_RC = EV_RC
EV_MSG = EV_MSG
ET_MSG = ET_MSG.
ENDIF.
ENDFUNCTION.
In above code how to capture 'EV_RC' when FM is called as background task.Prakash,
CALL FUNCTION IN BACKGROUND TASK allows no IMPORTING parameters, so that your code will produce a syntax error.
The calling program can only handle errors of remote function calls (RFC) if these are either
- synchronous RFC (that is CALL FUNCTION ... DESTINATION ...) or
- asynchronous RFC (that is CALL FUNCTION STARTING NEW TASK ... DESTINATION ...).
Both synchronous and asynchronous RFC allow the capturing of errors by means of exceptions. But that is a different topic. -
Error while calling BAPI_PARTNEREMPLOYEE_CREATE BAPI using JCO
Hi All,
Our requirement is to create and update customer contact details from java application. For this purpose we are trying to call BAPI_PARTNEREMPLOYEE_CREATE BAPI for create contact and BAPI_PARTNEREMPLOYEE_EDIT for updating contact information. As these BAPIs are of online version, error is coming while calling these BAPIs.
So is there any way to call these BAPIs through JCO or are there any alternative BAPIs available for same purpose?
Thanks in advance,
Arati.Hi,
All the bapi or function module available in SAP to create contact person will internally do a call transaction to VAP1 and VAP2 tcodes in order to create or change contact person respectively.
We had a similar problem when we were creating and updating customer contact person using inbound idoc. We then created a bdc recording for the same and then created two function module with name Z_CREATE_CONTACT and Z_CHANGE_CONTACT. In your case you can make this function modules as RFC enabled FM and call them using JCO I guess.
KR Jaideep, -
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. -
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 -
Calling Function Module in Update Task
Hello Experts,
Can anyone let me know about
Calling Function Module in Update Task.
Why do we use this " In Update Task " ??
How do we Use ??
What is the Use... ??
Kindly let me know....
Thanks and Regards
Pramodhi,
Why do we use this " In Update Task " ??
The main update technique for bundling database changes in a single database LUW is to use CALL FUNCTION... IN UPDATE TASK.
How do we Use ??
A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
What is the Use... ??
Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load
Real time scenario.
Suppose a user wants to change an entry in a database table, or add a new one. He or she enters the necessary data, and then starts the update process by choosing Save. This starts the following procedure in the ABAP program:
Firstly, the program locks the database entry against other users, using the enqueue work process (or the message server in the case of a distributed system). This generates an entry in the lock table. The user is informed whether the update was successful, or whether the lock could not be set because of other users.
If the lock is set, the program reads the entry that is to be changed and modifies it. If the user has created a new entry, the program checks whether a record with the same key values already exists.
In the current dialog work process, the program calls a function module using CALL FUNCTION... IN UPDATE TASK, and this writes the change details as an entry in table VBLOG.
When the program is finished (maybe after further dialog steps), a COMMIT WORK statement starts the final part of the SAP LUW. The work process that is processing the current dialog step starts an update work process.
Based on the information passed to it from the dialog work process, the update work process reads the log entries belonging to the SAP LUW from table VBLOG.
The update work process passes this data to the database for updating, and analyzes the return message from the database. If the update was successful, the update work process triggers a database commit after the last database change and deletes the log entries from table VBLOG.
If an error occurred, the update work process triggers a database rollback, leaves the log entries in table VBLOG, flags them as containing errors, and sends a SAPoffice message to the user, who should then inform the system administrator.
The corresponding entries in the lock table are reset by the update work process.
Hope this is helpful, Do reward. -
Call function module in backgrouns task and in update task
Hi Gurus,Pls crear me on the " <b>Call function module in backgrouns task and in update task</b>".
how it works and waht is the link with LUW releated to these .
also heard that commit work statement aslo linked with this.
Pls clarfiy me with expalnation of code.Hi sridhar,
the explanation already given is correct and good. Small add-on:
All functions called during one LUW with addition IN UPDATE TASK are stored together with their actual parameters in a temporary memory area. The moment a COMMIT WORK is issued, the functions are released to be executed by a so-called update task which is running in the background. This explains why functions called in update task never return anything, no SY-SUBRC and no export or table parameters If a function called in update task raises an exception or runs into an error the calling user will get an express message informing about this. Also, all database updates done by this update process are rolled back to keep consistency.
This proceeding helps to keep database tables consistent and allows the user to keep on doing his work before all database updates are complete. You may have seen messages like "material will be changed" after saving. If you open the same material immediately, you'll get a message "object locked by...<yourself>". This means the update task is still running.
Regards,
Clemens -
How to call function module from IP
Hi
I need to trigger the process chain from the input ready queries in Bex analyzer. I figured out that I need to call RSPC_API_CHAIN_START.
How do we go about in calling the above function module in IP.
Thanks in advance
IHi Matt
Thanks for your response, it was very productive at the right time as we saw our process chain running indefinetly. With selecting all chars to be changed, it ran just once with no errors.
what is TA ? I know rsplan- transaction code for the planning modeler.
Can you tell me how can we call function module in custom exit planning function.
Where should I embed the code
CALL FUNCTION 'RSPC_API_CHAIN_START'
EXPORTING
I_CHAIN = 'ZPC_CCATOPCA'.
I_T_VARIABLES =
I_SYNCHRONOUS =
I_SIMULATE =
I_NOPLAN =
IMPORTING
E_LOGID =
EXCEPTIONS
FAILED = 1
OTHERS = 2
thanks in advance -
HOW TO CALL FUNCTION MODULE FROM ABAP4 EDITOR
HI !
friends
I want to call function module from abap 4 editor.
is there any shortcut key from edit menu through which if give a function module name then it calls the function automatically?
points will be awarded.
Cheers
troycommand will be like this
<b> call function 'YW2_GET_MNW_PERIOD'
exporting
w_budat = v_datum
importing
w_period = i_date-period
w_period_desc = i_date-p_desc.</b>
Regards
prabhu -
There seems to be an error in the function module OPEN_FORM obstructing the
Hi,
There seems to be an error in the function module OPEN_FORM obstructing the process.
Some vendors are not cabaple of usinf EDI and for some reason also not willing to use TTOOL solutions (example Hewlet Packard). In those cases the supplier still would like to get purchase order electronically via e-mail. Sending POu2019s via external mail (SMTP) is basically standard function in R/3 that has been possible since the version 4.5. It is not pre-configured, so (almost) all the required elements needs to be configured.
When we send the output message through ME9F t'code i facing the problem in the above FM.
Please help me how to solve this.
VijayGot you, the digital display for Cupertino and Frankfurt are wrong too.
Submit feedback:
http://www.apple.com/feedback/iphone.html -
Can we call functional module in a subroutine? Any example?
Can we call functional module in a subroutine? Any example?
sample code....
REPORT ZPL_BDC_PA30.
TABLES : PA0022.
DATA : V_PERNR LIKE PA0022-PERNR,
V_SLABS LIKE PA0022-SLABS.
DATA : FILENAME TYPE STRING.
DATA : BEGIN OF IT_DATA OCCURS 0,
PERNR LIKE PA0022-PERNR, "Personnel Number
SLABS LIKE PA0022-SLABS, "Certificate code
SLABS1 LIKE PA0022-SLABS, "Certificate code new
END OF IT_DATA.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 1 WITH HEADER LINE.
DATA : BEGIN OF IT_ERROR OCCURS 0,
POS LIKE SY-TABIX,
TEXT(40),
END OF IT_ERROR.
PARAMETERS : P_FNAME TYPE DXFIELDS-LONGPATH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
I_LOCATION_FLAG = ' '
I_SERVER = '?'
I_PATH = I_PATH
FILEMASK = '.'
FILEOPERATION = 'R'
IMPORTING
O_LOCATION_FLAG = O_LOCATION_FLAG
O_SERVER = O_SERVER
O_PATH = P_FNAME
ABEND_FLAG = ABEND_FLAG
EXCEPTIONS
RFC_ERROR = 1
ERROR_WITH_GUI = 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.
START-OF-SELECTION.
FILENAME = P_FNAME.
PERFORM UPLOAD. "Uploading inputfile to internal table.
PERFORM VALIDATE. "validating the values
PERFORM POPULATE_BDC. "Populating bdc internal table
PERFORM ERROR_RECORDS
TABLES IT_ERROR. "Error records
*& Form bdc_fdata
FORM BDC_FDATA USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM. " bdc_fdata
*& Form bdc_hdata
FORM BDC_HDATA USING PROGRAM SCRNO DYNBEGIN.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = SCRNO.
IT_BDCDATA-DYNBEGIN = DYNBEGIN.
APPEND IT_BDCDATA.
ENDFORM. " bdc_hdata
*& Form upload
FORM UPLOAD .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = FILELENGTH
HEADER = HEADER
TABLES
DATA_TAB = IT_DATA
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 I000(BCTRAIN) WITH 'FILE NOT UPLOADED'.
ELSE.
MESSAGE I000(BCTRAIN) WITH 'FILE UPLOADED'.
ENDIF.
ENDFORM. " upload
*& Form populate_bdc
FORM POPULATE_BDC .
LOOP AT IT_DATA .
PERFORM BDC_HDATA USING 'SAPMP50A'
'1000'
'X'.
PERFORM BDC_FDATA USING 'RP50G-PERNR'
IT_DATA-PERNR.
PERFORM BDC_FDATA USING 'RP50G-CHOIC'
'0022'.
PERFORM BDC_FDATA USING 'BDC_OKCODE'
'=MOD'.
PERFORM BDC_HDATA USING 'MP002200'
'2000'
'X'.
PERFORM BDC_FDATA USING 'P0022-SLABS'
IT_DATA-SLABS1.
PERFORM BDC_FDATA USING 'BDC_OKCODE'
'=UPD'.
CALL TRANSACTION 'PA30' USING IT_BDCDATA.
REFRESH IT_BDCDATA.
ENDLOOP.
ENDFORM. " populate_bdc
*& Form validate
FORM VALIDATE .
data : num like sy-tabix,
num1 like sy-tabix.
LOOP AT IT_DATA.
num = num + 1.
num1 = sy-tabix.
SELECT PERNR
FROM PA0022
INTO V_PERNR WHERE
PERNR EQ IT_DATA-PERNR.
ENDSELECT.
IF SY-SUBRC <> 0.
MOVE num TO IT_ERROR-POS.
MOVE 'Invalid Pernr' TO IT_ERROR-TEXT.
APPEND IT_ERROR.
DELETE IT_DATA .
ELSE.
IF IT_DATA-SLABS IS INITIAL.
MOVE num TO IT_ERROR-POS.
MOVE 'Certificate code is initial' TO IT_ERROR-TEXT.
APPEND IT_ERROR.
DELETE IT_DATA.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " validate
*& Form error_records
FORM ERROR_RECORDS TABLES IT_ERRORS.
FORMAT COLOR COL_GROUP.
WRITE : / 'Error in the following records : ' .
FORMAT COLOR COL_NEGATIVE.
LOOP AT IT_ERROR.
WRITE : / IT_ERROR-POS,
IT_ERROR-TEXT.
ENDLOOP.
ENDFORM. " error_records
Maybe you are looking for
-
First, if Apple actually takes the time to read these Discussions, let me say, "Thanks!" I love Apple. Second, I don't claim to be an expert, nor do I consider myself a uber-geek with incredible technical prowess. I've just been playing around with i
-
Well I just bit the bullet and bought Lion, just finished installing it and it all seems to work fine. First thing I noticed, is my iMac i7 now boots by default into a 64bit Kernel. Logic Studio works perfectly fine, as does my RME Babyface. So all b
-
Home sharing problem - "copy of the file could not be found"
Hi all - I just tried to load about 2700 songs via home sharing from my old laptop to my current one. At the end of the import, it showed that about 1200 songs did not import because "a copy of the file could not be found", something like that. To
-
How to save a still image from video without Photoshop
So- I need to save a still from some video but I do not have Photoshop. How can I do it. Is it possible in FCP? Any other ideas?
-
X,Y position of Grid Column
Hi All, How to get xy position of grid column On mouse over. regards, karthik@chennai