VirtualProvider with Function Module
Hi,Experts
Can anyone tell me how to create a VirtualProvider with Function Module?
I have read the How to guide"How to Implement a VirtualProvider with service",but I can't go throw the source code.
Please give me a sample test code of yours!
Thanks a lot!
My Email:[email protected]
Hi Jin
This question does not belong to this forum, close it and post it in the appropriate one.
Also, please remove your email address from the thread as it violates the forum guidelines.
Similar Messages
-
VirtualProvider with Function module problem !
I implemented virtualprovider with function module. Unfortunately when I run query i get message error :
u201CFunction call of ZT0X failed; the obligatory parameter CHARACTERISTICS
An exception with the type CX_SY_DYN_CALL_PARAM_MISSING occurred, but was
I>> Row: 67 Inc: READ_DATA Prog: CL_RSDRV_VPROV_LOC_NOSIDu201D
Any suggestions ?
Below source code:
u201CFUNCTION ZT0X.
""Lokalny interfejs:
*" IMPORTING
*" VALUE(INFOCUBE) LIKE BAPI6200-INFOCUBE DEFAULT 'ZT03'
*" VALUE(KEYDATE) LIKE BAPI6200-KEYDATE OPTIONAL
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" SELECTION STRUCTURE BAPI6200SL
*" CHARACTERISTICS STRUCTURE BAPI6200FD
*" KEYFIGURES STRUCTURE BAPI6200FD
*" DATA STRUCTURE BAPI6100DA
DATA:
l_r_srv TYPE ref to CL_RSDRV_REMOTE_IPROV_SRV,
l_th_mapping TYPE CL_RSDRV_REMOTE_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
* break-point ID ZRSDRV_RC1.
* break DEVELOPER.
perform build_mapping_table
changing l_th_mapping.
create object l_r_srv
exporting
i_tablnm = '/BIC/PZPRD_ID'
i_th_iobj_fld_mapping = l_th_mapping.
l_r_srv->open_cursor(
i_t_characteristics = characteristics[]
i_t_keyfigures = keyfigures[]
i_t_selection = selection[] ).
l_r_srv->fetch_pack_data(
importing
e_t_data = data[] ).
return-type = 'S'.
ENDFUNCTION.
&---- <
*& Form build_mapping_table
&---- <
Form build_mapping_table
changing
c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
DATA:
l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
l_s_map-iobjnm = 'ZPRD_ID'.
l_s_map-fldnm = '/BIC/ZPRD_ID'.
insert l_s_map into table c_th_mapping.
l_s_map-iobjnm = 'ZWARTOSC'.
l_s_map-fldnm = '/BIC/Z_CEN_W'.
insert l_s_map into table c_th_mapping.
+endform.u201DHello
I experienced the same issue. Were u able to solve it? If yes , kindly ask you to make posting here so that others can benefit as well.
Huge thanks -
To update Employee Data with Function module
Hi
CRM employee master and HR employee master need to be mapped
for the labor cost posting function to work.
In BP transaction (Change in BP role : Employee),
I could update "Personnel number" and "User Name"
under Identification Tab
now I need to do same job with Function module in report program.
Anybody knows that what Function module should I use ?
I tryed to do it with Function "CRMXIF_PARTNER_SAVE"
but I only succesed to update imformations under Adress tab in BP transaction.
thank you.Use FM BAPI_BUPA_CREATE_FROM_DATA.
Rg,
Harshit -
How to copy a generic extractor with function module into a new system?
Dear Gurus,
i would like to know how i can copy a gneric datasource with function module from one system to the target system.
Thank you
CheersHi Anesh,
thank you for replying.
Since the Datasource will have a new new in the new system, i will create a new one.
Create a generic datasource base on the table is not the problem.
My problem is how could i copy the FM in the new system?
If you can help me on that, it will be fine.
Thanks -
Hierarchial Layout Saving with function modules
Hai to all
i am facing a problem while saving layout in Hierarchial list display with function module.
below error message is coming when i am going save my layout.
210 if l_def_variant-variant eq rs_variant-variant.
211 l_default = 'X'.
212 endif.
213 endif.
214
215 call function 'LT_FC_SAVE'
216 exporting
217 * I_TOOL = 'LT'
218 i_tabname = r_tabname
219 i_tabname_slave = r_tabname_slave
220 is_variant = rs_variant
221 it_fieldcat = rt_fieldcat[]
222 it_sort = rt_sort[]
223 it_filter = rt_filter[]
224 is_layout = rs_layout
225 i_default_variant = l_default
226 exceptions
227 fc_not_complete = 1
228 others = 2.
229 case sy-subrc.
230 when '0'.
231 message s018(0k).
232 when '1'.
>>>>> message x000(0k) with 'LT_FC_SAVE' sy-subrc
234 raising fc_not_complete.
235 endcase.
it is very urgent...
Subhash.Mdata: ls_vari type disvariant.
DATA: w_repid TYPE sy-repid.
ls_vari-report = w_repid.
ls_vari-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_callback_program = w_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
is_layout = wa_layout
it_fieldcat = i_fcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = i_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
i_default = 'X'
i_save = 'X'
IS_VARIANT = ls_vari
it_events = i_event[]
IT_EVENT_EXIT =
i_tabname_header = 'I_FINAL1'
i_tabname_item = 'I_FINAL2'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = wa_key
IS_PRINT =
IS_REPREP_ID =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
IR_SALV_HIERSEQ_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab_header = i_final1
t_outtab_item = i_final2
EXCEPTIONS
PROGRAM_ERROR = 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.
i have passed the parameters
but i am getting same dump again..
Subhash.M -
Generic Data Source with Function Module data mismatch in BI
Hi All,
I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
and single record is divided into 2 records in BI side(not all the records), how can it be possible???
is there anything Im missing to explain you my issue???
if understood please help me out.
Thanks n Regards,
ravi.the datasource frame work starts the function module several times.
1. the initialization
2. the serval times, until you "raise no_more_data".
check you coding: have you refreshed necessary internal tables.
Sven -
Generic Data Source with Function Module data mismatch
Hi All,
I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
and single record is divided into 2 records in BI side(not all the records), how can it be possible???
is there anything Im missing to explain you my issue???
if understood please help me out.
Thanks n Regards,
ravi.HI rkiranbi,
1. FIrst you excute function module according to your paramers, you will get some records. then goto tcode RSA3 --> excute
Provide your Data source name and under setting we have options like Data records/calls, Display extractor calls and selections --> fields .
in that options you have to increase the values. and then you have to pass paramers in RSA3 according to your function module
selections in SE37. Now you will get equal values in both functin module selection and RSA3 Selection. if it fail means you need to
check coding logic in function module.
2. if your are getting wrong values in BI System then check with
1. compare with PSA data and data target data (here you need to check with characterstic as well as keyfigures)
if you find any mistake you need change the coding in function module according to client requirement.
2. compare data with RSA3 and bi report data or data target data.
check it properly above steps, you will get solution.
thanks and regards,
malli -
How to use fieldtab with Function Module F4IF_INT_TABLE_VALUE_REQUEST
Hi,
I'm using the function module F4IF_INT_TABLE_VALUE_REQUEST to build a matchcode in a selection screen parameter.
The internal table that I use have 3 fields:
GROUPID like APQI-GROUPID,
CREDATE like APQI-CREDATE,
STATE type string.
STATE is not in ABAP dictionary, so the function doesn't show this field. I need this field having field label 'STATUS'
I have tried to use table FIELDTAB, but I cannot resolv the problem.
Can anyone help me?
Kind RegardsHi
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Regards
Anji -
Virtual cube with function module
hi
I wrote function module which is used with virtual cube.
When I launch query build on this cube in the BEX i can't interrupt execution
of function module. How to put break point. may be there is any option that could turn off debugging?Try an external breakpoint. How you set that depends on your version. If there's not a button for it on your editor screen, look at utilities->settings->ABAP Editor->debugging in SE38.
matt -
Generic delta with function module
Hi Gurus,
Is it possible to create a generic DataSource with delta support using function module following the queue delta mechanism (u can get some function moduel in MCEX function group, and check the outbound delta queue before and after update in transaction smq1.
I can store the delta data using qRFC and collective update mechanism. but I don't know how to create a generic data with delta and how to attach a rfc destination (& logical system) to the data source. The Source system information is stored in the table "ROOSGEN". Is there any configuration setting required to do the same.
Regards,
JugalJugal,
What I understand you to be asking is if it is possible to create a generic delta extractor which uses the delta queue. If this indeed is your question the answer is yes.
First you need to create your data source so it is visible via tx RSA5 and need to make sure that the delta type (ie ABR, AIM)is set appropriately for the datasource.
The issue however is determining from where you will associate your delta hook (when will you write to the queue)? I have in the past utilized BTE's, Business Transaction Events to write information out to the delta queue, you can see a list of available BTE's in your system via tx FINF.
Once you find a place to write your deltas from you call the below FM with the appropriate datasource.
RSC1_TRFC_QUEUE_WRITE.
Once you have done this the standard BW extractor for deltas will pull the information from the delta queue. But from what I understand you just want to know how to associate the data with the delta and that is the FM listed above.
Hope this helps,
Cheers,
Scott
> Hi Gurus,
>
> Is it possible to create a generic DataSource with
> delta support using function module following the
> queue delta mechanism (u can get some function moduel
> in MCEX function group, and check the outbound delta
> queue before and after update in transaction smq1.
> I can store the delta data using qRFC and collective
> update mechanism. but I don't know how to create a
> generic data with delta and how to attach a rfc
> destination (& logical system) to the data source.
> The Source system information is stored in the table
> "ROOSGEN". Is there any configuration setting
> required to do the same.
>
> Regards,
> Jugal -
XI-- IDOC scenario, how to link process code with function module
Hi Forum,
I have a XI--->IDOC (R/3) scenario,
where i m creating a IDOC in XI and sending it to R/3,
i have done all settings to send the IDOC from XI to the R/3,
i also have the function module to process that IDOC in R/3,
the problem is:
I want to know in details (step by step) how to make a Idoc Inbound process code, link it with the function module and use the process code in the Partner Profile in R/3,
pls helpHI,
FOr this u need to go to transaction WE41 for inbound and WE40 for outbound there u assign the function module.
Now u go to WE20 transaction for partner profile and u can assign the proces code to the inbound message.
Go to the below help for more information:
http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
Inbound process code:
http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
Thnx
Chirag -
How to create Drop-Down with Function Module REUSE_ALV_GRID_DISPLAY
Hi Experts,
I have used Reuse_alv_grid_display function module in my report for ALV output. I have a requirement to add drop down in one cell of my output. I have searched but all are suggesting through OOPS programing that I can not use.
If it is possible with the given scenerion , please help me how to write the code for it?
Thanks a bunch in advance.Hi,
You can check demo programs:
BCALV_EDIT_06
BCALV_EDIT_07
Hope it helps
Regards
Mansi -
Problem with function module calling
Hi,
I have two questions here
i have a function moduel 'Z_GET_MATL_BALANCE'
in my code it called in the below said way
CALL FUNCTION 'Z_GET_MATL_BALANCE'
DESTINATION 'NONE'
STARTING NEW TASK 'A'
PERFORMING f_back ON END OF TASK
EXPORTING
ref_dte = s_datum-low
str_dte = s_datum-high
end_dte = s_datum-high
i_werks = p_werks
i_past = 'X'
i_future = 'X'
verselem = p_mrpver
plscn = p_scenar
r_outrec = r_outrec
supstk = p_supstk
days_ahead = w_days_ahead
shipnt = p_shipnt
TABLES
mat_bals = w_zmat_bals_a
i_zdatum = i_datum
mat_movmts = w_mat_movmts_a
mat_ship = i_mat_ship_a.
IF sy-subrc NE 0.
MESSAGE e005(ZMIM) WITH
text-009 text-166 text-054 sy-subrc.
ENDIF.
FORM f_back USING task.
CASE task.
WHEN 'A' .
RECEIVE RESULTS FROM FUNCTION 'Z_GET_MATL_BALANCE'
TABLES
mat_bals = w_zmat_bals_a
mat_movmts = w_mat_movmts_a
mat_ship = i_mat_ship_a
EXCEPTIONS
call_material_lesen_fail = 1
call_t450n_fail = 2
call_t399d_fail = 3
call_aufbauen_mdpsx_fail = 4
call_mdezx_aufbauen_fail = 5
call_t001w_fail = 6
call_zmrpelem_failed = 7
call_aufbauen_mdpsx_sim_fail = 8
OTHERS = 9.
IF SY-SUBRC NE 0.
RET_CODE1 = SY-SUBRC.
ENDIF.
now my first question is what is the difference between function modules calling normally and in the above said way
and the second question is
under tables parameter i have four internal tables defined where as while calling the same function module using recive results i have three internal tables. is this correct?
i am asking this because i am getting an error message while using this funciton module
please do not give generic answers, all the helpful answers will get a def rewardCall function starting new task is used to make Asynchronus RFC Call. In this case your function module will be called in a NEW SESSION and it will exceute independently from the Main program which is calling the FM. Also, the main program will continue its own processing and it will not wait for the RFC FM to complete.
Its not mandatory to have all the TABLES parameters in the RETURN Perform (..Receive results from ...) -
Rule creation with Function module to be executed.
Hi there,
I have been trying to create a function module and then use it in a rule... I have declared ACTOR_TAB, AC_CONTAINER, but still I get an error with the below statement.
swc_get_element ac_container 'PERNR' pernr.
The error I get is as below:
The field "PERNR" cannot be changed.
Note that, I have also declared PERNR as an import parameter for the function module....
Help on this would be great.
Thanks.
Sukumar.FUNCTION ZHR_TEST.
""Local Interface:
*" IMPORTING
*" REFERENCE(LV_PERNR) TYPE PERNR_D OPTIONAL
*" REFERENCE(LV_REINR) TYPE REINR OPTIONAL
*" REFERENCE(BEGDA) TYPE BEGDA DEFAULT SY-DATUM
*" REFERENCE(ENDDA) TYPE ENDDA DEFAULT SY-DATUM
*" TABLES
*" ACTOR_TAB STRUCTURE SWHACTOR OPTIONAL
*" AC_CONTAINER STRUCTURE SWCONT OPTIONAL
*" EXCEPTIONS
*" NOBODY_FOUND
include <cntn01>.
data: result_tab like swhactor occurs 0 with header line.
refresh: actor_tab.
clear: result_tab.
swc_get_element ac_container 'PERNR' lv_pernr.
Still it does not work. It keeps showing the error.
Thanks,
Sukumar. -
Select options with function modules.
Hello People,
I found few threads on this topic already, I tried solving with the help of those clues but in vain.
I want to create a function module which accepts a date range like in ACC_T_RA_DATE, and output a list of materials.
The list of materials correspond to the purchase orders that were created in the given date range.
Please kindly observe, I am not using a program to pass any value - I will be using only the function module throughout the process.
Please advice me on this.
Thanks in advance,
Disha.What is your exact requirement, FM should look like
FUNCTION z_mm_xxx.
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(RANGE_DATE) TYPE ACC_T_RA_DATE
*" EXPORTING
*" REFERENCE(MATERIAL_LIST) TYPE /SAPXCQM/EKPO_TAB
*" EXCEPTIONS
*" INVALID_DATE_RANGE
*" NO_PURCHASE_ORDER
*" NO_ITEM_FOUND
DATA: lv_ebeln LIKE ekko-ebeln, "#EC NEEDED
lv_datum LIKE syst-datum.
FIELD-SYMBOLS <fs> TYPE acc_s_ra_date.
* Init
REFRESH material_list.
* Check date range
LOOP AT range_date ASSIGNING <fs>.
lv_datum = <fs>-low.
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = lv_datum
EXCEPTIONS
plausibility_check_failed = 1.
IF sy-subrc NE 0.
RAISE invalid_date_range.
ENDIF.
IF <fs>-option EQ 'BT'
OR <fs>-option EQ 'NB'.
IF <fs>-high LT <fs>-low. "#EC PORTABLE
RAISE invalid_date_range.
ENDIF.
lv_datum = <fs>-high.
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = lv_datum
EXCEPTIONS
plausibility_check_failed = 1.
IF sy-subrc NE 0.
RAISE invalid_date_range.
ENDIF.
ENDIF.
ENDLOOP.
* Check existence of PO
SELECT SINGLE ebeln INTO lv_ebeln
FROM ekko
WHERE aedat IN range_date.
IF sy-subrc NE 0.
RAISE no_purchase_order.
ENDIF.
* Read item
SELECT * INTO CORRESPONDING FIELDS OF TABLE material_list
FROM ekpo
JOIN ekko ON ekko~ebeln EQ ekpo~ebeln
WHERE ekko~aedat IN range_date.
IF sy-subrc NE 0.
RAISE no_item_found.
ENDIF.
ENDFUNCTION.
Regards,
Raymond
Maybe you are looking for
-
Hi, I want to know if the User guides are available on the Web in HTML format. I have seen the User guides in the PDF format on the Appsnet website. Somebody help.
-
Hello, I have a customer at Santa Clara University who wants to change from a Mac to a PC go figure! He is currently using Apple Mail and wants to export his e-mail addresses to GroupWise (Novell) on the PC. Can you tell me what he would need to do i
-
Photoshop CS5 *serious* printing issue
Dear Adobe Programmers, we recently buy Photoshop CS5 standalone for Windows. We installed the software on Windows XP with Service Pack 3. We are a copy center so we need to produce an huge amount of prints every day. After the installation I tried t
-
Using iMovie to Make a DVD with Chapter Markers
All, Can someone explain the shortcomings of the following workflow to create a simple DVD with chapter markers? 1. Create each "chapter" as a separate project in FCP X. 2. Export each project using "Export project as QuickTime movie using current se
-
Hello everyone! I'm new here so i think i should introduce myself. My name is Marcin. I'm 22 years old man from Poland. I'm computer scientist working with multimedia, graphic cards hardware, server administration & website design. I'm customer of SB