Accessing an SAP T-Code from WDA

Hi all
I need to call an SAP T-Code from my WebDynpro. I tried it on a button click.But while I am trying to do that its giving me an error "Access via 'NULL' object reference not possible". Its because l_sapgui_manager is not getting the value. Why is it so?
This is the code that I have used,
  data l_componentcontroller type ref to ig_componentcontroller .
  data l_api_componentcontroller type ref to if_wd_component.
  data l_sapgui_manager type ref to cl_wdr_sapgui_integration.
  l_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
  l_api_componentcontroller = l_componentcontroller->wd_get_api( ).
  l_sapgui_manager = l_api_componentcontroller->get_sapgui_manager( ).
if l_sapgui_manager is not initial.
    l_sapgui_manager->fire_start_transaction(
    exporting
               transaction =  item_tcode' ).
  endif.
Is there any other option through which I can access T-Code from WDA.
Please help me with solutions.
Thanks In Advance
Athu

Hi, Athulya,
You can only use SAPGUI Manager when you are executing your wda application from within SAPGUI:
Calling R/3 Transaction from WDA
Call Transacion from my WebDynpro.
Hope this helps!
Andre

Similar Messages

  • Not able to access the native c code from servlet

    I want to call c function from servlet using JNI . I created the .so file and gave the library path . But when i try to load the library it says "Unsatisfied link error ". I am using tomcat on linux .. any more setting has to be done in order to call native code from servlets ?

    You need to post a little bit of code. What does your LoadLibrary() call look like?

  • Calling SAP t-code from mobile

    Hi ,
    Can we call sap transaction from mobile? If so how can we call ? your help is very much appereciated.
    Regards,
    Pavani

    Hi Pavani,
    Well a good answer to your query would be guixt mobile suite which actually makes it possible to use transactions in mobile.
    Check this out:
    http://www.guixt.com/solutions/mobile.php
    Regards,
    Veera

  • Access SAP database table from different SAP server

    Hi,
    May i know is that possible to access the SAP database table from server A to server B without write a program on server A? Is it possible for direct access the SAP database table.
    Best regards,
    Gan

    Hello,
    you could use the RFC-Modules RFC_READ_TABLE or RFC_GET_TABLE_ENTRIES on server A.
    Precondition: you need a RFC-Destination from B to A.
    And a little drawback: you get only the first 512 byte of each table entry.
    Regards Wolfgang

  • How to extract Source from  .wda file

    Hi WebDynpro Experts,
    Do you know how to extract source from .wda file. I appreciate your help and will award points for correct answers.
    Thank you
    Maruti CR

    Hi,
    U wont be able to extract source code from wda file.It contains
    only class,xml and mf  files.The only thing that u would be able
    to use is class file which u need to convert to .java file
    by .class to .java converter.
    Hope this will clear ur doubt.Still if u want to try just extract
    wda file using winzip.go on doing this untill u find unzip files.
    Regards
    Surender Dahiya

  • Sap Source code

    Hi All ,,
    how to read SAP source code from an ABAP program? I would appreciate your prompt response.
    Thanks

    try this source code
    DANGER WARNING
    ABSOLUTELY NO WARRANTY
    USE AT OWN RISK
    COPYRIGHT DR. MARTIN ROGGE
    UNAUTHORISED USE PROHIBITED
    REPORT ZPTTMXFI LINE-SIZE 200 NO STANDARD PAGE HEADING.
    TABLES: TRDIR, TADIR.
    DATA: XDIR LIKE TRDIR,
          XOBJ LIKE TADIR,
          XREL LIKE SY-SAPRL,
          XLAN LIKE SY-LANGU.
    DATA: BEGIN OF XSRC OCCURS 10,
            LINE(72),
          END OF XSRC.
    DATA: BEGIN OF XTXT OCCURS 10.
            INCLUDE STRUCTURE TEXTPOOL.
    DATA: END OF XTXT.
    DATA: BEGIN OF PACK OCCURS 10,
            KEY(4),
            DATA(152),
          END OF PACK.
    DATA: BEGIN OF FILENAME,
            PATH(40),
            FILE LIKE SY-REPID,
            SEP(1),
            EXT(3),
          END OF FILENAME.
    DATA: TABIX TYPE I,
          LOCALFILE LIKE RLGRAP-FILENAME,
          IRDIR LIKE TRDIR OCCURS 100.
    SELECTION-SCREEN BEGIN OF BLOCK 01 WITH FRAME TITLE TEXT-P01.
    SELECT-OPTIONS: REPNAM FOR SY-REPID.
    SELECTION-SCREEN END OF BLOCK 01.
    SELECTION-SCREEN BEGIN OF BLOCK 02 WITH FRAME TITLE TEXT-P02.
    PARAMETERS: PATH(40) DEFAULT 'C:\SAPGUI\',
                EXT(3)   DEFAULT 'TXT'.
    SELECTION-SCREEN END OF BLOCK 02.
    SELECTION-SCREEN BEGIN OF BLOCK 03 WITH FRAME TITLE TEXT-P03.
    PARAMETERS: DOWNLD RADIOBUTTON GROUP ACT,
                UPLOAD RADIOBUTTON GROUP ACT.
    SELECTION-SCREEN END OF BLOCK 03.
    SELECTION-SCREEN BEGIN OF BLOCK 05 WITH FRAME TITLE TEXT-P05.
    PARAMETERS: UPL_ADIR DEFAULT ' ' AS CHECKBOX,
                UPL_RDIR DEFAULT ' ' AS CHECKBOX,
                UPL_SRC  DEFAULT 'X' AS CHECKBOX,
                UPL_TXT  DEFAULT 'X' AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK 05.
    SELECTION-SCREEN BEGIN OF BLOCK 04 WITH FRAME TITLE TEXT-P04.
    PARAMETERS: DISP RADIOBUTTON GROUP SAFE,
                UPDT RADIOBUTTON GROUP SAFE,
                PASSWD LIKE SY-UNAME.
    SELECTION-SCREEN END OF BLOCK 04.
    END-OF-SELECTION.
    safety parameters
      CHECK PASSWD EQ SY-UNAME.
      DESCRIBE TABLE REPNAM LINES TABIX.
      CHECK TABIX GT 0.
      IF UPLOAD IS INITIAL.
        SELECT * FROM TRDIR INTO TABLE IRDIR WHERE NAME IN REPNAM.
        LOOP AT IRDIR INTO XDIR.
          PERFORM GET USING XDIR-NAME.
          CHECK SY-SUBRC EQ 0.
          PERFORM PACK.
          IF DISP IS INITIAL.
            PERFORM DOWNLOAD USING XDIR-NAME.
          ELSE.
            PERFORM PRINT_FILE USING XDIR-NAME.
          ENDIF.
          SKIP.
          ULINE.
        ENDLOOP.
      ELSE.
        LOOP AT REPNAM WHERE OPTION EQ 'EQ'.
          PERFORM UPLOAD USING REPNAM-LOW.
          PERFORM UNPACK.
          PERFORM CHECK_STRUCTURES.
          CHECK SY-SUBRC EQ 0.
          IF DISP IS INITIAL.
            PERFORM PUT USING REPNAM-LOW.
          ELSE.
            PERFORM PRINT_STRUCTURES USING REPNAM-LOW.
          ENDIF.
          SKIP.
          ULINE.
        ENDLOOP.
      ENDIF.
          FORM GET                                                      *
    FORM GET USING REPID LIKE SY-REPID.
      REFRESH XSRC.
      REFRESH XTXT.
      MOVE SY-SAPRL TO XREL.
      MOVE SY-LANGU TO XLAN.
    move space to xdir.
      MOVE SPACE TO XOBJ.
    select single * from trdir into xdir where name eq repid.
    check sy-subrc eq 0.
      SELECT SINGLE * FROM TADIR INTO XOBJ WHERE PGMID    EQ 'R3TR'
                                             AND OBJECT   EQ 'PROG'
                                             AND OBJ_NAME EQ REPID.
      CHECK SY-SUBRC EQ 0.
      READ REPORT REPID INTO XSRC.
      READ TEXTPOOL REPID INTO XTXT LANGUAGE XLAN.
    ENDFORM.
          FORM PUT                                                      *
    FORM PUT USING REPID LIKE SY-REPID.
      IF NOT UPL_ADIR IS INITIAL.
        MODIFY TADIR FROM XOBJ.
      ENDIF.
      IF NOT UPL_RDIR IS INITIAL.
        MODIFY TRDIR FROM XDIR.
      ENDIF.
      IF NOT UPL_SRC IS INITIAL.
        INSERT REPORT REPID FROM XSRC STATE 'A'.
        DELETE REPORT REPID STATE 'I'.
      ENDIF.
      IF NOT UPL_TXT IS INITIAL.
        INSERT TEXTPOOL REPID FROM XTXT LANGUAGE XLAN STATE 'A'.
        DELETE TEXTPOOL REPID LANGUAGE '*' STATE 'I'.
      ENDIF.
    ENDFORM.
          FORM PACK                                                     *
    FORM PACK.
      REFRESH PACK.
      CLEAR PACK.
      PACK-KEY = 'REL'.
      MOVE XREL TO PACK-DATA.
      APPEND PACK.
      CLEAR PACK.
      PACK-KEY = 'LNG'.
      MOVE XLAN TO PACK-DATA.
      APPEND PACK.
      CLEAR PACK.
      PACK-KEY = 'DIR'.
      MOVE XDIR TO PACK-DATA.
      APPEND PACK.
      CLEAR PACK.
      PACK-KEY = 'OBJ'.
      MOVE XOBJ TO PACK-DATA.
      APPEND PACK.
      CLEAR PACK.
      PACK-KEY = 'SRC'.
      LOOP AT XSRC INTO PACK-DATA.
        APPEND PACK.
      ENDLOOP.
      LOOP AT XTXT.
        CLEAR PACK.
        PACK-KEY = 'TXT'.
        PACK-DATA+00(001) = XTXT-ID.
        PACK-DATA+01(008) = XTXT-KEY.
        PACK-DATA+10(010) = XTXT-LENGTH.
        PACK-DATA+20(132) = XTXT-ENTRY.
        APPEND PACK.
      ENDLOOP.
    ENDFORM.
          FORM UNPACK                                                   *
    FORM UNPACK.
      REFRESH XSRC.
      REFRESH XTXT.
    move sy-saprl to xrel.
      MOVE 'XXX' TO XREL.
      MOVE SY-LANGU TO XLAN.
      MOVE SPACE TO XDIR.
      MOVE SPACE TO XOBJ.
      LOOP AT PACK WHERE KEY EQ 'REL'.
        XREL = PACK-DATA.
        EXIT.
      ENDLOOP.
      LOOP AT PACK WHERE KEY EQ 'LNG'.
        XLAN = PACK-DATA.
        EXIT.
      ENDLOOP.
      IF NOT UPL_RDIR IS INITIAL.
        LOOP AT PACK WHERE KEY EQ 'DIR'.
          XDIR = PACK-DATA.
          EXIT.
        ENDLOOP.
      ENDIF.
      IF NOT UPL_ADIR IS INITIAL.
        LOOP AT PACK WHERE KEY EQ 'OBJ'.
          XOBJ = PACK-DATA.
          EXIT.
        ENDLOOP.
      ENDIF.
      IF NOT UPL_SRC IS INITIAL.
        LOOP AT PACK WHERE KEY EQ 'SRC'.
          XSRC = PACK-DATA(72).
          APPEND XSRC.
        ENDLOOP.
      ENDIF.
      IF NOT UPL_TXT IS INITIAL.
        LOOP AT PACK WHERE KEY EQ 'TXT'.
          CLEAR XTXT.
          XTXT-ID     = PACK-DATA+00(001).
          XTXT-KEY    = PACK-DATA+01(008).
          XTXT-LENGTH = PACK-DATA+10(010).
          XTXT-ENTRY  = PACK-DATA+20(132).
          APPEND XTXT.
        ENDLOOP.
      ENDIF.
    ENDFORM.
          FORM DOWNLOAD                                                 *
    FORM DOWNLOAD USING REPID LIKE SY-REPID.
      FILENAME-PATH = PATH.
      FILENAME-FILE = REPID.
      FILENAME-SEP  = '.'.
      FILENAME-EXT  = EXT.
      CONDENSE FILENAME NO-GAPS.
      LOCALFILE = FILENAME.
      FORMAT INTENSIFIED ON.
      SKIP.
      WRITE: / '* downloading', FILENAME.
      CALL FUNCTION 'WS_DOWNLOAD'
           EXPORTING
                FILENAME            = LOCALFILE
                FILETYPE            = 'ASC'
           TABLES
                DATA_TAB            = PACK
           EXCEPTIONS
                FILE_OPEN_ERROR     = 1
                FILE_WRITE_ERROR    = 2
                INVALID_FILESIZE    = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                OTHERS              = 8.
      WRITE: / '* download returncode', SY-SUBRC.
    ENDFORM.
          FORM UPLOAD                                                   *
    FORM UPLOAD USING REPID LIKE SY-REPID.
      REFRESH PACK.
      FILENAME-PATH = PATH.
      FILENAME-FILE = REPID.
      FILENAME-SEP  = '.'.
      FILENAME-EXT  = EXT.
      CONDENSE FILENAME NO-GAPS.
      LOCALFILE = FILENAME.
      FORMAT INTENSIFIED ON.
      SKIP.
      WRITE: / '* uploading', FILENAME.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                FILENAME            = LOCALFILE
                FILETYPE            = 'ASC'
           TABLES
                DATA_TAB            = PACK
           EXCEPTIONS
                CONVERSION_ERROR    = 1
                FILE_OPEN_ERROR     = 2
                FILE_READ_ERROR     = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                OTHERS              = 8.
      WRITE: / '* upload returncode', SY-SUBRC.
    ENDFORM.
          FORM CHECK_STRUCTURES                                         *
    FORM CHECK_STRUCTURES.
      IF NOT UPL_RDIR IS INITIAL.
        IF XDIR EQ SPACE.
          WRITE: / '* fatal error: no report directory entry'.
          SY-SUBRC = 1.
          EXIT.
        ENDIF.
      ENDIF.
      IF NOT UPL_ADIR IS INITIAL.
        IF XOBJ EQ SPACE.
          WRITE: / '* fatal error: no object directory'.
          SY-SUBRC = 2.
          EXIT.
        ENDIF.
      ENDIF.
      IF NOT UPL_SRC IS INITIAL.
        DESCRIBE TABLE XSRC LINES TABIX.
        IF TABIX LE 0.
          WRITE: / '* fatal error: no source code'.
          SY-SUBRC = 3.
          EXIT.
        ENDIF.
      ENDIF.
      IF NOT UPL_TXT IS INITIAL.
        DESCRIBE TABLE XTXT LINES TABIX.
        IF TABIX LE 0.
          WRITE: / '* fatal error: no text elements'.
          SY-SUBRC = 4.
          EXIT.
        ENDIF.
      ENDIF.
      IF XREL NE SY-SAPRL.
        IF ( UPL_ADIR IS INITIAL ) AND ( UPL_RDIR IS INITIAL ).
          WRITE: / '* warning: system release is', SY-SAPRL,
                   'whereas source release is', XREL.
        ELSE.
          WRITE: / '* fatal error: system release is', SY-SAPRL,
                   'whereas source release is', XREL.
          SY-SUBRC = 8.
          EXIT.
        ENDIF.
      ENDIF.
      IF NOT UPL_ADIR IS INITIAL.
        IF XOBJ-DEVCLASS EQ '$TMP' AND XOBJ-SRCSYSTEM NE SY-SYSID.
          WRITE: / '* info: changing source system to', SY-SYSID.
          XOBJ-SRCSYSTEM = SY-SYSID.
        ENDIF.
        IF XOBJ-MASTERLANG NE SY-LANGU.
          WRITE: / '* warning: changing master language to', SY-LANGU.
          XOBJ-MASTERLANG = SY-LANGU.
        ENDIF.
        IF XLAN NE SY-LANGU.
          WRITE: / '* warning: changing text language to', SY-LANGU.
          XLAN = SY-LANGU.
        ENDIF.
      ENDIF.
      IF XLAN NE SY-LANGU.
        WRITE: / '* warning: system language is', SY-LANGU,
                 'whereas text language is', XLAN.
      ENDIF.
      SY-SUBRC = 0.
    ENDFORM.
          FORM PRINT_STRUCTURES                                         *
    FORM PRINT_STRUCTURES USING REPID LIKE SY-REPID.
      SKIP.
      WRITE: / '* displaying selected internal structures for', REPID.
      SKIP.
      FORMAT INTENSIFIED OFF.
      WRITE: /4 XREL.
      WRITE: /4 XLAN.
      IF NOT UPL_RDIR IS INITIAL.
        WRITE: /4 XDIR.
      ENDIF.
      IF NOT UPL_ADIR IS INITIAL.
        WRITE: /4 XOBJ.
      ENDIF.
      IF NOT UPL_SRC IS INITIAL.
        LOOP AT XSRC.
          WRITE: /4 XSRC.
        ENDLOOP.
      ENDIF.
      IF NOT UPL_TXT IS INITIAL.
        LOOP AT XTXT.
          WRITE: /4 XTXT-ID,
                  6 XTXT-KEY,
                 20 XTXT-LENGTH,
                 24 XTXT-ENTRY.
        ENDLOOP.
      ENDIF.
      FORMAT INTENSIFIED ON.
    ENDFORM.
          FORM PRINT_FILE                                               *
    FORM PRINT_FILE USING REPID LIKE SY-REPID.
      SKIP.
      WRITE: / '* displaying file content for', REPID.
      SKIP.
      FORMAT INTENSIFIED OFF.
      LOOP AT PACK.
        WRITE: /4 PACK.
      ENDLOOP.
      FORMAT INTENSIFIED ON.
    ENDFORM.

  • CALL a report from WDA using SUBMIT to sap-spool

    Hi,
    I need to call a report from one of the methods of a WDA application.
    The out of this report is a sapscript. I want show it in WDA (PDF).
    The report is called when a user clicks EXECUTE button.
    The piece of the code is:
      call function 'GET_PRINT_PARAMETERS'
        exporting
          immediately            = 'X'
          new_list_id            = 'X'
          no_dialog              = 'X'
          receiver               = sy-uname
          release                = 'X'
          sap_cover_page         = 'X'
        importing
          out_archive_parameters = t_arcpar
          out_parameters         = t_pripar
          valid                  = i_valid
        exceptions
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          others                 = 4.
          submit hbrcced0
                          with pnppernr-low eq i_pernr
                          with pnpbukrs-low eq t_p0001-bukrs
                          with pnpbegda     eq i_begda
                          with pnpendda     eq i_endda
                          with p_expot      eq ''
                          with ano          eq v_gjahr
                          with respcc       eq v_sachn
                         to sap-spool
                         spool   parameters t_pripar
                         archive parameters t_arcpar
                         without spool dynpro
                         and return.
        if sy-calld eq ''.
          message 'err' type 'E'.
        else.
    If i execute this code in WDA, the sy-calld never is equal 'X'.
    But if i execute it in program (SE38) the sy-calld is 'X'.
    How i can call the program 'hbrcced0' in WDA ?
    Cheers,
    Silvio Galery

    Hi Silvio,
    a submit REPORT to spool does work from WDA.
    ONLY when "and return" is used.
    You have that, so it should work.
    Note you had print immediate on, so it will be output on printer,
    and not available to read after the call.
    (which option was the keep after print?, I would have to check docu)
    The sy-calld will be set to X  inside the REPORT when it is running.
    After the submit has run back inside WDA it is of course reset to space again.
    Cheers
    Phil.

  • Develop RFC to access SAP Z-Tcodes from Microsoft Sharepoint

    Dear Experts,
    A very Good Morning...!!!
    I have a requirement in SAP to develop an interface between the two Systems.
    Systems:
    Microsoft SharePoint
    SAP System
    Here, i want to access the SAP System Transaction Codes (i.e.. ZTCODE's ) from Microsoft SharePoint using RFC Method.
    Can anyone please help me out.
    Please do the needful.

    Hi Dinu,
    Get a selection inputs from the transactions.
    Create a RFC enabled function modules and try to maintain the Importing parameter are the ZTCODE inputs.
    and copy the codes from ZTCODE into newly created RFC FM and use tables parameters(Internal table used in ZTCODE)
    Do remember to developing RFC
    Dont call any screen
    Dont use Error messages like 'A'
    Dont raise exception.
    Regards,
    Vadamalai A

  • Access SAP through SAPRouter from outside of Network

    Hello All,
    As my SAPRouter cerificate got expired  i genrated new certificate & import same into SAProuter. And this time my router is working fine.
    But this time i want to access from outside of network so added this entries in my SAProutab as follow:
    KT "p:CN=sapserv2, OU=SAProuter, O=SAP, C=DE" 194.39.131.34 *
    KP "p:CN=sapserv2, OU=SAProuter, O=SAP, C=DE" <Public ip>
    P <Public ip> 194.39.131.34 3299
    P <my router ip> 194.39.131.34 3299
    P 172.16.. 194.39.131.34 3299
    P 194.39.131.34 172.16..
    P 194.39.131.34 <Public ip> 3299
    S * <my SAP ip> 3200
    P <Public ip> <my SAP ip> 3200
    Note:
    SAP System No: 00
    DEV_Rout
    trc file: "dev_rout", trc level: 1, release: "700"
    Thu Sep 30 11:38:25 2010
    SAP Network Interface Router, Version 38.10
    command line arg 0: F:\usr\sap\saprouter\saprouter.exe
    command line arg 1: -r
    command line arg 2: -W
    command line arg 3: 60000
    command line arg 4: -R
    command line arg 5: F:\usr\sap\saprouter\saprouttab
    command line arg 6: -K
    command line arg 7: p:CN=<HOSTNAME>,OU=0000*****,OU=SAProuter,O=SAP,C=DE
    SncInit(): Initializing Secure Network Communication (SNC)
    PC with Windows NT (mt,ascii,SAP_UC/size_t/void* = 16/64/64)
    SncInit(): Trying environment variable SNC_LIB as a
    gssapi library name: "F:\usr\sap\saprouter\nt-x86_64\sapcrypto.dll".
    File "F:\usr\sap\saprouter\nt-x86_64\sapcrypto.dll" dynamically loaded as GSS-API v2 library.
    The internal Adapter for the loaded GSS-API mechanism identifies as:
    Internal SNC-Adapter (Rev 1.0) to SECUDE 5/GSS-API v2
    main: pid = 2028, ppid = 0, port = 3299, parent port = 0 (0 = parent is not a saprouter)
    reading routtab: 'F:\usr\sap\saprouter\saprouttab'
    I am not able to access my sap from outside of network.
    SAP Router String: /H/<PUBLIC IP>/S/3299/H
    Any idea. Thnaks in advance
    Regards.

    Hi,
    Hope you have private external IP than dynamic which changes every now and then you can this:
    P <Public ip> * 3299 or P <Public ip> SID_IP 3299
    Also look for your the logs for saprouter and your router logs if this not works.
    Regards;

  • Upload data from ms access to sap r/3

    Dear Experts,
    I have a requirement to upload data from one ms access database tables to sap r/3.I have searched a lot in sdn  but i am able to find to upload data from sap r/3 to ms access.
    Please give me a solution.
    Thanks And Regards
    Ansuman

    Hi ansuman,
    i tried this for getting the result..
    [access to sap|http://www.sdn.sap.com/irj/scn/advancedsearch?query=uploadfrommsaccessto+sap#sdn_content_category_value_forums]

  • I Need Help to Access The Source Code From A Form to Know the Calculation Formula

    Hi,
    I Need Help to Access The Source Code From A Form to Know the Calculation Formula. The application is a windows form application that is linked to SQL Server 2008. In one of the application forms it generates an invoice and does some calculations. I just
    need to know where behind that form is the code that's doing the calculations to generate the invoice, I just need to get into the formula that's doing these calculations.
    Thank you so much.

    Hi, 
    Thanks for the reply. This is a view and [AmountDue] is supposed to be [CurrentDueAmount] + [PastDueAmount] - [PaidAmount]. The view is not calculating [PaidAmount] right . Below is the complete code of the view. Do you see anything wrong in the code ?
    Thanks. 
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [iff].[FacilityFeeID], [LoanID] = NULL, [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_fee].[SectionType], [Name]
    = [iff].[Name], [ReceivedAmount], [dates].[CurrentDueAmount], 
                          [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply reset to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN 0 ELSE
    [pastdue].[PastDueFeeAmount] END, [PaidAmount] = CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN - [pastdue].[PastDueFeeAmount]
    ELSE 0 END, [AmountDue] = [unpaid].[UnpaidFeeAmount], [ID] = [iff].[FacilityFeeID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_FacilityFee] iff ON [if].[ID] = [iff].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_fee].[ID],
    [sis_fee].[SectionTypeCode], [SectionType] = [st_fee].[Name], [sis_fee].[INV_FacilityFeeID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_fee JOIN
                   [dbo].[INV_SectionType] st_fee ON [sis_fee].[SectionTypeCode] = [st_fee].[Code]
                                WHERE      [INV_FacilityFeeID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_fee ON [iff].[ID] = [isis_fee].[INV_FacilityFeeID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedFeeAmount]), 
                   [ReceivedAmount] = SUM([iffa].[ReceivedFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_fee].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     *
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [SectionID],
    [PastDueFeeAmount] = SUM([PastDueFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_loan].[SectionType], [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount], [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount], 
                          0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount],
    0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, 
                          [PaidAmount] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN 0 ELSE CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END END, 
                          [AmountDue] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN [CurrentDueAmount] ELSE [unpaid].[AmountDue] END, [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_loan ON [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[ExpectedPrincipalAmount]), 
                   [ReceivedAmount] = SUM([ReceivedPrincipalAmount])
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidPrincipalAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDuePrincipalAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = 'PIK Interest Applied', [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount] = - [dates].[CurrentDueAmount], 
                          [PastDueAmount] = - CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, [PaidAmount] = - CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END, [AmountDue] = - [AmountDue], [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL' AND [sis_loan].[SectionTypeCode] = 'LOAN_INT_PIK') isis_loan ON 
                          [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                   [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]

  • Accessing comapny code from the source file name

    Hi,
    Iam doing FILE –FILE to scenario.
    My source file name is XXXX237061606.txt. (XXXX is company code)
    My requirement is …
    Based on company code from the source file name; I need to send the file to the corresponding receiver.
    How to retrieve the company code from the source file name?
    Thanks,
    Hem.

    hem chand wrote:>
    > Hi Varun,
    >
    > Could u please provide me detailed procedure to get the company code.
    >
    > Reg,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    This will get you the File name...TRuncate it to extract company code...
    Then have a mapping program with the receivers message type which is persent under SAP BASIS component....
    There map to the required receiver by getting the file name above..
    Create an int mapping for the above mapping and use that in ur enhanced recv determination

  • Calling SAP Transaction from WDA

    Hi,
    We have a peculiar requirement of calling SAP Standard Transaction from Web Dynpro ABAP.Well, we tried achieving this using the Transactional iview. On click of appropiate link/button in my applicaiton, I can call the Transactional iview. But the problem is, I could not pass on the data from WDA Application to Transactional iview. I need some inputs in handling such cases.
    The case might look something similar to PCR's final updation(like after all approvals of PCRs, the final Administrator executes the workitem which in turn calls the Notification Maintenance and this in turn calls the PA40 passing the data from Adobe form(XML data) to PA40 txn. Like this, After all my approvals, I would like to call the SAP Transaction passing the data from WDA Application. Hope I am clear.
    Regards
    <i><b>Raja Sekhar</b></i>

    Hi,
    Maybe you can use the information from this blog to pass dynamic parameters to the SAP transaction iview which you call with the created URl
    How to launch SAP transaction & pass parameters via URL
    Dagfinn

  • Copy code from 1 SAP instance to another.

    Is there a way to copy code from one client to another client eg. I developed a RFC with a new table (Z-Table). How can I transport that defelopment?

    Hi
    check thi link
    http://www.sap-basis-abap.com/sapbs046.htm
    <b>reward point if useful.</b>
    rgrds
    shazia

  • ESS - Creating a Front End Selection Screen, that accesses SAP T-code

    Hi,
    We have an ESS Portal in our company.
    I have been given the following request:
    For a specific transaction, create a selection screen in the portal that would be a modified version of the selection screen that exists in the SAP system.
    From this front-end in the selection screen, the specific transaction within the SAP system would be accessed.
    How is this done? What do I need to know about the overall process?
    Please help.
    Thanks,
    John

    Just to clarify,
    Create the transaction and selection screen in the SAP system.
    Then ask the Portal team to create an iView for this transaction.
    What if I need to say get the Internal SAP employee number from the user's sign on information?
    Thanks,
    John

Maybe you are looking for

  • Quicktime plugin does not load on FireFox 4.01 says Waiting for Video

    When i go to Apple Trailers and view a trailer the popout box opens but message in window is " Waiting For Video ". Have re-installed quicktime still doesnt work, works ok in IE 8 still. == This happened == Every time Firefox opened == since installi

  • Closing an LDAP session

    I use DBMS_LDAP.INIT(host, port) to open a session with an LDAP server. How does one CLOSE such a session?

  • MOVED: Cooler XP does not support motherbord !! ~ HELP!

    This topic has been moved to VGA products. https://forum-en.msi.com/index.php?topic=121040.0

  • How to move bookmarks from one PDF to another?

    I have many bookmarks that should be common to a series of documents. It seems nutty to have to create each one within each document individually. Is there some way to copy and paste bookmarks between documents? Does it require a plug-in or something

  • Channel weight in WL eight

    Hi Guys, The docs here (http://e-docs.bea.com/wls/docs81/ConsoleHelp/domain_networkaccesspoint_conf iguration.html) indicate that there is a channel weight associated with channels. The docs here (http://e-docs.bea.com/wls/docs81/notes/resolved.html)