Regarding function module error
hi experts,
i m using hr_infotype_operation....the syntax is like this..
loop at info_table.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = info_table-pernr
SUBTYPE = '6500'
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = jtab-begda
VALIDITYBEGIN = jtab-endda
RECORDNUMBER =
RECORD = info_table
OPERATION = 'INS'
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT = NOCOMMIT
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN = W_RETURN.
KEY = PERSONALDATAKEY.
endloop.
but it is giving this error:::
ShrtText
Error in ASSIGN in the program "SAPLHRMM".
What happened?
Error in ABAP application program.
The current ABAP program "SAPLHRMM" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
The source field is too short.
The current program, "SAPLHRMM", tried to assign a field to a field symbol.
However, the field is shorter than the type of the field symbol, which
is not allowed.
The statement in question is in the form ASSIGN f TO <fs> CASTING or
ASSIGN f TO <fs> with a field symbol that was created using the
STRUCTURE addition.
plz help me to solve this problemmmmm
check this piece of code
Perform PA30 via infotype_operation
call function 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0009'
number = p0009-pernr
validityend = p0009-endda
validitybegin = p0009-begda
subtype = p0009-subty
recordnumber = p0009-seqnr
record = p0009
operation = 'MOD'
dialog_mode = '1'
IMPORTING
return = l_return.
the data type should be same as the one's paased in the above case.
Reward points if helpful
Similar Messages
-
query regarding function module SPOOL_RQ_READ_BAPI_EXPORTS (EBP-SRM Module)
shopping cart
Hi in FM SPOOL_RQ_READ_BAPI_EXPORTS
i want to relate the internal tables requisition_items and requisition_services.
but in am not getting the key on which they should be joined
here i have to take the quantity and other fields from requisition_services
right now i am using the joining condition as
requisition_items-pckg_no = requisition_services-pckg_no.
any help in this regard is welcome.
Thanks and regards,
VithalprasadHi Kathirvel,
Thank you for reply. I am making changes for standard code only.
" Call FM SPOOL_DPO_READ_BAPI_EXPORTS to read PO data exported to backend.
Use this data to call FM B46B_DPO_TRANSFER and copy errors tab from
' lt_bapi_return ' to ' et_messages' retrun tab in 'doc_check' badi. "
Thank you.
Regards, Sunu -
Regarding the function module --error is coming.
Hi All
I am executing function module and i am getting one error after actvating that FM.
Error is - REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
Waiting for the fovarable reply.Hi,
While creating a FM you will be assigned to a Function Group, that Function Group is not active. If function group is not active then only you will be getting this error.
To over come this issue. Please do the below process.
Go to Se80--> Select Function Group from the drop down list --> Select the function group --> Right click on the Function group --> Select activate.
After above process is completed.
Test the Function Module.
Thanks,
Sriram Ponna. -
Function module error message.
Call Function Z_function.
Imports
Exports
EXCEPTIONS
no_entry_found = 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.
Suppose
if sy-subrc = 1.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Giving me popup and is troubling.
Could you please tell me if I comment below
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4....
and proceed will it effect me in case of sy-subrc <> 0.
Thank youHi Sam,
Yes you can. But some times the programs emphasises specific program errors.
For e.g.
Use the following code for function module for GENEREIC case.
In this case you can remove total piece of code suggested by you. and replace the following code.
If sy-subrc ne 0.
Messae 'Error in function module' Type 'E'.
Endif.
Use the following code for function module for SPECIFIC case.
case sy-subrc.
when '1'.
Message 'No_entry found' type 'E'.
when '2'.
Message 'Undetermined error in Function module. Please contact system administrator' Type 'E".
Endcase.
Regards
Bhupal Reddy -
Regarding Function module HR_MAINTAIN_MASTERDATA.
hi experts,
i have a requirement where in i need to inseert data in to infotype:0000,0001,0105,9010,0041 and update the infotypes:0015,0014,0008,0009 by using function module HR_MAINTAIN_MASTERDATA . i have used ACTIO as 'INS' and 'MOD' (since T589A table doesn't contain the 'UPD' operation).
but using this "MOD' i am unable to update all the infotypes, instead it is throwing the error as entry doesn't exist in T589A for P.
i need to know whether the following code is correct or not and also to overcome the error.. Please let me know the changes needed.
DATA: BEGIN OF IT_INFTY,
INFTY TYPE PPROP-INFTY,
END OF IT_INFTY .
DATA: LV_PERNR TYPE PSPAR-PERNR.
LV_PERNR = '430102'.
if ( IT_INFTY-infty = '0000' or IT_INFTY-infty = '0001'
or IT_INFTY-infty = '9010'
or IT_INFTY-infty = '0105' OR IT_INFTY-infty = '0041' ).
LV_OPERATION = 'INS'.
elseif ( IT_INFTY-infty = '0007' or IT_INFTY-infty = '0008'
or IT_INFTY-infty = '0014' or IT_INFTY-infty = '0015').
LV_OPERATION = 'MOD'.
endif.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = LV_PERNR "WA_SOURCE_DATA-pernr
IMPORTING
RETURN =
LOCKING_USER = sy-uname
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = LV_PERNR
MASSN =
ACTIO = LV_OPERATION "'INS'
TCLAS = 'A'
BEGDA = SY-DATUM
ENDDA = '99991231'
OBJPS =
SEQNR =
SPRPS =
SUBTY = lv_subty
WERKS =
PERSG =
PERSK =
PLANS =
DIALOG_MODE = '2'
LUW_MODE = '1'
NO_EXISTENCE_CHECK = ' '
NO_ENQUEUE = ' '
IMPORTING
RETURN = RC
RETURN1 = RC1
HR_RETURN =
TABLES
PROPOSED_VALUES = PROPOSED_VALUES
MODIFIED_KEYS =
write : / rc-message.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = LV_PERNR "WA_SOURCE_DATA-pernr
IMPORTING
RETURN =
kindly suggest.
regards,
joy.hi,
i have a similar situation wherein i need to use the two operations insert and modifications for the infotypes.
the problem i am facing is ,i need to put the logic in a method and it doesnt allow the usage of with header line. so how can we refer to the fields if the following logic is used.
TYPES : begin of ty_infty,
infty TYPE pprop-infty,
END OF ty_infty.
DATA: it_INFTY TYPE STANDARD TABLE OF TY_INFTY,
proposed_values TYPE pprop occurs 0 with header line,
wa_INFTY TYPE TY_INFTY.
*************************updation of 0000***********************
lv_fval = '01'.
wa_proposed_values-infty = '0000'.
wa_proposed_values-fname = 'P0000-MASSG'.
wa_proposed_values-fval = LV_FVAL.
wa_proposed_values-fname = '00'.
append wa_proposed_values to proposed_values.
it_infty-infty = wa_proposed_values-infty.
clear wa_proposed_values.
***similarly we update the values for other infotypes
if ( it_infty-infty = '0000' or it_infty-infty = '0001'
or it_INFTY-infty = '0041' or it_INFTY-infty = '9010'
or it_INFTY-infty = '0105').
lv_operation = 'INS'.
elseif ( it_INFTY-infty = '0007' or it_INFTY-infty = '0014' ).
"or IT_INFTY-infty = '0014' or IT_INFTY-infty = '0015').
lv_operation = 'MOD'.
endif.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = lv_pernr
IMPORTING
RETURN =
LOCKING_USER = sy-uname
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = lv_pernr
MASSN =
ACTIO = lv_operation
TCLAS = 'A'
BEGDA = SY-DATUM
ENDDA = '99991231'
OBJPS =
DIALOG_MODE = '2'
LUW_MODE = '1'
NO_EXISTENCE_CHECK = ' '
NO_ENQUEUE = ' '
IMPORTING
RETURN = rc
RETURN1 = rc1
HR_RETURN =
TABLES
PROPOSED_VALUES = proposed_values
MODIFIED_KEYS =
write : / rc-message.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = lv_pernr
IMPORTING
RETURN =
here its giving an error that it_infty is a table without headerline and has no field as infty.
how to over come this, please guide me in this regard. if this is not the correct logic please tell me the appropraite one..
thanks in advance,
Durga. -
Function Module Error: GETWA_NOT_ASSIGNED
Hello everyone,
I have a scenario where I copy a function module (IDOC_INPUT_ORDERS to ZIDOC_INPUT_ORDERS) and make changes to the code to enhance the program. I get an error 'GETWA_NOT_ASSIGNED' 'Field symbol has not yet been assigned' on the shortdump.
This is strange since even if I don't make any major changes (eg. write a *note in the zprogram), whenever I run it, it gives me the above error. Has anyone encountered this before? If so, would anyone be able to help me out?
Thanks in advance!
GlennHello Ginger,
Thanks for your reply! I copied the whole IDOC_INPUT_ORDERS program from SE37. It showed the function group VEDA then. The new program - ZIDOC_INPUT_ORDERS also belongs to the function group VEDA.
Is this correct?
Warm regards,
Glenn
PS. I did my changes in DEV Client 100 (Where we do our configurations), I'm testing in DEV Client 300. The changes made in Client 100 reflect in Client 300, but would there be any activations I need to perform in Client 300 as well? -
Function Module error in query execution
Hi SDN Gurus,
When I run this query in Dev it gives me an error: "Function Module RSD_ZK_ACCT_TEXT_GET does not exist." When I look up in SE37 in both DEV and QAS, there is no such function module though I don't get this message in QAS.
ZK_ACCT is one of our important infoobjects and is in the query.
Thanks for your help.
SAFHi Saf,
Try with Tcode RSRT and with the following option:
Buttom:Genrate Report.
Menù: Repair.
And then execute once again the report.
Ciao.
Riccardo. -
Regarding Function Module 'SO_NEW_DOCUMENT_SEND_API1'
Hi All,
I am having a issue in using Function Module 'SO_NEW_DOCUMENT_SEND_API1'.
<b>I am presently sending the E-mail as follow:</b>
From: [email protected]
To: [email protected]
Subject: You have Missing Time
Please Do Not Respond To This E-mail ***
BOHAN JAMES P. S25751
07/01/2005 4.00 HRS
07/07/2005 4.00 HRS
07/27/2005 1.50 HRS
For any missing time greater than 30 calendar days, please complete a Salary Request for Labor Hours Transfer Form (SA8250). If you have any questions, please contact Salary Timekeeping on extension 6-5571 or 6-5500.
<b>But the user wants it to be in following way:</b>
From: [email protected] [mailto:[email protected]]
Sent: Monday, August 15, 2005 10:44 AM
To: [email protected]
Subject: You have Missing Time
Please Do Not Respond To This E-mail ***
BOHAN JAMES P. S25751
07/01/2005 4.00 HRS
07/07/2005 4.00 HRS
07/27/2005 1.50 HRS
For any missing time greater than 30 calendar days, please complete a Salary Request for Labor Hours Transfer Form (SA8250). If you have any questions, please contact Salary Timekeeping on extension 6-5571 or 6-5500.
<i>I want following Extra row to be added in when i send Emails to recipients.They should receive Date & Time when i sent that E-mail in following way.</i>
<b>Sent: Monday, August 15, 2005 10:44 AM</b>
Can any body help how can i solve this issue.
Thanks in advance.
Thanks & Regards,
Rayeezuddin.Hi,
check this link:
http://www.sapdevelopment.co.uk/reporting/email/email_sapmail.htm
It has options for date and time while sending a mail.
Best Regards,
Anjali -
Regarding function module in update task
Hi,
I have a function module(Zxxx) which is update type. i have called the fun.module in my program (Zyyy) using the syntax CALL FUNCTION ZXXX IN UPDATE TASK. As I suppose to debug the function module, I activated the update debugging in the debugging screen. But the controll still not goen into the function module. Please let me know solution.
Thanks & regards,
Suresh>
sureshkumar vaniyasekar wrote:
> I activated the update debugging in the debugging screen. But the controll still not goen into the function module.
Hello Suresh,
What do you mean by not going?
If you are trying to do an F5 at the function call, the debugger is not "enter" into the FM. This is because at this point the function call is registered but the FM is not executed.
Update FM calls registered in a particular LUW are executed(in a special "UPD" workprocess) when there is a COMMIT encountered(may be explicit or implicit).
Did you read the online help on [Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm] & [Breakpoint behaviour during Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617cbee68c11d2b2ab080009b43351/content.htm]?
BR,
Suhas -
Hello,
In one of my function modules, I have the code as shown below. I got an error after executing this code. The error is:
In LOOP .... WHERE... the line type of the table must be statically defined.
<b>This error is for the highlighted LOOP statement.</b> Could someone please help me with the code.
<b>Objective of the function module:</b> I have a hashed table with some records.
Eg: CCTR FISCPER VERSION AMOUNT
100 06/2007 10 100
100 06/2007 20 0
100 07/2007 10 45
I want to update the amount for version '20' (for same costcenter and same period as of version 10) by doing some calculations.
FUNCTION YCALC_VALUE.
""Local Interface:
*" IMPORTING
*" REFERENCE(I_AREA) TYPE UPC_Y_AREA
*" REFERENCE(I_PLEVEL) TYPE UPC_Y_PLEVEL
*" REFERENCE(I_METHOD) TYPE UPC_Y_METHOD
*" REFERENCE(I_PACKAGE) TYPE UPC_Y_PACKAGE
*" REFERENCE(IT_EXITP) TYPE UPF_YT_EXITP
*" REFERENCE(ITO_CHASEL) TYPE UPC_YTO_CHASEL
*" REFERENCE(ITO_CHA) TYPE UPC_YTO_CHA
*" REFERENCE(ITO_KYF) TYPE UPC_YTO_KYF
*" EXPORTING
*" REFERENCE(ET_MESG) TYPE UPC_YT_MESG
*" CHANGING
*" REFERENCE(XTH_DATA) TYPE HASHED TABLE
FIELD-SYMBOLS: <xth_data> TYPE HASHED TABLE,
<ls_data> TYPE /1SEM/_YT_DATA_100KMPA,
<l_chavl> TYPE ANY,
field symbols for fields of <ls_data>
<ls_chas> TYPE /1SEM/_YT_CHAS_100KMPA,
<ls_nchas> TYPE /1SEM/_YT_CHAS_100KMPA,
<ls_kyfs> TYPE /1SEM/_YT_KYFS_100KMPA,
<ls_nkyfs> TYPE /1SEM/_YT_KYFS_100KMPA,
LOOP AT xth_data ASSIGNING <ls_data>.
ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO <ls_chas>.
ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <ls_data> TO <ls_kyfs>.
......There are some calculations................................
ENDLOOP.
LOOP AT xth_data INTO <ls_data>.
ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO <ls_nchas>.
ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <ls_data> TO <ls_nkyfs>.
IF ( <ls_data>-S_CHAS-0fiscper = '006' ) AND (<ls_data>-S_CHAS-0version='10' ).
tempcctr = <ls_data>-S_CHAS-0costctr.
tempperiod = <ls_data>-S_CHAS-0fiscper.
tempamount = <ls_data>-S_KYFS-0amount.
<b> LOOP AT XTH_DATA INTO <ls_nchas>
WHERE 0costctr = tempcostctr
AND 0fiscper = tempperiod
AND 0version = '20'.</b>
<ls_nchas>-S_KYFS-0amount = ( tempamount * 100 ) + 500.
MODIFY xth_data FROM <ls_nchas>.
ENDLOOP.
ENDFUNCTION.
Thank You.
Message was edited by:
George Smith
Message was edited by:
George SmithHi George..
Declare the Field symbol with the Same line type of the Internal table which is passed to the FM.
Eg:
<b>Field-symbols : <ls_data> like Line of XTH_Data.
Loop at XTH_Data ASSIGNING <LS_DATA>.</b>
Then it should work... -
Dought regarding Function module
Hi ,
I have small dought regarding fm....
since Read_text is a function module can it be changed to RFC , since i need to retrive data from sap to informatica .
since some of the long text are also need to retrived to a non sap system .
if i creat a zread _text as a RFC .
will this work .am i in the right path ,need ur advice on the same .
if its right what are the steps needs to be followed .to create a zread_text
Thanks ,
VInay .Create a new function module in SE37, e.g. Z_RFC_READ_TEXT and tick that it is RFC enabled. The Import, Export, and Tables parameters should mirror those in READ_TEXT, but you might like to add another table so you can return any exception messages to the caller (e.g. "OT_RETURN" with a structure like BAPIRET2)... you might also have local standard for naming parameters in custom code which you may need to follow. Inside your "Z" function module you just call 'READ_TEXT' using the parameters of the "Z" function. Any exceptions from 'READ_TEXT' should be added into OT_RETURN so that the external caller can be advised of the problem.
-
Regarding Function module call
Hi Guru s
Can any body explain how many Function modules are stored in One function group.
And What happen when I call 1 function module in a F.Group.
Thanks in advance,
Kumar.Hi,
Function group can be defined it as collection of Function
modules. This Function groups are presents in the Packages
where we can create in the SE38. So,that all packages are
consists in the Function Groups.All function groups are
consists Function Modules.This function modules are created
at enhancements/Exists.
A function group can hav any no. of FM's.
there is no restriction.
reward if useful
thanks and regards
suma sailaja -
Regarding function module to convert hours to minutes and seconds to minute
hi all,
is there any function module to convert hours to minutes and seconds to minutes....if so please guided me....i hav req like this...want to convert all those to minutes[seconds and hours]....Hi,
Use FM
SD_CALC_DURATION_FROM_DATETIME
Pass paramters like
I_DATE1 16.09.2008
I_TIME1 10:33:00
I_DATE2 16.09.2008
I_TIME2 19:00:00
and you will get the result as below..
E_TDIFF 8:27
8 hours and 27 minutes...
Now u can use this values of hours and minutes to get the exact wage type values... get the details from HR module and multiply it with the hours and minute and calculate it...
Use Offsets and get the hour and minute value from E_TDIFF
Hope it will solve your problem..
Thanks & Regards,
Naresh -
Regarding Function Module AC_DOCUMENT_RECORD
Hi All,
I am working on one Report in which I am calling the function module
<b>AC_DOCUMENT_RECORD</b>. I am Exporting values for all the parameters to this function except
I_AWSYS, I_AWTYP_INCL,I_AWTYP_EXCL.
These parameters will be treated as Default to SPACE.
Can anyone please tell me what these parameters are and what type of value or what value shall
I Export to these Parameters.
Regards,
RishiDear Rishi,
All these three parameters are optional. You can comment them if you do not want to pass any data. The system would treat them as SPACE.
I_AWSYS - Logical System (Character Type of Length 10: ACCHD-AWSYS)
I_AWTYP_INCL - Reference procedure (Character Type of Length 5 :ACCHD-AWTYP)
I_AWTYP_EXCL - Reference procedure (Character Type of Length 5 :ACCHD-AWTYP)
Regards,
Naveen. -
How to remove function module error?
Hi Iam using a FM to get the database value of project name(PROJ-PSPID),Iam using this in my module pool program,when I enter wrong project name,the FM itself throwing the error,I want my own error message rather FM error message.How to achieve it?
Thanks in advance.Hi Rock,
After executing the function module , check for sy-subrc value as shown below
data: w_return type bapiret2,
it_return type table of bapiret2.
call function '.....'
IF SY-SUBRC EQ 0.
PERFORM fm_update_return_msg
USING 'E'
your Message class
'msg no'
CHANGING w_return.
APPEND w_return TO IT_RETURN.
clear w_return.
ENDIF.
FORM fm_update_return_msg USING p_msgty TYPE sy-msgty
p_msgid TYPE sy-msgid
p_msgno TYPE sy-msgno
p_msg_v1 TYPE sy-msgv1
p_msg_v2 TYPE sy-msgv2
p_msg_v3 TYPE sy-msgv3
p_msg_v4 TYPE sy-msgv4
CHANGING p_return TYPE bapiret2.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = p_msgty
cl = p_msgid
number = p_msgno
par1 = p_msg_v1
par2 = p_msg_v2
par3 = p_msg_v3
par4 = p_msg_v4
IMPORTING
return = p_return.
ENDFORM. "fm_update_return_msg
Maybe you are looking for
-
Bought 3 songs on my iPod touch but didn't show up on iTunes. What to do?
I bought 3 songs yesterday directly from the iTunes Store on my iPod touch. They all downloaded and processed, and I assumed that they showed up on my iPod's music library. Today I checked my iPod to listen to those 3 songs, but only one of them show
-
How to elemenate blank records
dear All, i am facing the report level problem. i have one char structure and key fig structure .in rows i have placed char structure and units key figure structure kept in columns. in my reports some unit haveing values some units don't have any val
-
I have installed itunes on my laptop but there is no cover flow option, none at all, just the old style version of viewing, I have downloaded latest version
-
SEARCH OPTION in XE APPLICATION
Hi, There is an application developed using Oracle XE. The application which is a webpage holds a lot of information in tabular form. I'm trying to include a search tab in the page to search for any item with a key word. But, unfortunately, I'm not a
-
Thid item is temporarily unavailible try again later
every time i try to reintall OS Xmaverick.Aftetr i enmter my apple-id and thtt shi...t pop up came up every time. any1 know how to fix thist?