Function module not working

Hi All,
I have created a function module it is working fine by executing it self,when I am calling it into any program it is not working it means it is not fetching data from table I passed correct parameters I don't know what was the problem any one can help me in this.
Thanks&regds,
Sree.

There is no leading zeros here I am giving my funtion module code.
*function zmm_vendor.
""Local Interface:
*"  IMPORTING
*"     REFERENCE(P_VENDOR) TYPE  LFA1-LIFNR
*"  TABLES
*"      P_VENDOR_DATA STRUCTURE  ZVENDOR_DATA
tables : lfa1,lfm1.
data flag(1) type c.
types : begin of ty_lfm1,
        lifnr like lfm1-lifnr,
        "ekorg LIKE lfm1-ekorg,
        "erdat LIKE lfm1-erdat,
        ernam like lfm1-ernam,
        lfabc like lfm1-lfabc,
        waers like lfm1-waers,
        minbw like lfm1-minbw,
        webre like lfm1-webre,
        kalsk like lfm1-kalsk,
        ekgrp like lfm1-ekgrp,
        lipre like lfm1-lipre,
        end of ty_lfm1.
types : begin of ty_lfa1,
        lifnr like lfa1-lifnr,
        name1 like lfa1-name1,
        ort01 like lfa1-ort01,
        ort02 like lfa1-ort02,
        adrnr like lfa1-adrnr,
        end of ty_lfa1.
types : begin of ty_adr6,
        addrnumber like adr6-addrnumber,
        smtp_addr like adr6-smtp_addr,
        end of ty_adr6.
types : begin of ty_lfb1,
        akont like lfb1-akont,
        zwels like lfb1-zwels,
        zterm like lfb1-zterm,
        fdgrv like lfb1-fdgrv,
        reprf like lfb1-reprf,
         end of ty_lfb1.
types : begin of ty_display,
        sel,
        lifnr like lfm1-lifnr,
        ekorg like lfm1-ekorg,
        erdat like lfm1-erdat,
        ernam like lfm1-ernam,
        lfabc like lfm1-lfabc,
        smtp_addr like adr6-smtp_addr,
        waers like lfm1-waers,
        minbw like lfm1-minbw,
        webre like lfm1-webre,
        kalsk like lfm1-kalsk,
        ekgrp like lfm1-ekgrp,
        lipre like lfm1-lipre,
        name1 like lfa1-name1,
        ort01 like lfa1-ort01,
        ort02 like lfa1-ort02,
        akont like lfb1-akont,
        zwels like lfb1-zwels,
        zterm like lfb1-zterm,
        fdgrv like lfb1-fdgrv,
        reprf like lfb1-reprf,
        end of ty_display.
         INTERNAL TABLES DECLARATION
data: t_lfm1 type standard table of ty_lfm1 with header line,
      t_lfa1 type standard table of ty_lfa1 with header line,
      t_display type standard table of ty_display with header line,
       t_lfb1 type standard table of ty_lfb1 with header line,
       t_adr6 type standard table of ty_adr6 with header line.
         WORK AREAS DECLARATION
data: wa_lfm1 type ty_lfm1,
      wa_lfa1 type ty_lfa1,
      wa_adr6 type ty_adr6,
      wa_lfb1 type ty_lfb1,
      wa_display type ty_display.
