Function module not executing in background due to Transactional RFC error in SM58
Hi Team,
I am executing a report which calls a function module in background.This in turn creates a LUW which should eventually get cleared once the processing is completed through commit statement.
However LUW is going for an error whenever it gets executed through commit statement.
The error message in SM58 is
Error msg : Conversation
<init> not found / CPIC-CALL: 'ThSA PCMRCV' : cmRc=19 thRc=
However when I try to excecute the function module in foreground, it works correctly as expected.
Please note that the same report is being used for various clients and the function module is working fine in all others.Hence, I am expecting that thers is no issue with the code.
Is there some settings which we are missing here.
Please provide me your valuable inputs.
Hi Divy,
It appears to network issue. please use below SAP note to perform network analysis using NIPING.
SAP note 500235 - Network diagnosis with NIPING
Hope this helps.
Regards,
Deepak Kori
Similar Messages
-
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.
-
Modified Functional module not executing the inserted Code
Hi everyone
I've modified the IW_C_CREATE_TRANSPORT_REQUEST Functional module so that it calls the GUI_EXEC FM which calles my java script which saves the transport ID with a filename specified. The code seems to work when i test it within SAP, but when i come to use STARTRFC to call the function, the added code dosen't seem to be executing, the transport still gets created but my javascript is not being called?
Anyone know why?
Thanks - Peter
Code following
FUNCTION IW_C_CREATE_TRANSPORT_REQUEST.
""Local interface:
*" IMPORTING
*" VALUE(DESCRIPTION) LIKE E07T-AS4TEXT
*" VALUE(TRANSPORT_KIND) LIKE E070-TRFUNCTION DEFAULT 'K'
*" VALUE(LANGU) LIKE SY-LANGU DEFAULT 'EN'
*" VALUE(CQ_ID) LIKE E070-TRKORR DEFAULT 'FileName'
*" EXPORTING
*" VALUE(COMMFILE) LIKE E070-TRKORR
*" VALUE(PROG_PATH) LIKE E070-TRKORR
*" VALUE(CLASSNAME) LIKE E07T-AS4TEXT
*" EXCEPTIONS
*" LANGUAGE_MISSING
*" NUMBER_RANGE_FULL
*" UNALLOWED_TRFUNCTION
*" NO_AUTHORIZATION
*" CREATE_TRANSPORT_ERROR
CLEAR COMMFILE.
CASE TRANSPORT_KIND.
WHEN 'P'.
Stücklisten für Releasewechsel
IF NOT LANGU IS INITIAL.
PERFORM CREATE_RELEASE_REQUEST
USING LANGU
DESCRIPTION
TRANSPORT_KIND
CHANGING COMMFILE.
ELSE.
keine Sprache angegeben und Transportart Stücklisten
RAISE LANGUAGE_MISSING.
ENDIF.
WHEN OTHERS.
Alle anderen Transporte
PERFORM CREATE_REQUEST
USING DESCRIPTION
TRANSPORT_KIND
CHANGING COMMFILE.
ENDCASE.
*{ INSERT SM1K900042 1
WRITE 'Entering My Pogram'.
PROG_PATH = 'java.exe'.
CLASSNAME = '-cp c: writeToFile'.
CONDENSE CLASSNAME.
CONDENSE PROG_PATH.
CONCATENATE CLASSNAME CQ_ID COMMFILE INTO CLASSNAME SEPARATED BY ' '.
CALL FUNCTION 'GUI_EXEC'
EXPORTING
PARAMETER = CLASSNAME
COMMAND = PROG_PATH.
WRITE 'Our path is'.
WRITE PROG_PATH.
WRITE CLASSNAME.
*} INSERT
ENDFUNCTION.
*************************FORMS****************************************
FORM CREATE_RELEASE_REQUEST *
Transportauftrag für Stücklisten erstellen *
FORM CREATE_RELEASE_REQUEST
USING P_LANGU LIKE SY-LANGU
P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
P_TRANS_KIND LIKE E070-TRFUNCTION
CHANGING P_COMMFILE LIKE E070-TRKORR.
DATA: SUBRC LIKE SY-SUBRC,
H_TMP_LANG(2) TYPE C,
H_NUMBER(3) TYPE C,
NUMBER(4) TYPE C.
Anwednungslog öffnen
PERFORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT.
*Nummer ziehen
PERFORM GET_NUMBER USING P_LANGU
CHANGING H_NUMBER
SUBRC.
IF SUBRC = 12.
Fehler beim erstellen des Transportauftrags
RAISE CREATE_TRANSPORT_ERROR.
ELSEIF SUBRC = 11.
Nummernkreis voll
RAISE NUMBER_RANGE_FULL.
ELSE.
WRITE P_LANGU TO H_TMP_LANG.
P_COMMFILE = 'SAPKXXXLYY'.
REPLACE 'XXX' WITH H_NUMBER INTO P_COMMFILE.
REPLACE 'YY' WITH H_TMP_LANG INTO P_COMMFILE.
CALL FUNCTION 'SUBST_CREATE_COMMANDFILE'
EXPORTING
IV_KORRNAME = P_COMMFILE
IV_KORRTYPE = P_TRANS_KIND
IV_KORRTEXT = P_TRANSPORT_DESCRIPT
EXCEPTIONS
NAME_COLLISION = 1
CREATE_HEADER_FAILED = 2
UPDATE_HEADER_FAILED = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
CLEAR P_COMMFILE.
Fehler beim Erstellen des Transportauftrags
RAISE CREATE_TRANSPORT_ERROR.
ELSE.
Transportauftrag erstellt
Log schreiben
PERFORM WRITE_LOGFILE
USING P_COMMFILE.
ENDIF.
ENDIF.
ENDFORM. "CREATE_RELEASE_REQUEST
FORM CREATE_REQUEST *
Transportauftrag erstellen *
FORM CREATE_REQUEST
USING P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
P_TRANS_KIND LIKE E070-TRFUNCTION
CHANGING P_COMMFILE LIKE E070-TRKORR.
CALL FUNCTION 'TRINT_INSERT_NEW_COMM'
EXPORTING
WI_KURZTEXT = P_TRANSPORT_DESCRIPT
WI_TRFUNCTION = P_TRANS_KIND
IMPORTING
WE_TRKORR = P_COMMFILE
EXCEPTIONS
NUMBER_RANGE_FULL = 1
INVALID_INPUT = 2
NO_AUTHORIZATION = 3
OTHERS = 4.
CASE SY-SUBRC.
WHEN 0.
Auftrag erstellt
Anwednungslog öffnen
PERFORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT.
Log schreiben
PERFORM WRITE_LOGFILE
USING P_COMMFILE.
WHEN 1. "Nummernkreis für Aufträge voll
CLEAR P_COMMFILE.
RAISE NUMBER_RANGE_FULL.
p_error_msg-no = '735'.
WHEN 2. "Unbekannter Auftragstyp
CLEAR P_COMMFILE.
RAISE UNALLOWED_TRFUNCTION.
p_error_msg-no = '353'.
WHEN 3. "keine Berechtigung
CLEAR P_COMMFILE.
RAISE NO_AUTHORIZATION.
p_error_msg-no = '328'.
WHEN 4. "Allgemeiner Fehler
CLEAR P_COMMFILE.
RAISE CREATE_TRANSPORT_ERROR.
p_error_msg-no = '353'.
ENDCASE.
ENDFORM. "create_request
FORM OPEN_LOG *
Anwedungslog öffnen *
FORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT.
*init application log
PERFORM LOG_INIT USING C_APPL_LOG_TRANSPORT.
*log header
PERFORM LOG_HEADER
USING C_APPL_LOG_TRANSPORT P_TRANSPORT_DESCRIPT.
ENDFORM. "OPEN_LOG
FORM WRITE_LOGFILE *
Logfile in den Anwendungslog schreiben *
-> P_TRANSPORT_DESCRIPT *
FORM WRITE_LOGFILE
USING P_COMMFILE LIKE E070-TRKORR.
DATA: H_ERROR_MSG LIKE IWERRORMSG.
*log message transport created
CLEAR H_ERROR_MSG.
MOVE '42' TO H_ERROR_MSG-ID.
MOVE 'I' TO H_ERROR_MSG-TYPE.
MOVE '733' TO H_ERROR_MSG-NO.
MOVE P_COMMFILE TO H_ERROR_MSG-V1.
PERFORM LOG_MSG
USING C_APPL_LOG_TRANSPORT '2' H_ERROR_MSG.
*log save
PERFORM LOG_SAVE
USING C_APPL_LOG_TRANSPORT.
ENDFORM. "WRITE_LOGFILE
FORM GET_NUMBER *
--> LANGU *
--> NUMBER *
FORM GET_NUMBER
USING LANGU LIKE SY-LANGU
CHANGING NUMBER TYPE C
SUBRC LIKE SY-SUBRC.
CONSTANTS: OBJECT LIKE INRI-OBJECT VALUE 'SIWBTRANSP'.
DATA: NR_RANGE LIKE INRI-NRRANGENR,
RETURNCODE LIKE INRI-RETURNCODE,
ERROR_MSG LIKE IWERRORMSG.
CLEAR SUBRC.
NR_RANGE = '01'.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = NR_RANGE
OBJECT = OBJECT
SUBOBJECT = LANGU
IMPORTING
NUMBER = NUMBER
RETURNCODE = RETURNCODE
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
OTHERS = 7.
CASE SY-SUBRC.
WHEN 00.
WHEN 01.
PERFORM NUMBER_RANGE_INTERVAL_INSERT
USING NR_RANGE LANGU
CHANGING NUMBER
RETURNCODE.
WHEN OTHERS.
SUBRC = 12.
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_ERROR 736 SY-SUBRC SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
ENDCASE.
CASE RETURNCODE.
WHEN ' '.
WHEN '1'. "Nummer im kritischen Bereich
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_INFO 734 SPACE SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 2 ERROR_MSG.
WHEN '2'. "letzte Nummer vergeben
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_INFO 735 SPACE SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
SUBRC = 11.
ENDCASE.
ENDFORM. "number_get
Message was edited by:
Peter LaiHi i've tried restarting and starting the server, but it didn't help, would it have anything to do with the fact i'm callin sap which is calling JAVA from a .exe program. The .exe program is having problems connecting to the JAVA program as there is no link?
I did a trace as well and this is what it came up with:
Error in program 'startrfc': ======> Exception condition "NO_BATCH" raised.
>>>> [1] <unknown> : EXT <ac: 7> L DDSLOCTE01 >>> CLOSE abrfcrcv.c 429 (23850562)
-{F0776FA3-F1A7-4662-BF7A-D1352735C394}
*> RfcReceive
handle = 1
Data conversion On
Error in program 'startrfc': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
Error in program 'startrfc': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
>>>> [1] <unknown> : EXT <ac: 8> L DDSLOCTE01 >>> FREE abrfcio.c 3517 (23850562)
-{F0776FA3-F1A7-4662-BF7A-D1352735C394}
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
*> RfcClose called by external program ...
handle = 1
*> rfcClose called by RFC-Library in file: abrfc.c, line: 532
handle = 1
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
<* rfcClose
>* RfcClose
Any help or ideas what it could be would be great -
Function module not working when used with 'In Background Task'
hi,
this is my code
call function 'Z_IBD_FILL_ZINETACT'
in background task
destination 'SAPD220125'
tables
it_net1 = it_net1
it_net2 = it_net2
it_net3 = it_net3 .
when this code is executed i am not getting any data in my internal tables i.e it_net1, it_net2, and it_net3
but i changed this code see the below code
call function 'Z_IBD_FILL_ZINETACT'
in background task (THIS IS COMMENTED)
destination 'SAPD220125'
tables
it_net1 = it_net1
it_net2 = it_net2
it_net3 = it_net3 .
now i am getting data into my internal tables
can any one tell me what can be the problem and how to solve it in my case
its very urgentHi,
Pls. go through the docu..
CALL FUNCTION
Variant 5
CALL FUNCTION func IN BACKGROUND TASK.
Additions:
1. ... AS SEPARATE UNIT
2. ... DESTINATION dest
3. ... EXPORTING p1 = f1 ... pn = fn
4. ... TABLES p1 = itab1 ... pn = itabn
Effect
Flags the function module func to be run asynchronously. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and the next COMMIT WORK executes it in another work process.
Note
This variant applies only as of Release 3.0, so both the client system and the server system must be Release 3.0 or higher.
Note
qRFC with Outbound Queue
This is an extension of tRFC. The tRFC is serialized using queues, ensuring that the sequence of LUWs required by the application is observed when the calls are sent.
For further information about qRFC, refer to the Serialized RFC: qRFC With Outbound Queue section of the SAP Library.
Addition 1
... AS SEPARATE UNIT
Effect
Executes the function module in a separate LUW under a new transaction ID.
Addition 2
... DESTINATION dest
Effect
Executes the function module externally as a Remote Function Call (RFC); dest can be a literal or a variable.
Depending on the specified destination, the function module is executed either in another R/3 System or as a C-implemented function module. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
Since each destination defines its own program context, further calls to the same or different function modules with the same destination can access the local memory (global data) of these function modules.
Note
Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you may not use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).
Addition 3
... EXPORTING p1 = f1 ... pn = fn
Effect
EXPORTING passes values of fields and field strings from the calling program to the function module. In the function module, formal parameters are defined as import parameters. Default values must be assigned to all import parameters of the function module in the interface definition.
Addition 4
... TABLES p1 = itab1 ... pn = itabn
Effect
TABLES passes references to internal tables. All table parameters of the function module must contain values.
Notes
If several function module calls with the same destination are specified before COMMIT WORK, these normally form an LUW in the target system. Calls with the addition 1 are an exception to this rule - they each have their own LUW.
You cannot specify type 2 destinations (R/3 - R/2 connections).
(See Technical details and Administration transaction.)
Example
REPORT RS41503F.
/* This program performs a transactional RFC.
TABLES: SCUSTOM.
SELECT-OPTIONS: CUSTID FOR SCUSTOM-ID DEFAULT 1 TO 2.
PARAMETERS: DEST LIKE RFCDES-RFCDEST DEFAULT 'NONE',
MODE DEFAULT 'N',
TIME LIKE SY-UZEIT DEFAULT SY-UZEIT.
DATA: CUSTITAB TYPE TABLE OF CUST415,
TAMESS TYPE TABLE OF T100,
WA_CUSTITAB TYPE CUST415.
SELECT ID NAME TELEPHONE INTO CORRESPONDING FIELDS OF TABLE CUSTITAB
FROM SCUSTOM WHERE ID IN CUSTID ORDER BY ID.
PERFORM READ_CUSTITAB.
EDITOR-CALL FOR CUSTITAB TITLE 'Editor for table CUSTITAB'.
PERFORM READ_CUSTITAB.
CALL FUNCTION 'TRAIN415_RFC_CALLTRANSACTION'
IN BACKGROUND TASK
DESTINATION DEST
EXPORTING
TAMODE = MODE
TABLES
CUSTTAB = CUSTITAB.
CALL FUNCTION 'START_OF_BACKGROUNDTASK'
EXPORTING
STARTDATE = SY-DATUM
STARTTIME = TIME
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC = 1.
EXIT.
ENDIF.
COMMIT WORK.
CALL TRANSACTION 'SM58'.
FORM READ_CUSTITAB *
FORM READ_CUSTITAB.
WRITE: / 'System ID:', SY-SYSID.
SKIP.
LOOP AT CUSTITAB into WA_CUSTITAB
WRITE: / WA_CUSTITAB-ID, WA_CUSTITAB-NAME,
WA_CUSTITAB-TELEPHONE.
ENDLOOP.
ULINE.
ENDFORM.
Pls. reward if useful.... -
Idoc error 51 - "Function module not allowed - APPL_IDOC_INPUT1'
Hello everyone,
We are uploading GL balances from legacy to SAP using the LSMW Bapi
object - bus6035
method - post
message type - ACC_DOCUMENT
Basic type - ACC_DOCUMENT03
When we run the lsmw, idoc is created, however with an error 51 saying
"Function module not allowed - APPL_IDOC_INPUT1'
The partner no. is the logical system (the system on which the lsmw is executed)
In the partner profile, we have defined this as LS. In the inbound parameters, we have defined message type = ACC_DOCUMENT, the process code is APL1 and the corresponding function module is - APPL_IDOC_INPUT1
Please let me know if we are missing something or doing anything wrong ?
Since the data in the LSMW will be read frmo a file on the presentation server, do we need to have a port configuration for the same ?
Thanks,
Sushil Joshi`Hello Sushil
The long text of message B1(252) is quite informative for error analysis:
NA B1252
Short Text
Function module not allowed: &
Diagnosis
The function module and the application object type which were
determined are not valid for this IDoc.
Procedure
1. Please check that the process code in the inbound partner profile
is correct.
2. If this is the case, you should check the ALE inbound methods ALE
inbound methods for the process code and see whether the specified
function module and application object type are correct.
3. If this is also the case, then the function module and the
application object type are not permitted for the logical message
type, message variant, message function and basis type that are
contained in the IDoc control record. You should check whether the
correct values have been assigned to these fields in the control
record. If they do have the correct values, then the assignment to
the function module and the application object type needs to be
maintained.
On ECC 6.0 this long text contains 3 transactions for analysis:
- WE20
- BD67
- WE57
Regards
Uwe -
"Function module not allowed" error message
Hi,
We created a special FM to be processed when the INVOIC is in inbound processing. We link the FM to the process code and the process code to the partner functions. We get the error message; "Function module not allowed: & name of our FM". However, when we reprocess the idoc via WE19, it goes through.
Did somebody ever face that situation?
Thanks
MartinHi
is it for MRM . If it is ,I faced the same Problem Martin .go to EDIFCT table give ur basic type and execute and check for entries .if there no issue other wise goto we57 and maintain the entry for basic type . -
Function Module not working for old Role
Dears
Function Module not working for old Role
Function Module: /VIRSA/BAPI_AE_USERS_FOR_ROLES
Before EHP4 upgrade this functional module working fine, but after updated users are not visible.
We have chekced if the users are assigned directly users are visible but indirect (Position Based) assignment users are not apprearing.
Pl check the fucntion module with given roles below and identify the root cause,
EP_TRVL_ALL_CAB - Old Role
EP_TRN_TRVL_DRGC_V2 - New Role
Regards
Krishna Mohan CH
9704500717Krishna,
I do not think this BAPI is meant to be called by anyone but the application using it, and its functionality may therefore change without notice.
What are you trying to achieve? Maybe there's a better way to do that...
Frank. -
How to capture errors when a Function module is called as BACKGROUND TASK
How to capture errors when a Function module is called as BACKGROUND TASK?.Please advise.
FUNCTION ZRPM_DELETE_PROJECT_DATA_API.
""Local interface:
*" IMPORTING
*" VALUE(IV_EXTERNAL_ID) TYPE RPM_TV_EXTID OPTIONAL
*" VALUE(IV_PROJECT_GUID) TYPE RPM_TV_GUID OPTIONAL
*" VALUE(FLAG) TYPE BOOLEAN OPTIONAL
*" EXPORTING
*" VALUE(EV_RC) TYPE I
*" VALUE(EV_MSG) TYPE STRING
*" VALUE(ET_MSG) TYPE RPM_TT_MESSAGES
IF flag = cl_rpm_co=>sc_true.
Call function 'RPM_DELETE_PROJECT_DATA' IN BACKGROUND TASK
EXPORTING
IV_EXTERNAL_ID = IV_EXTERNAL_ID
IV_PROJECT_GUID = IV_PROJECT_GUID
IMPORTING
EV_RC = EV_RC
EV_MSG = EV_RC
ET_MSG = ET_MSG.
COMMIT WORK.
ELSE.
CALL FUNCTION 'RPM_DELETE_PROJECT_DATA'
EXPORTING
IV_EXTERNAL_ID = IV_EXTERNAL_ID
IV_PROJECT_GUID = IV_PROJECT_GUID
IMPORTING
EV_RC = EV_RC
EV_MSG = EV_MSG
ET_MSG = ET_MSG.
ENDIF.
ENDFUNCTION.
In above code how to capture 'EV_RC' when FM is called as background task.Prakash,
CALL FUNCTION IN BACKGROUND TASK allows no IMPORTING parameters, so that your code will produce a syntax error.
The calling program can only handle errors of remote function calls (RFC) if these are either
- synchronous RFC (that is CALL FUNCTION ... DESTINATION ...) or
- asynchronous RFC (that is CALL FUNCTION STARTING NEW TASK ... DESTINATION ...).
Both synchronous and asynchronous RFC allow the capturing of errors by means of exceptions. But that is a different topic. -
Error Function module " " not found in Smartforms
Hi all,
Please help me out .
I created the form using the smartforms, check it and activated it. I can see the unique function module is assigned to the form. I wrote the ABAP program and use function module SSF_FUNCTION_MODULE_NAMEand also define data types.
when I called the function module fm_name for passing values and tables from program to smartform. This is working perfectly in development server but in production it giving error like Function module " " not found.
Below I m pasting my code.
*& Report ZCASHJOURNAL *
REPORT zcashjournal .
TABLES: bseg.
DATA: FM_NAME TYPE rs38l_fnam.
DATA:BEGIN OF it_bseg OCCURS 0.
INCLUDE STRUCTURE bseg.
DATA:END OF it_bseg.
DATA:BEGIN OF it_bseg1 OCCURS 0.
INCLUDE STRUCTURE bseg.
DATA:END OF it_bseg1.
DATA: gv_amt_in_words TYPE spell,
gv_word TYPE spell-word,
gv_decword TYPE spell-decword.
DATA:BEGIN OF gt_bkpf OCCURS 0.
INCLUDE STRUCTURE bkpf.
DATA:END OF gt_bkpf.
DATA:bktxt TYPE bktxt.
DATA:waers TYPE waers.
DATA:belnr TYPE belnr_d.
DATA:werks TYPE bukrs.
DATA:desc TYPE butxt.
DATA:awkey TYPE awkey.
DATA:docno TYPE matnr.
DATA:cajo TYPE awkey.
DATA:desc1 TYPE butxt.
DATA:dmbtr TYPE dmbtr.
SELECTION-SCREEN BEGIN OF BLOCK b2.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (15) FOR FIELD s_belnr.
SELECTION-SCREEN POSITION 28 .
PARAMETERS : s_belnr TYPE bseg-belnr .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (15) FOR FIELD s_werks.
SELECTION-SCREEN POSITION 28 .
PARAMETERS: s_werks TYPE werks.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
SELECT * FROM bkpf
INTO CORRESPONDING FIELDS OF TABLE gt_bkpf
WHERE belnr LIKE s_belnr
AND bukrs LIKE s_werks.
IF NOT gt_bkpf[] IS INITIAL.
SELECT * FROM bseg
INTO CORRESPONDING FIELDS OF TABLE it_bseg
FOR ALL ENTRIES IN gt_bkpf
WHERE bukrs EQ gt_bkpf-bukrs
AND belnr EQ gt_bkpf-belnr
AND shkzg EQ 'S'.
ENDIF.
LOOP AT gt_bkpf.
bktxt = gt_bkpf-bktxt.
waers = gt_bkpf-waers.
belnr = gt_bkpf-belnr.
werks = gt_bkpf-bukrs.
awkey = gt_bkpf-awkey.
docno = awkey+0(10).
cajo = awkey+10(4).
ENDLOOP.
LOOP AT it_bseg.
dmbtr = it_bseg-dmbtr.
ENDLOOP.
IF s_werks EQ '65'.
desc = 'JCBML - Heavy Equipments'.
ENDIF.
IF cajo EQ '0001'.
desc1 = 'PETTY CASH PLANT II'.
ENDIF.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = dmbtr
currency = waers
filler = space
language = sy-langu
IMPORTING
in_words = gv_amt_in_words
EXCEPTIONS
not_found = 1
too_large = 2
OTHERS = 3.
IF sy-subrc EQ 0.
MOVE : gv_amt_in_words-word TO gv_word,
gv_amt_in_words-decword TO gv_decword.
ENDIF.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZCASHRECPT'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
*CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = 'ZCASHRECPT'
variant = ' '
direct_call = ' '
IMPORTING fm_name = lf_fm_name
EXCEPTIONS no_form = 1
no_function_module = 2.
*v_vbeln = S_VBELN-low.
CALL FUNCTION FM_NAME
EXPORTING
bktxt = bktxt
waers = waers
belnr = belnr
werks = werks
desc = desc
docno = docno
cajo = cajo
desc1 = desc1
dmbtr = dmbtr
gv_word = gv_word
TABLES
T_ZDEB = it_bseg
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hi Rakesh,
Check two things
1. Program tranpsorted to production without any error in request log.
2. Smartform tranpsorted to production without any error in request log and without renaming / misspelling it.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZCASHRECPT'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
Also try to uncomment the Message id part and it will show some meaningful message.
And to check whether actaually fucntion module is generated or not goto smartforms ->Smartform name -> Display -> Environment->Fucntion module name . if this is blank try to retransport smartform.
Hope that helps.
Regards
Kapadia
***Assigning points is the way to say thanks in SDN.*** -
IDOC error 51- Function module not allowed:
Hi,
I am getting following error in IDOC inbouond.I verifyed all parameters mentioned in error.
Issue still not resolved.
When debugged from WE19 this issue dosnt arise.
Kindly guide.
Function module not allowed: ZIDOC_INPUT_MATCLASS
Message no. B1252
Diagnosis
The function module ZIDOC_INPUT_MATCLASS and the application object type BUS1001 which were determined are not valid for this IDoc.
Procedure
1. Please check that the process code in the inbound partner profile is correct.
2. If this is the case, you should check the ALE inbound methods ALE inbound methods for the process code and see whether the specified function module and application object type are correct.
3. If this is also the case, then the function module and the application object type are not permitted for the logical message type, message variant, message function and basis type that are contained in the IDoc control record. You should check whether the correct values have been assigned to these fields in the control record. If they do have the correct values, then the assignment to the function module and the application object type needs to be maintained.Hi,
Check in WE42, for the process code, you have assigned this function module and given the correct process code in the partner profile.
Sujay -
Function module not allowed: IDOC_INPUT_INVOIC_MRM in 4.6C
Hi All,
I am working on SAP 4.6C, I am trying to post an idoc through WE19 and using message type INVOIC and basic type - INVOIC02. Also, we are using the process code - INVL which using the function IDOC_INPUT_INVOIC_MRM.
While trying to post an MM Invoice after entering all the parameters in WE19, the IDoc in status 51.
Also, the error message states that "Function module not allowed: IDOC_INPUT_INVOIC_MRM". Since it is a standard function module, I donu2019t know how to get to solve the problem.
Thanks in advance.
Regards,
NagarajanHi Nagaraju ,
Make Entries in WE57 . To make entries in this Take help of WE42-Inbound process code INVL .If u did not have the entries then it causes this error .After logging ur entry Check in table EDIFCT.
Hope this helps .
Rgds
Sree . M -
IDOC Error - Function module not allowed: IDOC_INPUT_HRMD
Hello Gurus,
I have an issue with the IDOC Transfer. I am using the program RSEINB00 to read the file and convert the data into IDOCs with status 64.
But all my Idocs are getting created with status 51 and the error is getting populated as " Function module not allowed: IDOC_INPUT_HRMD ".
Please do let me know whats needs to be done for this to be rectified.
Thanks,
Naveen.You are not using the right process code.
In partner profile - in message type
u will see the process code to which a function module is attached,
for ur message type, this is not the right function module.
Regards
Manu -
Function module not allowed: AFS_RETAIL_ARTMAS_IDOC_INPUT.
Dear Expert,
I have a problem when I use ALE. I found error message of inbound in target system have a error status 51. Function module not allowed: AFS_RETAIL_ARTMAS_IDOC_INPUT.
message type is MATMAS. and i want to distribute Material master from 1 system to another system.
Process code: AFSA
This below is my config.
Process code AFSA
My process code Identification.
Function module : AFS_RETAIL_ARTMAS_IDOC_INPUT
Maximum number of repeats 0
Object type IDOCARTMAS
End event MASSINPUTFINISHED
Object type IDOCARTMAS
Start event INPUTERROROCCURRED
End event INPUTFINISHED
How to do this?
thanks,
Sak
Edited by: Pongsak Ruangsongkhram on Dec 24, 2007 8:59 AMPls make sure the following config in we42.
Process code MATM
Function module IDOC_INPUT_MATMAS01 IDOC_INPUT_MA
Maximum number of repeats
Object type IDPKMATMAS
End event MASSINPUTFINISHED
Object type IDOCMATMAS
Start event INPUTERROROCCURRED
End event INPUTFINISHED
Object type BUS1001
Start event
Cheers! -
Hi Gurus,
By ALE config I am trying to send material from one client to another ( MATMAS )
I have created two logical systems and assigned them to corresponding clients.
Created a RFC destination and assigned logical systems.
Created Distribution model in sending client.
Created partner profile in both clients.
Created Material and send to receiving system using BD10 tcode.
I checked Idoc status in Sending system, Idoc status is 03-Data is passed to port OK, status 30-Idoc ready for dispatch and status 01- Idoc generated.
But in receving system (Inbound Idoc)- I got status- 51-Application document not posted and Function module not allowed: AFS_RETAIL_ARTMAS_IDOC_INPUT.
I also checked partner profiles in both systmes- both r same.
IAny help in this regard is appreciated.
Thanks,
BlueshOn receiver system...
1 - goto WE20
2 - locate the sender logical system (partner)
3 - in Inbound grid select message type MATMAS (double click)
4 - change "Process code" AFSA to MATM (probably AFSA is the actual code)
5 - save and reprocess the IDocs using BD87
Note: Process code AFSA is deafult but the scenarios need a spefic code that is MATM
Best Regards,
Josieudes Claudio
Edited by: Josieudes de Sousa Cláudio on Jul 12, 2011 9:06 PM -
SMQ2 SYSFAIL - Function Module not found
Hi All,
When i am trying to push data to cdb i got sysfail - Function module not found error in the smq2. But data inserted in the cdb, the probelm we found was the data object having the dependency cause this error.
The data was there in the cdb, but no distribution entries found.
Please help me to resolve the same.
Regards,
RamkumarHi,
Clear the queue first (delete it), then implement the NOTE 1552255 - 'Parallel load problem for partial association shadow'. Run the report mentioned in the NOTE and do a delta generation.
Then on doin a delta load the queues should run successfully.
regards,
Anil
Maybe you are looking for
-
Odd, Green video in Adobe Premiere CS4?
Hi! This has been happening to me a lot lately, and I really need a fix! When editing my projects, I will have imported a lot of video files. Before dragging those files into my timeline, I like to preview them. However, sometimes, the video does not
-
Hi Friends, Instead of display Sheet 1 in the Excel sheet tab(Bex), is there a way we can display Query Name in the excel sheet tab? please let me know. Thanks, KK
-
Payment Notice not print if Clearing Doc post another outstanding item and
hi Guru, anyone know any solution in Payment Notice not print while Clearing Doc(payment) clear against a invoice but the clearing doc is a partial payment only, thus using same clearing doc to post a outstanding line item and we use another
-
PLease help me, I can't sync to itunes since I updated tro 7.0.4 on my iPad mini.
-
JUnit to test abstract class?
Folks: I am new to JUnit and currently writing some testing code using it. I am wondering if it's necessary to test an abstract class/interface. If so, how? Do I need to create a mock object that extends it to test it? Thanks a lot!!!