Call SmartForm in RFC

We have a RFC calling a smartform and passing parameters to it. But I just cannot get the right results. It looks like an auth issue to me because the program works well using some account (say, UserA) but not well using other accounts(UserB). However, Basis did an auth trace and didn't find anything wrong.
I tried to run this RFC via se37. One interesting fact is that it doesn't pop up a screen (smartform) for input using USserA but it does using UserB. I canceled the screen and then got the wrong results.
I hope I can find luck here. Please kindly let me know your solution if you had the same issue before. Many thanks to you!
Edited by: Jackyork on Dec 14, 2011 11:48 PM

Hi,
  I hope yes you can write the RFC fm code inside the layout of the smartforms, but the problem is if RFC could not able to fetch the data from R/3 some times, or if it could not able to find the right records then it will return with error / blank records. To avoid all this kind of problems its better to write the same code in your driver program. In case if you dont get the data from R/3 then you can control the layout set from triggering.
Regards,
Satya

Similar Messages

  • Is it possible to call custom designed RFC function module, apart from BAPI

    Hi Friends,
    1.     Is it possible to call custom designed RFC function module, apart from BAPI.
    2.     Why we call it Adaptive RFC layer, Since every time the JCO layer updated with SAP, Why can’t be dynamic.
    Thanx for Ur time.
    Cheers,
    Sam

    Also check <a href="http://help.sap.com/saphelp_nw04/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm">here</a> for more information on aRFC. Here you can find why it is called adaptive.
    Regards,
    Christophe

  • How do we call smartforms in abap program or web services

    how do we call smartforms in abap program or web services
    How many types of smartforms are there?
    points will be rewarded

    Hi
    See this sample program
    Using the fun module smartform is called from the program
    Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    <b>call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'</b>
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function <b>FM_NAME</b>
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    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.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?

    Hi Experts,
    How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?
    I mean, in driver program i called SSF_FUNCTION_MODULE_NAME to get the related FM  for my smart form. after that How do I call it(smartform fm) . I tried to call by pressing PATTERN button in Report. but it is showing FM is not exist error.
    Call function SSF_FUNCTION_MODULE_NAME
    Export
    formname = 'zsmartform'
    import
    fm_name = function_name.
    function_name is stored the corresponding smartform fm. then How do i call it to process my smartform?
    thanks in advance.

    hi,
    Chk this sample.
    DATA: p_output_options TYPE ssfcompop, "occurs 0 with header line
    p_control_parameters TYPE ssfctrlop. "occurs 0 with header line
    p_output_options-TDCOPIES = 3. "number of copies.
    p_output_options-tddest = 'LP01'. "def
    p_control_parameters-no_dialog = 'X'. "no dilog box
    p_control_parameters-preview = 'X'. "no preview
    DATA : v_form_name TYPE rs38l_fnam.
    *---- Function to get the function module name of the    ----
    *---- specified Smart form.                              ----
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'GIVE YOUR SMART FORM NAME'   
    * VARIANT = ' '
    * DIRECT_CALL = ' '
    IMPORTING
    fm_name = v_form_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3 .
    *---- Function Module to call the Smart Form          ----
    *step 1 - go to ur smart form
    *step2 - take environment
    *step3-take function module name
    *copy that unique number.
    *step4 -come back to ur driver program.
    *step5 - place ur cursur here. take patter,.give that unique number.
    *at that time u will get the below code.
    *step6 - rename that unique number with 'v_form_name' in the code generated by pattern.
    CALL FUNCTION v_form_name
    EXPORTING
    * ARCHIVE_INDEX =
    * ARCHIVE_PARAMETERS =
    control_parameters = p_control_parameters
    * MAIL_APPL_OBJ =
    * MAIL_RECIPIENT =
    * MAIL_SENDER =
    output_options = p_output_options
    user_settings = ' '
    * ARCHIVE_INDEX_TAB =
    * IMPORTING
    * DOCUMENT_OUTPUT_INFO =
    * JOB_OUTPUT_INFO =
    * JOB_OUTPUT_OPTIONS =
    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.
    for any clarifiaction pls revert.
    regards,
    Reshma

  • SAP adapter giving the merged result set (First RFC call data + Second RFC call data) for second RFC call

    I have a WCF Adapter service to call a SAP RFC. When I call the RFC first time, it gives me correct no of result set but when I call this RFC second time immediately after first call, it gives me merged result set (First Result set + Second Result Set).
    e.g. We have a RFC which receives vendor number and blank object of result set as parameter and gives back the list of purchase orders as Response in object of result set for that vendor.
    Suppose, we have a vendor "a" and vendor "b". For vendor "a" there are 5 purchase orders and for vendor "b", we have 4 purchase orders in SAP. When I call the WCF adapter service for this RFC for vendor "a",
    it gives me 5 purchase orders. Immediately after first call, when I call WCF service for vendor "b", it gives me 9 (5+4) purchase order records which is wrong.
    In brief, one RFC call is affected by its previous call.
    For each new WCF request, a new object of result set is created, connection is opened, rfc is executed and connection is closed.
    Can anybody have any idea on this?
    Thanks.
    Thanks, Nishant Gupta

    Hi,
    Please refer to the document
    http://seroter.wordpress.com/biztalk-and-wcf-part-vii-about-the-biztalk-adapter-pack/

  • Call Transaction Through RFC

    Hi ,
    I am trying to do a call transaction through RFC call from a Middleware which is a CPIC user (only communication Non dialog User ) . 
    Call  transaction does gets executed without any error but it does not update any data.But when I run it through my user id it works absolutely fine .
    I am not sure what is causing the issue
    Security authorization?
    RFC through Non Dialog user ?
    Paramters missing in RFC  ?
    Paramatertes missing in call transaction option?
    If anyone of you has faced a similiar issue then please let me know the path forward.
    Thanks
    Vikas

    Hi Vikas,
        The problem is in Authorization? And check the mode of Process Synchoronus or asynchoronous? Both the RFC and CALL transaction should be Same /
    Thanks
    MAnju

  • How to call smartform in me54n

    Hai All,
              Iam developing a smartform for PR print with  ztcode,the user asked me that,he dont want seperate tcode,in me54n tcode itself he want
    print.I have tried in the enhancement spot but it is not firing.
    Regards,
    Siva jyothi.

    Hi ,
    The print button creates a spool number through which you can get ALV output of the ITEM details but cannot call smartform from that.
    PR is just an internal document.There is no other way to do it(As far as i know).
    You now have only two options to go for:
    1) Create a subscreen with a pushbutton , and then call the driver program to print the smartform.
    2) A Z transaction to print the PR , which you have already done.
    Let me know if you find any other way to do it.
    Br.
    Giri

  • Call Smartforms in WD

    Hi all,
    i want to print the data that i have in Portal (WD)  in a PDF via Smartforms, 
    can somebody tell me how can i do this?
    Best Regards

    get the Smartform function module
    call smartform
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME           = '<Smartform name>'
        IMPORTING
          FM_NAME            = LV_FUNC_MOD_NAME
        EXCEPTIONS
          NO_FORM            = 1
          NO_FUNCTION_MODULE = 2
          OTHERS             = 3.
    IF SY-SUBRC <> 0 .
      RETURN.
    ENDIF.
    call LV_FUNC_MOD_NAME   with Control parameter NO_DIALOG,GET_OTF marking X
    *convert the OTF to PDF using
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        FORMAT                = 'PDF'
        MAX_LINEWIDTH         = 132
      IMPORTING
        BIN_FILESIZE          = LV_LENGTH
        BIN_FILE              = LV_XSTRING
      TABLES
        OTF                   = LT_RETURN-OTFDATA
        LINES                 = LT_TLINE
      EXCEPTIONS
        ERR_MAX_LINEWIDTH     = 1
        ERR_FORMAT            = 2
        ERR_CONV_NOT_POSSIBLE = 3
        ERR_BAD_OTF           = 4
        OTHERS                = 5.
    IF SY-SUBRC <> 0.
      RETURN.
    ENDIF.
    now use use runtime service method to push the PDF to browser client
    CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE

  • Calling Smartforms from Module pool: Most Urgent

    Hi, Exeperts
    how can I call smartforms from module pool.
    I have done like below.
    First Created a push button on screen and used
    these code in user command through PAI
    FORM CALL_SMARTFORMS .
    DATA: V_FORM_NAME TYPE RS38L_FNAM.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME           = 'ZSMART'
      IMPORTING
        FM_NAME            = V_FORM_NAME
      EXCEPTIONS
        NO_FORM            = 1
        NO_FUNCTION_MODULE = 2
        OTHERS             = 3.
    ENDFORM.                    " CALL_SMARTFORMS
    now I am getting form name in v_form_name, but it is not executing.
    Please help me out.
    Regards
    Rajiv singh.

    Well, as it's most urgent....
    One you have a value in V_FORM_NAME you need to call this function module, passing the fields and strucures that make up the interface to your form.
    Eg.
    DATA: DEVICE TYPE SSFCTRLOP .
    DEVICE-DEVICE = 'PRINTER'.
    DEVICE-NO_DIALOG = 'X'.
    CALL FUNCTION V_FORM_NAME
    EXPORTING
       CONTROL_PARAMETERS         = device
       USER_SETTINGS              = 'X'
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5.
    Regards,
    Nick

  • Problem while calling smartform in webdynpro

    Hi Experts,
    I  am calling a smartform in webdynpro abap. It was working fine in development server. I have ported the same request to Quality Server, there it was not working.it is giving sy-subrc = 1 and it is displaying a blank screen
    I m following the following steps for calling smartform in webdynrpo.
    I am calling the smartform by
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM_NAME'
    importing
    fm_name = fname
    exceptions
    no_form = 1
    no_function_module = 2
    others = 3
    if sy-subrc  0.
    Error MESSAGE
    endif.
    call function fname
    exporting
    control_parameters = lv_control_parameters
    output_options = lv_output_options
    user_settings = space
    pernr = stru_input1-zpernr
    reinr = stru_input1-zreinr
    pdvrs = stru_input1-zpdvrs
    importing
    job_output_info = lv_ssf_output
    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.
    But it is not passing otfdata and it is returning 1 in sy-subrc.
    Please help me to solve this issue.

    I m not using any image.
    I have checked through debug and the function module is not transfering any file to OTF table.
    Please suggest me..
    Edited by: zakirriyaz on Nov 4, 2011 9:47 AM

  • How to Call Same Adaptive RFC across different Backend R/3 Systems

    Hi Everyone,
    I have been troubled for the last 3 or 4 days on how I should develop Web DynPro code to call the same RFC on different backend R/3 systems.  Don't really want to maintain my own Jco connects within a SAP Connector project and I don't really want to import 3 or 4 of the same models.  Can someone please inform what is the best approach?
    Thanks.

    Hi Glen,
    There is one other way of doing this which needs a bit of data maintenance.
    The webdynpro app will connect to one R/3 backend. In the same R/3 create RFC destinations to all others backends where the RFC's needs to be called. Create a table where u maintain for what value which backend system should be called. Add rfc_dest as an import paramter in all the RFCs in the backend system where the webdynpro app is connected and call those systems using RFC destinations.
    For e.g. you have one HR system and multiple FI systems based on Company codes.
    Connect your webdynpro app to the HR system. Create a table in the HR system which will contain data like given below
    CoCode                        RFC Destination
    1000                             RFCDEST1
    2000                             RFCDEST1
    In the RFC's in HR system add both CoCode and RFC Destination as additional input parameters. From the front end u can pass different values and call the same RFC's from different systems.
    Regards
    Prakash

  • Can we call report from rfc.

    Hi All,
    Can we call report from rfc.
    if it is possible please tell me the process.
    i know the process to call rfc from report and from rfc.
    but i dont know how to call report from rfc FM.
    Thank you.

    HI
    you call report from rfc.
    but you have to write the logic for that..
    ex: 1st of all you have to create the fm  in target system
    then you have to call that fm using that rfc
    and then you can call the report form the target system.

  • Calling Smartform in WD application?

    Hi,
       Is it possible to call Smartform in WD application?
    Thanks

    Yes it is. Check out the thread [Displaying Smartforms in Webdynpro ABAP   |Re: Displaying Smartforms in Webdynpro ABAP; and check the code as Vikrant Trivedi suggested.
    Also check the SAP document [How to Display a Smartform as PDF document in Web Dynpro for ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785].
    Hope it helps.

  • Installing CCMS agent fails: calling SALS_MS_GET_LOCAL_MS_INFO via RFC

    Hi All,
    I'm trying to connect our SolMan development to the CEN. However when registering ccmsr within J2ee admin it gives the following errors.
    Does anybody have an idea?
    Output for : /usr/sap/DSM/SYS/exe/run/sapccmsr(-j2ee,-v,pf=/usr/sap/DSM/SYS/profile/DSM_DVEBMGS00_ijmdsm01)         
    CCMS version 20040229, 64 bit, multithreaded, Non-Unicode         
    compiled at Oct 28 2006         systemid 324 (IBM RS/6000 with AIX)         
    relno 7000         
    patch text patch collection 2006/4, OSS note 914721         
    patchno 83         intno 20050900         
    running on ijmdsm01 AIX 3 5 00C97C6E4C00
    Logfile for : /usr/sap/DSM/SYS/exe/run/sapccmsr(-j2ee,-R,-f,/tmp/csm53771.conf,pf=/usr/sap/DSM/SYS/profile/DSM_DVEBMGS00_ijmdsm01)      [Thr 01]   Mon Mar 26 13:29:05 2007      
    INFO: CCMS agent sapccmsr working directory is /usr/sap/ccms/DSM_00/sapccmsr      
    INFO: CCMS agent sapccmsr config file is /usr/sap/ccms/DSM_00/sapccmsr/csmconf   
    INFO: Central Monitoring System is . (found in config file)   
    INFO: additional Central Monitoring System is . (found in config file)   
    INFO: found ini file /usr/sap/ccms/DSM_00/sapccmsr/sapccmsr.ini.         
    INFO: Checking Distributed Statistical Records Library dsrlib.o    
    INFO: checking version an Unicodeness of dsrlib.o   
    INFO: DSR: Dynamic Library dsrlib.o (version 22) successfully loaded.   
    INFO: DSR: Dynamic Library dsrlib successfully loaded.   
    INFO: DSR: Path /usr/sap/ccms/DSM_00/dsr for Distributed Statistical Records.   
    INFO:         CCMS version 20040229, 64 bit, multithreaded, Non-Unicode         compiled at Oct 28 2006         systemid 324 (IBM RS/6000 with AIX)         relno 7000         patch text patch collection 2006/4, OSS note 914721         patchno 83         intno 20050900         running on ijmdsm01 AIX 3 5 00C97C6E4C00         pid 479452         profile /usr/sap/DSM/SYS/profile/DSM_DVEBMGS00_ijmdsm01      
    INFO: Attached to Shared Memory Key 73 (size 40000000), no pool used      
    INFO: Connected to Monitoring Segment           segment status WARM_UP           segment started at Thu Mar 22 08:58:40 2007           segment version 20040229         
    INFO: DSM:000:999999 connected to DSM, host ijmdsm01, System Nr. 00, traceflag   
    INFO: DSM release is 700 , (kernel release 700 )   
    ERROR: DSM:000:CSMREG calling SALS_MS_GET_LOCAL_MS_INFO via RFC failed, can not get version of DSM. RfcRc = 2, C_CALL_FAILED</b>     
     INFO: SLM:000:999999 connected to SLM, host rthuas50, System Nr. 10, traceflag   
    INFO: SLM release is 700 , (kernel release 700 )      
    INFO: SLM:000:CSMREG connected to SLM, host rthuas50, System Nr. 10, traceflag   INFO: SLM release is 700 , (kernel release 700 ), CCMS version 20040229      INFO: RFC logon info for SLM:000:CSMREG can be updated at any time with -R option:        sapccmsr -R           INFO: Updated saprfc.ini in agent work directory /usr/sap/ccms/DSM_00/sapccmsr   
    ERROR: Registration failed: Can't get version of DSM. RfcRc = 2, C_CALL_FAILED RFC Error Info for SALS_MS_GET_LOCAL_MS_INFO message: status: EXCEPTION C_CALL_FAILED RAISED intstat:       Mon Mar 26 13:29:10 2007   INFO: dsr: dsrlib unloaded.   
    ...closing this logfile...
    Registration of CCMS Customizing Destination   
    Error during registration of CCMS Customizing destination        
    Source system cannot be set to Unicode

    Hi,
    Check these notes.
    641339 - RZ20: CCMS monitoring context loses client assignment
    558608 - Correction: Starting/stopping LDAP Connector via CCMS
    827843 - Access Alert Analysis Methods that are Defined Locally
    Feel free to revert back.
    --Ragu

  • How to avoid Priner prompt while calling smartform

    Hi All,
    I am calling smartform FM from my program. I am passing following settings in Output-Options and Control-Parameters:
    wa_outputoptions-tddest = 'LP01'. "Printer name
    wa_outputoptions-tdnewid = 'X'. "New request
    wa_controlpara-device = 'PRINTER'. "Device
    wa_controlpara-no_dialog = 'X'. "No dialog
    Even after these settings I am getting prompt which asks printer name and other details.
    Please tell me how I can avoid the prompt which asks printer name and other settings such as new spool request and print immediately.
    Thanks in Advance.
    Regards,
    Vijay

    hi,
    try this....
    DATA :  control TYPE ssfctrlop.
    control-no_dialog = ''.
    control-preview   = ''.
    control-no_open   = 'X'.
    control-no_close  = 'X'.
    CALL FUNCTION 'SSF_OPEN'
    EXPORTING
      ARCHIVE_PARAMETERS       =
      USER_SETTINGS            = 'X'
      MAIL_SENDER              =
      MAIL_RECIPIENT           =
      MAIL_APPL_OBJ            =
      OUTPUT_OPTIONS           =
    control_parameters       =<b> control</b>
    IMPORTING
      JOB_OUTPUT_OPTIONS       =
    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.

Maybe you are looking for

  • How can I add a search engine to Safari in Mavericks?

    Safari only gives me three choices for a search engine:    Google    Yahoo    Bing I would like it to default to StartPage, or maybe even Duck Duck Go. How do I add sites to the drop down menu?

  • Itunes and Conflicts with AIM

    *Notes: I have itunes 7.0 and an old version of AIM (because I absolutely hate the new, ad covered version - Triton, or whatever it's called) I was listening to itunes with AIM open and running, and everything was fine. The moment someone IMed me, my

  • Wired 802.1x Continouos Authentication Restart in Win 7

    Hi, I'm trying to implement 802.1x authenticaion with HP switches and NPS 2008/R2. Seems like the switch is configured properly and a 802.1x policy was created and configured to grant network access to domain users and computers. Clients are Win 7 co

  • Problem in importing idoc structure into repository

    Hi experts, I am trying to import an IDOC structure (ORDRSP.ORDERS03) from an R/3 system into the repository. But I am getting the following error: "             **Ready for import** Import started... ORDRSP.ORDERS03:   + com.sap.aii.ibrep.sbeans.upl

  • How do I see http headers in new web inspector resource tab?

    In Safari 4.x there was a simple tab to see the http headers, but in the new fancy resource tab I can't find them anywhere.   Where did they go?