select lifnr
         ekorg
         erdat
         ernam
         lfabc
         waers
         minbw
         webre
         kalsk
         ekgrp
         lipre from lfm1
         into  corresponding fields of table t_lfm1
         where lifnr = p_vendor.
    if t_lfm1[] is not initial.
  select lifnr
         name1
         ort01
         ort02
         adrnr from lfa1
         into corresponding fields of table t_lfa1
         for all entries in t_lfm1
         where lifnr =  t_lfm1-lifnr.
     endif.
    if t_lfm1[] is not initial.
    select addrnumber smtp_addr from adr6
           into table t_adr6
           for all entries in t_lfa1
           where  addrnumber = t_lfa1-adrnr.
      endif.
      if t_lfm1[] is not initial.
    select akont
           zwels
           zterm
           fdgrv
           reprf from lfb1
           into table t_lfb1
           for all entries in t_lfm1
           where  lifnr = t_lfm1-lifnr.
      endif.
  loop at  t_lfm1 into wa_lfm1.
    move  wa_lfm1-lifnr to t_display-lifnr.
     "move   wa_lfm1-ekorg to  wa_display-ekorg.
    " move   wa_lfm1-erdat to wa_display-erdat.
     move   wa_lfm1-lfabc to  t_display-lfabc.
     move   wa_lfm1-waers to  t_display-waers.
     move   wa_lfm1-minbw to  t_display-minbw.
     move   wa_lfm1-webre to  t_display-webre.
     move   wa_lfm1-kalsk to  t_display-kalsk.
     move   wa_lfm1-ekgrp to  t_display-ekgrp.
     move   wa_lfm1-lipre to  t_display-lipre.
     "append  wa_display to t_display.
  read table t_lfa1  into wa_lfa1 index 1 .
  if sy-subrc = 0.
    move wa_lfa1-name1  to t_display-name1.
    move wa_lfa1-ort01  to t_display-ort01.
    move wa_lfa1-ort02  to t_display-ort02.
   endif.
read table t_adr6  into wa_adr6 index 1 .
if sy-subrc = 0.
    move wa_adr6-smtp_addr  to t_display-smtp_addr.
endif.
read table t_lfb1  into wa_lfb1 index 1 .
  if sy-subrc = 0.
    move wa_lfb1-akont  to t_display-akont.
    move wa_lfb1-zwels  to t_display-zwels.
    move wa_lfb1-zterm  to t_display-zterm.
    move wa_lfb1-fdgrv  to t_display-fdgrv.
    move wa_lfb1-reprf  to t_display-reprf.
endif.
append   t_display.
exit.
"clear  wa_display.
"clear t_display.
endloop.
delete adjacent duplicates from  t_display comparing lifnr.
     move  t_display-lifnr to p_vendor_data-lifnr.
     "move   t_display-ekorg to  P_VENDOR_DATA-ekorg.
    " move   t_display-erdat to P_VENDOR_DATA-erdat.
     move   t_display-lfabc to  p_vendor_data-lfabc.
     move   t_display-waers to  p_vendor_data-waers.
     move   t_display-minbw to  p_vendor_data-minbw.
     move   t_display-webre to  p_vendor_data-webre.
     move   t_display-kalsk to  p_vendor_data-kalsk.
     move   t_display-ekgrp to  p_vendor_data-ekgrp.
     move   t_display-lipre to  p_vendor_data-lipre.
     move   t_display-name1  to p_vendor_data-name1.
     move   t_display-ort01  to p_vendor_data-ort01.
     move   t_display-ort02  to p_vendor_data-ort02.
     move   t_display-smtp_addr  to p_vendor_data-smtp_addr.
     move   t_display-akont  to p_vendor_data-akont.
     move   t_display-zwels  to p_vendor_data-zwels.
     move   t_display-zterm  to p_vendor_data-zterm.
     move   t_display-fdgrv  to p_vendor_data-fdgrv.
     move   t_display-reprf  to p_vendor_data-reprf.
     append p_vendor_data.
endfunction.*
but after calling this into my program it is not working here is my program.
report ZTEST.
parameters : zvendor like lfm1-lifnr.
data : begin of ty_display occurs 0,
       lifnr like lfm1-lifnr,
       ekorg like lfm1-ekorg,
       erdat like lfm1-erdat,
       ernam like lfm1-ernam,
       lfabc like lfm1-lfabc,
       smtp_addr like adr6-smtp_addr,
waers like lfm1-waers,
       minbw like lfm1-minbw,
       webre like lfm1-webre,
       kalsk like lfm1-kalsk,
       ekgrp like lfm1-ekgrp,
       lipre like lfm1-lipre,
       name1 like lfa1-name1,
       ort01 like lfa1-ort01,
       ort02 like lfa1-ort02,
       akont like lfb1-akont,
      zwels like lfb1-zwels,
      zterm like lfb1-zterm,
      fdgrv like lfb1-fdgrv,
      reprf like lfb1-reprf,
      end of ty_display.
