Calling generic function modules
Hi all!
As .NET connector doesn't support the call of function modules or bapis that are not known at design time, I found another tool on the web (see www.erpconnect.net).
Does anyone have any experience with this library? My first test programs work very well.
Kind Regards,
Markus
Have you looked at the SAP Connector for Microsoft .NET (NCo, also known as "SAP .NET Connector")? This is made exactly for that and comes with documentation and samples. SAP customers can download it from http://service.sap.com/connectors .
Similar Messages
-
Can i call a function module of SAP?
Hi, i have a question... Can i call a function module of SAP... I need print a document from a device, can i call the function module of SAP in order that me it prints it?
Thanks,Hi Victor,
you can use the GenericSync Example of the MDK. This calls the Module to verify the user directly. Generic Sync is exactly for that purpose: call a BADI directly and no usage of SyncBO. Be aware, that you - out of the box- sync your app data as well at that moment, because a sync runs both - generic and smartsync. Even worse: even when you have nothing to sync in Generic Sync - so nothing to print - it will call the function module for generic sync as long as it is registered.
Well, anyway, this is the way to call a function module separate.
If it works with you rparticular print module? I have no idea, but if this is a normal function module - well, it should be ok.
Hope this helps.
Regards,
Oliver -
Function Module in a Generic Function Module Extractor
I want to use a generic function module (ZFM_CONNECTION_DETAIL) in a Generic Function Module based Extractor.
After Creating, I have checked it in RSA3... Data is showing properly on the Extractor Check.
And replicated on BW side, after triggering the extractor using infopackageu2026 only one record is coming on the target side (BW).
And one job is running endless on the source system.
Generic extractor on the normal code is working properly on both sides.
But problem occurs while I was using Function Module in the Generic function Module extractor.
Waiting for a Reply with solution...........
Hi Siegfried Szameitat,
I have searched a lot to find out the solution of my Question (Problem). But there is no solution for the problem I have.
Please let me to find out a proper solution of my issue....
ThanksFUNCTION zcrm_questionnaire.
Its a full Load...
Codes are as followed..........
DATA:lv_times TYPE i.
DATA:lv_datapakid TYPE numc4.
CLEAR:lv_datapakid,lv_times .
STATICS: s_s_if TYPE srsc_s_if_simple,
sd_no_more_data TYPE flag.
DATA: l_s_select TYPE srsc_s_select.
DATA : s_counter_datapakid LIKE sy-tabix,
s_cursor TYPE cursor.
RANGES : date FOR zresult_lt-date.
DATA: lv_count TYPE i VALUE 1.
IF i_initflag = sbiwa_c_flag_on.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check InfoSource validity
CASE i_dsource.
WHEN 'ZCRM_QUESTIONNAIRE'.
WHEN OTHERS.
IF 1 = 2. MESSAGE e009(r3). ENDIF.
log_write 'E' "message type
'R3' "message class
'009' "message number
i_dsource "message variable 1
' '. "message variable 2
RAISE error_passed_to_mess_handler.
ENDCASE.
APPEND LINES OF i_t_select TO s_s_if-t_select.
s_s_if-requnr = i_requnr.
s_s_if-dsource = i_dsource.
s_s_if-maxsize = i_maxsize.
APPEND LINES OF i_t_fields TO s_s_if-t_fields.
ELSE. "Initialization mode or data extraction
IF NOT sd_no_more_data IS INITIAL.
RAISE no_more_data.
ENDIF.
LOOP AT s_s_if-t_select INTO l_s_select .
MOVE-CORRESPONDING l_s_select TO date.
ENDLOOP.
DATA : v_questionire TYPE crm_svy_db_sid.
DATA : itab_questionire TYPE zsurveyid.
DATA : e_tt_data_get TYPE zresult_lt OCCURS 10.
v_questionire = 'CALL CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'METER INSTALLATION TEAM'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'METER READING & BILLING'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'NO SUPPLY'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'CASH COLLECTION CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'STREET LIGHT'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'CONSUMER CARE CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'WEBSITE'.
APPEND v_questionire TO itab_questionire.
DATA : counter TYPE i,
high LIKE sy-datum,
low LIKE sy-datum.
CONCATENATE
l_s_select-high+6(4)
l_s_select-high+3(2)
l_s_select-high+0(2)
INTO
high.
CONCATENATE
l_s_select-low+6(4)
l_s_select-low+3(2)
l_s_select-low+0(2)
INTO
low.
BREAK-POINT.
do i_maxsize times.
CALL FUNCTION 'ZCRM_SURVEY_REPORTING'
EXPORTING
e_date_frm = low
e_date_to = high
e_questionire = itab_questionire
CHANGING
it_result = e_tt_data_get.
IF sy-subrc IS INITIAL.
e_t_data[] = e_tt_data_get[].
APPEND e_t_data.
ELSE.
EXIT.
ENDIF.
sd_no_more_data = 'X'.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
lk -
Generic function module for delta - which FM ?
Hi all,
I want to create a custom generic datasource in R3 which uses a function module for delta extraction. This is straight forward for full extract (copy FM RSAX_BIW_GET_DATA_SIMPLE - I already did this and have a full extraction working to BW). However I need to extract delta - and the above function module does not have example code for that (I have seen some forum posts that it 'can' be used - but this looks like a pseudo get around where the delta field name is passed in I_T_SELECT).
FM RSVD_BW_GET_DELTA_DATA seems to be an example code of a FM which can allow delta (i.e. manually codes how to fill date/time stamp information). However when I code this and try test in RSA3 it seems to try to populate the delta selection field before calling my function module! I need it to call my function and allow the function to specifiy the date criteria.
Can anyone help with an example of how this should best be done ?
Or can it only be done in a pseudo form using 'RSAX_BIW_GET_DATA_SIMPLE' example FM.
Note: I have setup the RSO2 datasource to allow delta.
Also - I have spent several hours searching the forum - but please answer with a link if you think it does answer exactly this problem.
Thanks for any help
MartinHi again,
Have had a few requests for the code I used - I created a new custom function copied from 'RSAX_BIW_GET_DATA_SIMPLE'. AEDAT has been set as the delta date for this data source in transaction RSO2.
Main sample code is -
1. Code to receive selection criteria and store in internal ranges -
FUNCTION zbw_sodetail_get_detail.
""Global interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZBW_SODETAIL OPTIONAL
*--- Sales order item create date
LOOP AT i_t_select INTO l_s_select WHERE fieldnm = 'ERDAT'.
MOVE-CORRESPONDING l_s_select TO r_erdat.
APPEND r_erdat.
ENDLOOP.
*--- Sales order item change date - DELTA only - auto filled before
this function is called.
C (Initialise Delta) - Low = blank, High = today - safety limit
D (Delta) - low = , High = . *from roosgendlm
LOOP AT i_t_select INTO l_s_select WHERE fieldnm = 'AEDAT'.
MOVE-CORRESPONDING l_s_select TO r_aedat.
APPEND r_aedat.
ENDLOOP.
2. Code to use selection criteria to get initial or delta. Note that for delta the delta date field to be used is automatically populated with the date of the last delta run (from table roosgendlm) -
SELECT VBAK~KNUMV
VBAPVBELN VBAPPOSNR VBAPMATNR VBAPARKTX VBAP~SPART
VBAPWERKS VBAPERDAT VBAPAEDAT VBAPNETWR VBAP~WAERK
VBAPABGRU VBAPZPROMISE VBAP~CUOBJ
VBEP~EDATU
INTO CORRESPONDING FIELDS OF TABLE ZBW_SODETAIL_ITAB
FROM VBAK JOIN VBAP ON VBAKVBELN = VBAPVBELN
JOIN VBEP ON VBAPVBELN = VBEPVBELN
AND VBAPPOSNR = VBEPPOSNR
WHERE VBAP~VBELN IN R_VBELN "Order number
AND VBAP~POSNR IN R_POSNR "Order item number
AND VBAP~ERDAT IN R_ERDAT "Order item date created
AND ( VBAP~ERDAT IN R_AEDAT OR "Created date in Delta range
VBAP~AEDAT IN R_AEDAT OR "Order item change Delta range
VBAK~AEDAT IN R_AEDAT ). "Order header change Delta range
Note that if the data source is called in initial or full extract mode the delta change date (aedat) will automatically be blank.
I have been using this successfully.
I hope this helps
Martin. -
CNTL_ERROR while calling a function module from Java webdynpro
I am calling a RFC function module from javawebdynpro app
which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
Any help on this is highly appreciatedGood catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
DATA:
SOURCEVAL TYPE /BIC/OIINVQTY,
SOURCEUOM TYPE /BIC/OIUSUOM,
USITM TYPE /BIC/OIUSITM,
TARGETUOM TYPE /BIC/OIUSUOM,
CONVERTED_COST TYPE /BIC/OIINVQTY.
DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
" get the Production UOM
SELECT SINGLE I~/BIC/USPRDUOM
FROM /BIC/PUSITM AS I
INTO PRODUCTION_UOM
WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
IF ( SY-SUBRC = 4 ). " no records found
"RAISE PARTNO_NOT_FOUND.
RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
ENDIF.
" load the parameters
SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
USITM = SOURCE_FIELDS-/BIC/USITM.
" then you can call the FM
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCEVAL
PSOURCEUOM = SOURCEUOM
PUSITM = USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = CONVERTED_COST
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
" ... [do the rest]
Thanks for your help,
Dennis -
Can we call a function module in ADHOC query
Hi
Can we call a function module in ADHOC query if yes how.
Also we ned to know how to call a function module in SAP query.
An early responce is appreciated.
Thanks and best regards
RajeevOkay as far as I understand your aim is:
To fill a field in the output list with a value that is based on the current line information and calculated by a function module
So go to SQ02 and create an additional field in the InfoSet.
You can refer in the coding to the technical names you can see in the left tree window like P0000-PERNR.
More information is avaiable in the Help part look for additional field in SQ02.
Regards,
Michael -
Upload data from excel with vba by calling a function module
Hello all,
i have a problem with the function module "ALSM_EXCEL_TO_INTERNAL_TABLE". I will call this function module with vba to load data from excel to sap with a Buttonclick. I have copied this function module and set it remotable. But i can´t call it from excel.
Can you give me some tips how can i
upload data from excel with vba by click a button.
The problem seems the function: call method cl_gui_frontend_services=>clipboard_import in the function module, because when i comment this function call the vba-call is true but no results.
How can I call the function module correct with vba?
Thanks a lot for your tips!!!!
Chris
Message was edited by:
Christoph KirschnerHI
Uploading data directly from Excel file format
* Upload data direct from excel.xls file to SAP
REPORT ZEXCELUPLOAD.
PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
begcol TYPE i DEFAULT 1 NO-DISPLAY,
begrow TYPE i DEFAULT 1 NO-DISPLAY,
endcol TYPE i DEFAULT 100 NO-DISPLAY,
endrow TYPE i DEFAULT 32000 NO-DISPLAY.
* Tick don't append header
PARAMETERS: kzheader AS CHECKBOX.
DATA: BEGIN OF intern OCCURS 0.
INCLUDE STRUCTURE alsmex_tabline.
DATA: END OF intern.
DATA: BEGIN OF intern1 OCCURS 0.
INCLUDE STRUCTURE alsmex_tabline.
DATA: END OF intern1.
DATA: BEGIN OF t_col OCCURS 0,
col LIKE alsmex_tabline-col,
size TYPE i.
DATA: END OF t_col.
DATA: zwlen TYPE i,
zwlines TYPE i.
DATA: BEGIN OF fieldnames OCCURS 3,
title(60),
table(6),
field(10),
kz(1),
END OF fieldnames.
* No of columns
DATA: BEGIN OF data_tab OCCURS 0,
value_0001(50),
value_0002(50),
value_0003(50),
value_0004(50),
value_0005(50),
value_0006(50),
value_0007(50),
value_0008(50),
value_0009(50),
value_0010(50),
value_0011(50),
value_0012(50),
value_0013(50),
value_0014(50),
value_0015(50),
value_0016(50),
value_0017(50),
value_0018(50),
value_0019(50),
value_0020(50),
value_0021(50),
value_0022(50),
value_0023(50),
value_0024(50),
value_0025(50),
value_0026(50),
value_0027(50),
value_0028(50),
value_0029(50),
value_0030(50),
value_0031(50),
value_0032(50),
value_0033(50),
value_0034(50),
value_0035(50),
value_0036(50),
value_0037(50),
value_0038(50),
value_0039(50),
value_0040(50),
value_0041(50),
value_0042(50),
value_0043(50),
value_0044(50),
value_0045(50),
value_0046(50),
value_0047(50),
value_0048(50),
value_0049(50),
value_0050(50),
value_0051(50),
value_0052(50),
value_0053(50),
value_0054(50),
value_0055(50),
value_0056(50),
value_0057(50),
value_0058(50),
value_0059(50),
value_0060(50),
value_0061(50),
value_0062(50),
value_0063(50),
value_0064(50),
value_0065(50),
value_0066(50),
value_0067(50),
value_0068(50),
value_0069(50),
value_0070(50),
value_0071(50),
value_0072(50),
value_0073(50),
value_0074(50),
value_0075(50),
value_0076(50),
value_0077(50),
value_0078(50),
value_0079(50),
value_0080(50),
value_0081(50),
value_0082(50),
value_0083(50),
value_0084(50),
value_0085(50),
value_0086(50),
value_0087(50),
value_0088(50),
value_0089(50),
value_0090(50),
value_0091(50),
value_0092(50),
value_0093(50),
value_0094(50),
value_0095(50),
value_0096(50),
value_0097(50),
value_0098(50),
value_0099(50),
value_0100(50).
DATA: END OF data_tab.
DATA: tind(4) TYPE n.
DATA: zwfeld(19).
FIELD-SYMBOLS: <fs1>.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
mask = '*.xls'
static = 'X'
CHANGING
file_name = filename.
START-OF-SELECTION.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = filename
i_begin_col = begcol
i_begin_row = begrow
i_end_col = endcol
i_end_row = endrow
TABLES
intern = intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Upload Error ', SY-SUBRC.
ENDIF.
END-OF-SELECTION.
LOOP AT intern.
intern1 = intern.
CLEAR intern1-row.
APPEND intern1.
ENDLOOP.
SORT intern1 BY col.
LOOP AT intern1.
AT NEW col.
t_col-col = intern1-col.
APPEND t_col.
ENDAT.
zwlen = strlen( intern1-value ).
READ TABLE t_col WITH KEY col = intern1-col.
IF sy-subrc EQ 0.
IF zwlen > t_col-size.
t_col-size = zwlen.
* Internal Table, Current Row Index
MODIFY t_col INDEX sy-tabix.
ENDIF.
ENDIF.
ENDLOOP.
DESCRIBE TABLE t_col LINES zwlines.
SORT intern BY row col.
IF kzheader = 'X'.
LOOP AT intern.
fieldnames-title = intern-value.
APPEND fieldnames.
AT END OF row.
EXIT.
ENDAT.
ENDLOOP.
ELSE.
DO zwlines TIMES.
WRITE sy-index TO fieldnames-title.
APPEND fieldnames.
ENDDO.
ENDIF.
SORT intern BY row col.
LOOP AT intern.
IF kzheader = 'X'
AND intern-row = 1.
CONTINUE.
ENDIF.
tind = intern-col.
CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
ASSIGN (zwfeld) TO <fs1>.
<fs1> = intern-value.
AT END OF row.
APPEND data_tab.
CLEAR data_tab.
ENDAT.
ENDLOOP.
CALL FUNCTION 'DISPLAY_BASIC_LIST'
EXPORTING
file_name = filename
TABLES
data_tab = data_tab
fieldname_tab = fieldnames.
*-- End of Program
<b>Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT</b>
*Title : Excel Uploading
TYPES: BEGIN OF t_datatab,
col1(25) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
col4(30) TYPE c,
col5(30) TYPE c,
col6(30) TYPE c,
col7(30) TYPE c,
col8(30) TYPE c,
col9(30) TYPE c,
col10(30) TYPE c,
col11(30) TYPE c,
END OF t_datatab.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
wa_datatab TYPE t_datatab.
Data : p_table type t_datatab occurs 0 with header line.
DATA : gd_scol TYPE i VALUE '1',
gd_srow TYPE i VALUE '1',
gd_ecol TYPE i VALUE '256',
gd_erow TYPE i VALUE '65536'.
DATA: it_tab TYPE filetable,
gd_subrc TYPE i.
field-symbols : <fs>.
*Selection screen definition
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_file LIKE rlgrap-filename
DEFAULT 'c:test.xls' OBLIGATORY. " File Name
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
REFRESH: it_tab.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select File'
default_filename = '*.xls'
multiselection = ' '
CHANGING
file_table = it_tab
rc = gd_subrc.
LOOP AT it_tab INTO p_file.
* so_fpath-sign = 'I'.
* so_fpath-option = 'EQ'.
* append so_fpath.
ENDLOOP.
START-OF-SELECTION.
PERFORM upload_excel_file TABLES it_datatab
USING p_file
gd_scol
gd_srow
gd_ecol
gd_erow.
* END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3,
wa_datatab-col4,
wa_datatab-col5,
wa_datatab-col6,
wa_datatab-col7,
wa_datatab-col8,
wa_datatab-col9,
wa_datatab-col10,
wa_datatab-col11.
ENDLOOP.
*& Form UPLOAD_EXCEL_FILE
* upload excel spreadsheet into internal table
* -->P_TABLE Table to return excel data into
* -->P_FILE file name and path
* -->P_SCOL start column
* -->P_SROW start row
* -->P_ECOL end column
* -->P_EROW end row
FORM upload_excel_file TABLES p_table
USING p_file
p_scol
p_srow
p_ecol
p_erow.
DATA : lt_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.
* Has the following format:
* Row number | Colum Number | Value
* i.e. 1 1 Name1
* 2 1 Joe
DATA : ld_index TYPE i.
* Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_file
i_begin_col = p_scol
i_begin_row = p_srow
i_end_col = p_ecol
i_end_row = p_erow
TABLES
intern = LT_INTERN
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'Error Uploading file'.
EXIT.
ENDIF.
IF lt_intern[] IS INITIAL.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'No Data Uploaded'.
EXIT.
ELSE.
SORT lt_intern BY row col.
LOOP AT lt_intern.
MOVE lt_intern-col TO ld_index.
assign component ld_index of structure
p_table to <fs>.
move : lt_intern-value to <fs>.
* MOVE lt_intern-value TO p_table.
AT END OF row.
APPEND p_table.
CLEAR p_table.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. "UPLOAD_EXCEL_FILE
Regards
Pavan -
How to call a function module from the Web Template?
Hi all,
how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
Many thanks for your hints.
Regards, NilsHi!
I am too working on a similar issue.
Probably this helps:
Re: Calling a function module from a Web Template
Regards,
Sri -
Program making a RFC call to Function Module not working in background
Hi All,
I have an ABAP Program which is used to do a reconciliation check between the R/3 and BI system for Invoice Data. Please find below the details of the program flow:
1. Program counts the number of records in the DSO table and aggregates the Net_Value based on the date range (passed as parameters)
2. Program calls a Function Module (RFC Call) which counts the number of records in the R/3 table and aggregates the Net_Value for the same date range
3. Function Module Passes back the count values and aggregated Net_Value to the program
4. Program compares the count and aggregated Net_Value from EDWH and MSP systems and sends an email mentioning whether the counts match or not
However we are facing an issue.
Whenever, we execute the program in dialog mode, it works fine and fetches results within 5-6 minutes. However if we schedule the program to run in background (parameters through a variant), it gives no results even after running for over 3-4 hours. We tried figuring it out yesterday but could not come to any conclusion. Since there is a RFC call being to the function module, we were wondering if we need to specify some other parameter as well.
Thanks & Regards
DharmendraRFC Call is a procedure for executing remote enables function modules. It is done via the 'Remote Enabled' radio button on the function module's attribute screen.
-
How to call a function module from a transformation
Hi,
Could somebody please let me know how I can call an abap function module from a transformation (abap xslt program). I know how to call the class methods from transformation, but how do i call a function module..?
Thanks,
Shashi.
Edited by: Shashi Kanth Kasam on Apr 8, 2010 12:45 PMYa. I can do that. But I don't want to use a class and a method to call that function module. Want to directly call function module from transformation. Is that possible..?
Thanks,
Shashi -
System failure, during call of function module RSWR_RFC_SERVICE_TEST
Hi Team,
I am working with BW and Portal Integration, with the Netweaver
2004s SP 11 version. I have a issue when i run the RSPOR_SETUP program
to test the configuration.
The error is on status 5 and 12, i get the following error:
System failure, during call of function module RSWR_RFC_SERVICE_TEST,
and when i enter at the dev_jrfc.trc log file, i have the following
error:
Exception thrown [Tue Jul 10 16:12:16,687]:Exception thrown by
application running in JCo Server
java.lang.RuntimeException: call FM RSWR_RFC_SERVICE_TEST to ProgId
smxpedvc_PORTAL_EPD on host smxpedvc.grupoempresarialangeles.com.mx
with SSO not authorized: No login module succeeded.
at
com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest
(RFCDefaultRequestHandler.java:79)
at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequest
(RFCJCOServer.java:156)
at com.sap.mw.jco.JCO$Server.dispatchRequest(JCO.java:7785)
at com.sap.mw.jco.MiddlewareJRfc$Server.dispatchRequest
(MiddlewareJRfc.java:2405)
at com.sap.mw.jco.MiddlewareJRfc$Server.listen
(MiddlewareJRfc.java:1728)
at com.sap.mw.jco.JCO$Server.listen(JCO.java:8145)
at com.sap.mw.jco.JCO$Server.work(JCO.java:8265)
at com.sap.mw.jco.JCO$Server.loop(JCO.java:8212)
at com.sap.mw.jco.JCO$Server.run(JCO.java:8128)
at com.sap.engine.core.thread.impl3.ActionObject.run
(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute
(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run
(SingleThread.java:170)
Could you help me to solve this issue.
Thanks so much.Have you checked the user that is used to connect from J2EE back to ABAP?
I had a similar problem, went into the Visual Administrator and found the incorrect password (or possibly outdated password) was being used to communicate back to ABAP, and updating that sorted out my problem.
Hope this helps.
Cheers,
Andrew -
Call of function module "SUBST_START_BATCHJOB" by RFC failed
Hello Guru's,
We have the following Issue:
In Phase PREP_INIT/JOB_RSUPDTEC we get this error from EHPI (Version 710-1)
Checks after phase PREP_INIT/JOB_RSUPDTEC were negative!
Last error code set: BATCHJOB RSUPDTEC FAILED: Calling RSUPDTEC failed - repeat phase.
In the file PSUPDTEC.LOG are the following error:
4 ETQ260 Starting batchjob "RSUPDTEC"
4 ETQ230 Starting RFC Login to: System = "E11", GwHost = "sape11", GwService = "sapgw00"
4 ETQ359 RFC Login to: System="E11", Nr="00", GwHost="sape11", GwService="sapgw00"
4 ETQ232 RFC Login succeeded
4 ETQ233 Calling function module "SUBST_START_BATCHJOB" by RFC
4 ETQ399 JOBNAME='RSUPDTEC', REPNAME='RSUPDTEC', VARNAME='', BATCHHOST='sape11', IV_SCHEDEVER=' '
4 ETQ234 Call of function module "SUBST_START_BATCHJOB" by RFC succeeded
4 ETQ399 Returned JOBCOUNT='14230100'
2EETQ235 Call of function module "SUBST_START_BATCHJOB" by RFC failed (error-status "27")
2EETQ261 Start of batchjob "RSUPDTEC" failed
In the Sysem we can see, that the Job RSUPDTEC was created by DDIC but not started.
We can start (and finish) the job successfully as logged in DDIC.
We don't know whats the problem. The EHPI stopped every time at this point.
Need Help...
regards
ChrisIssue solved.
In /etc/hosts the first entry was SAPE11.
But it must be sape11, because the instance is sape11_E11_00.
In SM51 we could see that
sape11_E11_00 SAPE11 Dialog Batch Update Upd2 Spool Enqueue ICM active
We changed the entry and restarted SAP.
Then the job can be started. -
Error when call RFC Function module in R/3
Dear All,
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
This is the first time we are doing this configuration.
Could you please let me know what woulbe the reason.read the original message
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter -
Type conflict when calling a function module (field length)
Dear All,
I am getting this following error while executing: Type conflict when calling a function module (field length)
This is piece of coding i have writern in my action button.
method SEARCH_MATERIAL .
data:
node_mat_input TYPE REF TO if_wd_context_node,
node_mat_output TYPE REF TO if_wd_context_node,
material TYPE BAPIMATDET-MATERIAL,
itab TYPE TABLE OF BAPIMATDOA.
node_mat_input = wd_context->get_child_node( 'NODE_MAT_INPUT' ).
node_mat_output = wd_context->get_child_node( 'NODE_MAT_OUTPUT' ).
node_mat_input->get_attribute( EXPORTING name = 'MATERIAL'
IMPORTING value = material ).
CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
EXPORTING
material = material
PLANT = plant
VALUATIONAREA =
VALUATIONTYPE =
MATERIAL_EVG =
IMPORTING
MATERIAL_GENERAL_DATA = itab
RETURN =
MATERIALPLANTDATA =
MATERIALVALUATIONDATA =
node_mat_output->bind_table( itab ).
endmethod.
Attributes are:
Node name = INPUT its structure is BAPIMATDET
INPUT attributes = MATERIAL of type BAPIMATDET-MATERIAL
Thanks,
Gopi.Hi Amit,
I have used service call to fetch records from that bapi..
The following is the code generated by service call:-
METHOD execute_bapi_material_get_deta .
declarations for context navigation
DATA:
node_bapi_material_get_de TYPE REF TO if_wd_context_node,
node_exporting TYPE REF TO if_wd_context_node,
node_material_general_dat TYPE REF TO if_wd_context_node,
node_importing TYPE REF TO if_wd_context_node,
lri_element TYPE REF TO if_wd_context_element.
declarations for fuba parameters
data:
stru_c_material_general_dat TYPE if_componentcontroller=>element_material_general_dat.
DATA:
attr_material TYPE bapimatdet-material,
attr_plant TYPE bapimatall-plant.
get all involved child nodes
node_bapi_material_get_de = wd_context->get_child_node( `BAPI_MATERIAL_GET_DE` ).
node_exporting = node_bapi_material_get_de->get_child_node( `EXPORTING` ).
node_material_general_dat = node_exporting->get_child_node( `MATERIAL_GENERAL_DAT` ).
node_importing = node_bapi_material_get_de->get_child_node( `IMPORTING` ).
get input from context
node_importing->get_attribute( EXPORTING name = `MATERIAL`
IMPORTING value = attr_material ).
node_importing->get_attribute( EXPORTING name = `PLANT`
IMPORTING value = attr_plant ).
the invocation - errors are always fatal !!!
CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
EXPORTING
material = attr_material
plant = attr_plant
" valuationarea = wd_This->Valuationarea
" valuationtype = wd_This->Valuationtype
" material_Evg = wd_This->Material_Evg
IMPORTING
material_general_data = stru_c_material_general_dat
" return = wd_This->Return
" materialplantdata = wd_This->Materialplantdata
" materialvaluationdata = wd_This->Materialvaluationdat
node_material_general_dat->bind_structure( stru_c_material_general_dat[] ).
ENDMETHOD.
but the problem is I am getting the following error while compiling...
" stru_c_materialplantdata " is not an internal table - the " OCCOURS n" specification is missing.
Thanks,
Gopi.
Edited by: Yegalaivan on Nov 18, 2009 8:30 AM -
ERROR: -Type conflict when calling a function module
hi to all,
when iam executing the program in browser Type conflict when calling a function module error is showing, i have bind all the attribute correctly still iam getting error, WHEN I CLICK ON THE SEARCH BUTTON DATA IS NOT COMING TO MY TABLE ITAB1 plz help me....
DATA:
NODE_IP_SELECTION TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_IP_SELECTION TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_IP_SELECTION TYPE IF_PLANNING_HISTORY=>ELEMENT_IP_SELECTION ,
ITAB TYPE TABLE OF ZSL_PL_UPDATE1,
WA TYPE ZSL_PL_UPDATE1.
navigate from <CONTEXT> to <IP_SELECTION> via lead selection
NODE_IP_SELECTION = WD_CONTEXT->GET_CHILD_NODE( NAME = `IP_SELECTION` ).
get element via lead selection
ELEM_IP_SELECTION = NODE_IP_SELECTION->GET_ELEMENT( ).
get all declared attributes
ELEM_IP_SELECTION->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = STRU_IP_SELECTION ).
CALL FUNCTION 'ZBAPI_PL_UPDATE'
EXPORTING
GV_LIFNR = STRU_IP_SELECTION-LIFNR
GV_MATNR = STRU_IP_SELECTION-LIFNR
GV_GJAHR = ' '
GV_WEEK_LOW = STRU_IP_SELECTION-FROM_WEEK
GV_WEEK_HIGH = STRU_IP_SELECTION-TO_WEEK
IMPORTING
RETURN =
TABLES
GT_PL_UPDATE = ITAB
DATA:
NODE_PLANN_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_PLANN_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_PLANN_NODE TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
WA1 TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
ITAB1 TYPE TABLE OF IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE.
LOOP AT ITAB INTO WA.
MOVE-CORRESPONDING WA TO WA1.
APPEND WA1 TO ITAB1.
ENDLOOP.
navigate from <CONTEXT> to <PLANN_NODE> via lead selection
NODE_PLANN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = `PLANN_NODE` ).
CALL METHOD NODE_PLANN_NODE->BIND_TABLE
EXPORTING
NEW_ITEMS = ITAB1
SET_INITIAL_ELEMENTS = ABAP_TRUE
INDEX =
ENDMETHOD.CALL FUNCTION 'ZBAPI_PL_UPDATE'
EXPORTING
GV_LIFNR = STRU_IP_SELECTION-LIFNR
GV_MATNR = STRU_IP_SELECTION-LIFNR
GV_GJAHR = ' '
GV_WEEK_LOW = STRU_IP_SELECTION-FROM_WEEK
GV_WEEK_HIGH = STRU_IP_SELECTION-TO_WEEK
IMPORTING
RETURN =
TABLES
GT_PL_UPDATE = ITAB
Problem is here
check out the type GV_GJAHR whether it accepts string type.
thanks
sarbjeet singh
Maybe you are looking for
-
Need help setting up site-to-site VPN between two ASA 5505's
We have been pulling our hair outtrying to solve this. Below is the running configs for both Sites. We have always used Junipers prior to this. It does not appear that the tunnel is getting created. Any help would be greatly appreciated Basic Network
-
Oracle Server 8.1.7 on Windows 2000 Dynamic Drives (?)
Does somebody know if Oracle Server ver.8.1.7 works with Dynamic Drives under Windows 2000?
-
How to save my photo library in a web service.
Hello: In first place sorry for my poor english... I would like to know how to secure my photo library in a web service. I have 100gb free with my internet provider and i would like to use it. The problem is that i don´t know wich is the folder that
-
Weblogic Server 8.1 for japanese lang install comes out with CRC error
We are trying to install the evalution copy of weblogic 8.1 sp1 Japanese. During extraction it comesout with following error. Extracting 0%........../mizrwsdv/weblogic/tmp //aaabIaiHU/jre141_03/lib/font.properties.UTF8.5.6 ba d CRC d4bf6e9f (should b
-
How can you sort photos by descending date in Photos?
how can you sort photos by descending date in Photos?