Refreshing Results of RP_GET_REMAINING_HOLIDAY

Hi out there,
I got a problem because the result of function call RP_GET_REMAINING_HOLIDAY is not up to date.
in my coding i'm doing these steps in PAI
1. DELETE Entry from PA2001 - via BAPI_INFOTYPE_OPERATION
2. COMMIT WORK ANDWAIT.
3. Get Holiday via RP_GET_REMAINING_HOLIDAY.
Unfortunately the Holiday is not up to date.
After exit of report and starting it new. The RP_GET_REMAINING_HOLIDAY works grea and gives the correct result.

Hi elOpalo,
thank you for the answer. AJAX would exceed my otherwise very limited programming knowledge.
I hoped there is a way to do this with JSP...too bad.
I have this html with 4 forms. in the first two you put information, and the second two should update this information in html tables. So let say, when I fill in my "talents" and click on "add talent", the form activates an "db_insert_talent.jsp", does its work saving the data and then another JSP should update the information in a html table just bellow the form.
Any idea how to achieve this without AJAX? Thank you in advance...
I image it happening in the following way:
1. in the html I prepare a table with the name of the colums, the result would return
2. I declare some paramaters using <%= param.getSomething %> in the cells of the table to eavesdrop for some changes
3. the jsp is called, it does it work, gets some results and processes the values (??)
4. the parameter in the html table populate the values
5. everyone is happy ?
Or thats totally not the way it is done?
Edited by: fankoff on Jun 22, 2010 4:59 AM
Edited by: fankoff on Jun 22, 2010 5:05 AM
Edited by: fankoff on Jun 22, 2010 5:11 AM