CALL FUNCTION 'ZMM_VENDOR'
EXPORTING
  p_vendor            = zvendor
tables
  p_vendor_data       = ty_display
loop at ty_display.
write : / ty_display-ort01.
endloop.
Thanks and Regds,
Sree.

Similar Messages

  • 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
    9704500717

    Krishna,
    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.

  • Function Module not working as required

    Hi,
    I am currently using a function module HR_FBN_GENERATE_SEND_EMAIL which sends mail to external sources from a standard SAP screen.
    The fm seems to be working fine if its run from within a report program, but isnt executing when is run from within a PAI module.(code same in both).
    Could anyone throw some light on a solution to this issue.
    Also,this module doesnt seem to allow sending of mails on a specified date. How can i incorporate that or alternatively is there an existing fn module which will send mails out on a specified date with specified content?
    Will def shell out loads of points to solutions that help...
    Cheers,
    Preethi...

    HI,
    Here is the code to send the mail from ABAP
    *& Report  ZSENDEMAIL                                                  *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  zsendemail                    .
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default '[email protected]' .
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
    *       Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
    *       Send email message
    form send_email_message.
    * Fill the document data.
      gd_doc_data-doc_size = 1.
    * Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    * Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    * Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    * Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    * Store function module return code
      gd_error = sy-subrc.
    * Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
    *       Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    If you look at the function module, you will get the field to pass the date also
    Regards
    Sudheer

  • 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 urgent

    Hi,
    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....

  • 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
    Dharmendra

    RFC 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.

  • Function Module not working through VC

    Hi Experts
    I am facing one strange issue while working on VC model with function module as data service.
    This FM is to writes data to bcak end BI master data table which is working fine through BI. When i pass the values through VC, New values are not reflecting in BI table. I tried passing values through form / table but still its not working. Also we have system generated message which show success / failure of FM & the changed values as output after execution of FM. Which i am getting success message every time i pass values.
    Currently i am working on VC 7.01 & SP6 with Flash compiler.
    Please guide me if you have face this issue.
    Thanks
    Sandeep

    Hi Sandeep,
    Try to put a breakpoint in your FM and check whether you are sending correct values and the values saving or not.
    Thanks,
    Pradeep

  • DOWNLOAD function module not working in Portal

    Hello,
    We are in 4.6C. I have a piece of code that downloads an internal table to the presentation server using function module DOWNLOAD. This works fine in SAPGui. The function module DOWNLOAD does not work in the EP6 portal environment (the part where a popup is presented to the user to select the directory/file name to save the file in). Instead a screen is shown which says "This screen exists for technical reasons....".
    I have been looking for options and have tried the GUI_DOWNLOAD method which does not work in the portal either.
    Anyone face this issue? Please advice possible resolutions.
    Thanks!

    Correct, but the following thread got me started:
    Adobe Acrobat Reader and MIME-DOWNLOAD
    Rob

  • DOWLOAD function module not working in Portal

    Hello,
    We are in 4.6C. I have a piece of code that downloads an internal table to the presentation server using function module DOWNLOAD. This works fine in SAPGui. The function module DOWNLOAD does not work in the EP6 portal environment (the part where a popup is presented to the user to select the directory/file name to save the file in). Instead a screen is shown which says "This screen exists for technical reasons....".
    I have been looking for options and have tried the GUI_DOWNLOAD method which does not work in the portal either.
    Anyone face this issue? Please advice possible resolutions.
    Thanks!

    check the following thread where your issue is discussed before
    Re: webgui - unwanted msg screens during save of local file
    you should use GUI_DOWNLOAD  - this FM will work both in SAP gui environment and ITS environment.
    Regards
    Raja

  • Enhanced function module not working

    Hi guys,
    There's a requirement in my project to add new fields to the standard ESS > Personal Data iView and as well as add in additional validations along with the standard validations. I've thus asked an ABAP developer to
    - add in the new fields to Hcmt_Bsp_Pa_xx_R0002 and
    - make a duplicate of function module Hrxss_Per_Modify_P0002_xx to Z_Hrxss_Per_Modify_P0002_xx where my developer has coded in additional validations.
    Then, I
    - Import these into the Model classes
    - Remapped the context nodes (ModifyInfoype) of FcPerPersonalxx to map to Z_Hrxss_Per_Modify_P0002_xx
    - Did code change to method modifyRecord() in FcPerPersonalxx.
    Result: The new fields are reflected. However, the additional validations don't work. The standard validations are working. Is there any filtering at Webdyn pro Java side that filters only certain msgs? Can anyone help pls?
    Edited by: zhenmin wang on Jul 25, 2008 5:49 AM

    Hi Zhenmin,
                   If I understood your problem correctly, you are getting framework validation messages instead of custom developed validation  messages. The reason is this
    Web Dynpro validations are of two types.
    1. Framework handled 2. Custom developed.
    Framework handled validations get more priority than the custom developed validations.
    Regards,
    Siva

  • Calling a ztransaction from function module not working

    Hi experts,
    I have made a ztransaction through SE93 called Z_TRANS.When I am calling this transaction from a program in SE38, it is giving the screen corresponding to the transaction. But when same
    Call Transaction 'z_TRANS' is used in SE37 in a function module, program is abending.
    Please help...

    Hi ,
    Also check the 3 check boxes for GUI support.
    Regards.

  • Function module not genrating a output when executing

    Hello
    I am using this function module to calculate the difference between the number of days using factory calendar. The function module is working fine but it is not giving the output. It is not generating the result. here is the code for the function module
    please can you check and let me know what can be the reason
      DATA:
        DURATION_F       TYPE F.
      IF  START_DATE IS INITIAL
      AND END_DATE IS INITIAL.
        MESSAGE E032 RAISING PARAMETERS_NOT_VALID.
    Bitte geben Sie ein gültiges Start- und Enddatum an
      ENDIF.
      IF FLG_UNITS IS INITIAL.
        PERFORM TIME_UNITS.
        FLG_UNITS = 'X'.
      ENDIF.
      IF UNIT = SPACE.
        UNIT = UNIT_DAY.
      ENDIF.
      PERFORM DURATION_COMPUTE
         USING
              START_DATE
              START_TIME
              END_DATE
              END_TIME
              FACTORY_CALENDAR
              UNIT
         CHANGING
              DURATION_F
              START_DATE
              END_DATE
              START_TIME
              END_TIME.
      DURATION = DURATION_F.
    ENDFUNCTION.

    when calling the function module get the duration field as output
    write that output on the list

  • 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

  • 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_NAME’and 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.***

  • 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,
    Nagarajan

    Hi 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

  • Since I installed Lion on my macbook the LED light does not pulse when I close the screen - the sleep function does not work.

    Since I installed Lion on my macbook the LED light does not pulse when I close the screen - the sleep function does not work neither when chosen after pressing the button nor chosen in the apple menu..

    I have had the same problem but on another forum it was suggested that disabling internet sharing would solve this. This fix seems to work on my machine - why it works I do not understand

Maybe you are looking for

  • An unknown error occurred (9)

    Hello everyone, I just recently bought an iPhone 3gs. Everything has been working fine over the past two weeks. Then, last night, I plugged the iPhone into my Mac to sync it. Then, as it was syncing, it went to the Apple logo. I immediately went onli

  • HTTP server code 500 reason Internal Server Error

    HI, I am getting following error in Call Adapter   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Message canceled   --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"

  • HR ABAP : Need more information for Import/Export files in HR

    Hi Everybody, I have been in ABAP programming for pretty long but very new to ABAP HR.I am making a Self-Learning attempt in ABAP HR where I have been able to acheive a fair understanding of Infotype,LDB,Screen Modifications,RMAC macros... But presen

  • Apex 2.1 (XE) Master/Detail Page Question Regarding Prev/Next Buttons

    When creating a page of type master/detail the master form is auto-populated with two buttons that allow the user to navigate to the previous or next record. These buttons are implemented as submit buttons, which cause the session variables to be upd

  • How to know  when it pushed browser print button

    Hi anyone knows how to get the print browser button event ? I mean I have a jsp and I want to know when then IE 5 print button is pushed. How to get the event?