Info regarding Target System in clonning Process

Hi all
In the docs in metalink regarding the clonning process, i have enconterd the "Target System".
"Target System", means only the OS of the same platform, or another installation of EBS in the destination machine.
So if i run pre clone steps in the source, i have to copy the EBS folders in the destination machine that has the same OS platform, or that has an EBS installation in which i want to create the source's clone?
Thanks in advance, Soni

"Target System", means only the OS of the same platform, or another installation of EBS in the destination machine.It means the target node (with an OS which is binary compatible with the source node).
So if i run pre clone steps in the source, i have to copy the EBS folders in the destination machine that has the same OS platform, or that has an EBS installation in which i want to create the source's clone?You have to "copy the EBS folders in the destination machine that has the same OS platform". You do not have to install Oracle Apps on the target node, copying the files from the source node should be enough.

Similar Messages

  • Info regarding a system function

    Hi all,
    Can any one explain me what the system function 'C_RSTS_WRITE' does if it is called like this in the program 
    call 'C_RSTS_WRITE'
         ID 'HANDLE' field field1
         ID 'BUFF' field field2
         ID 'RC' field field3
         ID 'ERRMSG' field field4.
    Regards,
    Asha

    CALL - Call a System Function
    Note
    This statement is for internal use only.
    Incompatible changes or further developments may occur at any time without warning or notice.
    Basic form 8
    CALL cfunc.
    Addition:
    ... ID id1 FIELD f1 ... ID idn FIELD fn
    Effect
    Calls the system function cfunc. The relevant function must exist in the file sapactab.h. If you change or recreate a function, you have to compile and link the SAP kernel again. For this, you need the C source code files.
    Normally, external programs should be called by RFC with CALL FUNCTION ... DESTINATION.
    Addition
    ... ID id1 FIELD f1 ... ID idn FIELD fn
    Effect
    Passes fields to the called program by reference. With "ID id1", you specify the name of a formal parameter, and with "FIELD f1" the relevant field from the ABAP/4 program. If a formal parameter expects an internal table, the latter is passed in the form "FIELD tab[]".
    Example
    DATA RESULT(8).
    CALL 'MULTIPLY' ID 'P1' FIELD '9999'
    ID 'P2' FIELD '9999'
    ID 'RES' FIELD RESULT.
    Note
    With some critical C functions, the system automatically performs an authorization check. If the user does not have the appropriate authorization, a runtime error occurs. You can check the authorization with the function module AUTHORITY_CHECK_C_FUNCTION.
    Note
    Runtime errors:
    CALL_C_FUNCTION_NOT_FOUND: Specified system function unknown.
    CALL_C_FUNCTION_NO_AUTHORITY: No authorization to call this C function.
    CALL_SYSTEM-DISABLED: The system function SYSTEM is disabled (with CALL 'SYSTEM').

  • In CIF post processing notable to see target system

    Hi Gurus,
                  I am not able to see target system in CIF post processing.Can any one explain me where did i miss my settings? Please let me know it will be really great help
    Thanks & Regards,
    Kumar

    Hi,
    Check in /SAPAPO/C2 whether Post Processing is active or not.
    For CIF error handling to be active ,setting to be defined under error handling coloumn is
    Post Processing, No splitting of LUW .
    If Strict is defined CIF error handling is not active.( Standard setting )
    This setting applies for the data transfer for APO to R3 and R3 to APO.
    Thanks,
    nandha

  • Trigger Process Chain from Source System into Target System

    Hello...actually in source system BZD, we have a process chain, in the target system BWD, we have another process chain as well. We want to have a process of combining these two process chain together. When the process chain in source system is completed successfully, the system will sent out some sort of signal to start the process chain in BWD. I am not sure how this can be done, I try to use the function module "BP_EVENT_RAISE" in the BZD and when this module is called, it does not start the process chain in BWD after the process chain in BZD is completed. I just wondering am I using the correct method. If will be good if anyone here can help...thanks alot.

    >
    FluffyToffee wrote:
    > Hello...actually in source system BZD, we have a process chain, in the target system BWD, we have another process chain as well. We want to have a process of combining these two process chain together. When the process chain in source system is completed successfully, the system will sent out some sort of signal to start the process chain in BWD. I am not sure how this can be done, I try to use the function module "BP_EVENT_RAISE" in the BZD and when this module is called, it does not start the process chain in BWD after the process chain in BZD is completed. I just wondering am I using the correct method. If will be good if anyone here can help...thanks alot.
    Hi Fluffy,
    Check RFC connection between the two sysems.
    Try using remote process chain process type in the process chain. the fllowing link may help you.
    http://help.sap.com/saphelp_nw70/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    Regards,
    sunmit.

  • Transporting Process Chains-includes the ERROR DTPs in the Target System

    Hello Gurus,
    Iam facing an issue in version NW2004s while transporting the Process Chains from DEV to QA. The Process Chains in the Target system are including the ERROR Dtps as parallel loads along with the regular DTP.This happens when there exists an ERROR DTP in the Target system at the time of Transport.
    This will cause a problem
    1.these would run parallel to the regular DTPs.
    2.no of back ground processes running at any point will be beyond our limit.
    Let me know if you have faced the same issue and how you resolved it.
    Thanks
    Jagadish

    Hi DPN,
    Check oout this thread. This might solve yuor problem.
    Errors in Transportation
    Thanks and Regards
    Subray Hegde

  • PI FTP: Process 1 file at a time until it is successfully processed at the target system

    Dear Experts,
    As the title said, I'm required to process 1 file at a time and only process the next file after the previous file has been successfully processed at the target system. The interface scenario is asynchronous FTP to ABAP proxy.
    It is similar with the following link:
    File adapter to pick a single file
    I think there could be 2 feasible solutions:
    1. Configure EOIO at the sender CC. According to this link:
         Queues for Asynchronous Message Processing (SAP Library - SAP NetWeaver Exchange Infrastructure)
         It is stated that "Once the message has been processed successfully in the target system, the Integration Engine executes an implicit database commit."
         In the case of asynchronous FTP to ABAP proxy, will the PI wait for the ABAP proxy to finish processing the file before sending the next one?
    2. Configure locking at the ABAP program in ECC. I could ask the ABAPer to create a locking mechanism to lock the document before it is posted to BAPI. If the reference document is being locked, it will try again for the next second up to a certain times before it gives up.
    Which 1 is actually fits the requirement?
    Thank you,
    Suwandi C.

    Dear Experts,
    Sorry, just 1 more question which I'm curious.
    In NFS adapter we have the option to set the processing sequence to by Name / Date.
    In FTP will it only by Date?
    According to this link:
    https://help.sap.com/saphelp_nw73/helpdata/en/f9/17888f490846a9972628525cc28aac/content.htm
    "Messages are delivered with the same queue names (supplied by the application) in the same sequence that they were sent from the sender system"
    If it is in the same sequence sent by the sender, I guess it is in the Date order for FTP. Is that correct?
    Thank you,
    Suwandi C.

  • How to use FTP_COMMAND to put a file in the target system

    Hi All,
    I have the requirement to put an excel file from apllication server to another remote system for this i am using the function modules
    1) FTP_CONNECT to connect to the sourece as well as the destination systems  --- Here i am able to hit the both systems.
    2) for sending the data to the target system i am using FTP_COMMAND by passing the 'put' statement along with the soruce and destinations  for the command parameter.
    See the bellow code
    CONCATENATE 'put' v_fname '
    ' 'wbrs1\' folder
    into cmd separated by space.
    CALL FUNCTION 'FTP_COMMAND'
      EXPORTING
       HANDLE                = dhdl
        command              = cmd
       COMPRESS              = 'N'
      VERIFY                =
      RFC_DESTINATION       =
    IMPORTING
      FILESIZE              =
      FILEDATE              =
      FILETIME              =
      tables
        data                  = result
    EXCEPTIONS
       TCPIP_ERROR           = 1
       COMMAND_ERROR         = 2
       DATA_ERROR            = 3
       OTHERS                = 4
    Here v_name is the file path and name in the application server suppose say :
    /usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS
    and wbrs1 is the target system and 'Waynesboro DFS' is the folder name i ma passing to the command .
    Also I tried with the following statement
    CONCATENATE 'put' v_fname '
    ' dhost  folder
    into cmd separated by space.
    Here v_name is the file path and name in the application server suppose say :
    /usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS,
    Dhost is wbrs1.wb.na.webdti.com
    And Waynesboro DFS is the folder .
    Here i am getting the error as invalid argument.
    See the bellow messages from result internal table.
    put /usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS
    wbrs1\ Waynesboro DFS
    open /usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS errno 22: Invalid argument
    Please let me know how i can resolve this problem and how can I put this file in the destination system.
    Thanks in advance.
    Regards,
    Venkat

    check this code....here data is transferred from SAP to Informatica box..
    REPORT zfo_phoenix_acc_reconciliation NO STANDARD PAGE HEADING
                                                    MESSAGE-ID zz
                                                    LINE-SIZE  255
                                                    LINE-COUNT 65.
                            PROGRAM DECLARATION
    PROGRAM ID            : ZFO_PHOENIX_ACC_RECONCILIATION
    DESCRIPTION           : Phoneix Account Reconcilation Program-Feed
                            Balance sheet account balances from GL
                            3 files needed to be enhanced. The files are " Master
                  Attribute File" & "Transaction File(GL Balance)". For
                  Master Attribute File, data needs to be retrieved from
                  T001, ZDATSRC_T, SKA1, T003, T856. The corresponding
                  data from all the tables is downloaded into file
                  according to the condition specified. For Transaction
                  File, data needs to be retrieved from ZGEIST based on
                  Ledger(GG), Record Type(0), Fiscal Year, Period(016).
                  Then the current period is used to determine which TSLxx
                  & KSLxx needs to be used. Also, the conditions are
                  specified in specs which have been used accordingly.
                  The final data fetched will need to processed as files
                  which neednot be downloaded to Presentation/Application
                  server. Instead the files are been FTPed to the
                  Informatica Server using FTP. The location where the
                  files need to be located is ERC\GLOBALSAP.
                         TABLES
    TABLES : ADR6.
                         TYPES
    Output File - Master COA(Chart of Account)
    TYPES : BEGIN OF ty_coacode ,
             coa_code(20),         "COA Code
             coa_description(50),  "COA Description
             field11 TYPE x,       "Line Feed
             END OF ty_coacode.
    Output File - Master Account
    TYPES : BEGIN OF ty_acctcode ,
             act_code(20),         "GL Account Number
             act_desc(60),         "GL Account Description
             act_act_flag(1),      "Account marked for deletion indicator
             glact_type(1),        "GL Account type
             fi_line(20),          "Corporate Financial Statement Line
             coa_code(20),         "COA Code
             act_defcode(3),       "Account Defination Code
             field11 TYPE x,       "Line Feed
           END OF ty_acctcode.
    Output File - Master Entity
    TYPES : BEGIN OF ty_entitycode,
             entity_code(12),     "Entity Code
             com_desc(40),        "Company Name
             coa_code(20),        "COA Code
             field11 TYPE x,      "Line Feed
            END OF ty_entitycode.
    Output File - Master Attribute
    TYPES : BEGIN OF ty_attribcode,
             attrib_code(5),       "Attribute Code
             attrib_value(20),     "Attribute Value
             attrib_desc(60),      "Attribute Description
             field11 TYPE x,       "Line Feed
            END OF ty_attribcode.
    Output File - Transaction GL Balance
    TYPES : BEGIN OF ty_glbal,
             gl_reccode(2),        "GL Reconciliation Code
             gl_entity(12),        "GL Entity - Company Code
             gl_accnum(20),        "Gl Group Account Number
             site(4),              "Site
             currency_type(6),     "Transaction Currency Code
             year(4) TYPE n,       "Year
             month(2) TYPE n,      "Month
             as_of_date(8),        "Date Account Balance
             tran_cur_amt(21),     "Transaction Currency Amount
             usd_amount(21),       "USD Amount
             racct(20),            "GL Account Number
             zzbewar(20),          "Consolidation Transaction Type
             zzdatsrc(20),         "Data Source
             zzblart(20),          "Document Type
             rassc(20),          "Trading Partner
             field1(20),           "Attribute field1
             field2(20),           "Attribute field2
             field3(20),           "Attribute field3
             field4(20),           "Attribute field4
             field5(20),           "Attribute field5
             field11 TYPE x,       "Line Feed
           END OF ty_glbal.
    Output File - Control
    TYPES :BEGIN OF ty_globalsap,
            clnt_name(6),          "Client Name
            source_name(12),       "Source Name
            as_of_date(8),         "AS of Date
            time_stamp(6),         "Time Stamp
            time_zone(8),          "Time Zone
            num_of_files(3),       "Number of Files
            num_of_records(9),     "Number of Records
            user_ids(60),          "User ID(s)
            field11 TYPE x,        "Line Feed
           END OF ty_globalsap.
    Int'table to hold ZGEIST Data
    TYPES : BEGIN OF ty_zgeist_data,
              rldnr    TYPE rldnr,      "Ledger
              rrcty    TYPE rrcty,      "Record Type
              rvers    TYPE rvers,      "Version
              ryear    TYPE gjahr,      "Fiscal Year
              rbukrs   TYPE bukrs,      "Company Code
              racct    TYPE racct,      "Account Number
              robjnr   TYPE gobjnr_r,   "Object Number for objects
              cobjnr   TYPE gobjnr_c,   "Object Number for transaction
              sobjnr   TYPE gobjnr_s,   "Object Number for partner
              rtcur    TYPE rtcur,      "Currency Key
              runit    TYPE meins,      "Base Unit of Measure
              drcrk    TYPE shkzg,      "Debit/Credit Indicator
              rpmax    TYPE rpmax,      "Period
              rzzstagr TYPE stagr,      "Statistical key figure
              zzaltkt  TYPE altkt,      "Account Number in Group
              zzdatsrc TYPE zdatsrc,    "Data Source code
              zzbewar  TYPE rmvct,      "Transaction Type
              zzblart  TYPE blart,      "Document Type
              rassc    TYPE rassc,       "Trading Partner
              zzvbund  TYPE rassc,      "Trading Partner
              tslvt    TYPE tslvt9,     "Transactional Currency
              kslvt    TYPE kslvt9,     "Group Currency
            END   OF ty_zgeist_data.
    Int'table to hold ZGEIST Error Data based on conditions
    TYPES : BEGIN OF ty_zgeist_error_data,
              rldnr    TYPE rldnr,      "Ledger
              rrcty    TYPE rrcty,      "Record Type
              rvers    TYPE rvers,      "Version
              ryear    TYPE gjahr,      "Fiscal Year
              rbukrs   TYPE bukrs,      "Company Code
              robjnr   TYPE gobjnr_r,   "Object Number for objects
              cobjnr   TYPE gobjnr_c,   "Object Number for transaction
              sobjnr   TYPE gobjnr_s,   "Object Number for partner
              rtcur    TYPE rtcur,      "Currency Key
              runit    TYPE meins,      "Base Unit of Measure
              drcrk    TYPE shkzg,      "Debit/Credit indicator
              rpmax    TYPE rpmax,      "Period
            END   OF ty_zgeist_error_data.
                         FIELD SYMBOLS
    FIELD-SYMBOLS : <fs> TYPE ANY.
                         CONSTANTS
    DATA : c_selected    TYPE c VALUE 'X',  "Field for constant value 'X'
           c_y           TYPE c VALUE 'Y',  "For Acc marked for deletion
           c_n           TYPE c VALUE 'N',  "For Acc not marked for deletion
           c_a           TYPE c VALUE 'A',  "For GL Account type Asset
           c_l           TYPE c VALUE 'L',  "For GL Account type Liability
           c_q           TYPE c VALUE 'Q',  "For GL Account type Equity
           c_r           TYPE c VALUE 'R',  "For GL Account type Revenue
           c_e           TYPE c VALUE 'E',  "For GL Account type Expense
           c_t           TYPE c VALUE 'T',  "For GL Account type
           c_userid(60)  TYPE c ,
           c_curtp       TYPE curtp VALUE '10', "Currency type
           c_curtp1      TYPE curtp VALUE '30', "Currency type
           c_rassc(5)    TYPE c VALUE 'RASSC',  "Trading Partner
           c_dtsrce(6)   TYPE c VALUE 'DTSRC',  "Data Source
           c_sacct(5)    TYPE c VALUE 'SACCT',  "GL Account
           c_docty(5)    TYPE c VALUE 'DOCTY',  "Document Type
           c_trxtp(5)    TYPE c VALUE 'TRXTP',  "Transaction Type
           c_tradptn(15) TYPE c VALUE 'Trading Partner',  "Trading Partner
           c_datsrc(11)  TYPE c VALUE 'Data Source',      "Data Source
           c_glacc(10)   TYPE c VALUE 'GL Account',       "GL Account
           c_doctyp(13)  TYPE c VALUE 'Document Type',    "Document Type
           c_trantyp(16) TYPE c VALUE 'Transaction Type'. "Transaction Type
                         DATA (Simple Fields)
    DATA: w_cnt1         TYPE i, "No Of records in output file COA Code
          w_cnt2         TYPE i, "No Of records in output file Account
          w_cnt3         TYPE i, "No Of records in output file Entity
          w_cnt4         TYPE i, "No Of records in output file attribute
          w_cnt5         TYPE i, "No Of records in output file GL Balance
          w_tot_recs     TYPE i, "TOtal number of records downloaded
          w_date         LIKE sy-datum, "System date
          w_timediff     LIKE sy-uzeit, "Time Difference to GMT
          w_timezone(10) TYPE c,       "Time Difference to GMT
          w_file_count(3) TYPE n,       "File Count
          w_period TYPE poper,          "To hold Period Value
          w_year LIKE t009b-bdatj,      "To hold Fiscal Year Value
          w_outfile       TYPE char64,  "FTPed file path
          w_hdl           TYPE i.       "Handle for FTP
                         INTERNAL TABLES
    Intenal table for GL Account details
    DATA: BEGIN OF it_gl_detail OCCURS 0,
              saknr      TYPE saknr,
              txt50_skat TYPE txt50_skat,
              xloev      TYPE xloev,
          END OF it_gl_detail.
    DATA: it_company_list LIKE bapi0014_1  OCCURS 0 WITH HEADER LINE,
          it_coacode TYPE STANDARD TABLE OF ty_coacode  WITH HEADER LINE,
          it_acctcode TYPE STANDARD TABLE OF ty_acctcode WITH HEADER LINE,
          it_entitycode TYPE STANDARD TABLE OF ty_entitycode
                                            WITH HEADER LINE,
          it_attribcode TYPE STANDARD TABLE OF ty_attribcode
                                            WITH HEADER LINE,
          it_glbal TYPE STANDARD TABLE OF ty_glbal WITH HEADER LINE,
          it_globalsap TYPE STANDARD TABLE OF ty_globalsap WITH HEADER LINE,
          it_t001 TYPE STANDARD TABLE OF t001 WITH HEADER LINE,
          it_zdatsrc TYPE STANDARD TABLE OF zdatsrc_t WITH HEADER LINE,
          it_ska1 TYPE STANDARD TABLE OF ska1 WITH HEADER LINE,
          it_t003 TYPE STANDARD TABLE OF t003 WITH HEADER LINE,
          it_t856 TYPE STANDARD TABLE OF t856 WITH HEADER LINE,
          it_zgeist_data    TYPE STANDARD TABLE OF ty_zgeist_data
                                 WITH HEADER LINE,
          it_zgeist_data1   TYPE STANDARD TABLE OF ty_zgeist_data
                                 WITH HEADER LINE,
          it_zgeist_data_all TYPE STANDARD TABLE OF zgeist,
          wa_it_zgeist_data1 TYPE ty_zgeist_data,
          wa_it_zgeist_data TYPE zgeist,
          it_zgeist_error_data TYPE STANDARD TABLE OF ty_zgeist_error_data,
          wa_it_zgeist_error_data TYPE ty_zgeist_error_data.
                         SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-009.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-006,
                POSITION POS_LOW.
    PARAMETERS :       P_USER(30) TYPE C LOWER CASE OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-007,
                POSITION POS_LOW.
    PARAMETERS :       P_PWD(30) TYPE C LOWER CASE OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-008,
                POSITION POS_LOW.
    PARAMETERS :       P_HOST(64) TYPE C LOWER CASE OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE,
                COMMENT 1(30) TEXT-010,
                POSITION POS_LOW.
    SELECT-OPTIONS :   S_EMAIL FOR ADR6-SMTP_ADDR NO INTERVALS.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    -- Password not visible--
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'P_PWD'.
          screen-invisible = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    I N I T I A L I Z A T I O N                                         *
    INITIALIZATION.
      w_date0(2) = sy-datum4(2).
      w_date2(2) = sy-datum6(2).
      w_date4(4) = sy-datum0(4).
      S_EMAIL-SIGN = 'I'.
      S_EMAIL-OPTION = 'EQ'.
      S_EMAIL-LOW = '[email protected]'.
      APPEND S_EMAIL.
      S_EMAIL-SIGN = 'I'.
      S_EMAIL-OPTION = 'EQ'.
      S_EMAIL-LOW = '[email protected]'.
      APPEND S_EMAIL.
                         START - OF - SELECTION
    START-OF-SELECTION.
    Geting Company Details
      PERFORM get_company_list.
    Geting GL Account Details
      PERFORM get_gl_acc_detail.
    Geting GL Balance Details
      PERFORM get_zgeist_data.
                         END - OF - SELECTION
      PERFORM process_coacode.
      PERFORM process_acctcode.
      PERFORM process_entitycode.
      PERFORM process_attribcode.
      PERFORM process_glbal.
      PERFORM process_ftp_file.
      IF NOT it_zgeist_error_data[] IS INITIAL.
        PERFORM write_error_report.
      ENDIF.
    *&      Form  GET_COMPANY_LIST
               Form to get Company List                                 *
    FORM get_company_list.
      CALL FUNCTION 'BAPI_COMPANY_GETLIST'
        TABLES
          company_list = it_company_list.
    ENDFORM.                    "GET_COMPANY_LIST
    *&      Form  GET_GL_ACC_DETAIL
          Form to get the GL Account details                            *
    FORM get_gl_acc_detail.
      DATA : l_txt50 LIKE skat-txt50,
             l_tabix LIKE sy-tabix.
      SELECT saknr xloev
        INTO TABLE it_gl_detail
        FROM ska1
        WHERE ktopl = 'G001'
        AND   ( saknr GE '1000000000' AND saknr LE '4500000000' ).
      LOOP AT it_gl_detail.
        l_tabix = sy-tabix.
        SELECT SINGLE txt50
          INTO l_txt50
          FROM skat
          WHERE spras = 'EN'
          AND   ktopl = 'G001'
          AND   saknr = it_gl_detail-saknr.
        it_gl_detail-txt50_skat = l_txt50.
        MODIFY it_gl_detail INDEX l_tabix.
        CLEAR l_txt50.
      ENDLOOP.
    ENDFORM.                    "GET_GL_ACC_DETAIL
    *&      Form  PROCESS_COACODE
    Form to Populate COA data to Output internal table  IT_COACODE *
    FORM process_coacode.
      it_coacode-coa_code          =  text-023.     "GLOBAL.
      it_coacode-coa_description   =  text-022.     "Global SAP for ERC
      it_coacode-field11           =  '11'.
      APPEND it_coacode.
      CLEAR it_coacode.
    ENDFORM.                    "PROCESS_COACODE
    *&      Form  PROCESS_ACCTCODE
    Form to Populate Account data to Output Internal table IT_ACCTCODE *
    FORM process_acctcode.
      DATA:l_saknr(10).
      DATA : it_gl_detail2 LIKE it_gl_detail OCCURS 0 WITH HEADER LINE.
      IF NOT it_gl_detail[] IS INITIAL.
        it_gl_detail2[] = it_gl_detail[].
        SORT it_gl_detail2 BY saknr.
        DELETE ADJACENT DUPLICATES FROM it_gl_detail2 COMPARING saknr.
      ENDIF.
      IF NOT it_gl_detail2[] IS INITIAL.
        LOOP AT it_gl_detail2.
          MOVE it_gl_detail2-saknr      TO it_acctcode-act_code.
          MOVE it_gl_detail2-txt50_skat TO it_acctcode-act_desc.
    Check GL Account is marked for deletion or not
          IF it_gl_detail2-xloev     = c_selected.
            it_acctcode-act_act_flag = c_n.
          ELSE.
            it_acctcode-act_act_flag = c_y.
          ENDIF.
    Determine GL Account type based on GL account number
          l_saknr = it_gl_detail2-saknr.
          SHIFT l_saknr LEFT DELETING LEADING '0'.
          IF l_saknr CP '1*'.
            it_acctcode-glact_type = c_a.
          ELSEIF l_saknr CP '2*'.
            it_acctcode-glact_type = c_l.
          ELSEIF l_saknr CP '3*'.
            it_acctcode-glact_type = c_q.
    Start of Addition by C.Ramesh Babu on 11/04/2005   "DR1K907900
          ELSEIF l_saknr CP '4*'.
            it_acctcode-glact_type = c_l.
    End of Addition by C.Ramesh Babu on 11/04/2005   "DR1K907900
          ELSEIF l_saknr CP '5*'.
            it_acctcode-glact_type = c_r.
          ELSEIF l_saknr CP '6*'.
            it_acctcode-glact_type = c_e.
          ELSEIF l_saknr CP '7*'.
            it_acctcode-glact_type = c_t.
          ENDIF.
          it_acctcode-fi_line      = 'CDR'.
          it_acctcode-coa_code     = 'GLOBAL'.
          it_acctcode-act_defcode  = '001'.
          it_acctcode-field11      = '11'.
          APPEND :it_acctcode.
          CLEAR  :it_acctcode,it_gl_detail2.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "PROCESS_ACCTCODE
    *&      Form  PROCESS_ENTITYCODE
      Form to Populate Entiti data to Output file internal table        *
    FORM process_entitycode.
      IF NOT it_company_list[] IS INITIAL.
        LOOP AT it_company_list.
          SHIFT it_company_list-company LEFT DELETING LEADING '0'.
          MOVE it_company_list-company TO it_entitycode-entity_code.
          MOVE it_company_list-name1   TO it_entitycode-com_desc.
          it_entitycode-coa_code    = 'GLOBAL'.
          it_entitycode-field11     = '11'.
          APPEND it_entitycode.
          CLEAR : it_company_list,it_entitycode.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "PROCESS_ENTITYCODE
    *&      Form  PROCESS_ATTRIBCODE
        Form to Populate Attribute data to output file internal table   *
    FORM process_attribcode.
    Getting data from T001.
      SELECT * FROM t001 INTO TABLE it_t001.
      LOOP AT it_t001.
        MOVE c_rassc TO it_attribcode-attrib_code.
        MOVE it_t001-bukrs TO  it_attribcode-attrib_value.
        MOVE c_tradptn TO it_attribcode-attrib_desc.
        it_attribcode-field11 = '11'.
        APPEND it_attribcode.
        CLEAR it_attribcode.
      ENDLOOP.
    Getting data from table ZDATSRC_T.
      SELECT * FROM zdatsrc_t INTO TABLE it_zdatsrc.
      LOOP AT it_zdatsrc.
        MOVE c_dtsrce TO it_attribcode-attrib_code.
        MOVE it_zdatsrc-zdatsrc TO  it_attribcode-attrib_value.
        MOVE c_datsrc TO it_attribcode-attrib_desc.
        it_attribcode-field11 = '11'.
        APPEND it_attribcode.
        CLEAR it_attribcode.
      ENDLOOP.
    Getting data from table SKA1.
      SELECT * FROM ska1 INTO TABLE it_ska1.
      LOOP AT it_ska1.
        MOVE c_sacct TO it_attribcode-attrib_code.
        MOVE it_ska1-saknr TO  it_attribcode-attrib_value.
        MOVE c_glacc TO it_attribcode-attrib_desc.
        it_attribcode-field11 = '11'.
        APPEND it_attribcode.
        CLEAR it_attribcode.
      ENDLOOP.
    Getting data from table T003.
      SELECT * FROM t003 INTO TABLE it_t003.
      LOOP AT it_t003.
        MOVE c_docty TO it_attribcode-attrib_code.
        MOVE it_t003-blart TO  it_attribcode-attrib_value.
        MOVE c_doctyp TO it_attribcode-attrib_desc.
        it_attribcode-field11 = '11'.
        APPEND it_attribcode.
        CLEAR it_attribcode.
      ENDLOOP.
    Getting data from table T856.
      SELECT * FROM t856 INTO TABLE it_t856.
      LOOP AT it_t856.
        MOVE c_trxtp TO it_attribcode-attrib_code.
        MOVE it_t856-trtyp TO  it_attribcode-attrib_value.
        MOVE c_trantyp TO it_attribcode-attrib_desc.
        it_attribcode-field11 = '11'.
        APPEND it_attribcode.
        CLEAR it_attribcode.
      ENDLOOP.
    ENDFORM.                    "PROCESS_ATTRIBCODE
    *&      Form  PROCESS_GLBAL
      Form to Populate GL Balance data to Output file internal table    *
    FORM process_glbal.
      DATA : l_ctran_amt(21),
             l_cusd_amt(21).
      LOOP AT it_zgeist_data INTO wa_it_zgeist_data1.
    *Start of change by 501030559 on 11/04/2005
       it_glbal-gl_reccode = '04'.
         it_glbal-gl_reccode = '05'.
    *End of change by 501030559 on11/04/2005
        it_glbal-gl_entity  = wa_it_zgeist_data1-rbukrs.
        it_glbal-gl_accnum  = wa_it_zgeist_data1-zzaltkt.
        it_glbal-site       = 'ERC'.
        it_glbal-currency_type = wa_it_zgeist_data1-rtcur.
        it_glbal-year = w_year.
        it_glbal-month = w_period.
        it_glbal-as_of_date = w_date.
        l_ctran_amt = wa_it_zgeist_data1-tslvt.
    Put sign to left side of the value
        IF l_ctran_amt LT 0.
          TRANSLATE l_ctran_amt USING ' 0'.
          CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
            CHANGING
              value = l_ctran_amt.
        ELSE.
    Trailing Zero's to the value
          SHIFT l_ctran_amt RIGHT DELETING TRAILING space.
          TRANSLATE l_ctran_amt USING ' 0'.
          REPLACE '0' WITH '' INTO l_ctran_amt.
        ENDIF.
        it_glbal-tran_cur_amt = l_ctran_amt.
        l_cusd_amt = wa_it_zgeist_data1-kslvt.
    Put Sign to leftside of the value
        IF l_cusd_amt LT 0.
          TRANSLATE l_cusd_amt USING ' 0'.
          CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
            CHANGING
              value = l_cusd_amt.
        ELSE.
    Trailing Zero's to the value
          SHIFT l_cusd_amt RIGHT DELETING  TRAILING space.
          TRANSLATE l_cusd_amt USING ' 0'.
          REPLACE '0' WITH '' INTO l_cusd_amt.
        ENDIF.
        it_glbal-usd_amount = l_cusd_amt.
        it_glbal-racct   = wa_it_zgeist_data1-racct.
        it_glbal-zzbewar = wa_it_zgeist_data1-zzbewar.
        it_glbal-zzdatsrc = wa_it_zgeist_data1-zzdatsrc.
        it_glbal-zzblart  = wa_it_zgeist_data1-zzblart.
        it_glbal-rassc  = wa_it_zgeist_data1-rassc.
        it_glbal-field11 = '11'.
        APPEND it_glbal.
        CLEAR : wa_it_zgeist_data1, it_glbal.
      ENDLOOP.
    ENDFORM.                    "PROCESS_GLBAL
    *&      Form  PROCESS_GLOBALSAP
       Form to Populate COntrol data to Output file internal table      *
    FORM process_globalsap.
      DATA :l_total(9),
            l_len(3) type c.
    Logic to get Time Zone
      w_timediff  = sy-tzone.
      IF sy-tzone LT '0'.
        w_timediff = sy-tzone * -1.
        CONCATENATE 'GMT-' w_timediff(4) INTO w_timezone.
      ELSE.
        w_timediff = sy-tzone.
        CONCATENATE 'GMT+' w_timediff(4) INTO w_timezone.
      ENDIF.
      LOOP AT S_EMAIL.
        CONCATENATE C_USERID S_EMAIL-LOW ',' INTO C_USERID.
      ENDLOOP.
      l_len = strlen( c_userid ).
      l_len = l_len - 1.
      c_userid = c_userid+0(l_len).
      it_globalsap-clnt_name    = 'ERC'.
      it_globalsap-source_name  = 'GLOBALSAP'.
      it_globalsap-as_of_date   = w_date.
      it_globalsap-time_stamp   = sy-uzeit.
      it_globalsap-time_zone    = w_timezone.
      it_globalsap-num_of_files = w_file_count.
      MOVE w_tot_recs TO l_total.
      SHIFT l_total RIGHT DELETING TRAILING space.
      TRANSLATE l_total USING ' 0'.
      it_globalsap-num_of_records = l_total.
      it_globalsap-user_ids = c_userid.
      it_globalsap-field11  = '11'.
      APPEND it_globalsap.
      CLEAR it_globalsap.
    ENDFORM.                  "PROCESS_GLOBALSAP
    *&      Form  COUNT_RECORDS
    Form to count total number of records Downlaoded                   *
    FORM count_records.
      DESCRIBE TABLE it_coacode    LINES w_cnt1.
      DESCRIBE TABLE it_acctcode   LINES w_cnt2.
      DESCRIBE TABLE it_entitycode LINES w_cnt3.
      DESCRIBE TABLE it_attribcode LINES w_cnt4.
      DESCRIBE TABLE it_glbal      LINES w_cnt5.
      w_tot_recs = w_cnt1 + w_cnt2 + w_cnt3 + w_cnt4 + w_cnt5.
    ENDFORM.                    "COUNT_RECORDS
    *&      Form  get_zgeist_data
    Form used to fetch data from ZGEIST table for the GL BAL file
    FORM get_zgeist_data .
      PERFORM get_period_year.
      SELECT * INTO TABLE it_zgeist_data_all
               FROM zgeist
               WHERE rldnr  EQ 'GG'
               AND   ryear  EQ w_year
               AND   rrcty  EQ 0
               AND   rpmax  EQ '016'
               AND  ( zzaltkt GE '1000000000' AND zzaltkt LE '4500000000' )
               AND   rzzstagr = space.
      sort it_zgeist_data_all by rbukrs rldnr zzaltkt racct
                                 zzdatsrc zzbewar zzblart rtcur rassc.
      LOOP AT it_zgeist_data_all INTO wa_it_zgeist_data.
        IF wa_it_zgeist_data-zzaltkt EQ space.
          wa_it_zgeist_error_data-rldnr = wa_it_zgeist_data-rldnr.
          wa_it_zgeist_error_data-rrcty = wa_it_zgeist_data-rrcty.
          wa_it_zgeist_error_data-rvers = wa_it_zgeist_data-rvers.
          wa_it_zgeist_error_data-ryear = wa_it_zgeist_data-ryear.
          wa_it_zgeist_error_data-rbukrs = wa_it_zgeist_data-rbukrs.
          wa_it_zgeist_error_data-robjnr = wa_it_zgeist_data-robjnr.
          wa_it_zgeist_error_data-cobjnr = wa_it_zgeist_data-cobjnr.
          wa_it_zgeist_error_data-sobjnr = wa_it_zgeist_data-sobjnr.
          wa_it_zgeist_error_data-rtcur = wa_it_zgeist_data-rtcur.
          wa_it_zgeist_error_data-runit = wa_it_zgeist_data-runit.
          wa_it_zgeist_error_data-drcrk = wa_it_zgeist_data-drcrk.
          wa_it_zgeist_error_data-rpmax = wa_it_zgeist_data-rpmax.
          APPEND wa_it_zgeist_error_data TO it_zgeist_error_data.
        ELSE.
          it_zgeist_data1-rbukrs   = wa_it_zgeist_data-rbukrs.
          it_zgeist_data1-rldnr    = wa_it_zgeist_data-rldnr.
          it_zgeist_data1-zzaltkt  = wa_it_zgeist_data-zzaltkt.
          it_zgeist_data1-racct    = wa_it_zgeist_data-racct.
          it_zgeist_data1-zzdatsrc = wa_it_zgeist_data-zzdatsrc.
          it_zgeist_data1-zzbewar  = wa_it_zgeist_data-zzbewar.
          it_zgeist_data1-zzblart  = wa_it_zgeist_data-zzblart.
          it_zgeist_data1-rassc  = wa_it_zgeist_data-rassc.
          it_zgeist_data1-rtcur    = wa_it_zgeist_data-rtcur.
          PERFORM get_tslvt_kslvt_values USING w_period.
          COLLECT it_zgeist_data1.
        ENDIF.
        CLEAR : wa_it_zgeist_data, wa_it_zgeist_error_data,
                it_zgeist_data1.
      ENDLOOP.
      it_zgeist_data[] = it_zgeist_data1[].
    ENDFORM.                    " get_zgeist_data
    *&      Form  write_error_report
    Form used to display error data for the GL BAL fetched data
    FORM write_error_report .
      DATA : l_text(80) TYPE c.
      CASE w_period.
        WHEN '001' OR '01'.
          l_text = text-e01.
        WHEN '002' OR '02'.
          l_text = text-e02.
        WHEN '003' OR '03'.
          l_text = text-e03.
        WHEN '004' OR '04'.
          l_text = text-e04.
        WHEN '005' OR '05'.
          l_text = text-e05.
        WHEN '006' OR '06'.
          l_text = text-e06.
        WHEN '007' OR '07'.
          l_text = text-e07.
        WHEN '008' OR '08'.
          l_text = text-e08.
        WHEN '009' OR '09'.
          l_text = text-e09.
        WHEN '010' OR '10'.
          l_text = text-e10.
        WHEN '011' OR '11'.
          l_text = text-e11.
        WHEN '012' OR '12'.
          l_text = text-e12.
        WHEN '013' OR '13'.
          l_text = text-e13.
        WHEN '014' OR '14'.
          l_text = text-e14.
        WHEN '015' OR '15'.
          l_text = text-e15.
        WHEN '016' OR '16'.
          l_text = text-e16.
      ENDCASE.
      SKIP 2.
      WRITE:/45 text-h01 COLOR COL_HEADING.
      SKIP 2.
      FORMAT COLOR 4.
      WRITE:/(234) sy-uline.
      WRITE:/1   sy-vline,
             2   text-h02,
             9   sy-vline,
             10  text-h03,
             19  sy-vline,
             20  text-h04,
             28  sy-vline,
             29  text-h05,
             41  sy-vline,
             42  text-h06,
             49  sy-vline,
             50  text-h07,
             69  sy-vline,
             70  text-h08,
             89  sy-vline,
             90  text-h09,
             109 sy-vline,
             110 text-h10,
             119 sy-vline,
             120 text-h11,
             130 sy-vline,
             131 text-h12,
             144 sy-vline,
             145 text-h13,
             152 sy-vline,
             153 text-h14,
             234 sy-vline.
      WRITE:/(234) sy-uline.
      FORMAT COLOR OFF.
      LOOP AT it_zgeist_error_data INTO wa_it_zgeist_error_data.
        FORMAT COLOR 2.
        WRITE:/1   sy-vline,
               4   wa_it_zgeist_error_data-rldnr,
               9   sy-vline,
               13  wa_it_zgeist_error_data-rrcty,
               19  sy-vline,
               22  wa_it_zgeist_error_data-rvers,
               28  sy-vline,
               32  wa_it_zgeist_error_data-ryear,
               41  sy-vline,
               42  wa_it_zgeist_error_data-rbukrs,
               49  sy-vline,
               50  wa_it_zgeist_error_data-robjnr,
               69  sy-vline,
               70  wa_it_zgeist_error_data-cobjnr,
               89  sy-vline,
               90  wa_it_zgeist_error_data-sobjnr,
               109 sy-vline,
               112 wa_it_zgeist_error_data-rtcur,
               119 sy-vline,
               123 wa_it_zgeist_error_data-runit,
               130 sy-vline,
               135 wa_it_zgeist_error_data-drcrk,
               144 sy-vline,
               147 wa_it_zgeist_error_data-rpmax,
               152 sy-vline,
               153 l_text,
               234 sy-vline.
        FORMAT COLOR OFF.
      ENDLOOP.
      WRITE:/(234) sy-uline.
    ENDFORM.                    " write_error_report
    *&      Form  get_tslvt_kslvt_values
    Form used to get TSLxx & KSLxx values for the period fetched
    FORM get_tslvt_kslvt_values USING period.
    FIELD-SYMBOLS : <f1> TYPE ANY,
                     <f2> TYPE ANY.
    DATA : l_tslvt_val(25) VALUE 'wa_it_zgeist_data-tsl',
            l_kslvt_val(25) VALUE 'wa_it_zgeist_data-ksl',
            l_tslvt TYPE tslvt9,
            l_kslvt TYPE kslvt9,
            l_period TYPE poper.
      clear l_period.
      l_period = period.
      DO l_period TIMES.
          CONCATENATE  l_tslvt_val  l_period+1(2) INTO  l_tslvt_val.
          CONCATENATE   l_kslvt_val l_period+1(2) INTO  l_kslvt_val.
        ASSIGN (l_tslvt_val) TO <f1>.
        l_tslvt = <f1>.
        it_zgeist_data1-tslvt = it_zgeist_data1-tslvt + l_tslvt.
        ASSIGN (l_kslvt_val) TO <f2>.
        l_kslvt = <f2>.
        it_zgeist_data1-kslvt = it_zgeist_data1-kslvt + l_kslvt.
        l_period = l_period - 1.
        clear : l_tslvt, l_kslvt, l_tslvt_val, l_kslvt_val.
        l_tslvt_val = 'wa_it_zgeist_data-tsl'.
        l_kslvt_val = 'wa_it_zgeist_data-ksl'.
        if l_period = 0.
          exit.
        endif.
      ENDDO.
    ENDFORM.                    "get_tslvt_kslvt_values
    *&      Form  process_ftp_file
    Form used to connect & disconnect to Informatica Server using FTP
    Also, used to transfer files to the Informatica location
    -->  p1        text
    <--  p2        text
    FORM process_ftp_file .
      DATA: l_slen     TYPE i,
            l_error,
            l_pwd(30)  TYPE c.
      CONSTANTS: c_dest TYPE rfcdes-rfcdest VALUE 'SAPFTP',
                 c_key  TYPE i              VALUE 26101957.
      l_error = 0.
    connect to ftp server
      l_pwd = p_pwd.
      l_slen = STRLEN( l_pwd ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = l_pwd
          sourcelen   = l_slen
          key         = c_key
        IMPORTING
          destination = l_pwd.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Connect to FTP Server'.
    To Connect to the Server using FTP
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = p_user
          password        = l_pwd
          host            = p_host
          rfc_destination = c_dest
        IMPORTING
          handle          = w_hdl
        EXCEPTIONS
          OTHERS          = 1.
      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 : w_outfile, w_file_count.
      MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_COACODE' TO w_outfile.
      PERFORM download_to_ftp TABLES it_coacode USING w_outfile.
      w_file_count = w_file_count + 1.
      CLEAR : w_outfile.
      MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_ACCTCODE' TO w_outfile.
      PERFORM download_to_ftp TABLES it_acctcode USING w_outfile.
      w_file_count = w_file_count + 1.
      CLEAR : w_outfile.
      MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_ENTITYCODE' TO w_outfile.
      PERFORM download_to_ftp TABLES it_entitycode USING w_outfile.
      w_file_count = w_file_count + 1.
      CLEAR : w_outfile.
      MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_ATTRIBCODE' TO w_outfile.
      PERFORM download_to_ftp TABLES it_attribcode USING w_outfile.
      w_file_count = w_file_count + 1.
      CLEAR : w_outfile.
      MOVE 'ERC/GLOBALSAP/ERC_GLOBALSAP_GLBAL' TO w_outfile.
      PERFORM download_to_ftp TABLES it_glbal USING w_outfile.
      w_file_count = w_file_count + 1.
      CLEAR : w_outfile, w_tot_recs.
      PERFORM count_records.
      PERFORM process_globalsap.
      MOVE 'ERC/GLOBALSAP/C_ERC_GLOBALSAP' TO w_outfile.
      PERFORM download_to_ftp TABLES it_globalsap USING w_outfile.
    To disconnect the FTP
      CALL FUNCTION 'FTP_DISCONNECT'
        EXPORTING
          handle = w_hdl.
    To disconnect the RFC Connection
      CALL FUNCTION 'RFC_CONNECTION_CLOSE'
        EXPORTING
          destination = c_dest
        EXCEPTIONS
          OTHERS      = 1.
    ENDFORM.                    " process_ftp_file
    *&      Form  download_to_ftp
    Form to put the files in the Informatica Location using FTP
    Path is ERC\GLOBALSAP\<filename>
    FORM download_to_ftp TABLES it_tab
                         USING l_string TYPE char64.
      CALL FUNCTION 'FTP_R3_TO_SERVER'
        EXPORTING
          handle         = w_hdl
          fname          = l_string
          character_mode = 'X'
        TABLES
          text           = it_tab[]
        EXCEPTIONS
          tcpip_error    = 1
          command_error  = 2
          data_error     = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING invalid_output_file.
      ENDIF.
    ENDFORM.                    " download_to_ftp
    *&      Form  get_period_year
    Form to fill the Period & Year based on the Sy-datum
    FORM get_period_year .
      DATA : l_month(2) TYPE c,
             l_day(2)   TYPE c,
             l_year(4)  TYPE c.
      l_year  = sy-datum+0(4).
      l_month = sy-datum+4(2).
      l_day   = sy-datum+6(2).
      CASE l_month.
        WHEN '01'.
          IF l_day <= '15'.
            w_period = '12'.
            w_year = l_year - 1.
          ELSE.
            w_period = '1'.
            w_year = l_year.
          ENDIF.
        WHEN '02'.
          IF l_day <= '15'.
            w_period = '1'.
            w_year = l_year.
          ELSE.
            w_period = '2'.
            w_year = l_year.
          ENDIF.
        WHEN '03'.
          IF l_day <= '15'.
            w_period = '2'.
            w_year = l_year.
          ELSE.
            w_period = '3'.
            w_year = l_year.
          ENDIF.
        WHEN '04'.
          IF l_day <= '15'.
            w_period = '3'.
            w_year = l_year.
          ELSE.
            w_period = '4'.
            w_year = l_year.
          ENDIF.
        WHEN '05'.
          IF l_day <= '15'.
            w_period = '4'.
            w_year = l_year.
          ELSE.
            w_period = '5'.
            w_year = l_year.
          ENDIF.
        WHEN '06'.
          IF l_day <= '15'.
            w_period = '5'.
            w_year = l_year.
          ELSE.
            w_period = '6'.
            w_year = l_year.
          ENDIF.
        WHEN '07'.
          IF l_day <= '15'.
            w_period = '6'.
            w_year = l_year.
          ELSE.
            w_period = '7'.
            w_year = l_year.
          ENDIF.
        WHEN '08'.
          IF l_day <= '15'.
            w_period = '7'.
            w_year = l_year.
          ELSE.
            w_period = '8'.
            w_year = l_year.
          ENDIF.
        WHEN '09'.
          IF l_day <= '15'.
            w_period = '8'.
            w_year = l_year.
          ELSE.
            w_period = '9'.
            w_year = l_year.
          ENDIF.
        WHEN '10'.
          IF l_day <= '15'.
            w_period = '9'.
            w_year = l_year.
          ELSE.
            w_period = '10'.
            w_year = l_year.
          ENDIF.
        WHEN '11'.
          IF l_day <= '15'.
            w_period = '10'.
            w_year = l_year.
          ELSE.
            w_period = '11'.
            w_year = l_year.
          ENDIF.
        WHEN '12'.
          IF l_day <= '15'.
            w_period = '11'.
            w_year = l_year.
          ELSE.
            w_period = '12'.
            w_year = l_year.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " get_period_year

  • Solution Import Failure Message: Cannot add a Root Component 'GUID' of type 29 because it is not in the target system

    Hi all,
    Please refer to the error:
    Root Components import: FAILURE
    [2015-04-10 17:04:48.126] Process: w3wp |Organization:0937f109-45df-e411-80cf-0050560100db |Thread:   43 |Category: Exception |User: ac011cf7-ad36-405b-91cf-2155ca15efb1 |Level: Error |ReqId: d3924c06-ad4b-4d5e-a204-70f8170016e1 | CrmException..ctor
     ilOffset = 0x30
    at CrmException..ctor(String formattedErrorMessage, Int32 errorCode, Object[] arguments)  ilOffset = 0x30
    at ImportRootComponentsHandler.GetSolutionRootsCollection(Boolean throwIfMissing, Boolean skipRibbonCustomization)  ilOffset = 0x209
    at ImportRootComponentsHandler.ImportItem()  ilOffset = 0x8
    at ImportHandler.Import()  ilOffset = 0x43
    at RootImportHandler.ImportAndUpdateProgress(ImportHandler ih)  ilOffset = 0x7
    at RootImportHandler.HandleNonMetadataHandlers(String[] ImportEntities, ImportHandler& ihForCurrentPath)  ilOffset = 0x33
    at RootImportHandler.RunImport(String[] ImportEntities)  ilOffset = 0x1D8
    at ImportXml.RunImport(String[] ImportEntities)  ilOffset = 0xE
    at ImportXml.RunImport()  ilOffset = 0x5BF
    at ImportXmlService.ImportSolutionSkipCapable(Boolean overwriteUnmanagedCustomizations, Boolean publishWorkflows, Byte[] customizationFile, Guid importJobId, Boolean convertToManaged, Boolean skipProductUpdateDependencies,
    ExecutionContext context)  ilOffset = 0x46
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)  ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)  ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  ilOffset = 0xCF
    at LogicalMethodInfo.Invoke(Object target, Object[] values)  ilOffset = 0x4F
    at InternalOperationPlugin.Execute(IServiceProvider serviceProvider)  ilOffset = 0x57
    at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)  ilOffset = 0x200
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode,
    Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)
     ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId,
    OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode)  ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset
    = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request)  ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal()  ilOffset = 0xF6
    at ImportSolutionCommand.Execute()  ilOffset = 0x20
    at DataSource.ImportSolution(Byte[] customizationFile, Boolean overwriteUnmanagedCustomizations, Boolean publishWorkflows, Guid importJobId, Boolean convertToManaged, Boolean skipProductUpdateDependencies, IOrganizationContext
    context)  ilOffset = 0x0
    at SolutionImportProcessPage.ImportSolution()  ilOffset = 0x123
    at SolutionImportProcessPage.ProcessRequestData()  ilOffset = 0x4A
    at SolutionImportProcessPage.ProcessAction(String action)  ilOffset = 0x92
    at AppUIPage.OnPreRender(EventArgs e)  ilOffset = 0xD
    at Control.PreRenderRecursiveInternal()  ilOffset = 0x54
    at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  ilOffset = 0x6D3
    at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  ilOffset = 0x3C
    at Page.ProcessRequest()  ilOffset = 0x14
    at Page.ProcessRequest(HttpContext context)  ilOffset = 0x33
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error)  ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)  ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)  ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)  ilOffset = 0x4B
    >Crm Exception: Message: Cannot add a Root Component 0ffbcde4-61c1-4355-aa89-aa1d7b2b8792 of type 29 because it is not in the target system., ErrorCode: -2147188705
    [2015-04-10 17:04:48.126] Process: w3wp |Organization:0937f109-45df-e411-80cf-0050560100db |Thread:   43 |Category: Platform.Sql |User: ac011cf7-ad36-405b-91cf-2155ca15efb1 |Level: Info |ReqId: d3924c06-ad4b-4d5e-a204-70f8170016e1 | BusinessProcessObject.ExecuteNonQuery
     ilOffset = 0x28
    I am getting this coming up in the error log when I attempt to import an unmanaged solution.
    After searching on google Type 29 refers to a workflow.
    I go into the source system and query the database by the GUID and discover that it is actually a Business Process Flow called 'Phone to Case Process'. 
    I do not have this process in my target system as I deleted it.
    Looks like this is one of the out of the box ones. I don't think we we have changed this one much.
    What does this mean and what should I be looking for??
    Anyway how do I remove this offending process from the unmanaged solution xml file and attempt to re-import it? 
    It doesn't look like I can generate the solution again without the offending workflow/process..

    I managed to resolve this issue after looking at this thread:
    https://social.microsoft.com/Forums/en-US/fddff17f-1cca-4d33-a666-60c08ad76b0c/crm-2011-import-failure?forum=crmdevelopment
    Just modify both solution and customizations xml by searching for the guid and removing the root component

  • Two Errors during Unicode import into Target System

    I exported our non-unicode 64-bit test NW 7.0 BW database as unicode and now I have started the import into the new unicode database on the target system.  I am using the Single Code Page System Conversion to Unicode NW 7.0 SP16 and higher documentation.  We are at service pack 18 with NW 7. During the Import ABAP phase the sapinst stopped with an errors.  I found the following the first error in the SAP000.log - O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20090326104509
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#18 $ SAP
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: version R7.00/V1.4 [UNICODE]
    Compiled Nov 18 2008 23:19:12
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe -i SAP0000.cmd -dbcodepage 4103 -l SAP0000.log -stop_on_error
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): UTF8
    (DDL) ERROR: no tablespace for TABART SLEXC
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DDL) ERROR: no tablespace for TABART SLEXC
    (DB) INFO: disconnected from DB
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error(s)
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20090326104509
    The second error appears in the SAPSLEXC.LOG - O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20090326104509
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#18 $ SAP
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: version R7.00/V1.4 [UNICODE]
    Compiled Nov 18 2008 23:19:12
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe -i SAPSLEXC.cmd -dbcodepage 4103 -l SAPSLEXC.log -stop_on_error
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): UTF8
    (GSI) INFO: dbname   = "BWP20090325020311                                                                                "
    (GSI) INFO: vname    = "ORACLE                          "
    (GSI) INFO: hostname = "STBWP64                                                         "
    (GSI) INFO: sysname  = "Windows NT"
    (GSI) INFO: nodename = "STBWP64"
    (GSI) INFO: release  = "5.2"
    (GSI) INFO: version  = "3790 Service Pack 2"
    (GSI) INFO: machine  = "4x AMD64 Level 15 (Mod 4 Step 8)"
    (DDL) ERROR: no tablespace for TABART SLEXC
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DDL) ERROR: no tablespace for TABART SLEXC
    (DB) INFO: disconnected from DB
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error(s)
    O:\usr\sap\BWP\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20090326104509
    It looks like the same error but in two different logs. Has anyone seen this error before?  Thanks.

    I checked and the datafiles for all the tablespaces are set to autoextend up to 10gb and none have done this in the tablepaces that are close to being full.  I did increase three tablespaces that were showing close to being full and that did not resolve the error.  Would I need to restart the process from the beginning and adjust the dbsize.xml to make it work?

  • ** File to IDoc scenario - IDoc not created in target system

    Hi friends,
    We are doing File to IDoc scenario. We made required setting in both application as well as XI system. While test the scenario, the file is picked up and successfully processed in SXMB_MONI, but the inbound IDoc is not created in target system. What could be the problem?
    We are using DEBMAS message type DEBMAS06 IDoc type. We checked the following.
    1) SM59 - Connections are OK both application and XI system
    2) IDX1 - In XI System, we have assigned SAP<R/3> port.
    3) IDX2 - IDoc is imported.
    4) In ID - Sender File - Business Service - Adapter-Specific Identifier - Logical System name is given.
    5) In application system. - Partner Profile maintained correctly.
    6) SM58 - There is no error.
    So, what could be the reason ?
    Kindly reply, friends,
    Thanking you.
    Kind Regards,
    Jeg P.

    Hi,
    Check all the steps ..
    File to IDOC
    Do these configurations in R/3 and in XI...
    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2)
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    Thanks,
    Satya

  • Error in target system !!!

    Hello,
    I have the same error in Dev, Quality and production (wich are in different machines) with XI 2.0 To R/3 4.7, we send tRFC to IDOC and all messages are " error in target system" in sm58
    in sxmb_moni, for a message, the first flag is OK, the second flag (A. Status) is red.
    When we check the RFC Connection in sm59, it's sometimes good, sometimes not, we think it's a network problem (maybe with firewall...)
    have someone any idea please ?
    Cedric Rousseau

    Hi Manish,
    If so, can you control the number of idocs sending to XI box. This is workaround
    Is this may be because of number of work process . I am not sure here. So you can increase the work process.
    But you can seek help from SAP to audit on this provided if you are able to reproduce the error..
    This is just my views~
    Regards,
    moorthy

  • Error in target system : iDOC -XI-iDOC

    We are getting this error in smq2 when we are processing bulk idocs thru XI <i><b>"Error in target system "</b></i> . The setting on receiving system is <u>trigger by background program .</u>
    Manish

    Hi Manish,
    If so, can you control the number of idocs sending to XI box. This is workaround
    Is this may be because of number of work process . I am not sure here. So you can increase the work process.
    But you can seek help from SAP to audit on this provided if you are able to reproduce the error..
    This is just my views~
    Regards,
    moorthy

  • Call RFC for Lookup from BPM. how to determin the correct target system

    Hi
    I have a scenario where i am sending a sync call to SAP R/3 to fetch some sata using the BPM.
    The issue is I can have multiple SAP systems so to determin the SAP system for the correct lookup is necessary.
    in the rec determination step of Config I can configure multiple receivers but this isthrowing an error saying the multiple receivers cannot be determined for sync step.
    Any idea why is such an error occuring
    Regards
    Nikhil

    Nikhil,
    Multiple Receivers cannot be configured for a Synchronous Interfaces. reason is that when you are sending the request message to the target systems, XI will recieve multiple responses for one request and this is aginst the concept of Synch Message Processing.
    You will have to have an option of determining the receivers inside your BPM and using separate Send Steps for each of these.
    Regards
    Bhavesh

  • How can I load data with Scripts on *FDM* to a HFM target System????

    Hi all!
    I need help because I can´t find a good guide about scripting on FDM. The problem I have is the next one.
    I have on mind to load my data with data load file in FDM to a HFM target system, but I would like to load an additional data using an event script, ie after validate. I would need any way to access to HFM system though FDM Scripts, is it possible??
    If so, It would be wonderful to get a data from HFM with any Point of View, reachable from FDM Scripts in order to load or getting any data.
    I´ve looking for a good guide about scripting in FDM but I couldn´t find any information about accessing data on HFM target system, does it really exist?
    Thanks for help

    Hi,
    Take a look at the LOAD Action scripts of your adapter. This might give you an idea.
    Theoretically it should be possible to load data in an additional load, but you need to be very careful. You don't want to corrupt any of the log and status information that is being stored during the load process. The audit trail is an important feature in many implementations. In this context it might not be a good idea to improve automation and risk compliance of your system.
    Regards,
    Matt

  • Need to post Full Load data (55,000 records) to the target system.

    Hi All,
    We are getting the data from SAP HR system and we need to post this data to the partner system. So we configured Proxy(SAP) to File(Partner) scenario. We need to append the data of each message to the target file. Scince this is a very critical interface, we have used the dedicated queues. The scenario is working fine in D. When the interface transported to Q, they tested this interface with full load i.e with 55,000 messages.All messages are processed successfully in Integration Engine and to process in Adapter engine, it took nearly 37 hrs. We need to post all 55,000 records with in 2 hrs.
    The design of this interface is simple. We have used direct mapping and the size of each message is 1 KB. But need to append all messages to one file at the target side.We are using Advantco sFTP as receiver adapter and proxy as a sender.
    Could you please suggest a solution to process all 55,000 messages with in 2hrs.
    Thanks,
    Soumya.

    Hi Soumya,
    I understand your scenario as, HR data has be send to third party system once in a day. I guess, they are synchronizing employee (55,000) data in third party system with SAP HR data, daily.
    I would design this scenario as follows:-
    I will ask ABAPer to write a ABAP program, which run at 12:00, pickup 55,000 records from SAP HR tables and place them in one file. That file will be placed in SAP HR file system (you can see it using al11). At 12:30, PI File channel will pick up the file and transfer the file to third party target system as it is, without any transformation. File to File, pass through scenario (no ESR objects). Now, ask the target system to take the file, run their program (they should have some SQL routines). That SQL program will insert these records into target system tables.
    If 55,000 records make huge file at SAP HR system, ask ABAPer to split it into parts. PI will pick them in sequence based on file name.
    In this approach, I would ask both SAP HR (sender) and third party (target) system people to be flexible. Otherwise, I would say, it is not technically possible with current PI resources. In my opinion, PI system is middleware, not system in which huge computations can be done. If messages are coming from different systems, then collection in middleware makes sense. In your case, collecting large number of messages from single system, at high frequency is not advisable. 
    If third party target system people are not flexible, then go for File to JDBC scenario. Ask SAP HR ABAPer to split input file into more number of files (10-15, you PI system should be able to handle). At receiver JDBC, use native SQL. You need java mapping to construct, SQL statements in PI. Donu2019t convert flat file to JDBC XML structure, in your case PI cannot handle huge XML payload.
    You have to note, hardware upgrade is very difficult (you need lot of approvals depending your client process) and very costly. In my experience hardware upgrade will take 2-3 months.
    Regards,
    Raghu_Vamsee

Maybe you are looking for