Similar Messages

  • Refreshing results on html

    One last question, really !
    How for goodness's sake can I load the results in the html page without leaving it? Always when I click a button, I get redirected to the jsp that carries out the action.
    I`ve tried putting the <jsp: forward> tag at the bottom of the jsp, so when it is done with processing the db-results to redirect back to the calling-page.
    still no success on this one. for 3 days now, and my time is ticking away....
    please help me. thanks a million!
    -- do I always have to click a button to get some results? how can I load the results "live" without pressing anything ? ---
    Edited by: fankoff on Jun 21, 2010 7:07 PM

    Hi elOpalo,
    thank you for the answer. AJAX would exceed my otherwise very limited programming knowledge.
    I hoped there is a way to do this with JSP...too bad.
    I have this html with 4 forms. in the first two you put information, and the second two should update this information in html tables. So let say, when I fill in my "talents" and click on "add talent", the form activates an "db_insert_talent.jsp", does its work saving the data and then another JSP should update the information in a html table just bellow the form.
    Any idea how to achieve this without AJAX? Thank you in advance...
    I image it happening in the following way:
    1. in the html I prepare a table with the name of the colums, the result would return
    2. I declare some paramaters using <%= param.getSomething %> in the cells of the table to eavesdrop for some changes
    3. the jsp is called, it does it work, gets some results and processes the values (??)
    4. the parameter in the html table populate the values
    5. everyone is happy ?
    Or thats totally not the way it is done?
    Edited by: fankoff on Jun 22, 2010 4:59 AM
    Edited by: fankoff on Jun 22, 2010 5:05 AM
    Edited by: fankoff on Jun 22, 2010 5:11 AM

  • Refresh results...

    After building my site with divs and entering content I am now at the stage where I am applying the CSS to get the desired look.
    There is loads I love about CC but I am frustrated by the following:
    in split view
    live view
    manually type in my CSS style to style sheet
    hit F5
    display goes blank
    when the content re appears it is at the bottom of the page which means I have to scroll up each time... The CSS applies just fine, its just annoying when I working on the top of the page.
    This also happens when I use the tools i.e if i try and increase my margin by dragging the contextual menu item the screen immediately refreshes to the bottom so i can see the impact of any further changes?
    This may sound petty but I am working on the mobile view which is long. Is there a way that I can force the refresh to keep the view still?
    Thanks in advance
    mark

    After building my site with divs and entering content I am now at the stage where I am applying the CSS to get the desired look.
    There is loads I love about CC but I am frustrated by the following:
    in split view
    live view
    manually type in my CSS style to style sheet
    hit F5
    display goes blank
    when the content re appears it is at the bottom of the page which means I have to scroll up each time... The CSS applies just fine, its just annoying when I working on the top of the page.
    This also happens when I use the tools i.e if i try and increase my margin by dragging the contextual menu item the screen immediately refreshes to the bottom so i can see the impact of any further changes?
    This may sound petty but I am working on the mobile view which is long. Is there a way that I can force the refresh to keep the view still?
    Thanks in advance
    mark

  • Is CPA Cache refresh linked with  ftp or file pooling process in XI?

    Hi,
    I have a file to file scenario using Transport protocol as FTP in XI 3.0 SP 15.
    When we try to sends some file using ftp protocol where we are using
    FTP  connection parameters
    Server                          = <CORRECT IP>,
    Port                               =  21 ,
    User name                <CORRECT NAME>,
    Password                  <PASSWORD> ,
    Data Connection           = Active
    Connection Seq          = None
    Connection Mode          = Permanently
    Transfer Mode            =   Text
    Processing Parameters
    Quality of Service    = Exactly Once
    Pooling Interval        = 1 sec
    Processing Mode    = delete
    File Type                   = Text
    File encoding           = utf-8                 
    The problem we are facing like some time the ftp is not working even the file is present in the location for pick up. If few files are stacked up to be collected then when we are using CPA Cache refresh in Full mode manually then it fetches all the files from the location but the problem is that ,we have a time constraint for this process to be completed in just 60 seconds if we are not able to pick up a  file in 60 Secs then the file will be treated as invalid.
    So I just want to know how Manual CPA CACHE refresh in full mode generally solve the problem.
    Next if more files will be stacked up then cache refresh also failed to solve the problem and more cache refresh result in NOT pooling any other files in XI including the above discussed flow.
    So,in anyway Cache refresh linked with ftp or file pooling process in XI?
    Please assist me in correctly understating the whole problem and what solution could be put to solve this.
    Thanks,
    Satya
    Edited by: Satya Jethy on Mar 14, 2008 12:28 PM

    Hi Suraj,
      If you see my query i have mentioned that the pooling interval is 1 Second.
    If we are not able to pick the file with in 60 Secs as this is a  real time scenario so the file will be treated as a invalid file.
    Moreover this problem is happening some time.
    I have also checked the component monitoring it is saying everything is ok as because we are receiving the file with out any error and the file transfer is also success.The only problem is that it is not collecting the files from the given location.
    Hope i make you understnad the problem .If not please revert back i will try to explain once again.
    Thanks,
    Satya

  • In HOTMAIL Fireefox Beta continually refreshes automatically. How to stop the refresh?

    In hotmail.com the screen automatically continues to refreshes resulting in the displayed screen continuously reloading every second. How to stop this automatic refresh?

    See [/questions/778953]

  • Quiz Analyzer Doesn't Pull in Results

    I am using the Adobe servers with the quiz analyzer on a windows-based system.  Often when I try to generate reports, it will pop up the window telling me there were new learners and asks if I want to download them.  When I say yes, it thinks for a second but still displays the previous report that I had generated.  It did it very sporadically at first and now I am often unable to generate more than one report per quiz analyzer session and have to restart the program to generate each additional report.  Any help as to the cause or a solution to this issue would be greatly appreciated.

    Download to disk did work despite the Quiz Analyzer itself not refreshing results.
    I'm not sure what you were driving at with the added server location given that I was reporting to Acrobat.com but this did solve my issue.  Although, it still is frustrating that the Quiz Analyzer Tool does not refresh its results and the only option that I have is to download to disk.
    Thanks.

  • Getting error while calling a subscreen in  module pool program

    HI  ALL,
                         ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
                       IN A MODULE POOL PROGRAM IN PAI MODULE
                       THE ERROR IS AS FOLLOW
                           "." or "ID ... FIELD ..." expected after "SUBSCREEN"
                        CAN ANYBODY PLS HELP ME.
    REGARDS
    ANDREWS

    HI MAX ,
                      THE CODE IS AS FOLLOWS:
    *& Report  ZTABSTRIP_PS
    REPORT  ZTABSTRIP_PS.
    type-pools : vrm.
    DATA:number1 type I,
         number2 type I,
         result  type I,
         ok_code like SY-UCOMM,
         employee1 type c,
         ABAP(19)    type c,
         SALES(19)  type c,
         HR(19)      type c,
         MM(19)     type  c,
    employee type c.
        emp type c.
    CONTROLS  tabstrip TYPE TABSTRIP.
    CALL SCREEN 100.
    call screen 110.
    call screen 130.
    call screen 120.
    call screen  140.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
      SET TITLEBAR 'TITLE'.
      CASE OK_CODE.
        WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program.
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
       WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      when 'TAB1'.
    tabstrip-activetab = 'TAB1'.
       when 'TAB2'.
    tabstrip-activetab = 'TAB2'.
    result = number1 + number2.
       when 'TAB3'.
      tabstrip-activetab = 'TAB3'.
    SET TITLEBAR 'TITLE1'.
      when 'TAB4'.
        tabstrip-activetab = 'TAB4'.
       if employee = 'NEERAJ'.
         ABAP = 'NEERAJ'.
       elseif employee = 'UMESH'.
         SALES = 'UMESH'.
       ELSEIF employee = 'RAM'.
         HR = 'RAM'.
       elseif employee = 'ANIL'.
         MM = 'ANIL'.
         endif.
       employee = employee.
    WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    ENDCASE.
       WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program .
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0110  OUTPUT
          text
    **MODULE STATUS_0110 OUTPUT.
    SET PF-STATUS 'STATUS1'.
    SET TITLEBAR 'xxx'.
    **case ok_code.
    **WHEN 'back' or 'exit' or 'delete'.
        leave PROGRAM.
        WHEN 'save'.
          MESSAGE 'please choose a valid function ' TYPE 'W'.
    ENDCASE.
    **ENDMODULE.                 " STATUS_0110  OUTPUT
    *&      Module  USER_COMMAND_0110  INPUT
          text
    MODULE USER_COMMAND_0110 INPUT.
      number1 = number1.
      number2 = number2.
    CLEAR NUMBER1.
    CLEAR NUMBER2.
    REFRESH NUMBER1.
    REFRESH NUMBER2.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    *&      Module  STATUS_0130  OUTPUT
          text
    MODULE STATUS_0130 OUTPUT.
    SET PF-STATUS 'STATUS2'.
    SET TITLEBAR 'xxx'.
    RESULT = number1 + number2.
    *CLEAR RESULT.
    REFRESH RESULT.
    ENDMODULE.                 " STATUS_0130  OUTPUT
    *&      Module  STATUS_0120  OUTPUT
          text
    MODULE STATUS_0120 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    DATA:  l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'ANIL'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '2'.
      l_value-text = 'RAM'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '3'.
      l_value-text = 'NEERAJ'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '4'.
      l_value-text = 'UMESH'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
    l_name =  'employee'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    =  l_name
          VALUES                =  li_list
       EXCEPTIONS
         ID_ILLEGAL_NAME       = 1
         OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR li_list.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
          text
    MODULE USER_COMMAND_0120 INPUT.
    INCLUDING sy-repid '140'.
    employee1 = employee.
    IF employee1 CS 'NEERAJ'.
      call SUBSCREEN    sub4  .
      ABAP = 'NEERAJ'.
      CLEAR ABAP.
    ELSEIF employee1 CS 'UMESH'.
       call SUBSCREEN  sub4  .
        SALES = 'UMESH'.
        CLEAR SALES.
    elseif employee1 CS 'RAM'.
      call SUBSCREEN sub4 .
       HR = 'RAM'.
       CLEAR  HR.
    ELSEIF employee1 CS 'ANIL'.
       call SUBSCREEN sub4 .
       MM = 'ANIL'.
       CLEAR MM.
       endif.
    ENDMODULE.                 " USER_COMMAND_0120  INPUT
    *&      Module  STATUS_0140  OUTPUT
          text
    MODULE STATUS_0140 OUTPUT.
    *CASE OK_CODE.
       WHEN employee1  'NEERAJ'.
         screen-active = 1.
         ABAP = 'NEERAJ'.
       WHEN employee1 = 'UMESH'.
         screen-active = 1.
         SALES = 'UMESH'.
       WHEN employee1 = 'RAM'.
         screen-active = 1.
         HR = 'RAM'.
       WHEN employee1 = 'ANIL'.
         screen-active = 1.
         MM = 'ANIL'.
         endif.
    *ENDCASE.
    ENDMODULE.                 " STATUS_0140  OUTPUT

  • How do you resolve Financial Management service validation error in EPM ?

    Does anyone know how to resolve Financial Management service validation error from EPM Diagnostic Report?
    Environment:
    Quad-Core AMD Processor 2.2 GHz (Server Machine)
    5 GB RAM
    Server 2003 Standard 32-Bit SP2 (also tried in Enterprise)
    Application Server:
    WebLogic Server 9.2 Custom Installation (with Add-Ins)
    http://www.oracle.com/technology/software/products/ias/htdocs/wls_main.html
    Database:
    Oracle 10gR2 (Standard Installation per step-by-step guide from Oracle)
    http://www.oracle.com/technology/software/products/database/index.html
    Hyperion EMP System 11.1.1.3:
    Installer
    Foundation Services (4 Files )
    EMP Architect
    Financial Management, Planning, Financial Reporting and Web Analysis (primarily interested in FM)
    http://www.oracle.com/technology/software/products/bi/performance-management/index.html
    The following are the sequences of steps carried out during the Installation and Configuration of EPM:
    1)     Installed the Server along with its respective SP2 – Shutdown the machine
    2)     Assigned IP and DNS addresses
    3)     Installed Window components by ticking Application Server Console, Enable COM+ access, IIS and DNS
    4)     Run “dcpromo” to create a Domain Controller with default values and assigned a domain name – Shutdown the machine
    5)     Installed Weblogic Server 9.2 and configure it using Configuration Wizard – Selected “test environment” and ticked default “listening port” – Shutdown the machine
    6)     Basic installation of Oracle Database 10gR2 using Step-by-Step guide provided by Oracle and carried out Password Management steps. After installation, I then created a user “oracle” and assigned it to ora_dba User Group with the required Local Security Policies – “log on as a batch job” and “Act as part of operating system”
    7)     Logged into database and acknowledge the licensing window – Shutdown the machine
    8)     Restarted the machine and checked all relevant and newly installed Database and WebLogic services are running.
    9)     Started Installing EPM components by double clicking “InstallTool.cmd” and selected all relevant components at ONCE as per Installation Guide – Result: - All selected EPM components were successfully installed without errors or exceptions
    10)     At the end of installation window, I carried out the configuration in the following scearios:
    Scenario 1: Configuration all at Default settings
    Scenario 2: Configuration all, except “Application Server” I selected the WebLogic9.2
    Scenario 3: Configuration all, except “Application Server” and “Workspace Web Server” were being Welogic9.2 and IIS HTTP
    RESULT: After all numerous installations, all came down to ONE ERROR from “Diagnostic Report” stating the following:
    Financial Management:
    FAILED SVR: HFM Service Validation Check if HFM service in working state.
    Error: Error message: <03/11/2010 05:32:26 PM> CreateApplicationCAS... Failed at line: 2
    Recommended Action: Make sure HAT utility is working. 1 s
    I then simply ignored this error and tried to deploy an Application, all worked fine until you get to the point at “Job Console” where you need to press “Refresh” button. Progress remained at 12% until it got timedout after 300 seconds and force attempt of refreshing resulting in “aborted” job with the following error:
    Error Reference Number: {DB3940F5-2D4A-46AB-A370-77F82F121BBA}
    Num: 0x8000ffff;Type: 0;DTime: 4/12/2010 4:39:58 PM;Svr: PBAR;File: CHsvDataSourceImpl.cpp;Line: 196;Ver: 11.1.1.3.0.2413;
    Num: 0x8000ffff;Type: 0;DTime: 4/12/2010 4:40:07 PM;Svr: PBAR;File: CHsxServer.cpp;Line: 1276;Ver: 11.1.1.3.0.2413;
    Num: 0x8000ffff;Type: 0;DTime: 4/12/2010 4:40:07 PM;Svr: PBAR;File: CHsxServer.cpp;Line: 1190;Ver: 11.1.1.3.0.2413;
    Num: 0x8000ffff;Type: 0;DTime: 4/12/2010 4:40:07 PM;Svr: PBAR;File: AgentHelper.cpp;Line: 728;Ver: 11.1.1.3.0.2413;
    Num: 0x8000ffff;Type: 1;DTime: 4/12/2010 4:40:08 PM;Svr: PBAR;File: CHfmAwbAgent.cpp;Line: 744;Ver: 11.1.1.3.0.2413;
    This is, I believe preventing me from deploying Consolidation Apps, including Sample Application provided with EPM Downloads. I have tried installing and configuring by components. All failed with the same outcome.
    I have been working on this effortlessly in different combinations to get at least one Financial Management Application get deployed so I could enhance my learning adventure. As it stands, I am not sure where to get help and completely lost in the World of Oracle. I am also come to wonder whether “Free Downloads of EPM” are indeed, is “complete and is in working-state” or do I need a licence to use for personal learning experience? Are there different downloads for different needs or/users For example, eDelivery downloads are different from OTN Agreement downloads?
    I have downloaded the files from following URL:
    http://www.oracle.com/technology/software/products/bi/performance-management/index.html
    I am completely lost and all services are up and running and not sure what I am missing!! Any assistance will be greatly appreciated.
    Many Thanks
    BT
    Edited by: user8973921 on 13-Apr-2010 05:08
    Edited by: user8973921 on 13-Apr-2010 10:56
    Edited by: user8973921 on 14-Apr-2010 02:30

    I am having exactly the same problem using Windows 2003 Standard editions SP2. Is there anyone who knows a possible solution for this? The effect on HFM is that is not possible to create an application, since I always get an error that says "Server execution failed"
    Error Reference Number: {E68F87E6-588E-4665-862C-AAB02CB299DA}
    Num: 0x80080005;Type: 0;DTime: 12/3/2009 5:21:47 PM;Svr: KINGTUT;File: CHsxServerImpl.cpp;Line: 3522;Ver: 11.1.1.3.0.2413;
    Num: 0x80080005;Type: 0;DTime: 12/3/2009 5:21:47 PM;Svr: KINGTUT;File: CHsxServer.cpp;Line: 1115;Ver: 11.1.1.3.0.2413;
    Num: 0x80080005;Type: 0;DTime: 12/3/2009 5:21:47 PM;Svr: KINGTUT;File: CHsxServer.cpp;Line: 857;Ver: 11.1.1.3.0.2413;
    Num: 0x80080005;Type: 0;DTime: 12/3/2009 5:21:47 PM;Svr: KINGTUT;File: CHsxClient.cpp;Line: 2106;Ver: 11.1.1.3.0.2413;

  • Copy file from FTP server to sap application server

    Hi,
    I am able to copy a particular file from FTP server to sap application server using FTP_CONNECT, FTP_COMMAND and FTP_DISCONNECT. But here my problem is, it copies into default application server path(DIR_HIOME). I want to copy into specified folder in the application server. How can I specify the required destination path.
    Can you please suggest how to achieve this.
    Thanks,
    Shiva Kankanala

    try something like this:
    data: user(30) type c value 'ftpuser', "ftp username
                  pwd(30) type c value 'ftppass', "ftp password
                  host(64) type c value '255.255.255.255', "ftp server IP
                  cmd1(80) type c value 'lcd /dump', "location on app server where you want to copy the file
                  cmd2(80) type c value 'get', "specifies you are going to get the file from ftp server
                  dest like rfcdes-rfcdest value 'SAPFTPA',
                  file(15) type c value 'file.txt'. "specifies file that you want to get from ftp server
    data: hdl type i,
            key type i value 26101957,
            slen type i.
    slen = strlen( pwd ).
    call function 'HTTP_SCRAMBLE'
        EXPORTING
          source      = pwd
          sourcelen   = slen
          key         = key
        IMPORTING
          destination = pwd.
    call function 'FTP_CONNECT'
        EXPORTING
          user            = user
          password        = pwd
          host            = host
          rfc_destination = dest
        IMPORTING
          handle          = hdl.
    call function 'FTP_COMMAND'
        EXPORTING
          handle        = hdl
          command       = cmd1
        TABLES
          data          = result
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      loop at result.
        write at / result-line.
      endloop.
    CONCATENATE cmd2 file INTO cmd2 SEPARATED BY SPACE.
    call function 'FTP_COMMAND'
          EXPORTING
            handle        = hdl
            command       = cmd2
          TABLES
            data          = result
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        loop at result.
          write at / result-line.
        endloop.
        refresh result.

  • In FTP server file not storing in proper order when 'FTP_R3_TO_SERVER'

    Dear ,
    when i used FTP_R3_TO_SERVER to download data in FTP server 
    i checked in FTP server  file is not storing in proper order in FTP server . plz help how to get the file in proper order .it urgent . full points must be given. i given code below .
    DATA : BEGIN OF iresult OCCURS 5,
    rec(450),
    END OF iresult ,
    DATA :
    dest LIKE rfcdes-rfcdest VALUE 'SAPFTP',
    compress TYPE c VALUE 'N',
    host(64) TYPE c.
    DATA: hdl TYPE i.
    DATA: BEGIN OF result OCCURS 0,
    line(100) TYPE c,
    END OF result.
    DATA : key TYPE i VALUE 26101957 ,
    dstlen TYPE i,
    blob_length TYPE i.
    host = p_host  .
    DESCRIBE FIELD p_password LENGTH dstlen IN CHARACTER MODE.
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
    ID 'SOURCE' FIELD p_password ID 'KEY' FIELD key
    ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD p_password
    ID 'DSTLEN' FIELD dstlen.
    CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
    user = p_user
    password = p_password
    host = host
    rfc_destination = dest
    IMPORTING
    handle = hdl
    EXCEPTIONS
    not_connected = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    CONCATENATE 'cd' ftppath INTO ftppath SEPARATED BY space .
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = ftppath
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    IF sy-subrc = 0 .
    CLEAR result .
    REFRESH result .
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = 'ascii'
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    IF sy-subrc = 0 .
    DESCRIBE TABLE iresult LINES lines.
    blob_length = lines * width .
    clear : lines.
    Delete the existing file
    CONCATENATE 'del' ftpfile INTO delfile SEPARATED BY SPACE.
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = delfile
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    *End of deleting the existing file
    CALL FUNCTION 'FTP_R3_TO_SERVER'
    EXPORTING
    handle = hdl
    fname = ftpfile
    blob_length = blob_length
    TABLES
    blob = iresult
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4.
    IF sy-subrc 0 .
    WRITE 'Error in writing file to ftp' .
    ELSE.
    WRITE 'File downloaded on the ftp server successfully'.
    ENDIF.
    ENDIF.
    ELSE.
    WRITE : 'Path on ftp not found : ' , ftppath .
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
    handle = hdl.
    CALL FUNCTION 'RFC_CONNECTION_CLOSE'
    EXPORTING
    destination = 'SAPFTP'
    EXCEPTIONS
    OTHERS = 1.
    ELSE.
    WRITE 'Could not connect to ftp' .
    ENDIF.
    ENDFORM. " FTPFINANCEACCESS_DOWNLOAD
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF screen-name = 'PASSWORD'.
    screen-invisible = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Edited by: manoj kv on Feb 27, 2008 12:55 PM
    Edited by: manoj kv on Feb 28, 2008 5:37 AM
    Edited by: manoj kv on Feb 28, 2008 5:39 AM
    Edited by: manoj kv on Mar 5, 2008 2:15 PM
    Edited by: manoj kv on Mar 7, 2008 12:51 PM

    Hello,
    Did you try to put 'X' to the parameter CHARACTER_MODE.
    Hope it will help you
    Olivier

  • Abt RFC & FTP---- RFC to SAPFTP failed (urgent)

    Hi all,
    my program is working fine when i execute it in SAP GUI.
    in this program i need to send some local file to FTP server from presentation server.
      actually we have a scanner through which we can scan the barcode data from barcode label.this scanner is connected to  sap test server through web console.
         so ,i can see the sap screen on the screen of scanner for this perticular transaction.
    after scanning a barcode,the barcode data comes to scanner.when i execute this report on the scanner, it is showing the error---- RFC to SAPFTP failed.
            where as this same report is working very fine on the SAP server.it can send my file from presentation server to FTP server located at some other place.
        web console is installed so i can connect scanner to SAP for this perticular transaction through web.i think, to execute on scanner is same as execute on sap server.
       This error comes while executing a Function module FTP_CONNECT which is present in my program.
       can u please tell where  is the problem?it is very urgent as they need in 1 day of time.
    code is as follows.
    FORM ftp_send using printer dir.
          data: user(64) type c value 'man',
                pwd(64) type c value 'post',
                host(64) type c value '172.160.122.30',
                cmd1(80) type c ,
                cmd2(150) type c ,
                cmd3(80) type c ,
                dest like rfcdes-rfcdest value 'SAPFTP',
                compress type c value 'N'.
    data: hdl type i,
          key type i value 26101957,
          dstlen type i.
    data: begin of result occurs 0,
          line(100) type c,
          end of result.
    data:begin of tab_oline occurs 0,
         oline(200) type c,
         end of tab_oline.
    describe field pwd length dstlen.
    LOOP AT bt.
          CLEAR tab_oline.
          CONCATENATE
          bt-userid
          bt-zdate
          bt-seq
          bt-charg
          bt-batch
          bt-matnr
          bt-menge
          bt-lgpla
          bt-lifnr
          bt-lot_code
          bt-date_code
          bt-lead_nolead
          INTO tab_oline-oline SEPARATED BY ','.
    append tab_oline.
    endloop.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
       FILENAME                      = 'c:\pabi29.txt '
       FILETYPE                      = 'DAT'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        DATA_TAB                      = tab_oline.
      FIELDNAMES                    =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_WRITE_ERROR              = 2
      INVALID_FILESIZE              = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      OTHERS                        = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    clear tab_oline.
    refresh tab_oline.
    call 'AB_RFC_X_SCRAMBLE_STRING'
      id 'SOURCE'      field pwd    id 'KEY'         field key
      id 'SCR'         field 'X'    id 'DESTINATION' field pwd
      id 'DSTLEN'      field dstlen.
    **Set FTP File Paths
    call function 'FTP_CONNECT'
      exporting
        user            = user
        password        = pwd
        host            = host
        rfc_destination = dest
      importing
        handle          = hdl.
    if sy-subrc ne 0.
    message e020 with 'RFC connection failed'.
    endif.
       DATA: zfilename(150) TYPE c,
              zfilename2(150) TYPE c.
             printer(5) TYPE c." value 'P0001'.
    CONSTANTS: dir(50) TYPE c VALUE '\SAPuser\SAPfolder\'.
    DATA: dir(50) type c.
    select single pfolder from zkt014 into dir where printer = printer.
    TEXT file name
    CONCATENATE dir printer bt-userid bt-zdate sy-uzeit bt-seq '.txt'
      INTO zfilename.
      CONDENSE zfilename no-gaps.
    Done filename
      CONCATENATE dir printer bt-userid bt-zdate sy-uzeit bt-seq '.done'
      INTO zfilename2.
      CONDENSE zfilename2 no-gaps.
    clear bt.
    refresh bt.
    concatenate 'put' '\pabi29.txt' zfilename
    into cmd1 separated by space.
    if cmd1 ne ' '.
      call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = cmd1
          compress      = compress
        tables
          data          = result
        exceptions
          command_error = 1
          tcpip_error   = 2.
      IF SY-SUBRC NE 0.
      message e021 with 'bar tender is not submited due to error in RFC'.
      endif.
      loop at result.
        write:/ result.
      endloop.
    ENDIF.
      refresh result.
    endif.
    concatenate 'rename' zfilename zfilename2 into cmd2 separated by
    space.
    if cmd2 ne ' '.
      call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = cmd2
        tables
          data          = result
        exceptions
          command_error = 1
          tcpip_error   = 2.
          if sy-subrc eq 0.
      MESSAGE w044(zv).
      ELSE.
      message e019 with 'RFC ftp_command problem'.
       endif.
      loop at result.
        write:/ result.
      endloop.
      refresh result.
    endif.
    if cmd3 ne ' '.
      call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = cmd3
        tables
          data          = result
        exceptions
          command_error = 1
          tcpip_error   = 2.
      loop at result.
        write:/ result.
      endloop.
      refresh result.
    endif.
    call function 'FTP_DISCONNECT'
      exporting
        handle = hdl.
    thanks in advance.
    Regards
    pabitra

    Well may be the reason is that you are running report from SAP console.
    SAPFTP is just an RFC destination which is actually pointing to an exe file on your frontend. filename is 'sapftp' and it is installed with your GUI frontend installation. May be while running through web console it is having problems accessing this file.
    As a solution, why don't you use the rfc destination for the application server. It is called SAPFTPA. So instead of ws_download, you can save the file on application server through OPEN dataset ... ABAP commands. Than from application server ftp it using the same logic as it is in existing program. Just be sure to use the rfc destination SAPFTPA.
    Hope this helps.
    Cheers.

  • Executing Operating system commands in ABAP

    Hi
    I want to execute a unix operating system command in an ABAP program. I remember seeing code which executes an operating system command. Could any please let me know about that code?
    Thank You.
    Eswar

    Hi,
    you can try something like this.
    data:cmd(254) type c.
    data: RESULT(255) OCCURS 100 WITH HEADER LINE.
                cmd = 'ls'.
    ** Execute command
      REFRESH RESULT.
      CALL 'SYSTEM' ID 'COMMAND' FIELD CMD
                    ID 'TAB'     FIELD RESULT-*SYS*.
    Kostas

  • Receive Error 900|101000.101004.101005 While Watching Online

    I'm 9 minutes from finishing watching Spartacus: Gods of the Arena Episode 6 "The Bitter End" when I receive this message: Sorry, we've experienced some difficulty playing your video.Please refresh this page in your browser to try again.(Error 900|101000.101004.101005) Refreshing didn't help. I tried closing and reopening my Firefox browser but that didn't help either. I tried it in IE9 with the same result. Please help! Link to show: http://xfinitytv.comcast.net/watch/Spartacus%3A-Gods-of-the-Arena/8145186920100817112/2192718405/Ep-6---The-Bitter-End/videos My Device Information My Zip Code: 03301 My Cable Provider: Recommended by Comcast Use Dac: true My Conroller ID: 162 My Map ID: 57 My Persona ID: 12037 My myDVR Manager Status: Unknown My Set Top Box Names: Unknown My Queue setup: false Facebook Queue Syncing: false Facebook Connect: false My public IP address: 24.62.152.168 My operating system: Windows - Windows NT 6.0 My web browser: Explorer 9 - Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; WINFC 2.0.0.1; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0C; NET_mmhpset) My system type: Desktop computer or other device My Silverlight version: 5.1.20125.0 My flash version: 11.6 r602 Javascript&colon; enabled Cookies: Unknown Time Information My Clock Time: Unknown Server Clock Time: Unknown My Account Information In Home Authenticated: false Primary Account: true Provider Codes: bi, bj, cy, bq, ce, cd, cf, g, ak, cu, bv, b, cx, h, ad, bw, d, al, ci, a, bu, by, cn, ax, bs, at, ct, cb, ch, cs, e, aj, cv, db, co, bl, cw, bo, j, cc, bn Internet Subscriber: true Cable TV Subscriber: true Voice Subscriber: false

    I receive the same error for ANY show I try to watch online... The Walking Dead, Dexter, or Spartacus.  It is getting quite frustrating.  It reads the same... (Error 900|101000.101004.101005) and wants me to refresh.  Refreshing results in the ad of course playing quite well and then nothing.  What I have found is I have better luck with the lower quality but even that doesn't prevent the error all of the time... only delays the inevitable as I can't get through any single episode of anything anymore.  A friends laptop followed this same trend when we tested it... low quality seemed to delay the issue but it still happened.  Any why pay for HD when you can't even get it.  I did the Xfinity speed test at speedtest.comcast.net and average a 47Mbps on 2 different servers.  I have zero issues watching on my phone though.  I shouldn't have to resort to the small screen and limit my viewing experience when this is not free stuff here.  I have read through so many forums and found supposed causes anywhere from some versions of Flash Player not being compatible to secondary account holders aren't authorized to view anything rated MA.  I've also read of some who have similar errors as the only email account active with their service.  There is no rhyme or reason to it that I can find yet.  What I did find consistent in the forums so far is Comcast Joe.  He always asks for the info from xfinitytv.com/computer and links for the shows and when they are sent, there never seems to be a reply back with any resolution or possible cause.  I just don't get it.  The details submitted by everyone also vary with the answer to primary account holder being both true and false.  Please fix this Comcast.  There are a lot of customers out there being impacted by this issue.  My Device Information My Zip Code:Unknown My Cable Provider:Unknown Use Dac:true My Conroller ID:150 My Map ID:146 My Persona ID:9651 My myDVR Manager Status:Unknown My Set Top Box Names:Unknown My Queue setup:true Facebook Queue Syncing:false Facebook Connect:false My public IP address:24.240.92.101 My operating system:Windows - Windows NT 6.1 My web browser:Explorer 9 - Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; eMusic DLM/4) My system typeesktop computer or other device My Silverlight version:5.1.20125.0 My flash version:11.6 r602 Javascript&colon;enabled Cookies:Unknown Time Information My Clock Time:Unknown Server Clock Time:UnknownMy Account Information In Home Authenticated:false Primary Account:false Provider Codes:s, bi, bj, cy, bq, ce, cd, cf, g, ak, aw, ar, dc, dd, cg, cq, da, cu, au, bv, b, cz, u, cr, c, br, cx, bt, h, ad, bw, d, al, bh, ci, a, y, bx, bb, bc, cp, bu, by, cn, ax, bs, at, ct, cb, ch, cs, e, aj, cv, bz, db, bm, co, bl, bk, bp, cw, cj, bo, j, cc, f, m, bn Internet Subscriber:true Cable TV Subscriber:true Voice Subscriber:true   Most recent error happened while watching the link below but you can insert the episode 1 of the same season of Spartacus (link is episode 2) as well as any episode of the whole season 3 of The Walking Dead of any show in season 7 of Dexter.  It is ALWAYS the same error code.  Someone has to know what the codes mean or why have them programmed to populate at all.   http://xfinitytv.comcast.net/watch/Spartacus/7511923708853028112/15380547815/Ep-302---Wolves-At-The-Gate/videos   I hope this helps Comcast Joe.  Thanks for any help you can give.

  • Electronic Bank Statement (EBS)

    Hi All,
    My Client is implemented Electronic Bank Statement using BAI format.
    GL Accounts set up is wrong (all bank accounts should be clearing type accounts (Open Item managed, except Operating Account (Main bank account))),but these accounts are not set up as open item management.
    How can I handle this issue and is it possible to create new accounts or any other alternative solution? Any help is appreciated.
    I will assign points.
    Thanks,
    Rau

    HI
    Before executing the programe RFSEPA02 ask your ABAP person to convert the programe to Zprograme as below so that this problem will solve you
    *ZFI_OPEN_ITEM_MANAGE-TO APPLY OPEN ITEM MANAGE TICK
    *& Report  ZFI_OPEN_ITEM_MANAGE
    REPORT  ZFI_OPEN_ITEM_MANAGE MESSAGE-ID FH LINE-SIZE 80.
    THIS IS NOT A STANDARD PROGRAM.
    IT IS ONLY INCLUDED FOR CONVENIENCE IN CASE IT WILL BE NEEDED.
    ONLY USE IT AFTER CONSULTING WITH SAP. S6DK909852
    *REPORT RFSEPA02 MESSAGE-ID FH LINE-SIZE 80.
    INCLUDE FSACHCDF.
    INCLUDE FSACHCDV.
    TABLES: BSIS,
            BSAS,
            BSEG,
            BKPF,
            GLT0,
            T001.
    DATA: BEGIN OF T_BSXX OCCURS 100.
            INCLUDE STRUCTURE BSIS.
    DATA: END OF T_BSXX.
    DATA: BEGIN OF T_LISTE OCCURS 300,
            GJAHR    LIKE BKPF-GJAHR,
            BELNR    LIKE BKPF-BELNR,
            SORT     TYPE I,
            TABLE(4) TYPE C,
            TYPE     TYPE C,
            OK       TYPE C,
          END OF T_LISTE.
    DATA: D_MAX         LIKE SY-TFILL VALUE '100',
          D_BELNR       LIKE BSEG-BELNR,
        D_TFILL       LIKE SY-TFILL.        "<<<< DELETE - NOTE 70203
          D_TFILL       LIKE SY-TFILL,     "<<<< INSERT - NOTE 70203
          D_STORNO      TYPE C.            "<<<< INSERT - NOTE 70203
    DATA: BALANCE_ITEMS   LIKE GLT0-HSL01,
          BALANCE_ACCOUNT LIKE GLT0-HSL01.
    *>>>> BEGIN OF INSERTION - NOTE 66156 <<<<
    DATA: XGLEDTAB LIKE GLEDTAB OCCURS 1 WITH HEADER LINE.
    DATA: BEGIN OF BK_METHODE,
            HWAE1 LIKE T001-WAERS,
            HWAE2 LIKE T001-WAERS,
            HWAE3 LIKE T001-WAERS,
            CURT1 LIKE X001-CURT2,
            CURT2 LIKE X001-CURT2,
            CURT3 LIKE X001-CURT2,
          END OF BK_METHODE.
    DATA: BEGIN OF T_BALANCE_ITEMS_HW OCCURS 1,
            WAERS1 LIKE T001-WAERS,
            VALUE1 LIKE GLT0-HSLVT,
            WAERS2 LIKE T001-WAERS,
            VALUE2 LIKE GLT0-HSLVT,
            WAERS3 LIKE T001-WAERS,
            VALUE3 LIKE GLT0-HSLVT,
          END OF T_BALANCE_ITEMS_HW.
    DATA: BEGIN OF T_BALANCE_ACCOUNT_HW OCCURS 1,
            WAERS1 LIKE T001-WAERS,
            VALUE1 LIKE GLT0-HSLVT,
            WAERS2 LIKE T001-WAERS,
            VALUE2 LIKE GLT0-HSLVT,
            WAERS3 LIKE T001-WAERS,
            VALUE3 LIKE GLT0-HSLVT,
          END OF T_BALANCE_ACCOUNT_HW.
    DATA: BEGIN OF T_BALANCE_ITEMS_TW OCCURS 1,
            WAERS LIKE GLT0-RTCUR,
            VALUE LIKE GLT0-TSLVT,
          END OF T_BALANCE_ITEMS_TW.
    DATA: BEGIN OF T_BALANCE_ACCOUNT_TW OCCURS 10,
            WAERS LIKE GLT0-RTCUR,
            VALUE LIKE GLT0-TSLVT,
          END OF T_BALANCE_ACCOUNT_TW.
    *>>>> END OF INSERTION - NOTE 66156 <<<<
    DATA: NUM_BSEG_SELECT LIKE SY-TFILL,
          NUM_BSEG_UPDATE LIKE SY-TFILL,
          NUM_BSIS_INSERT LIKE SY-TFILL,
          NUM_BSIS_SELECT LIKE SY-TFILL,
          NUM_BSIS_UPDATE LIKE SY-TFILL,
          NUM_BSAS_INSERT LIKE SY-TFILL,
          NUM_BSAS_SELECT LIKE SY-TFILL,
          NUM_BSAS_UPDATE LIKE SY-TFILL.
    CONSTANTS: CHAR_I     TYPE C VALUE 'I',
               CHAR_S     TYPE C VALUE 'S',
               CHAR_U     TYPE C VALUE 'U'.
    *PARAMETER:     P_BUKRS  LIKE BSEG-BUKRS OBLIGATORY.
                                           "<<<< DELETE NOTE - 62751
    *PARAMETER:     P_SAKNR  LIKE BSEG-HKONT OBLIGATORY.
                                           "<<<< DELETE NOTE - 62751
    *>>>> BEGIN OF INSERTION - NOTE 62751 <<<<
    PARAMETERS:     P_BUKRS  LIKE BKPF-BUKRS OBLIGATORY.
    PARAMETERS:     P_SAKNR  LIKE SKA1-SAKNR OBLIGATORY
                                      MATCHCODE OBJECT SAKO.
    *>>>> END OF INSERTION - NOTE 62751 <<<<
    SELECT-OPTIONS P_BELNR  FOR  BSEG-BELNR.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-B01.
    PARAMETERS:    P_LISTE  AS CHECKBOX DEFAULT 'X'.    " list protocol on
    SELECTION-SCREEN END OF BLOCK B01.
    INITIALIZATION.
      CALL FUNCTION 'POPUP_DISPLAY_TEXT'
           EXPORTING
                POPUP_TITLE    = ' '
                TEXT_OBJECT    = 'RFSEPA02'
           EXCEPTIONS
                TEXT_NOT_FOUND = 1
                OTHERS         = 2.
    *{   DELETE         DMUK903910                                        1
    LEAVE PROGRAM.
    *}   DELETE
    AT SELECTION-SCREEN ON P_SAKNR.
      PERFORM CHECK_ACCOUNT.               " locked for posting?
      PERFORM CHECK_ACCOUNT2.              "<<<< INSERT - NOTE 66156
    PERFORM ENQUEUE_ACCOUNT.             "<<<< DELETE - NOTE 65191
    START-OF-SELECTION.
      PERFORM ENQUEUE_ACCOUNT.             "<<<< INSERT - NOTE 65191
      PERFORM CHECK_AUTHORITY_SKA1_BUK.
      PERFORM CHECK_AUTHORITY_SKA1_BES.
    PERFORM CHECK_ACCOUNT_BALANCE.       "<<<< DELETE - NOTE 66156
      PERFORM CHECK_ACCOUNT_BALANCE_2.     "<<<< INSERT - NOTE 66156
    *--- BSIS -
      CLEAR D_BELNR.
      CLEAR T_LISTE. REFRESH T_LISTE.
      CLEAR T_BSXX.  REFRESH T_BSXX.
      DO.
        PERFORM SELECT_ITEMS USING 'BSIS' D_TFILL.
        IF D_TFILL EQ 0.
          EXIT.
        ENDIF.
        LOOP AT T_BSXX.
          PERFORM BKPF_UPDATE.             "<<<< INSERT - NOTE 70203
          PERFORM BSEG_UPDATE.
          PERFORM BSXX_UPDATE USING 'BSIS'.
        ENDLOOP.
        PERFORM WRITE_LIST_PROTOCOL.
        COMMIT WORK.
      ENDDO.
    *--- BSAS -
      CLEAR D_BELNR.
      CLEAR T_LISTE. REFRESH T_LISTE.
      CLEAR T_BSXX.  REFRESH T_BSXX.
      DO.
        PERFORM SELECT_ITEMS USING 'BSAS' SY-TFILL.
        IF SY-TFILL EQ 0.
          EXIT.
        ENDIF.
        LOOP AT T_BSXX.
          PERFORM BSEG_UPDATE.
          PERFORM BSXX_UPDATE USING 'BSAS'.
        ENDLOOP.
        PERFORM WRITE_LIST_PROTOCOL.
        COMMIT WORK.
      ENDDO.
      PERFORM WRITE_PROTOCOL.
    END-OF-SELECTION.
      PERFORM CHANGE_ACCOUNT.
      PERFORM DEQUEUE_ACCOUNT.
    TOP-OF-PAGE.
      ULINE.
      WRITE:/   SY-VLINE,
             2  TEXT-001,
             25 P_SAKNR INTENSIFIED OFF,
             80 SY-VLINE.
      WRITE:/   SY-VLINE,
             2  TEXT-002,
             25 P_BUKRS INTENSIFIED OFF,
             80 SY-VLINE.
      ULINE.
      IF P_LISTE = 'X'.
        WRITE:/          SY-VLINE,
                  2(10)  TEXT-S01 COLOR COL_HEADING,
                  12     SY-VLINE,
                  13(4)  TEXT-S02 COLOR COL_HEADING,
                  17     SY-VLINE,
                  18(62) TEXT-S03 COLOR COL_HEADING,
                  80     SY-VLINE.
      ENDIF.
    *&      Form  SELECT_ITEMS
    FORM SELECT_ITEMS USING TABLE TYPE C
                            FILL  LIKE SY-TFILL.
      SELECT * FROM (TABLE) INTO TABLE T_BSXX
                            UP TO D_MAX ROWS
                           WHERE BUKRS EQ P_BUKRS
                             AND HKONT EQ P_SAKNR
                             AND BELNR IN P_BELNR
                             AND XOPVW EQ SPACE.
      FILL = SY-DBCNT.
    *--- PROTOCOL -
      LOOP AT T_BSXX.
        PERFORM SAVE_PROTOCOL USING T_BSXX-BELNR T_BSXX-GJAHR
                                    1 TABLE CHAR_S 1.
      ENDLOOP.
      SORT T_BSXX BY MANDT BUKRS BELNR GJAHR.
    ENDFORM.                               " SELECT_ITEMS
    *&      Form  BSEG_UPDATE
    FORM BSEG_UPDATE.
      SELECT SINGLE * FROM BSEG WHERE BUKRS = T_BSXX-BUKRS
                                AND   GJAHR = T_BSXX-GJAHR
                                AND   BELNR = T_BSXX-BELNR
                                AND   BUZEI = T_BSXX-BUZEI.
      IF BSEG-KTOSL = 'MVA' OR BSEG-KTOSL = 'VVA'.
        MESSAGE A145(FH) WITH BSEG-HKONT.
      ENDIF.
      IF BSEG-KOART = 'M'.
        MESSAGE A144(FH) WITH P_SAKNR BSEG-BSCHL.
      ENDIF.
      UPDATE BSEG SET XOPVW = 'X'
                WHERE BUKRS EQ T_BSXX-BUKRS
                  AND GJAHR EQ T_BSXX-GJAHR
                  AND BELNR EQ T_BSXX-BELNR
                  AND BUZEI EQ T_BSXX-BUZEI.
    *--- PROTOCOL -
      PERFORM SAVE_PROTOCOL USING T_BSXX-BELNR T_BSXX-GJAHR
                                  2 'BSEG' CHAR_U SY-DBCNT.
    ENDFORM.                               " BSEG_UPDATE
    *&      Form  BSIS_UPDATE
    FORM BSXX_UPDATE USING TABLE TYPE C.
      T_BSXX-XOPVW = 'X'.
      IF D_STORNO = 'X' AND TABLE = 'BSIS'."<<<< INSERT - NOTE 70203
        T_BSXX-XSTOV = SPACE.              "<<<< INSERT - NOTE 70203
      ENDIF.                               "<<<< INSERT - NOTE 70203
      UPDATE (TABLE) FROM T_BSXX.
    *--- PROTOCOL -
      PERFORM SAVE_PROTOCOL USING T_BSXX-BELNR T_BSXX-GJAHR
                                  1 TABLE CHAR_U SY-DBCNT.
    ENDFORM.                               " BSIS_UPDATE
    *&      Form  CHECK_ACCOUNT_BALANCE
    FORM CHECK_ACCOUNT_BALANCE.
      DATA:   D_GJAHR LIKE BSEG-GJAHR.
    Account balance
      PERFORM READ_T001 USING P_BUKRS.
      PERFORM READ_CURRENT_YEAR CHANGING D_GJAHR.
      PERFORM READ_GLDB USING P_BUKRS P_SAKNR D_GJAHR.
      PERFORM READ_BSIS USING P_BUKRS P_SAKNR.
      IF BALANCE_ITEMS NE BALANCE_ACCOUNT.
        MESSAGE E099.
      Summe der Einzelposten stimmt nicht mit Kontensaldo überein. ->
      ENDIF.
    ENDFORM.                               " CHECK_ACCOUNT_BALANCE
    *&      Form  READ_T001
    FORM READ_T001 USING BUKRS LIKE T001-BUKRS.
      SELECT SINGLE * FROM T001 WHERE BUKRS = BUKRS.
      IF SY-SUBRC <> 0.
        MESSAGE E001 WITH BUKRS.
      ENDIF.
    ENDFORM.                               " READ_T001
    *&      Form  READ_CURRENT_YEAR
    FORM READ_CURRENT_YEAR CHANGING GJAHR LIKE T009B-BDATJ.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
           EXPORTING
                I_DATE         = SY-DATUM
                I_PERIV        = T001-PERIV
           IMPORTING
                E_GJAHR        = GJAHR
           EXCEPTIONS
                T009_NOTFOUND  = 1
                INPUT_FALSE    = 1
                T009B_NOTFOUND = 1.
    ENDFORM.                               " READ_CURRENT_YEAR
    *&      Form  READ_GLDB
    FORM READ_GLDB USING XBUKRS LIKE GLT0-BUKRS
                         XSAKNR LIKE GLT0-RACCT
                         XGJAHR LIKE GLT0-RYEAR.
      SELECT * FROM GLT0
               WHERE RLDNR = '00'
               AND   RRCTY = '0'
               AND   RVERS = '001'
               AND   BUKRS = XBUKRS
               AND   RYEAR = XGJAHR
               AND   RACCT = XSAKNR.
        PERFORM CALCULATE_BALANCE.
      ENDSELECT.
    ENDFORM.                               " READ_GLDB
          FORM CALCULATE_BALANCE                                        *
    FORM CALCULATE_BALANCE.
      DATA: BALANCE  LIKE GLT0-TSL01.
      BALANCE_ACCOUNT = BALANCE_ACCOUNT + GLT0-HSLVT.
      DO GLT0-RPMAX TIMES
         VARYING BALANCE FROM GLT0-HSL01 NEXT GLT0-HSL02.
        BALANCE_ACCOUNT = BALANCE_ACCOUNT + BALANCE.
      ENDDO.
    ENDFORM.                               " CALCULATE_BALANCE
    *&      Form  READ_BSIS
    FORM READ_BSIS USING BUKRS LIKE BSIS-BUKRS
                         SAKNR LIKE BSIS-HKONT.
      SELECT * FROM  BSIS
             WHERE  BUKRS = BUKRS
             AND    HKONT = SAKNR.
        IF BSIS-SHKZG = 'S'.
          BALANCE_ITEMS = BALANCE_ITEMS  + BSIS-DMBTR.
        ELSE.
          BALANCE_ITEMS = BALANCE_ITEMS  - BSIS-DMBTR.
        ENDIF.
      ENDSELECT.
    ENDFORM.                               " READ_BSIS
    *&      Form  CHANGE_ACCOUNT
    FORM CHANGE_ACCOUNT.
      SKB1       = *SKB1.
      SKB1-XOPVW = 'X'.
      OBJECTID    = T001-KTOPL.
      OBJECTID+4  = SKB1-SAKNR.
      OBJECTID+14 = SKB1-BUKRS.
      UPD_SKB1    = 'U'.
      UTIME       = SY-UZEIT.
      UDATE       = SY-DATUM.
      USERNAME    = SY-UNAME.
      PERFORM CD_CALL_SACH.
      CALL FUNCTION 'GL_ACCOUNT_IN_COMPANY_UPDATE'
           EXPORTING
                I_SKB1 = SKB1.
      COMMIT WORK.
    ENDFORM.                               " CHANGE_ACCOUNT
    *&      Form  ENQUEUE_ACCOUNT
    FORM ENQUEUE_ACCOUNT.
      CALL FUNCTION 'ENQUEUE_EFSKB1'
           EXPORTING
                BUKRS          = P_BUKRS
                SAKNR          = P_SAKNR
           EXCEPTIONS
                FOREIGN_LOCK   = 1
                SYSTEM_FAILURE = 2.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE E042 WITH P_SAKNR P_BUKRS.
        WHEN 2.
          MESSAGE E038 WITH P_SAKNR P_BUKRS.
      ENDCASE.
    ENDFORM.                               " ENQUEUE_ACCOUNT
    *&      Form  DEQUEUE_ACCOUNT
    FORM DEQUEUE_ACCOUNT.
      CALL FUNCTION 'DEQUEUE_EFSKB1'
           EXPORTING
                BUKRS          = P_BUKRS
                SAKNR          = P_SAKNR
           EXCEPTIONS
                SYSTEM_FAILURE = 1.
    ENDFORM.                               " DEQUEUE_ACCOUNT
          FORM WRITE_LIST_PROTOCOL                                      *
          writes list protocol                                          *
    FORM WRITE_LIST_PROTOCOL.
      DATA: TEXT(62)   TYPE C,
            SAVE_BELNR LIKE BKPF-BELNR.
      DESCRIBE TABLE T_LISTE LINES SY-TFILL.
      CHECK P_LISTE = 'X'.
      CHECK SY-TFILL > 0.
      SORT T_LISTE BY GJAHR BELNR SORT TYPE.
      LOOP AT T_LISTE.
        CHECK T_LISTE-OK = 1.
        CASE T_LISTE-TABLE.
          WHEN 'BSEG'.
            CASE T_LISTE-TYPE.
              WHEN CHAR_S.
                TEXT = TEXT-BE1.
              WHEN CHAR_U.
                TEXT = TEXT-BE2.
            ENDCASE.
          WHEN 'BSIS'.
            CASE T_LISTE-TYPE.
              WHEN CHAR_S.
                TEXT = TEXT-XX1.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_U.
                TEXT = TEXT-XX2.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_I.
                TEXT = TEXT-XX3.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
            ENDCASE.
          WHEN 'BSAS'.
            CASE T_LISTE-TYPE.
              WHEN CHAR_S.
                TEXT = TEXT-XX1.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_U.
                TEXT = TEXT-XX2.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_I.
                TEXT = TEXT-XX3.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
            ENDCASE.
        ENDCASE.
        AT NEW BELNR.
          ULINE.
          WRITE:/       SY-VLINE,
                  2     T_LISTE-BELNR COLOR COL_KEY,
                  12    SY-VLINE,
                  13    T_LISTE-GJAHR COLOR COL_KEY,
                  17    SY-VLINE.
        ENDAT.
        IF SAVE_BELNR <> T_LISTE-BELNR.
          WRITE: 18(62) TEXT COLOR COL_NORMAL INTENSIFIED OFF,
                    80  SY-VLINE.
          SAVE_BELNR = T_LISTE-BELNR.
        ELSE.
          WRITE:/       SY-VLINE,
                 12     SY-VLINE,
                 17     SY-VLINE,
                 18(62) TEXT COLOR COL_NORMAL INTENSIFIED OFF,
                 80     SY-VLINE.
        ENDIF.
      ENDLOOP.
      ULINE.
    ENDFORM.                               " WRITE_LIST_PROTOCOL
          FORM WRITE_PROTOCOL                                           *
          writes normal protocol                                        *
    FORM WRITE_PROTOCOL.
      DATA: TEXT(62)   TYPE C.
    *- selected items-----
      IF NOT ( NUM_BSIS_SELECT = 0  ).
        TEXT = TEXT-NX1.
        REPLACE '&TAB' WITH 'BSIS' INTO TEXT.
        WRITE:/        SY-VLINE,
                2(58)  TEXT COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSIS_SELECT COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      IF NOT ( NUM_BSAS_SELECT = 0 ).
        TEXT = TEXT-NX1.
        REPLACE '&TAB' WITH 'BSAS' INTO TEXT.
        WRITE:/        SY-VLINE,
                2(58)  TEXT COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSAS_SELECT COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      IF NOT ( NUM_BSEG_SELECT = 0 ).
        WRITE:/       SY-VLINE,
                2(58) TEXT-NB1 COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSEG_SELECT COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
    *- changed items-----
      IF NUM_BSIS_UPDATE > 0.
        TEXT = TEXT-NX2.
        REPLACE '&TAB' WITH 'BSIS' INTO TEXT.
        WRITE:/        SY-VLINE,
                 2(58) TEXT COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSIS_UPDATE COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      IF NUM_BSAS_UPDATE > 0.
        TEXT = TEXT-NX2.
        REPLACE '&TAB' WITH 'BSAS' INTO TEXT.
        WRITE:/        SY-VLINE,
                 2(58) TEXT COLOR COL_KEY INTENSIFIED ON,
                 60(1)  SY-VLINE,
                 61(19) NUM_BSAS_UPDATE COLOR COL_NORMAL INTENSIFIED OFF,
                 80     SY-VLINE.
      ENDIF.
      IF NUM_BSEG_UPDATE > 0.
        WRITE:/        SY-VLINE,
                 2(58) TEXT-NB2 COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSEG_UPDATE COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      ULINE.
      ADD NUM_BSIS_SELECT TO NUM_BSAS_SELECT.
      IF NUM_BSAS_SELECT = 0.
        ULINE.
        WRITE:/       SY-VLINE,
                2(78) TEXT-NSB COLOR COL_NEGATIVE,
                80    SY-VLINE.
        ULINE.
      ENDIF.
    ENDFORM.
    *>>>> BEGIN OF INSERTION - NOTE 66156
    *&      Form  CHECK_ACCOUNT_BALANCE_2
    FORM CHECK_ACCOUNT_BALANCE_2.
      DATA:   D_GJAHR LIKE BSEG-GJAHR.
    Account balance
      PERFORM READ_T001 USING P_BUKRS.
      PERFORM READ_CURRENT_YEAR CHANGING D_GJAHR.
      PERFORM READ_CURRENCY_T001A USING P_BUKRS.
    Transaktionswährung & Hauswährung
      PERFORM READ_GLDB_2 USING P_BUKRS P_SAKNR D_GJAHR.
      PERFORM READ_BSIS_2 USING P_BUKRS P_SAKNR.
    BEGIN OF INSERTION
      LOOP AT T_BALANCE_ITEMS_TW WHERE VALUE = 0.
        DELETE T_BALANCE_ITEMS_TW.
      ENDLOOP.
      LOOP AT T_BALANCE_ACCOUNT_TW WHERE VALUE = 0.
        DELETE T_BALANCE_ACCOUNT_TW.
      ENDLOOP.
      LOOP AT T_BALANCE_ITEMS_HW WHERE VALUE1 = 0
                                 AND   VALUE2 = 0
                                 AND   VALUE3 = 0.
        DELETE T_BALANCE_ITEMS_HW.
      ENDLOOP.
      LOOP AT T_BALANCE_ACCOUNT_HW WHERE VALUE1 = 0
                                   AND   VALUE2 = 0
                                   AND   VALUE3 = 0.
        DELETE T_BALANCE_ACCOUNT_HW.
      ENDLOOP.
    END OF INSERTION
      IF T_BALANCE_ITEMS_HW[] <> T_BALANCE_ACCOUNT_HW[] OR
         T_BALANCE_ITEMS_TW[] <> T_BALANCE_ACCOUNT_TW[].
        PERFORM DEQUEUE_ACCOUNT.
        MESSAGE E099.
      Summe der Einzelposten stimmt nicht mit Kontensaldo überein. ->
      ENDIF.
    ENDFORM.                               " CHECK_ACCOUNT_BALANCE_2
    *&      Form  READ_GLDB_2
    FORM READ_GLDB_2 USING XBUKRS LIKE GLT0-BUKRS
                           XSAKNR LIKE GLT0-RACCT
                           XGJAHR LIKE GLT0-RYEAR.
      DATA: TYPE(3) TYPE C,
            CURT    LIKE BK_METHODE-CURT1.
      DATA: RESULT LIKE T_BALANCE_ACCOUNT_TW OCCURS 1 WITH HEADER LINE.
      CLEAR T_BALANCE_ACCOUNT_TW.
      CLEAR T_BALANCE_ACCOUNT_HW.
    Transaktionswährung
      CLEAR RESULT. REFRESH RESULT.
      CLEAR XGLEDTAB. REFRESH XGLEDTAB.
      TYPE = 'TW'.
      XGLEDTAB-RLDNR      = '00'.
      APPEND XGLEDTAB.
      PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                                  USING XBUKRS XSAKNR XGJAHR TYPE.
      LOOP AT RESULT.
        T_BALANCE_ACCOUNT_TW-WAERS = RESULT-WAERS.
        T_BALANCE_ACCOUNT_TW-VALUE = RESULT-VALUE.
        APPEND T_BALANCE_ACCOUNT_TW.
      ENDLOOP.
    1. Hauswährung
      CLEAR RESULT. REFRESH RESULT.
      CLEAR XGLEDTAB. REFRESH XGLEDTAB.
      TYPE = 'HW1'.
      CURT = BK_METHODE-CURT1.
      XGLEDTAB-RLDNR      = '00'.
      APPEND XGLEDTAB.
      PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                                  USING XBUKRS XSAKNR XGJAHR TYPE.
      READ TABLE RESULT INDEX 1.
      T_BALANCE_ACCOUNT_HW-WAERS1 = RESULT-WAERS.
      T_BALANCE_ACCOUNT_HW-VALUE1 = RESULT-VALUE.
    *2. Hauswährung
      IF BK_METHODE-CURT2 <> SPACE.
        CLEAR RESULT. REFRESH RESULT.
        CLEAR XGLEDTAB. REFRESH XGLEDTAB.
        TYPE = 'HW2'.
        CURT = BK_METHODE-CURT2.
        IF CURT = '30'.
          XGLEDTAB-RLDNR      = '00'.
          XGLEDTAB-CURRNUMBER = '3'.
        ELSE.
          CALL FUNCTION 'G_GIVE_LEDGERS_FOR_GLT0'
               EXPORTING
                    BUKRS  = XBUKRS
                    CURTP  = CURT
               TABLES
                    LEDTAB = XGLEDTAB.
          DESCRIBE TABLE XGLEDTAB LINES SY-TFILL.
          IF SY-TFILL GT 1. SORT XGLEDTAB. ENDIF.
          READ TABLE XGLEDTAB INDEX 1.
        ENDIF.
        PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                                    USING XBUKRS XSAKNR XGJAHR TYPE.
        READ TABLE RESULT INDEX 1.
        T_BALANCE_ACCOUNT_HW-WAERS2 = RESULT-WAERS.
        T_BALANCE_ACCOUNT_HW-VALUE2 = RESULT-VALUE.
      ENDIF.
      IF BK_METHODE-CURT3 <> SPACE.
    *3. Hauswährung
        CLEAR RESULT. REFRESH RESULT.
        CLEAR XGLEDTAB. REFRESH XGLEDTAB.
        TYPE = 'HW3'.
        CURT = BK_METHODE-CURT3.
        IF CURT = '30'.
          XGLEDTAB-RLDNR      = '00'.
          XGLEDTAB-CURRNUMBER = '3'.
        ELSE.
          CALL FUNCTION 'G_GIVE_LEDGERS_FOR_GLT0'
               EXPORTING
                    BUKRS  = XBUKRS
                    CURTP  = CURT
               TABLES
                    LEDTAB = XGLEDTAB.
          DESCRIBE TABLE XGLEDTAB LINES SY-TFILL.
          IF SY-TFILL GT 1. SORT XGLEDTAB. ENDIF.
          READ TABLE XGLEDTAB INDEX 1.
        ENDIF.
        PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                             USING XBUKRS XSAKNR XGJAHR TYPE.
        READ TABLE RESULT INDEX 1.
        T_BALANCE_ACCOUNT_HW-WAERS3 = RESULT-WAERS.
        T_BALANCE_ACCOUNT_HW-VALUE3 = RESULT-VALUE.
      ENDIF.
      APPEND T_BALANCE_ACCOUNT_HW.
      SORT T_BALANCE_ACCOUNT_TW.
    ENDFORM.                               " READ_GLDB_2
    *&      Form  READ_BSIS_2
    FORM READ_BSIS_2 USING BUKRS LIKE BSIS-BUKRS
                           SAKNR LIKE BSIS-HKONT.
      CLEAR T_BALANCE_ITEMS_HW. REFRESH T_BALANCE_ITEMS_HW.
      CLEAR T_BALANCE_ITEMS_TW. REFRESH T_BALANCE_ITEMS_TW.
      SELECT * FROM  BSIS
             WHERE  BUKRS = BUKRS
             AND    HKONT = SAKNR.
        IF ( BSIS-PSWSL IS INITIAL OR BSIS-PSWBT IS INITIAL ) AND
             BSIS-XARCH NE 'X'.
          SELECT SINGLE * FROM BSEG WHERE BUKRS = BSIS-BUKRS
                                    AND   BELNR = BSIS-BELNR
                                    AND   GJAHR = BSIS-GJAHR
                                    AND   BUZEI = BSIS-BUZEI.
          IF SY-SUBRC <> 0.
            MESSAGE A500(FE) WITH 'BSEG nicht gefunden'.        "#EC NOTEXT
          ENDIF.
          BSIS-PSWSL = BSEG-PSWSL.
          BSIS-PSWBT = BSEG-PSWBT.
        ENDIF.
        IF BSIS-SHKZG = 'S'.
          T_BALANCE_ITEMS_HW-WAERS1 = BK_METHODE-HWAE1.
          T_BALANCE_ITEMS_HW-WAERS2 = BK_METHODE-HWAE2.
          T_BALANCE_ITEMS_HW-WAERS3 = BK_METHODE-HWAE3.
          T_BALANCE_ITEMS_HW-VALUE1 = BSIS-DMBTR.
          T_BALANCE_ITEMS_HW-VALUE2 = BSIS-DMBE2.
          T_BALANCE_ITEMS_HW-VALUE3 = BSIS-DMBE3.
          T_BALANCE_ITEMS_TW-WAERS  = BSIS-PSWSL.
          T_BALANCE_ITEMS_TW-VALUE  = BSIS-PSWBT.
        ELSE.
          T_BALANCE_ITEMS_HW-WAERS1 = BK_METHODE-HWAE1.
          T_BALANCE_ITEMS_HW-WAERS2 = BK_METHODE-HWAE2.
          T_BALANCE_ITEMS_HW-WAERS3 = BK_METHODE-HWAE3.
          T_BALANCE_ITEMS_HW-VALUE1 = - BSIS-DMBTR.
          T_BALANCE_ITEMS_HW-VALUE2 = - BSIS-DMBE2.
          T_BALANCE_ITEMS_HW-VALUE3 = - BSIS-DMBE3.
          T_BALANCE_ITEMS_TW-WAERS  = BSIS-PSWSL.
          T_BALANCE_ITEMS_TW-VALUE  = - BSIS-PSWBT.
        ENDIF.
        COLLECT T_BALANCE_ITEMS_HW.
        COLLECT T_BALANCE_ITEMS_TW.
      ENDSELECT.
      SORT T_BALANCE_ITEMS_TW.
    ENDFORM.                               " READ_BSIS_2
    *&      Form  CHECK_ACCOUNT2
          Check some things for XOPVW
    FORM CHECK_ACCOUNT2.
      TABLES: TBSL, T030.
      DATA: CHECK_BSCHL LIKE BSIS-BSCHL OCCURS 10 WITH HEADER LINE.
    Belege schon archiviert?
      SELECT * FROM BSIS WHERE BUKRS EQ P_BUKRS
                         AND   HKONT EQ P_SAKNR
                         AND   XARCH EQ 'X'.
        MESSAGE E146.
       Es sind schon Belege archiviert worden. Änderung ist nicht möglich
      ENDSELECT.
    Vorgangsschlüssel MVA und VVA sind nicht erlaubt.
      SELECT * FROM T030 WHERE KTOPL = T001-KTOPL
                          AND  ( KTOSL = 'MVA' OR KTOSL = 'VVA' ).
        IF T030-KONTS = P_SAKNR OR T030-KONTH = P_SAKNR.
          MESSAGE E145(FH) WITH P_SAKNR.
       Konto wird in Kontenfindung für Vorgang MVA oder VVA verwendet
        ENDIF.
      ENDSELECT.
    Buchungsschlüsseln dürfen nicht für KOART = M sein
      SELECT BSCHL INTO TABLE CHECK_BSCHL FROM BSIS
                                          WHERE BUKRS EQ P_BUKRS
                                          AND   HKONT EQ P_SAKNR.
      SORT CHECK_BSCHL.
      DELETE ADJACENT DUPLICATES FROM CHECK_BSCHL.
      LOOP AT CHECK_BSCHL.
        SELECT SINGLE KOART INTO TBSL-KOART FROM TBSL
                                            WHERE BSCHL = CHECK_BSCHL.
        IF SY-SUBRC NE 0.
          MESSAGE E143(FH) WITH CHECK_BSCHL.
         Verwendeter Buchungsschlüssel & ist nicht mehr in der Kontenfindu
        ELSEIF TBSL-KOART = 'M'.
          MESSAGE E144(FH) WITH P_SAKNR CHECK_BSCHL.
          Konto & kann nicht geändert werden -> Langtext
        ENDIF.
      ENDLOOP.
    ENDFORM.                               " CHECK_ACCOUNT2
    *>>>> END OF INSERTION - NOTE 66156 <<<<
    INCLUDE FSACHCDC.
    INCLUDE EPA00F00.
    *&      Form  READ_CURRENCY_T001A
    FORM READ_CURRENCY_T001A USING P_BUKRS LIKE T001-BUKRS.
      TABLES: X001.
      CALL FUNCTION 'FI_CURRENCY_INFORMATION'
           EXPORTING
                I_BUKRS                = P_BUKRS
           IMPORTING
                E_X001                 = X001
           EXCEPTIONS
                CURRENCY_2_NOT_DEFINED = 1
                CURRENCY_3_NOT_DEFINED = 2
                OTHERS                 = 6.
      BK_METHODE-HWAE1 = T001-WAERS.
      BK_METHODE-HWAE2 = X001-HWAE2.
      BK_METHODE-HWAE3 = X001-HWAE3.
      BK_METHODE-CURT1 = '10'.
      BK_METHODE-CURT2 = X001-CURT2.
      BK_METHODE-CURT3 = X001-CURT3.
    ENDFORM.                               " READ_CURRENCY_T001A
    *&      Form  READ_LEDGER
    FORM READ_LEDGER TABLES   RESULT      STRUCTURE T_BALANCE_ACCOUNT_TW
                              XGLEDTAB    STRUCTURE GLEDTAB
                     USING    XBUKRS      LIKE      GLT0-BUKRS
                              XSAKNR      LIKE      GLT0-RACCT
                              XGJAHR      LIKE      GLT0-RYEAR
                              TYPE        TYPE      C.
      DATA: BALANCE LIKE GLT0-TSLVT.
      DATA:    I_GJAHR     LIKE GLT0-RYEAR.
      STATICS: I_RECURSIV  TYPE I.
      CHECK I_RECURSIV < 2.
      CLEAR RESULT. REFRESH RESULT.
      READ TABLE XGLEDTAB INDEX 1.
      SELECT * FROM GLT0
               WHERE RLDNR = XGLEDTAB-RLDNR
               AND   RRCTY = '0'
               AND   RVERS = '001'
               AND   BUKRS = XBUKRS
               AND   RYEAR = XGJAHR
               AND   RACCT = XSAKNR.
        CASE TYPE.
          WHEN 'TW'.
            RESULT-WAERS = GLT0-RTCUR.
            RESULT-VALUE = GLT0-TSLVT.
            DO GLT0-RPMAX TIMES
               VARYING BALANCE FROM GLT0-TSL01 NEXT GLT0-TSL02.
              RESULT-VALUE = RESULT-VALUE + BALANCE.
            ENDDO.
          WHEN 'HW1'.
            RESULT-WAERS = BK_METHODE-HWAE1.
            RESULT-VALUE = GLT0-HSLVT.
            DO GLT0-RPMAX TIMES
               VARYING BALANCE FROM GLT0-HSL01 NEXT GLT0-HSL02.
              RESULT-VALUE = RESULT-VALUE + BALANCE.
            ENDDO.
          WHEN 'HW2' OR 'HW3'.
            IF XGLEDTAB-CURRNUMBER = '3'.
              GLT0-HSLVT   = GLT0-KSLVT.
              GLT0-HSL01 = GLT0-KSL01. GLT0-HSL02 = GLT0-KSL02.
              GLT0-HSL03 = GLT0-KSL03. GLT0-HSL04 = GLT0-KSL04.
              GLT0-HSL05 = GLT0-KSL05. GLT0-HSL06 = GLT0-KSL06.
              GLT0-HSL07 = GLT0-KSL07. GLT0-HSL08 = GLT0-KSL08.
              GLT0-HSL09 = GLT0-KSL09. GLT0-HSL10 = GLT0-KSL10.
              GLT0-HSL11 = GLT0-KSL11. GLT0-HSL12 = GLT0-KSL12.
              GLT0-HSL13 = GLT0-KSL13. GLT0-HSL14 = GLT0-KSL14.
              GLT0-HSL15 = GLT0-KSL15. GLT0-HSL16 = GLT0-KSL16.
            ENDIF.
            IF TYPE = 'HW2'.
              RESULT-WAERS = BK_METHODE-HWAE2.
            ELSE.
              RESULT-WAERS = BK_METHODE-HWAE3.
            ENDIF.
            RESULT-VALUE = GLT0-HSLVT.
            DO GLT0-RPMAX TIMES
               VARYING BALANCE FROM GLT0-HSL01 NEXT GLT0-HSL02.
              RESULT-VALUE = RESULT-VALUE + BALANCE.
            ENDDO.
        ENDCASE.
        COLLECT RESULT.
      ENDSELECT.
      IF SY-SUBRC = 0.
        CLEAR I_RECURSIV.
      ELSE.
        ADD 1 TO I_RECURSIV.
        I_GJAHR = XGJAHR - 1.
        PERFORM READ_LEDGER TABLES  RESULT
                                    XGLEDTAB
                            USING   XBUKRS
                                    XSAKNR
                                    I_GJAHR
                                    TYPE.
      ENDIF.
    ENDFORM.                               " READ_LEDGER
    BEGIN OF INSERTION - NOTE 70203
    *&      Form  BKPF_UPDATE                   P30K137533
    FORM BKPF_UPDATE.
    *--- Stornovormerkung löschen? -
      CLEAR D_STORNO.
      SELECT SINGLE * FROM BKPF WHERE BUKRS = T_BSXX-BUKRS
                                AND   GJAHR = T_BSXX-GJAHR
                                AND   BELNR = T_BSXX-BELNR.
      IF BKPF-STBLG NE SPACE.
        D_STORNO = 'X'.
      ENDIF.
    ENDFORM.                               " BKPF_UPDATE
    END OF INSERTION - NOTE 70203
    If you find solution to your answer donot forget to reward points
    Regards

  • FTP in ABAP

    call function 'FTP_CONNECT'
      exporting
        user            = user
        password        = pwd
        host            = host
        rfc_destination = dest
      importing
        handle          = hdl.
    <b>What is Handle ?</b>
    call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = cmd1
          compress      = compress
        tables
          data          = result
        exceptions
          command_error = 1
          tcpip_error   = 2.
      loop at result.
        write at / result-line.
      endloop.
      refresh result.
    <b>What is result? Why do we display it?</b>
    Could some one explain me exception handling. I am new to ABAP and dont quite understand how to call function modules. What does command_error = 1 and tcpip_error = 2 mean?

    <b>Handle</b>
    This handle is a pointer to an instance of FTP that we started  via the FTP_CONNECT. So we get reconnected to the same FTP session with each command we issue.
    <b>Result</b>
    Depend on the comand your issued
    <b>Exception</b>
    Function modlure return an error code (in Abap, look at  ERROR RAISING or RAISE)
    You then check the value returned in sy-subrc.
    <b>Documentation</b>
    Look at this OSS <a href="https://service.sap.com/sap/support/notes/130106">Note 130106 - Using SAPFTP for data transfer</a>
    Look at this Blog <a href="/people/thomas.jung3/blog/2004/11/15/performing-ftp-commands-from-abap FTP Commands From ABAP</a>
    Regards

Maybe you are looking for

  • Enterprise learning/ Learning solution

    Hi all, I am looking for business requirements for the learning solution module. Can anyone share some thoughts and requirements of the same! Regards, Bharat

  • PR to PO conversion - Issue from Org structure

    Dear all I have configured following Org Structure in 4.6C. Plant: z101 is assigned with company code:xxxx another Plant: z201 is assigned with Company code:yyyy and centralised purchase organisation is used. I have created a PR belongs to plant:z101

  • Trying to take the little lock off the song when i drag the song to my desk

    Please help when i drag a song from itunes to my desktop thiers a lock on the top left coner of the song i tryed to put the song on my mp3 but it wont play how do i take the little lock of because my friend does the same but he has no lock on his son

  • Service product replication for test and developement system

    Hi Experts, In our scanario service product is created in production system and later manually created in test and developement system. Is there is any standard function module avilable to replicate the product master data into test and developement

  • Unable to replace the chips that are next to the battery.

    I took out my battery and then removed 2 chips (I guess that is what they're called?) as instructed by the picture in my macbook. Now I am unable to put the chips back in. I know I'm not putting them in properly but don't know what I'm doing wrong. A