Calling Page in Web dynpro

Hii,
I created one application in web dynpro.In the start page i have create button,export,refresh button and table.
I created button by name """ Create """"...And also in Action tab i given """"create"""..............
My requirement is.............
When i press Create button,,,,it has to go to next page.
when i press ""Save """""" it has to save the data...
Same for Cancel,Delete,Export,Refresh also........
For that what i have to do in the application.Is there any need to write the code.If thats the case,,,please provide the code for me.
Thanks in advance.
Regards
Sushma

Hi sushma ,
1. For the "create"  button , to navigate to a new view what you have to do is to create outbound plug(createout)  in the current view and an inbound plug(newin) to the view which you want to navigate ,
in the onAction property of the "create" button reate an action say onClick and in the implementations tab , add the following code to navigate to next view,
wdThis.wdFirePlugCreateout();
2. For the "save" button , if you want to save data from the view , you can create an RFC model for any functional module that does the required job of storing the data into the table.
Similarly for Delete , eport and all.
Regards
Sam Charles J

Similar Messages

  • Call a ABAP Web-Dynpro-application via a BSP-Application

    We have a BSP-Framework, that call several applications among other things other BSP-Applications, ITS-Application and other systems. Now I want to integrate a ABAP Web Dynpro-Application.
    For the moment I can call the ABAP Web Dynpro-Application from our application.
    This application runs in the same session as the Framework (verify in transaction sm04).
    When I want to call another application in the Framework, the session will be killed (no more sessions in sm04). This happens also, when I want to call the ABAP Web Dynpro-Application a second time.
    I guess, that the ABAP-Framework thinks I want to go outside the system (for example www.google.de) and close the session. I found out, that this wouldn't happen, if the application were suspended. But I found no way to tell the application via a url-parameter to suspend.
    Can someone help me?

    Thx for the tip,
    but I can't firea suspend plug. Because I'm in BSP. I understand the docu so, that you have the option to call a other apllication like BSP from a ABAP Web Dynpro.
    I want to call the ABAP Web Dynpro form BSP like this way.
    1. Start BSP-Framework
    2. Call ABAP Web-Dynpro-Application from BSP
    3. Call another Application from BSP without automatically logout by unload ABAP Web Dynpro. (I have a chance to call the ABAP Web Dynpro again via url to suspend before I call the other app.)
    Regards Stefanie

  • How to call jsp from web dynpro app.

    Hi Frndz,
    How can I call a JSP from my web dynpro(and here i don't want to redirect to JSP ),I want to call a JSP which can show a message window as alert on top  of WDP view.
    Here am using CE 7.2 SP1, and my requirement is to call the model(back end) for every minute interval and need to give alert that how many new records r added.With WDP java i haven't find any option to give alert r notifications about new records added, so am thinking to call JSP where I will pass the parameter which can show a alert r notification(like FACEBOOK n outlook notifications).
    Please share any ideas ti achieve this,
    Thanks in advance.
    Regrads
    Rajesh

    Hi,
    If your application should open in a new url, then you can use link to url action to open jsp.
    You can also use EPCF navigation api to call any pcd page as well external links
    i.e
      WDPortalNavigation
          .navigateAbsolute("link",[parameters]);
    Since your passing parameters, you build url in both the cases.
    Ram

  • How to call method in web dynpro for ABAP

    Hi All,
    I created a z class and two methods to get the data.
    I created a WE4A application. Now i want to call these methods from my Z calss in the web dynpro ,but i am getting  amessage saying 'type zclass is unknown".
    when i am trying to declare
    data: cl_class type ref to zclass . i am getting above message.
    can anyone explain how to call zcalss methods in my application.

    Hi,
    You can call any global class method in WDA via. Wizard.
    Even more you can make your class as assistance class and call their methods by wd_assist.
    Thanks
    Pradeep

  • I want to give custome error page in web dynpro application

    Hi ,
    I want to give custom error page for time out condition in my web dynpro application  .
    Kindly give me a soulation ASAP.
    Thank's and regard's.
    Vikash.

    Refer this :
    default error page
    May be it helps you.

  • Call Transaction in Web dynpro

    Hi friends ,
    how to call the sap transaction in web dynpro abap.
    I am using the function module
      CALL FUNCTION 'ABAP4_CALL_TRANSACTION '
        EXPORTING
          tcode                         =  'VA01'
    in web dynpro abap
    but i am getting error like  fill all the required filed
    please give suggestion.
    Regards ,
    krishnan R.

    Hi Krishnan,
    You cannot call a transaction from WebDynpro ABAP. You can instead create an transactional iView in the portal. Go through this link for further information.
    [http://help.sap.com/SAPHELP_NW04S/helpdata/EN/18/f96f4132f15c58e10000000a1550b0/frameset.htm|http://help.sap.com/SAPHELP_NW04S/helpdata/EN/18/f96f4132f15c58e10000000a1550b0/frameset.htm]
    There are already many similar threads over the issue of calling a transaction from WebDynpro ABAP. Please try run a search in the previous forum threads. Below are a few such threads:
    [https://forums.sdn.sap.com/click.jspa?searchID=18250003&messageID=5345700|https://forums.sdn.sap.com/click.jspa?searchID=18250003&messageID=5345700]
    [call Transaction thru WB4A.|call Transaction thru WB4A.]
    Regards,
    Uday

  • How to call call transaction in web dynpro abap

    hello experts,
    i need to call one RFC in web dynpro.In RFC we maintained the BDC program. but while calling the same RFC in web dynpro through service call function, it is not working.Kindly suggest any way out.this is very urgent.
    Regards

    Hi Rajat,
    Please use the below mentioned link.May be it will help you:
    The webdynpro/ABAP (WDA) calling RFC enabled FM of other ECC systems
    Thanks and Regards,
    Neha

  • Looking for a beginner guide - Adaptive RFC  call BAPI  in Web Dynpro Java

    Hi,
    im new in SAP Developeing. I developed some basic web Dynpro applications (after some tutorials) and they are all working.
    Now i want to build an Web Dynpro application with an adaptive RFC Model.
    I already imported the adaptive RFC Modell with a function Model (BAPI Z_...) from the R3 System successfully.
    But if i deploy the application i will get following error:
    com.sap.tc.webdynpro.services.exceptions.TypeNotFoundException: type extern:mypackages.com.types.BapiModel:mypackages.com.types.Zmbs_Bapi_Dispo_Orderdata could not be loaded: com.sap.dictionary.runtime.DdException: TypeBroker failed to access SLD: Error while obtaining JCO connection.
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getStructure(DataTypeBroker.java:305)
         at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:234)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:671)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:449)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:387)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:416)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.getDataNode(MappingInfo.java:83)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.initMapping(MappingInfo.java:125)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.init(MappingInfo.java:121)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.doInit(MappedNodeInfo.java:215)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:671)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:754)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:289)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: com.sap.dictionary.runtime.DdException: TypeBroker failed to access SLD: Error while obtaining JCO connection.
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker$1.fillSldConnection(DataTypeBroker.java:90)
         at com.sap.dictionary.runtime.ProviderFactory.internalResolveLogicalNameToJCODestination(ProviderFactory.java:377)
         at com.sap.dictionary.runtime.ProviderFactory.resolveLogicalNameToJCODestination(ProviderFactory.java:322)
         at com.sap.dictionary.runtime.ProviderFactory.internalGetProvider(ProviderFactory.java:181)
         at com.sap.dictionary.runtime.ProviderFactory.getProvider(ProviderFactory.java:146)
         at com.sap.dictionary.runtime.DdDictionaryPool.getProvider(DdDictionaryPool.java:97)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:79)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:48)
         at com.sap.dictionary.runtime.DdBroker.getDataType(DdBroker.java:149)
         at com.sap.dictionary.runtime.DdBroker.getStructure(DdBroker.java:180)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getStructure(DataTypeBroker.java:303)
         ... 49 more
    Caused by: com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscapeException: Error while obtaining JCO connection.
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:152)
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnectionUnMapped(SystemLandscapeFactory.java:178)
         at com.sap.tc.webdynpro.services.sal.sl.core.SystemLandscapeInternal.getJCOClientConnectionUnMapped(SystemLandscapeInternal.java:62)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker$1.fillSldConnection(DataTypeBroker.java:77)
         ... 59 more
    Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to load client to connect to SLD. Please check your SLD connection settings using the Visual Admin.
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory$1.run(SystemLandscapeFactory.java:754)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getClient(SystemLandscapeFactory.java:747)
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.readJCODestinationFromSLD(JCOClientConnection.java:511)
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter(JCOClientConnection.java:439)
         at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.init(AbstractJCOClientConnection.java:233)
         at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.<init>(AbstractJCOClientConnection.java:218)
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.<init>(JCOClientConnection.java:129)
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:150)
         ... 62 more
    Caused by: com.sap.sldserv.exception.SldServiceRuntimeException: Failed to create CIM client. Check via 'Visual Administrator' tool if the secure store is operational.
         at com.sap.sldserv.SldApplicationService.getCimClient(SldApplicationService.java:117)
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory$1.run(SystemLandscapeFactory.java:751)
         ... 70 more
    Caused by: com.sap.lcr.api.cimclient.CIMClientException: java.net.MalformedURLException: URL must have a host part
         at com.sap.lcr.api.cimclient.ClientFactory.createConnection(ClientFactory.java:466)
         at com.sap.lcr.api.cimclient.ClientFactory.createClientImpl(ClientFactory.java:413)
         at com.sap.lcr.api.cimclient.ClientFactory.createClient(ClientFactory.java:363)
         at com.sap.sldserv.SldApplicationService.getCimClient(SldApplicationService.java:113)
         ... 71 more
    ........Looks like a have a Problem with JCO.
    Is there a good guide, which explains the Basic steps in developeing Web dynpro applications and BAPI ?!

    thank you guys for all the answers.I have to read all the documentations.
    to my szenario:
    I installed on my notebook the Trial Versions of:
    SAP NetWeaver Application Server 7.00/Java AS 7.00
    SAP NetWeaver Developer Studio Version: 7.0.14
    All my basic Web Dynpro Applications in Java are running (even with Adobe Interactive Forms) on the local NetWeaver Trail- Web AS Trail perfectly.
    Now i want to connect per RFC to another SAPERP Server, which is in the intranet.
    I did the whole RFC tutorial with the flights -
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/content.htm (also with the JCO codeing etc)
    so my web dynpro application should work.
    I think I have to configure - like ramesh said something on the NetWeaver Trail.
    So what do i need and configure excactly on my Netweaver Trial to work with RFC - to call the BAPIS in the other System?
    - SLD ? JCO ?
    If i over Web Dynpro - Content Administrator - >
    it says "Connection to System Landscape Directory (SLD) could not be opended successfully." and all the buttons
    create Jco destinations etc. are greyed out.
    I didn´t configured the SLD and JCO in the Netweaver yet.

  • Call BAPI in Web Dynpro

    I want to call a BAPI using web Dynpro.
    In my case, the BAPI without input parameter, it only give out a out table after execute.
    So that I include this Bapi in the model and directly call it in wdDoInit like this :
            wdContext.nodeZbapi_Outvendor_Input().currentZbapi_Outvendor_InputElement().modelObject().execute();
    wdContext.nodeZbapi_Outvendor_Input().invalidate();
    However, no any result can see. Anybody could tell me what is the correct way to call BAPI in WD?
    Thanks!

    Hi,
    Don't invalidate the zbapi node...
    If your output can be recieved from the node say.., output from the bapi side and you mapped it to controller to node say OutVend...
    Then use this code
    wdContext.nodeOutVend().bind(wdContext.nodeZbapi_Outvendor_Input().currentZbapi_Outvendor_InputElement().modelObject().getOutput());
    Any queries revert back.
    If this is not working post your context structure in your reply and tell where you are expect the output
    Best Wishes,
    Idhaya R

  • How to Call Transaction iView that calls RRMXP from Web Dynpro for ABAP

    Dear Experts,,
    I'm developing an application in Web Dynpro for ABAP wherein I'm supposed to give a link that should open an SAP Transaction iView that calls  tcode = 'RRMXP' and I pass the application parameter as QUERY/WBID = <BI query/Workbook ID>.
    I tried calling com.sap.portal.appintegrator.sap.bwc.Transaction iView, but it asks for system/application and GUI type parameters. How to pass through the URL?
    Any help would be highly appreciated
    Regds,
    Srini

    Hi Wolfgang,,
    My problem was that I was supposed to call the BeX Web Analyser ( a BI excel based tool - client installation) on click of a button in my WD-ABAP application. I solved it as follows :
    In the portal pcd, I cam across a folder content provided by SAP. Here, you'll find standard template iViews that can be used to call applications ( for which you make iViews). I had to call an SAP TCode : RRMXP so as to call a BI Workbook/Query.
    So, I called the standard iView template for sap_transaction_iView as follows :
    irj/servlet/prt/portal/prtmode/preview/prtroot/'
               'pcd!3aportal_content!2fcom.sap.pct!2ftemplates'
               '!2fiviews!2fcom.sap.portal.sap_transaction_iview?'
               'sap-config-mode=true&System=BWR3System&TCode=RRMXP'
               '&GuiType=WinGui&OkCode=y&ApplicationParameter='  <appnm>  into url.
          l_popup =
             l_window_manager->create_external_window( url = url
                                          has_menubar = ' '
                                         has_statusbar = ' '
                                          has_toolbar = ' '
                                          has_location = ' ').
          l_popup->open( ).
    And , it worked.
    Any more help pls feel free to revert.
    Regds,
    Srini

  • Best place to begin design of old HTML pages with Web Dynpro

    I am new to web dynpro (and the Netweaver environment).  I just took the EP150 course so I have an idea of how to create pages with both Visual Composer (although I doubt I'll use that much) and in java projects in NWDS. 
    My first application is to be an online purchase requisition application to replace one written in Lotus Domino (this will NOT be integrated with R/3- we will have a seperate DB for these documents outside of R/3).  I have taken the HTML main page from that application and coded it as a JSP but I am getting the impression that the overall design/coding may be simpler if I do the project as a web dynpro.  I want to find some sort of a primer that describes the various controls that go on the web dynpro view in order to figure out how I can take my HTML design and bring it into a web dynpro project.  Can anyone point me to a resource that does this?  I've checked the help and SDN and not found anything that is too helpful yet.
    Can anyone tell me if it would be worthwhile for me to attend the JA310 Web Dynpro course?  I have done a couple of the tutorials posted on SDN for web dynpro but haven't done much else with it as of yet.
    Thanks.
    Dana

    I don't know such a migration guide, but here are some general remarks:
    The Web Dynpro programming model does not use tag-libs, markup, scripting etc. as you might have used in JSP or BSP applications.
    Instead, you create your view layout using the NWDS view designer (or the runtime API) and place UI elements like tables, input fields etc. inside containers.
    Containers have layouts (e.g. MatrixLayout, RowLayout, FlowLayout) and UI elements placed inside a container have layout data for setting individual layout constraints. This is similar to programming in non-Web frameworks like Java Foundation Classes (Swing).
    The UI elements get their data from the view controller context by data binding. There is a hierarchy of controllers (view, custom, component) and the corresponding controllers may be mapped, giving an automatic data flow through the controller hierarchy.
    The complete details of markup (e.g. HTML), client-side scripting, CSS etc. is provided by the client-specific framework part and the application is completely shielded from these technical details.
    This has the additional benefit that a Web Dynpro application can be run on completely different clients without change.
    Example: If tomorrow it will be hip to run your business application inside some other UI technology, e.g. Adobe Flex, SAP will provide a new Web Dynpro client and all Web Dynpro applications will run without change inside this  environment. (Replace Adobe Flex by any other relevant framework).
    Compare this to a programming model, that directly uses HTML, Javascript etc. Good luck rewriting several thousand user interfaces!
    So in your concrete use case, look at your UIs from such a perspective and identify the Web Dynpro concepts. This should help in the migration process.
    Armin

  • How to close portal page by Web Dynpro App

    Hi There,
    I would like to close a portal page by clicking a button of a Web Dynpro App which is inside an iView on that page.
    Is this possible or not?
    Bertil

    Bertil,
    First, it is very bad decision to make decisions instead of user. Just redirect him to logoff page and let close window himself.
    In WebDynpro you may use <b>Exit plug</b> on interface view with parameter <b>Url</b> (notice the case) of type string.
    Then you may previously fire this plug with JavaScript url: javascript:void(window.top.close())
    In recent versions of WD this will not work. So you have to redirect user via exit plug to some static html page, that contains in header <script>window.top.close();</script>
    VS

  • About navigate between ie pages in web dynpro for abap

    hi, all
      I want navigate between views, but the view in two ie page.
      How can i do it?
      Thanks for your help!

    hai Sapian,
    To navigate between two views you have to create navigation link between two views.First create inbound and outbound plugs for two views.
    Then in the window u embed the two views.u have to right click the outbound plug of first view and create navigation link.In the information box that comes u give the inboung plug of second view.Now the navigation link is created.
    Then suppose u design like, on clicking a button in first view u want to navigate to second view.For that button, create action.In the method that comes automatically after u create action, u just create a code, by code wizard for calling the second view.
    In the action method u click code wizard and check start navigation .select the outbound plug of first view and enter. code is written automaticaaly to call second view.The generated code will look similar to this.
    WD_THIS->FIRE_TORESULT_PLG(
    Reward me if helpful
    S.Ramesh

  • Call smartform in web dynpro abap

    hi guys,
          I am tring to create PDF from smartform but am getting sy-subrc = 1 error after call function LV_FNAM.
    I am attaching the code below. Am not using InteractiveForm UI Elemnt .
    data: lv_fnam type rs38l_fnam,
          ls_ssfctrlop type ssfctrlop,
          ls_ssfcompop type ssfcompop,
          ls_book type ppftbook,
          ls_job_output_info type ssfcrescl,
          ls_job_output_options type ssfcresop,
          lv_bytecount type i,
          lt_lines type table of tline,
          ls_line type tline,
          lv_string type string,
          lv_buffer type xstring,
          l_xline type xstring,
          l_pdfstring type xstring,
          it_add_rel type table of zprint_add_rel.
    *      p_pdf type xstring.
    data : wa_board type mara-matnr,
           plant type marc-werks.
    wa_board =  'SYPJ764'.
    plant = '2001'.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSSF_ADD_REL'
    importing
    fm_name = lv_fnam.
    ls_ssfctrlop-no_dialog = 'X'.
    ls_ssfctrlop-getotf  = 'X'.
    ls_ssfctrlop-preview = 'X'.
    ls_ssfcompop-tdnoprev = 'X'.
    ls_ssfcompop-tdtitle = 'X'.
    ls_ssfcompop-tdnewid = 'X'.
    call function lv_fnam
    exporting
    control_parameters = ls_ssfctrlop
    output_options = ls_ssfcompop
    *is_book = ls_book
    board = wa_board " 'SYPJ764'
    plant = plant " '2001'
    importing
    job_output_info = ls_job_output_info
    job_output_options = ls_job_output_options
    tables
    it_add_rel_i = it_add_rel
    exceptions
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    other = 5.
    if sy-subrc <> 0.
    endif.
    *convert to pdf
    call function 'CONVERT_OTF'
    exporting
    format = 'PDF'
    importing
    bin_filesize = lv_bytecount
    tables
    otf = ls_job_output_info-otfdata
    lines = lt_lines
    exceptions
    err_conv_not_possible = 1
    err_bad_otf = 2.
    loop at lt_lines into ls_line.
    lv_string = ls_line.
    export mydata = lv_string to data buffer lv_buffer.
    import mydata to l_xline from data buffer lv_buffer in char-to-hex mode.
    concatenate l_pdfstring l_xline into l_pdfstring in byte mode.
    endloop.
    p_pdf = l_pdfstring.
    Please help me out with this error.
    Regards,
    Santosh

    Hi Santhosh,
    Please find the below code:
    FUNCTION ZP3088_NEW_JOINEE_ACT.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PERNR) TYPE  PERSNO
    *"  EXPORTING
    *"     REFERENCE(L_DISPLAY_PDF) TYPE  NUM1
    *"     REFERENCE(L_DATA) TYPE  XSTRING
    *"  EXCEPTIONS
    *"      TRAINEE_PERNR
    * Tables declaration
      TABLES: NAST,PA0041.
    *   Type pools declaration
      TYPE-POOLS: SZADR.
    *   Internal table declaration
      DATA: L_PDF_LEN TYPE I,
            IT_PDF_LINES TYPE TABLE OF TLINE,
            JOB_OUTPUT_INFO TYPE  SSFCRESCL.
    *   Variables declaration
      DATA: G_RETCODE LIKE SY-SUBRC,
            G_FMNAME TYPE RS38L_FNAM.
      DATA: L_HIRE_DATE TYPE DATS,
            L_INCLUDE_DATE TYPE DATS,
            L_WEEK_DAYS TYPE P,
            IT_P0041 LIKE PA0041.
      DATA: DAR TYPE PA0041-DAR01,
            DAT TYPE PA0041-DAT01.
      DATA: L_DEVICE(30) TYPE C,
            LA_CTRL_FORM TYPE SSFCTRLOP,
            LA_OUTPUT_OPT TYPE SSFCOMPOP.
      data: l_persg type PA0001-persg. 
    * Start of Actual Code
      SELECT SINGLE persg
        from PA0001
        INTO l_persg
       where pernr eq pernr
         and endda eq '99991231'.
        if l_persg eq 'T' or
           l_persg eq 'W' or
           l_persg eq 'X'.
          raise trainee_pernr.
        endif.
      L_DISPLAY_PDF = 0.
      SELECT SINGLE * FROM PA0041 INTO IT_P0041
             WHERE PERNR EQ PERNR.
      IF SY-SUBRC = 0.
        DO 12 TIMES VARYING DAR FROM IT_P0041-DAR01
                                  NEXT IT_P0041-DAR02
                      VARYING DAT FROM IT_P0041-DAT01
                                  NEXT IT_P0041-DAT02.
          CASE DAR .
    *        WHEN '09'.          "Hiring Date
            WHEN '51'.          "Hiring Date
              L_HIRE_DATE = DAT.
              EXIT.
            WHEN ''.
              EXIT.
          ENDCASE.
        ENDDO.
      ENDIF.
    *To get the no. of weekdays between the hire date and current date excluding sat and sun
      IF NOT L_HIRE_DATE IS INITIAL.
        WHILE L_HIRE_DATE LE SY-DATUM.
          CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
            EXPORTING
              DATE_IN  = L_HIRE_DATE
            IMPORTING
              DATE_OUT = L_INCLUDE_DATE.
          DO 5 TIMES.
            " Making sure that it starts from the from date till to_date calculate before
            IF L_INCLUDE_DATE GE L_HIRE_DATE AND L_INCLUDE_DATE LE SY-DATUM.
              L_WEEK_DAYS = L_WEEK_DAYS + 1.
            ENDIF.
            L_INCLUDE_DATE = L_INCLUDE_DATE + 1.
          ENDDO.
          L_HIRE_DATE = L_INCLUDE_DATE + 2.
        ENDWHILE.
    IF L_WEEK_DAYS LE 30.
          L_DISPLAY_PDF = 1.         "Display the PDF document
        ELSE.
          L_DISPLAY_PDF = 0.         "Do Not Display the PDF document
        ENDIF.
      ENDIF.
      IF L_DISPLAY_PDF = 1.
    * Clear local variables
        CLEAR:   L_DEVICE,
                 LA_CTRL_FORM,
                 LA_OUTPUT_OPT.
    ** Spool Parameters
        LA_OUTPUT_OPT-TDIMMED = 'X'.
        LA_OUTPUT_OPT-TDDELETE = 'X'.
        LA_OUTPUT_OPT-TDLIFETIME = 'X'.
        LA_OUTPUT_OPT-TDDEST = 'LOCL'.
    * Get Smartform function module name
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            FORMNAME           = 'ZP3088_NEW_JOINEE_ACT_PDF'
          IMPORTING
            FM_NAME            = G_FMNAME
          EXCEPTIONS
            NO_FORM            = 1
            NO_FUNCTION_MODULE = 2
            OTHERS             = 3.
        IF SY-SUBRC <> 0.
          G_RETCODE = SY-SUBRC.
          SYST-MSGTY = 'E'.
        ELSE.
    * Parameters passes to get the output in PDF format
          LA_CTRL_FORM-NO_DIALOG = 'X'.
          LA_CTRL_FORM-PREVIEW = SPACE.
          LA_CTRL_FORM-GETOTF = 'X'.
          LA_CTRL_FORM-LANGU = NAST-SPRAS.
          LA_CTRL_FORM-DEVICE = 'PRINTER'.
    Edited by: wahid hussain syed on Nov 4, 2010 3:41 AM
    Edited by: wahid hussain syed on Nov 4, 2010 3:41 AM
    Edited by: Neil Gardiner on Nov 4, 2010 2:04 PM

  • Call Function in Web Dynpro

    Hi all, does anyone know how to call function 'RH_GET_DATE_DAYNAME' in WDDOINIT?
    Regards,
    YC

    Hi YC,
    see.. for example you have some FM or BAPI or Class method already there, now that you want to use in webdynpro,
    so by using SERVICE CALL option you can use this.
    Generally, WD is MVC pattern, so bussiness logic statements like SELECT, MODIFY, INSERT like commands directly
    not use in webdynpro methods, for this we create any FM or Class method and use those FM in webdynpro using
    SERVICE CALLS.
    Check this example for your understand..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/WebdynproApplicationtocalltwoBAPIsfordisplayingtheFlightdetailsusingtab+strips
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600?quicklink=index&overridelayout=true
    And read this..
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a189b0ee583b8be10000000a421937/frameset.htm
    ->using CALL FUNCTION you can call any FM in webdynpro abap.. same works with pattern too.
    Cheers,
    Kris.
    Edited by: kissnas on Mar 9, 2011 7:00 AM

Maybe you are looking for