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.
Similar Messages
-
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 -
Error with quantity field:Datasource Creation Using Function Module method
Problem with DATASOURCE Creation using Function Module method :
I have created a datasource ZSTANDARD_COST_PRICE using Function Module method . The datasource creation is successfull when I remove the quantity field from the Z table . If I dont remove the quantity field from my Z table it gives an error as "Units Field WAERS for field STPRS of datasource ZSTANDARD_COST_PRICE is hidden". I am not able to remove this error . Please someone guide.
Let me know if my explanation is not clear enough.
Thanks in advance,
Neha.
Z table definition is as below :
MATNR MATNR CHAR 18 0 Material Number
BWKEY BWKEY CHAR 4 0 Valuation area
LFGJA LFGJA NUMC 4 0 Fiscal Year of Current Period
STPRS STPRS CURR 11 2 Standard Price " Here the currency field is WAERS and table T001
PEINH PEINH DEC 5 0 Price Unit
VJSTP VJSTP CURR 11 2 Standard price in previous year
VJPEI VJPEI DEC 5 0 Price unit of previous year.
Edited by: Neha Rathi on Jan 30, 2009 3:03 PMHi,
You should add it as one of the main fields as you have added other fields and not as the currency fields...that is..it should be part of the data source and you should be able to see it in RSO2...
Also if added as i said then it will come as new field in the data source...you can either let it be there...or hide it..
also if you want to populate it then you will have to write the code for this fields as well.
Thanks
Ajeet -
Problem while working with function module RFC_READ_TABLE
Dear Experts,
I am facing a problem while working on the FM RFC_READ_TABLE, in which there is a tables parameter options which is of table type, to which I am passing the condition of selection. In the debugg mode I found the select quiry in the source code of function module is not executing the condition passed in the options parameter.
My actual requirement is to fetch all the custom programs in a remote server, the code I have written is below.
TYPES :
BEGIN OF ty_tadir,
pgmid TYPE pgmid,
object TYPE trobjtype,
obj_name TYPE sobj_name,
END OF ty_tadir.
DATA : it_tadir TYPE STANDARD TABLE OF ty_tadir,
wa_tadir TYPE ty_tadir.
data: stmp_dokhl like TAB512 occurs 100000 with header line.
data: options1 like rfc_db_opt occurs 10 with header line.
data: wa_options1 like line of options1.
data: nametab1 like rfc_db_fld occurs 10 with header line.
START-OF-SELECTION.
DATA : W_VALUE(5) TYPE C,
W_VALUE1(20) TYPE C.
W_VALUE1 = 'OBJ_NAME like'.
W_VALUE = 'z*'.
CONCATENATE 'OBJ_NAME LIKE' ' ''' W_VALUE '''' INTO OPTIONS1-TEXT.
CONCATENATE W_VALUE1 W_VALUE INTO wa_OPTIONS1-TEXT SEPARATED BY SPACE.
APPEND wa_OPTIONS1 to OPTIONS1.
CLEAR wa_OPTIONS1.
call function 'RFC_READ_TABLE'
destination 'zard'
exporting
query_table = 'TADIR' "'ZBANK_GUARANTEE'
tables
options = options1
fields = nametab1
data = stmp_dokhl
exceptions
table_not_available = 1
table_without_data = 2
option_not_valid = 3
field_not_valid = 4
not_authorized = 5
data_buffer_exceeded = 6
others = 7 .
Please give me some inputs on this,
With warm regards,
Murthy.
Edited by: pr murthy on Sep 18, 2008 1:49 PM
Edited by: pr murthy on Sep 18, 2008 2:14 PMHi
I have tried this and with small change this is working fine.
TYPES :
BEGIN OF ty_tadir,
pgmid TYPE pgmid,
object TYPE trobjtype,
obj_name TYPE sobj_name,
END OF ty_tadir.
DATA : it_tadir TYPE STANDARD TABLE OF ty_tadir,
wa_tadir TYPE ty_tadir.
data: stmp_dokhl like TAB512 occurs 100000 with header line.
data: options1 like rfc_db_opt occurs 10 with header line.
data: wa_options1 like line of options1.
data: nametab1 like rfc_db_fld occurs 10 with header line.
START-OF-SELECTION.
DATA : W_VALUE(5) TYPE C,
W_VALUE1(20) TYPE C.
W_VALUE1 = 'OBJ_NAME LIKE ''Z%'''.
wa_options1-text = w_value1.
APPEND wa_OPTIONS1 to OPTIONS1.
CLEAR wa_OPTIONS1.
call function 'RFC_READ_TABLE'
*destination 'zard'
exporting
query_table = 'TADIR' "'ZBANK_GUARANTEE'
tables
options = options1
fields = nametab1
data = stmp_dokhl
exceptions
table_not_available = 1
table_without_data = 2
option_not_valid = 3
field_not_valid = 4
not_authorized = 5
data_buffer_exceeded = 6
others = 7 . -
Function module/BAPI for executing VD51/VD52 transactions
Hi
Warm greetings to all,
I require a function module/BAPI for executing VD51/VD52 transactions. Can anyone help on this
SreekanthHi Sreekanth,
Use this.
There is an FM which is used by standard transaction
'RV_CUSTOMER_MATERIAL_UPDATE' .
Ex Code -
CALL FUNCTION 'RV_CUSTOMER_MATERIAL_UPDATE'
IN UPDATE TASK
TABLES
XKNMT_TAB = XKNMT
YKNMT_TAB = YKNMT
TCATALOG_TAB = LT_CATALOG.
commit work.
Regards,
Vijay -
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 -
Need to track Function modules called when executing a transaction
Hi All,
Is there a way through which i can track function modules called, while executing a Transaction. Kindly provide pointers to it.
Thanks in advance.
Regards,
Navin.Goto SE80 Transaction and use Program name for corresponding Transaction Use Find operation like Call Function .. then you will get list of FM ..
There is no other option .
reward Points if it is helpful
Thanks
Seshu -
BAPI creation versus function module creation...
Hi,
I know the difference between BAPI and simple function module. I have also created custom function module.
But I have not worked on creation of Custom BAPIs.
Is there a much differece in creation of function module and BAPI?
If there is please throw some light on main differences or stepwise differences when I create BAPI versus function module ?
Thanks.
Regards,
Tushar.Hai Tushar
what is BAPI?
BAPI stands for Business API(Application Program Interface).
I have answered this question before..
A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
Please check out this thread..
Re: bapi
Also refer to the following links..
www.sappoint.com/abap/bapiintro.pdf
www.sap-img.com/bapi.htm
www.sap-img.com/abap/bapi-conventions.htm
www.planetsap.com/Bapi_main_page.htm
www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
Java Connector(JCO) can call not only BAPI's but also the function modules which are remotely enabled..
BAPI's as i said earlier are remotely enabled function modules..
Hence, JCO can call also BAPI's(n not only BAPI's as u mentioned).
Thanks & regards
Sreeni -
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 -
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. -
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 -
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 -
How to automate the creation of Function Module & Class Object (SE24)
Experts,
I have the requirement to automate the creation of any type of programs: ie function module (like how we normally create in SE37 together with the parameters), class object (like how we normally create in SE24 together with attribute & method), normal report (like how we did in SE38), module pool and so on.
For example. I backuped my program into a flat file (the entire source code in txt formal or HTML) through a download program and I need to upload back this flat file into another installation of SAP.
Does SAP provide any predefined FM to cater for the above cases or better still, does anyone know of any upload program which I can use for the above requirement.
Thanks in advance.Hi Kris, I can't use the transport system as these are 2 separate SAP installation in a different place. The requirement came in the form of creation of program to be able to generate FM/Class/Report on the go.
-
Creation of function module for updating the ztable
Hi,
I am sending the requirement for ceation of function module for updating the ztable.
Requirement----
Table Updation rule (New record)
While creating a new record the calling function will export the following to the table handling function.
Table field Probable Values
ZORDERNO-------> Sales Delivery no in case of sales orderShipment no in case of transfer order
UNAME----
> User ID
ZORDTYPE----
> SALEOR in case of sales orderTRANSF in case of transfer order
ZREFDOCNO----
>Sales Order no in case of sales orderPurchase Order no in case of transfer order
ZREFDOCNO1----
>Delivery no in case of transfer order
The table handling function will calculate the following fields
Table field Probable Values
ZREQNO----
>Running serial number (incremented by 1 for each new record)
ZREQDAT -
>System date
ZREQTIME----
> System time
ZSTATUS----
>OPEN (for all new records)
Before inserting a new record the table handling function will always check if a previous record exists for the same order / shipment no. if record exists the function will not insert a new record.
Table Updation rule (Status Update)
While updating a record the calling function will export the following to the table handling function.
Table field Probable Values
ZORDERNO----
>Sales order no in case of sales orderShipment no in case of transfer order
ZSTATUS----
>CANCEL if cancellation successfulERROR if cancellation not possible (order already processed)
The table handling function will calculate the following fields
Table field Probable Values
ZSTATDAT----
>System date
ZSTATTIME----
> System timeDo you have to create/update new record in Ztable through Function Module ?
or you need to write FM only for validation?
Any how, you need to create a Program with Input values for the fields of Ztable, and for rest of fields the Value can be calculated based on input as per your requirement.
Let me know clearly what exactly u need ?
Regards,
Kiran
Maybe you are looking for
-
Vendor return process for consignment stock not yet own by you
Hello guru, I need some help from you on the following type of vendor return. We receive vendor consignment goods into our warehouse and we notice we would like to return back to the vendor after several defects defect were spotted few month later, h
-
I need help on knowing how to fix my iPod touch's screen.
-
APPLE TV SUBTITLES!!
I download a movie mp4 without internal subtitles, i download the subs separately, the movie is on my time capsule, when i try to play it, sometimes it says " ERROR LOADING THIS CONTENT PLEASE TRY AGAIN LATER ", it only plays when i copy the movie in
-
Setting 'key photo' for Faces?
On an iPhoto event, you can select one photo and set it as a 'key photo'. Can the same be done with Faces? How? Dave
-
Pass user-defined Interfaces between JSPs
Hi, I am using weblogic 6.0wSP1 on win2k. I'd like to pass some user_defined interfaces/classes variables between JSPs at run time. I've been tried using <jsp:include page...> However, the issue is that it was using http