Hi problems in function module
Hi friends I have the following problems.........
When I am using this following code in a function module
its not giving me output until i comment those two fields kwmeng and netwr..i have use VRKME and WAERS for those two..........which are the components of a structure i have created....unless i comment them its giving dump
but when i am using the same thing in report...i am getting
values..off course there is no use of structures......i am creating internal tables and using them ...
i need to use this functio module...how can i get the data from those two fields..tell me the
SELECT vbak~vbeln
vbak~erdat
vbak~vkorg
vbak~ABRVW
vbak~augru
vbak~kunnr
vbap~posnr
vbap~matnr
vbap~vkaus
vbap~spart
vbap~netwr
vbap~waerk
vbap~kwmeng
vbap~kondm
vbap~mvgr1
vbap~mvgr2
vbap~mvgr3
vbap~mvgr4
vbap~mvgr5
FROM vbak AS vbak INNER JOIN vbap AS vbap
ON vbakvbeln EQ vbapvbeln
INTO corresponding fields of TABLE tvbak
WHERE vbak~vbeln = vbeln1.
there is aproblem witht he last line of your code:
WHERE vbak~vbeln = vbeln1.
it should be
WHERE vbakvbeln = vbapvbeln.
There is no problem with selection of netwr or Kwmeng .
Edited by: Rachana Singh on Jan 21, 2008 9:09 AM
Similar Messages
-
Problem using Function Module IDOC_INBOUND_ASYNCHRONOUS
Hi friends,
I have a critical problem load idoc ARTMAS05. I development a program for load the data with idoc but my program call the function module IDOC_INBOUND_ASYNCHRONOUS close my session of the SAP GUI and lose the load. This problem begining today because yesterday was work well. This morning when I'm load the idoc gave to me a short dump with this message "SNAP_NO_NEW_ENTRY" I have find some notes and obtained this note 17537.
Note Solution
Solution
When the SNAP Table is full: Reorganize the table e.g. via Transaction ST22->Go to->Reorganize. Please also refer to Note 16083. This may lead to other errors of this kind since not all dumps e.g. from SM21 can be displayed.
In case of database problems, the errors should no longer occur with new short dumps after correcting the database error. Here, other errors of this kind may occur in SM21 as well.
After apply the correction begin the error that I close me the Session of SapGui and lose all my data proccessing. Please need your help.
Thank and regards..Hi Sir,
I am also facing the same issue...i need to update dependents Information Date Of Birth n Perid(Which is stored in IT0106)...in IT 0021..
Kindly correct my code....
I am using the following code for this...
data: w_return type bapireturn1.
data: p0021_struc TYPE p0021,
p0106_struc TYPE p0106,
p_pskey TYPE pskey.
start-of-selection.
get pernr.
p0021_struc = p0021.
p0021_struc-favor = 'Gaurav'.
p0021_struc-fgbdt = '05/10/1955'.
Move p0021_struc-favor to p0021-favor.
p0106_struc = p0106.
p0106_struc-stras = '2235 BOmbay Road'.
p0106_struc-perid = '123456789'.
MOVE p0106_struc-stras to p0106-stras.
Enqueue personnel number
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = pernr-pernr
importing
return = w_return.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = p_pskey-infty
number = p_pskey-pernr
subtype = p_pskey-subty
objectid = p_pskey-objps
lockindicator = p_pskey-sprps
validityend = p0021-endda " '99991231'
validitybegin = p0021-begda
record = p0021_struc
operation = 'mod'
tclas = 'A'
dialog_mode = '2'
nocommit = p_test
VIEW_IDENTIFIER = '07' "p0003-viekn
secondary_record = p0106_struc
IMPORTING
return = w_return
key = familykey
EXCEPTIONS
OTHERS = 0.
Enqueue personnel number
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = pernr-pernr
importing
return = w_return. -
Problems in Function Module of a Custom Virtual Cube
Hi all,
I have copied a Function Module-- RS_BCT_FIGL_DATA_GET_VC10 into a custom one ZRS_BCT_FIGL_DATA_GET_VC10. A custom Virtual Cube(ZFIGL_V10) was also created using this FM. The Function Module and Function Group are activated and there are no syntax errors in the custom FM.
When I try to check data of this virtual cube using the T-CODE "listcube" it gives me the following errors.
1. "An exception with the type CX_SY_DYN_CALL_ILLEGAL_FUNC occurred, but was neither handled locally, nor declared in a RAISING"
2. "The function call failed; the function ZRS_BCT_FIGL_DATA_GET_V10 is either not activated or contains no code"
Also some queries are not executing in this Virtual Cube.
Could not figure out what the problem was.Can someone help me on this?
Thanks
MaddyHI,
Can you check whether the FM is activated. Also check the function module group is activated or not. You can check the status of the same via SE80.
Goto SE80 -> Select function grp -> give your function grp and press enter
Double click on the below funtion grp to check status.
Also expand FM and check whether it is activated.
Also check the import and export parameters of the FM. Try to see whether there is any discrepancy.
If any default values are specified, check whether they are correct.
Also try to debug, put a breakpoint in your code and check whether it gets into the code or not.
Regds,
Shashank -
PROBLEM in function module extractor
Hi ,
i m facing a problem in creating a function module as extractor in srm but its not working plz letme know the way i can create the zfunction module as extrator.
i created a datasource ZSRM_CS in which i m using BBP_PDS_CND as extraction structure and Z_BIW_GET_DATA_SIMPLE as zfunction module
but even wen i use rsa3 in debug mode its not stoping and gives error
ERROR6 plz letmme know the problem.
i copied the standard module RSAX_BIW_GET_DATA_SIMPLE .
n hide the irrelvant things. tell me y its not stoping in debug mode in rsa3
Thnx
RegardsThnx for ur concern ...but i have already mentioned. my code goes llike this.plz have a luk
FUNCTION Z_BIW_GET_DATA_SIMPLE.
""Local Interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR OPTIONAL
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" 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 TYPE ZT_BBP_PDS_CND OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
Example: DataSource for table SFLIGHT
TABLES: ZQUOTATION.
Auxiliary Selection criteria structure
DATA : L_S_SELECT TYPE SRSC_S_SELECT.
DATA : GIT_QTN type table of ZQUOTATION with header line .
DATA : GIT_TAB type table of BBP_PDS_CND with header line .
Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
cursor
S_CURSOR TYPE CURSOR.
Select ranges
RANGES: L_R_CARRID FOR SFLIGHT-CARRID,
L_R_CONNID FOR SFLIGHT-CONNID.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check DataSource validity
CASE I_DSOURCE.
WHEN '0SAPI_SFLIGHT_SIMPLE'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
this is a typical log call. Please write every error message like this
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.
Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
Fill field list table for an optimized select statement
(in case that there is no 1:1 relation between InfoSource fields
and database table fields this may be far from beeing trivial)
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
select * from ZQUOTATION
into table GIT_QTN .
LOOP AT GIT_QTN .
CALL FUNCTION 'BBP_PDCND_GETDETAIL'
EXPORTING
i_p_guid = GIT_QTN-GUID1
I_P_KIND = 'B'
I_OBJECT_TYPE = GIT_QTN-OBJECT_TYPEH
IV_VERSION_TYPE = ' '
iv_header_guid = GIT_QTN-HEADER
IV_WITH_DELETED_RECORDS = ' '
IMPORTING
ET_CONDITIONS = GIT_TAB
E_COM =
TABLES
E_T_DATA =
MOVE-CORRESPONDING GIT_TAB TO E_T_DATA.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CARRID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
APPEND L_R_CARRID.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
APPEND L_R_CONNID.
ENDLOOP.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
WHERE CARRID IN L_R_CARRID AND
CONNID IN L_R_CONNID.
ENDIF. "First data package ?
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
plz letme know where i m wrong in code,
wt my code is doing its picking the GUID! and header from view zquation and through fm 'BBP_PDCND_GETDETAIL' its returning et conditions whichi have to pass to data source .
Thnx -
Reg: code problem in Function module
Hi Friends,
I am facing problem while developing Function module.
i declared following things in Import.
""Local Interface:
*" IMPORTING
*" VALUE(SOURCETABLETXT) TYPE STRING
*" VALUE(SELECTTXT) TYPE STRING
*" VALUE(SOURCEINFOOBJECT) TYPE STRING
*" REFERENCE(ITAB_OUTTAB)
*" REFERENCE(ITAB_SOURCEPAK)
In source code writen as,
DATA DREF1 TYPE REF TO DATA.
FIELD-SYMBOLS: <ITAB_SPACK> TYPE ANY TABLE,
<WA1> TYPE ANY,
TYPES: BEGIN OF SOURCEIOJ,
SOURCEINFOOBJECT(72) TYPE C ,
END OF SOURCEIOJ.
DATA: ITAB_SOURCEIOJ TYPE TABLE OF SOURCEIOJ.
DATA: WA_SOURCEIOJ LIKE LINE OF ITAB_SOURCEIOJ.
ASSIGN ITAB_SOURCEPAK->* TO <ITAB_SPACK>.
CREATE DATA DREF1 LIKE LINE OF <ITAB_SPACK>.
ASSIGN DREF1->* TO <WA1>.
LOOP AT <ITAB_SPACK> assigning <WA1>.
READ TABLE ITAB_SOURCEIOJ INTO WA_SOURCEIOJ WITH KEY SOURCEINFOOBJECT = <WA1>-SOURCEINFOOBJECT.
IF SY-SUBRC <> 0.
WA_SOURCEIOJ-SOURCEINFOOBJECT = <WA1>-SOURCEINFOOBJECT.
INSERT WA_SOURCEIOJ INTO TABLE ITAB_SOURCEIOJ.
ENDIF.
ENDLOOP.
While checking i am getting error as The data object "<WA1>" has no structure and therefore no componentcalled "SOURCEINFOOBJECT". called "SOURCEINFOOBJECT".
SOURCEINFOOBJECT is not field in internal table which passing as reference and hence not in WA1.
But the input field which i give to SOURCEINFOOBJECT while calling the FM, that input field is the part of the intenal table
<ITAB_SPACK>, which ref of ITAB_SOURCEPAK passing to FM.
Please give some idea how to handle this.
Regards
MRKHey,
you declared <wa> as field symbol, so it won't contain the field that you are trying to read. Go through the following; it may help you.
Loop at <ITAB_SPACK> assigning <WA1>.
do.
assign component sy-index of structure <wa1> to <dyn_field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
WA_SOURCEIOJ-SOURCEINFOOBJECT = <dyn_field>.
else.
WA_SOURCEIOJ-SOURCEINFOOBJECT = <dyn_field>.
endif.
enddo.
endloop.
with regards
Mahesh -
Urgent: problems in function module extraction
Hi Gurus,
I am new to BW and My requirement is to extract the notes from CRM as it is not stored in database tables i used functional module to extract it i have used standard FM RSAX_BIW_GET_DATA_SIMPLE but in that when i map E_T_DATA with my own structure with like or type keyword in tables tab(e.g. E_T_DATA LIKE/TYPE ZCRM_OREDR_STR) i am getting a warning msg "tables parameters are obsolete". Would anyone please suggest me what i need to do. I appreciate it in advance. I def. award points.
Thanks a lot
With Regards
VenkatHi PSG,
Thanks a lot for quick response. when i use tables it is once again giving an error "The typing method can be 'Like', 'Type', or 'Type Ref To'" I even used all the three than also same problem. Actually it is coming in Function Builder in Tables tabstrip when i use E_T_DATA Like/tables/type/type ref to ZCRM_ORDER_STR I donot know why it is happening. Please would you suggest me what to do.
Thanks a lot
With Regards
Venkat. -
Problem in Functional Module on BW Query
Hi,
We are working on below requirement in BW.
We have to fetch the data of BW Query via a functional module to web services. We have created a query and a functional module based on that query. To create the function module on query, we have followed the standard method suggested in SAP blog. (ie. Input parameters for Functional Module is Filters use in Query and output parameters will be Keyfigures and Char. Of the Query).
We have 0PLANT in the raw section in query. We want to fetch plant text in the Function module output. But, our problem is we are getting Plant KEY value only in the output of functional module.
0PLANT properties in query designer is set to TEXT only.
So, in short, we want to have 0PLANT Text in the function module output.
Please suggest.
Regards,
Macwan James.Hi,
In your Function module, I hope the code is perfect. Please check your Infoobject maintenance whether text was maintained.
Regards,
Suman -
Problem in Function Module "ALSM_EXCEL_TO_INTERNAL_TABLE"
Dear All,
In this function module we give the number of end rows to be picked from the excel sheet. So, please tell me what can be the maximum number, currently I have put 4000 end rows.
Thanx&Reg,
NishuHai Nishu
*& Report ZK_REPORT *
REPORT ZK_REPORT.
internal table declarations
DATA: BEGIN OF ITAB OCCURS 0,
NAME(20) TYPE C,
ADDR(20) TYPE C,
END OF ITAB.
DATA: ITAB1 LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
DATA: K1 TYPE I VALUE 1,
M1 TYPE I VALUE 1,
K2 TYPE I VALUE 100,
M2 TYPE I VALUE 9999.
use FM for uploading data from EXCEL to internal table
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = 'C:\book1.xls'
I_BEGIN_COL = K1
I_BEGIN_ROW = M1
I_END_COL = K2
I_END_ROW = M2
TABLES
INTERN = ITAB1
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT ITAB1.
WRITE:/ ITAB1.
ENDLOOP.
Thanks & regards
Sreeni -
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 ...) -
Hi.
can anybody tell me how can i calculate
cost depreciation for an asset.
I have used one function module DEPR_RECALCULATE.
but it will allow only one date and it will calculate depreciation for total year .
As per my
I want to pass the two dates and need to calculate the depreciation between two periods.Hi Nitin.
Thank you for u r quick reply.
I have tried all these function modules but as per our requirement
They are not support.
Issue:
I need to calculate the cost depreciation between APRIL and MARCH
but DEPR_RECALCULATE Fm will calculate between JAN and the date which is specified in the parameter field on the selection screen .
so how can calculate the depreciation cost between two dates( I want to pass the select-options).
Thanking you,
Regards
sateesh -
Hi gurus,
I have created a genric extractor by using function module and i took extract structure as a DB View, FM is working fine, when i am checking the extractor in RSA3 for records, it is showing 0 records. When i am executing FM, it is showing the data.
Thanks&Regards
PhaniHey. The best way would be to set a break point in the FM and just see what's happening. Couple thoughts...
1) You may not be passing the data to E_T_DATA, but that is just a guess. If that is the case, you just need to append the records to E_T_DATA as that is what the FM needs to populate for the records to be processed further/sent to BW.
2) Is the selection criteria the same when you are running RSA3 and testing the FM?
Thanks -
Hi,
I am using RH_STRUC_GET with evalPath O-O-S-P and get the or g structure. I then loop through the table obtained from RH_STRUC_GET and re-use RH_STRUC_GET with a evaluation path 'bossonly' to find out who the managers are. But it does not work. I get No ROOTS FOUND error.
When I try the function module RH_STRUC_GET separately with the same input fields then it works!!!
Please let me know if I am doing anything wrong. My code is shown below....
FUNCTION Z_ORGBUILDER_CONN.
""Local interface:
*" IMPORTING
*" VALUE(OTYPE) LIKE OBJEC-OTYPE
*" VALUE(OBJID) LIKE OBJEC-OBJID
*" VALUE(PATHID) LIKE GDSTR-WEGID
*" VALUE(PLVAR) LIKE OBJEC-PLVAR
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" L_ZCONN_TAB TYPE ZCONN_TAB
*" RESULT_TAB STRUCTURE SWHACTOR OPTIONAL
*" RESULT_OBJEC STRUCTURE OBJEC OPTIONAL
*" RESULT_STRUC STRUCTURE STRUC OPTIONAL
*" L_ZCONN_ORG TYPE ZCONN_TAB
*" L_ZCONN_POS_HOLDER TYPE ZCONN_POS_TAB
*" L_MANAGERS STRUCTURE OBJEC
DATA: z_struc type zconn_struc.
DATA: xresult_struc like result_struc.
DATA: yresult_struc like result_struc.
DATA: z_struc1 type zconn_struc.
DATA: z_struc_pos type zconn_position.
DATA: temp_tab LIKE SWHACTOR occurs 0 with HEADER LINE.
DATA: temp like struc-objid.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = otype
act_objid = objid
act_plvar = plvar
act_wegid = pathid
TABLES
result_tab = result_tab
result_struc = result_struc
result_objec = result_objec
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
RAISE no_roots_found.
ENDIF.
LOOP AT result_struc into xresult_struc.
read table result_struc into yresult_struc with key seqnr =
xresult_struc-pup.
if sy-subrc = 0.
z_struc-objectID = xresult_struc-OBJID.
z_struc-objectType = xresult_struc-otype.
z_struc-parentID = yresult_struc-objid.
z_struc-parentType = yresult_struc-otype.
endif.
Append z_struc to l_zconn_tab.
ENDLOOP.
LOOP AT l_zconn_tab.
if l_zconn_tab-objectType = 'O' or l_zconn_tab-objectType = 'S'.
z_struc1-objectID = l_zconn_tab-objectID.
z_struc1-objectType = l_zconn_tab-objectType.
z_struc1-parentID = l_zconn_tab-parentID.
z_struc1-parentType = l_zconn_tab-parentType.
Append z_struc1 to l_zconn_org.
endif.
ENDLOOP.
LOOP AT l_zconn_tab.
if l_zconn_tab-objectType = 'P'.
z_struc_pos-position = l_zconn_tab-parentID.
z_struc_pos-pos_holder = l_zconn_tab-objectID.
Append z_struc_pos to l_zconn_pos_holder.
endif.
ENDLOOP.
loop at result_struc.
if result_struc-otype = 'O'.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'O'
act_objid = result_struc-objid
act_plvar = '01'
act_wegid = 'bossonly'
TABLES
result_tab = temp_tab
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
RAISE no_roots_found.
ENDIF.
APPEND LINES OF temp_tab to L_managers.
endif.
endloop.
ENDFUNCTION.data: begin of itab occurs 0,
orgunit(10) type c,
mananger(30) type c,
end of itab.
* This will add a record to your itab
loop at result.
itab-orgunit = result-orgunit. " I don't know what fields they are
itab-manager = result-manager.
append itab.
endloop.
Please remember to award points for helpful answers and mark this post as solved if you question has been answered. Thanks.
Regards,
Rich Heilman -
Problem using function module for infotype 21
hi
im uploading the infotype 21 (family details) through function module hr_infotype_operations. i found that infotype 0106 (family/related person)
is a secondary infotype and that a record is created for 0106 ,everytime you create a record in 21. so i upload the family data of an employee using the function module for infotype 21 initially. and then fetch the same record from the table pa0106 and modify the same record with other information.
for example : u have the address details of a dependent(father subtype 11) in infotype 21. this address data is stored in the table pa0106 . im not able to modify the record for infotype 0106 using the function module 0106.
i would like to know the reason for the same. Is it because that infotype 0106 is a secondary infotype and u cannot modify the record using the fn module..?/
thanks
sridharanHi Sir,
I am also facing the same issue...i need to update dependents Information Date Of Birth n Perid(Which is stored in IT0106)...in IT 0021..
Kindly correct my code....
I am using the following code for this...
data: w_return type bapireturn1.
data: p0021_struc TYPE p0021,
p0106_struc TYPE p0106,
p_pskey TYPE pskey.
start-of-selection.
get pernr.
p0021_struc = p0021.
p0021_struc-favor = 'Gaurav'.
p0021_struc-fgbdt = '05/10/1955'.
Move p0021_struc-favor to p0021-favor.
p0106_struc = p0106.
p0106_struc-stras = '2235 BOmbay Road'.
p0106_struc-perid = '123456789'.
MOVE p0106_struc-stras to p0106-stras.
Enqueue personnel number
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = pernr-pernr
importing
return = w_return.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = p_pskey-infty
number = p_pskey-pernr
subtype = p_pskey-subty
objectid = p_pskey-objps
lockindicator = p_pskey-sprps
validityend = p0021-endda " '99991231'
validitybegin = p0021-begda
record = p0021_struc
operation = 'mod'
tclas = 'A'
dialog_mode = '2'
nocommit = p_test
VIEW_IDENTIFIER = '07' "p0003-viekn
secondary_record = p0106_struc
IMPORTING
return = w_return
key = familykey
EXCEPTIONS
OTHERS = 0.
Enqueue personnel number
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = pernr-pernr
importing
return = w_return. -
Problem in function module for expand in tree display
hi all,
i have found a function module which can expand all nodes of the tree.
it is TREEV_EXPAND_ROOT_NODES.
CALL FUNCTION 'TREEV_EXPAND_ROOT_NODES' "Expands all Root Nodes
EXPORTING
handle = " cntl_handle Handle for Tree Control
level_count = " i Number of Levels to be Expanded
expand_all_children = " c
no_flush = " c
EXCEPTIONS
FAILED = 1 " General Error
ILLEGAL_LEVEL_COUNT = 2 . " LEVEL_COUNT Must Be GE 0
for above function call what value should i give for "handle parameter".
thanks.Hi,
Please pass the value as below with minor changes as per your requirement.
DATA: tree TYPE cntl_handle,
DATA: TREE_HANDLE TYPE CNTL_HANDLE.
data: local_rep like sy-repid,
local_scr like sy-dynnr.
constants: dynpro_default type i value -1.
data: node_table type node_table_type,
constants : TREEV_NODE_SEL_MODE_SINGLE TYPE I VALUE 0,
call function 'TREEV_CREATE_SIMPLE_TREE'
exporting
owner_repid = local_rep
dynnr = local_scr
left = 0
top = 0
width = 45
height = 22
no_flush = space
shellstyle = style
parentid = dynpro_default
node_selection_mode = treev_node_sel_mode_single
node_table_structure_name = 'MTREESNODE'
tables
node_table = node_table
changing
handle = tree_handle
exceptions
create_error = 1
tree_control_not_existing = 2
cntl_system_error = 3
failed = 4
illegal_node_selection_mode = 5
missing_node_structure_name = 6
error_in_node_table = 7
dp_error = 8
illegal_owner_repid = 9
table_structure_name_not_found = 10
others = 11.
if sy-subrc <> 0.
message e645 with text-745 sy-subrc.
endif.
call function 'TREEV_EXPAND_ROOT_NODES'
exporting
handle = tree_handle
level_count = 2
expand_all_children = 'X'
no_flush = ' '
exceptions
failed = 1
illegal_level_count = 2
cntl_system_error = 3
others = 4.
if sy-subrc <> 0.
message e645 with text-743 sy-subrc.
endif.
If it is helpfull means reward me with some points.
Regards
Chitra -
Problem in function module NAST_PROTOCOL_UPDATE
Hi experts,
Im using the function module NAST_PROTOCOL_UPDATE to populate the processing log for purchase order.
My code is like this.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = i_processlog-msgid
msg_nr = i_processlog-msgno
msg_ty = i_processlog-msgty
MSG_V1 = i_processlog-msgv1
MSG_V2 = i_processlog-msgv2
MSG_V3 = i_processlog-msgv3
MSG_V4 = i_processlog-msgv4
EXCEPTIONS
OTHERS = 1 .
But still, im not getting the processing log for PO.
please give me the solution for this.
(Can you give me the sample code to solve the issue?)
regards
subash
Edited by: subash Arthanari on Feb 4, 2009 12:38 PMhi,
There are lots of threads on this FM. Search it
One is
NAST_PROTOCOL_UPDATE
Regards
Mudit
Maybe you are looking for
-
Can i install windows 8.1 as a virtual machine without an existing windows os
can i install windows 8.1 as a virtual machine without an existing windows os? I only have the download of 8.1, no cd.
-
Hello Folks I am having problem accesing the applet from the web application my applet runs fine if i run it in the IDE. These are my methods in the bean public String getApplet() { applet = "<applet code=\"applet.PrinterApplet.class\" code
-
TextEdit refusing to save files
Since Safari has no "save as text" option, I've been cutting and pasting text into TextEdit. However, if the copied text contains even a single character not in ISO Latin 1, which is what all my software works in, it refuses to save the file until I
-
Safari 5.0 is a disaster
How do I switch back to Safari 4.0 from 5.0? Since I downloaded 5.0 yesterday, downloads have slowed sometimes to a complete halt, the computer has frozen, the loading indicator continues to move and other annoying activity has taken place. I now hav
-
OID with 10gR2 database?
Is it possible to install OID using a 10gR2 database as the metadata repository? I'm getting an error but was wondering if there's a workaround? I'm using Oracle 10gR2 Database, OAS 10.1.3, and I'm installing Identity Managment from 10.1.2 to get OID