Logical Databas

Hi,
Does anyone know how can i modify the standard selection screen of the Logical Database S1L?
I need to add a field from MARC to the selection screen (Used in transaction LICC, so i can't copy the program nor the LDB), and it can't be a Dynamic View.
Thanks
Ori Abramov

Hi,
-you can exclude select-options / parameters with
loop at screen.
-you can create your own select-options / parameters
-you can change the sel-dynpro with se38 - goto attributes - Selection screen (there are 5 screens 100-104)
-you can manipulate sel-screen with tables command
Andreas

Similar Messages

  • Parameter inactive in the selection screen of a report with logical datab.

    I`m using a logical database in a report (PNP).
    I need put as inactive some parameters of the selection screen. How can i do it ???  From customizing ???
    Thanks

    Hi,
    Check this code..
    " In screen loop You need to inactive the field. 
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name CS 'PNPKOKRS' OR
           screen-name CS 'PNPKOSTL' OR
           screen-name CS 'PNPORGEH'.
          screen-active = '0'.
          screen-invisible = '1'.
          MODIFY SCREEN.
          CLEAR screen.
        ENDIF.
      ENDLOOP.

  • Text for block and select option on the selection screen of Logical Databas

    Hi,
    I have copied a standard program (RFBELJ10) which is making use of LDB (BRF) and created a custom program. Now, the requirement is to add a selection screen option to the custom report and do some validation on the data extracted. I have added the select option and provided a text (lets say "Segment") to it using menu path Goto --> Text Elements --> Selection Texts and activated. But this text is not displayed on the screen when i execute the report. It is showing the string which i used while defining the select option.
    Also i need to provide a frame and title to it. but its not displayed.
    i have written the following code for that:
    SELECTION-SCREEN: BEGIN OF BLOCK seg WITH FRAME TITLE text-h01. " Segment
    SELECT-OPTIONS: s_segmnt FOR faglflexa-segment. " Segment
    SELECTION-SCREEN: END OF BLOCK seg.
    Could you please help me in getting the texts displayed for fram and the select option?
    Thanks,
    Phani

    Solved the problem. I have maintained the text in German. So, when I execute the report in english, it is not displaying the text. I have translated the texts to English and is working fine now.

  • Give  ans

    1) what is the role of extended check in performance tinning?
    2)difference between  inner joins and for all entries?
    3)where we can find the standard logical databases?
    4) how can we handle the screen resolution in bdc?
    5)how can we handle the multiple values in bdc? write the logic?
    6)how can we handle the pop up screen in bdc?
    7)how can we call a report program in bdc?
    8) in XL sheet i have 1000 records how can we upload?
    9) how to call itab in scripts?
    10) in single page how can we display some data in upper and some data in bottom?

    Hi,
    Please check these links
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/f2bbcb142c11d3b93a0000e8353423/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/d1/801afd454211d189710000e8322d00/content.htm
    /people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better
    Inner Join
    When multiple SAP tables are logically joined, it is always advisable to use inner join to read the data from them. This certainly reduces the load on the network.
    Let us take an example of 2 tables, zairln and zflight. The table zairln has the field airln, which is the airline code and the field lnnam, which is the name of the airline. The table zflight has the field airln, the airline code and other fields which hold the details of the flights that an airline operates.
    Since these 2 tables a re logically joined by the airln field, it is advisable to use the inner join.
    Select aairln alnnam bfligh bcntry into table int_airdet
    From zairln as a inner join zflight as b on aairln = bairln.
    In order to restrict the data as per the selection criteria, a where clause can be added to the above inner join
    "Using several nested INNER JOIN statements can be inefficient and cause time out if the tables become too big in the future."
    Joins here (in ABAP) are not those Native SQL Joins. If you are talking about the Core RDBMS, which mean Oracle or SQL Server, then Undoubtedly Joins are the best.
    In ABAP, these joins are first split by the ABAP processor and then sent to the database, with the increase in DATA in production system, these joins tend to give way if your database keeps growing larger and larger.
    You should rather used "FOR ALL ENTRIES IN" (Tabular conditions), which is a much effecient way as far as performance is concerned.
    For example :
    DATA: BEGIN OF LINE,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    CITYFROM TYPE SPFLI-CITYFROM,
    CITYTO TYPE SPFLI-CITYTO,
    END OF LINE,
    ITAB LIKE TABLE OF LINE.
    LINE-CITYFROM = 'FRANKFURT'.
    LINE-CITYTO = 'BERLIN'.
    APPEND LINE TO ITAB.
    LINE-CITYFROM = 'NEW YORK'.
    LINE-CITYTO = 'SAN FRANCISCO'.
    APPEND LINE TO ITAB.
    SELECT CARRID CONNID CITYFROM CITYTO
    INTO CORRESPONDING FIELDS OF LINE
    FROM SPFLI
    FOR ALL ENTRIES IN ITAB
    WHERE CITYFROM = ITAB-CITYFROM AND CITYTO = ITAB-CITYTO.
    WRITE: / LINE-CARRID, LINE-CONNID, LINE-CITYFROM, LINE-CITYTO.
    ENDSELECT.
    Use of FOR ALL Entries
    Outer join can be created using this addition to the where clause in a select statement. It speeds up the performance tremendously, but the cons of using this variation are listed below
    Duplicates are automatically removed from the resulting data set. Hence care should be taken that the unique key of the detail line items should be given in the select statement.
    If the table on which the For All Entries IN clause is based is empty, all rows are selected into the destination table. Hence it is advisable to check before-hand that the first table is not empty.
    If the table on which the For All Entries IN clause is based is very large, the performance will go down instead of improving. Hence attempt should be made to keep the table size to a moderate level.
    3.Goto Transaction code SE36 and on logical databas field
    *give ' * ' and click on F4 button Now u can see all the Logical* database.
    Standard logical databases will start with alphabet A to X.
    4. U can change the Resolution in BDC by using CTU_PARAMS structure the field name is DEFSIZE in the structure. u need to populate this structure  pass to the bdctable.
    5. use TABLE CONTROL in BDC
    6.Many times in transaction pop-up screen appears and for this screen u dont pass any record but some indication to system telling it to proceed further.
    to handle pop-up screen system has provide a variable called BDC_CURSOR . you pass the variable to BDC_DATA and process the screen.
    7. Use SUBMIT Statement to call the program
    8. Use function Module GUI_UPLOAD or ASLM_EXCEL_TO_INTERNAL_TABLE  to upload data from excel sheet
    <REMOVED BY MODERATOR>
    raam
    Edited by: Alvaro Tejada Galindo on Apr 22, 2008 6:00 PM

  • ABAP OO data fetch logic

    Hi Experts,
                     I have normal report with dat fetch logic. I need to convert my normal code logic to OO abap logic using classes & methods..
    Exp:
          select knumh kotabnr vakey datab datbi knuma_bo
                 from konh
                 into corresponding fields of table i_konh
                 for all entries in i_kona
                 where knuma_bo eq i_kona-knuma.
    Is there any easy way to write the code in OO using classes & methods.
    Thanks.

    Hi Khan,
    Here is the code for your query with OO abap logic i.e. Class and methods.
    Code.
    TABLES: konh.
    data: i_konh TYPE TABLE OF konh,
          i_kona Type TABLE OF kona.
    CLASS class_name DEFINITION.
    PUBLIC SECTION.
    CLASS-METHODS get_details.
    ENDCLASS.
    CLASS class_name IMPLEMENTATION.
    METHOD get_details.
    DATA: knumh   TYPE REF TO konh-knumh,
               kotabnr  TYPE REF TO konh-kotabnr,
               vakey    TYPE REF TO konh-vakey,
               datab     TYPE REF TO konh-datab,
               datbi       TYPE REF TO konh-datbi,
              knumabo TYPE REF TO konh-knuma_bo.
    select knumh kotabnr vakey datab datbi knuma_bo
                 from konh
                 into corresponding fields of table i_konh
                 for all entries in i_kona
                 where knuma_bo eq i_kona-knuma.
    ENDMETHOD.
       ENDCLASS.
    *Global data.
      data: obj TYPE REF TO class_name.
    *Event block.
      START-OF-SELECTION.
    CREATE OBJECT: obj.
    CALL METHOD obj->get_details.
    Regards,
    Soundarya.
    Edited by: K.Soundarya Singh on Mar 24, 2010 8:42 AM
    Edited by: K.Soundarya Singh on Mar 24, 2010 8:43 AM

  • System.Data.SqlClient.SqlException (0x80131904): SQL Server detected a logical consistency-based I/O error: incorrect checksum

    Hello,
    I am migrating client's database to my hosted environment, the client runs
    SQL Server 2008 R2, and we run SQL Server 2014.
    I am stuck on restoring one log file, which left below error message when I restore it:
    Restoring files
      DBFile_20150401030954.trn
    Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
    ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
    ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
    in databa
    se ID 49 at offset 0x000001942a6000 in file 'F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
    sseyTSIAKL_Data.mdf'.  Additional messages in the SQL Server error log or system
     event log may provide more detail. This is a severe error condition that threat
    ens database integrity and must be corrected immediately. Complete a full databa
    se consistency check (DBCC CHECKDB). This error can be caused by many factors; f
    or more information, see SQL Server Books Online.
    RESTORE LOG is terminating abnormally.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
    n breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
    , Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
    ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
     cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
    TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
    Behavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
    havior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 time
    out, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletio
    nSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at OnBoardingTrnRestore.FileRestorer.FileIsRestored(SqlConnection connection,
     String sourceBackupFileName, String sourceDatabaseName, String destinationDatab
    aseName, String databaseName, String strFileName) in c:\Dev\WiseCloud\OnBoarding
    TrnRestore\OnBoardingTrnRestore\FileRestorer.cs:line 223
    ClientConnectionId:6f583f98-9c23-4936-af45-0d7e9a9949ea
    Finished
    I have run restore filelistonly and verifyonly in both client and my box, and both worked well:
    XXX_Data D:\Program Files (x86)\XXX\Data\YYY_Data.mdf
    restore filelistonly:
    D PRIMARY
    70922469376 35184372080640
    1 0
    0 00000000-0000-0000-0000-000000000000
    0 0
    0 512 1
    NULL 279441000014839500242
    66CC6D17-575C-41E5-BB58-3FB4D33E288C
    0 1 NULL
    XXX_Log E:\Program Files (x86)\XXX\Log\YYY_Log.ldf
    L NULL
    31985762304 35184372080640
    2 0
    0 00000000-0000-0000-0000-000000000000
    0 0
    0 512 0
    NULL 0
    00000000-0000-0000-0000-000000000000 0
    1 NULL
    restore verifyonly:
    Attempting to restore this backup may encounter storage space problems. Subsequent messages will provide details.
    The path specified by "D:\Program Files (x86)\XXX\Data\YYY_Data.mdf" is not in a valid directory.
    Directory lookup for the file "E:\Program Files (x86)\XXX\Log\YYY_Log.ldf" failed with the operating system error 3(The system cannot find the path specified.).
    The backup set on file 1 is valid.
    Dbcc checkdb also confirmed there is no error in client sql server database.
    dbcc checkdb (XXX, NOINDEX) 
    Results as follows:
    DBCC results for 'XXX'.
    Warning: NO_INDEX option of checkdb being used. Checks on non-system indexes will be skipped.
    Service Broker Msg 9675, State 1: Message Types analyzed: 17.
    Service Broker Msg 9676, State 1: Service Contracts analyzed: 9.
    Service Broker Msg 9667, State 1: Services analyzed: 7.
    Service Broker Msg 9668, State 1: Service Queues analyzed: 7.
    Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
    Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
    Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
    Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
    DBCC results for 'sys.sysrscols'.
    There are 23808 rows in 350 pages for object "sys.sysrscols".
    DBCC results for 'BMBoard'.
    There are 0 rows in 0 pages for object "BMBoard".
    DBCC results for 'CusOutturnHeader'.
    There are 0 rows in 0 pages for object "CusOutturnHeader".
    CHECKDB found 0 allocation errors and 0 consistency errors in database 'XXX'.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    We use ftp to transfer the log files from the another country to here, I confirmed the file's MD5(checksum) is same as the copy in client's environment, we have tried to upload the file a couple of times, same outcome.
    The full backup is fine, I have successfully restored a series log backups prior to this file.
    Has anyone seen this issue before? It is strange, all information indicates the file is good,but somehow it goes wrong.
    Below are the version details:
    Client: 
    MICROSOFT SQL SERVER 2008 R2 (SP2) - 10.50.4000.0 (X64) 
    My environment:
    Microsoft SQL Server 2014 - 12.0.2480.0 (X64) 
    Jan 28 2015 18:53:20 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )
    Thanks,
    Albert

    Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
    ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
    ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
    in databa
    se ID 49 at offset 0x000001942a6000 in file 'F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
    sseyTSIAKL_Data.mdf'.  Additional messages in the SQL Server error log or system
     event log may provide more detail. This is a severe error condition that threat
    ens database integrity and must be corrected immediately.
    Hi Albert,
    The above error message usually indicates that there is a problem with underlying storage system or the hardware or a driver that is in the path of the I/O request. You can encounter this error when there are inconsistencies in the file system or if the database
    file is damaged.
    Besides other suggestions, consider to use the
    SQLIOSim utility to find out if these errors can be reproduced outside of regular SQL Server I/O requests and change
    your databases to use the PAGE_VERIFY CHECKSUM option.
    Reference:
    http://support.microsoft.com/en-us/kb/2015756
    https://msdn.microsoft.com/en-us/library/aa337274.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Simple logic for the code

    HI All,
          Please expalin the logic behind the code and how can we put it simpler this logic by reducing the number of lines of the following logic
    FORM fisical_period.
      data : l_start_month like v_start_month,
             l_end_month like v_end_month.
      data: l_current_year like t009b-bdatj,
                l_variant like t009-periv.
          call function 'CCODE_GET_FISCAL_YEAR_VARIANT'
            EXPORTING
              company_code           = p_bukrs
            IMPORTING
              fiscal_year_variant    = l_variant
            EXCEPTIONS
              company_code_not_found = 1
              others                 = 2.
          if sy-subrc <> 0.
            message i368(00) with 'Unable to get Fiscal year'.
          endif.
          l_current_year = sy-datum(4).
          call function 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
            EXPORTING
              i_gjahr        = l_current_year
              i_periv        = l_variant
            IMPORTING
              e_first_day    = p_fiscal-low
              e_last_day     = p_fiscal-high
            EXCEPTIONS
              input_false    = 1
              t009_notfound  = 2
              t009b_notfound = 3
              others         = 4.
          if sy-subrc <> 0.
            message i368(00) with 'Unable to get the first and last day'.
          endif.
          if sy-datum < p_fiscal-low.
            p_fiscal-low = p_fiscal-low - 365.
            p_fiscal-high = p_fiscal-high - 365.
          endif.
          append p_fiscal.
          v_start_month = p_fiscal-low+4(2).
          v_end_month   = p_fiscal-high+4(2).
          if v_start_month >= 01 and v_start_month <= 03.
            move 01 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 02 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 03 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 04 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 05 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 06 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 07 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 08 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 09 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 10 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 11 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 12 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
          elseif v_start_month >= 04 and v_start_month <= 06.
            move 04 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 05 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 06 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 07 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 08 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 09 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 10 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 11 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 12 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 01 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 02 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 03 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
          elseif v_start_month >= 07 and v_start_month <= 09.
            move 07 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 08 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 09 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 10 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 11 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 12 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 01 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 02 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 03 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 04 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 05 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 06 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
          else.
            move 10 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 11 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 12 to fiscal_quarter_1-month.
            append fiscal_quarter_1.
            move 01 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 02 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 03 to fiscal_quarter_2-month.
            append fiscal_quarter_2.
            move 04 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 05 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 06 to fiscal_quarter_3-month.
            append fiscal_quarter_3.
            move 07 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 08 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
            move 09 to fiscal_quarter_4-month.
            append fiscal_quarter_4.
          endif.
          IF NOT p_fiscal IS INITIAL.
            perform get_fiscal_year.
          ENDIF.                                               
          IF NOT p_fiscal IS INITIAL.                          
            v_start_year = p_fiscal-low+2(2).
            v_end_year = p_fiscal-high+2(2).
            v_start_year = r_gfiscal-low+2(2).
            v_end_year = r_gfiscal-high+2(2).
            v_start_month = r_gfiscal-low+4(2).
            v_end_month = r_gfiscal-high+4(2).
            move 'Jan' to i_months-month.
            append i_months.
            move 'Feb' to i_months-month.
            append i_months.
            move 'Mar' to i_months-month.
            append i_months.
            move 'Apr' to i_months-month.
            append i_months.
            move 'May' to i_months-month.
            append i_months.
            move 'Jun' to i_months-month.
            append i_months.
            move 'Jul' to i_months-month.
            append i_months.
            move 'Aug' to i_months-month.
            append i_months.
            move 'Sep' to i_months-month.
            append i_months.
            move 'Oct' to i_months-month.
            append i_months.
            move 'Nov' to i_months-month.
            append i_months.
            move 'Dec' to i_months-month.
            append i_months.
            if v_end_month < v_start_month.
              v_find_month = 13 - v_start_month.
              do v_find_month times.
                read table i_months index v_start_month.
                move v_start_month to fiscal_months-month.
                move i_months-month to fiscal_months-literal.
                move v_start_year to fiscal_months-year.
                append fiscal_months.
                add 1 to: v_number_of_months, v_start_month.
              enddo.
              do v_end_month times.
                read table i_months index sy-index.
                move sy-index to fiscal_months-month.
                move i_months-month to fiscal_months-literal.
                move v_end_year to fiscal_months-year.
                append fiscal_months.
                add 1 to v_number_of_months.
              enddo.
            else.
              v_find_month = v_end_month - v_start_month + 1.
              do v_find_month times.
                read table i_months index v_start_month.
                move v_start_month to fiscal_months-month.
                move i_months-month to fiscal_months-literal.
                move v_start_year to fiscal_months-year.
                append fiscal_months.
                add 1 to: v_number_of_months, v_start_month.
              enddo.
            endif.
          ENDIF.                                               
    ENDFORM.
    form get_fiscal_year.
          data : l_lst_day like sy-datum,
                 l_frst_day like sy-datum,
                 l_fisc_vnt like t009-periv, "fiscal year variant
                 l_fisc_prd like t009b-poper,
                 l_fisc_yr like t009b-bdatj,
                 l_lines like sy-index.
          data : i_periods like table of periods with header line.
          perform get_fiscal_year_variant using p_bukrs
                                       changing l_fisc_vnt.
          perform get_period_on_date using p_fiscal-low
                                           l_fisc_vnt
                                  changing l_fisc_prd
                                           l_fisc_yr.
          call function 'G_PERIODS_OF_YEAR_GET'
            EXPORTING
              variant             = l_fisc_vnt
              year                = l_fisc_yr
            IMPORTING
              last_normal_period  = l_fisc_prd
            TABLES
              i_periods           = i_periods
            EXCEPTIONS
              variant_not_defined = 1
              year_not_defined    = 2
              others              = 3.
          if sy-subrc <> 0.
            message i368(00) with 'Unable to Convert Periods'.
          endif.
          describe table i_periods lines l_lines.
          read table i_periods index 1.
          move i_periods-datab to r_gfiscal-low.
          read table i_periods index l_lines.
          move : i_periods-datbi to r_gfiscal-high,
                 'I' to r_gfiscal-sign,
                 'BT' to r_gfiscal-option.
          append r_gfiscal.
        endform.                    " get_fiscal_year
    form get_fiscal_year_variant using    p_p_ccode like t001-bukrs
                                     changing p_g_fisc_vnt like t009-periv.
          call function 'CCODE_GET_FISCAL_YEAR_VARIANT'
            EXPORTING
              company_code           = p_p_ccode
            IMPORTING
              fiscal_year_variant    = p_g_fisc_vnt
            EXCEPTIONS
              company_code_not_found = 1
              others                 = 2.
          if sy-subrc <> 0.
            message i368(00) with 'Unable to retrieve fiscal year variant'.
          endif.
        endform.                    " get_fiscal_year_variant
    form get_period_on_date using    p_p_dcfp like sy-datum
                                         p_g_fisc_vnt like t009-periv
                             changing    p_g_fisc_prd like t009b-poper
                                         p_g_fisc_yr like t009b-bdatj.
          call function 'DATE_TO_PERIOD_CONVERT'
            exporting
              i_date               = p_p_dcfp
              i_periv              = p_g_fisc_vnt
           importing
             e_buper              =  p_g_fisc_prd
             e_gjahr              =  p_g_fisc_yr
           exceptions
             input_false          = 1
             t009_notfound        = 2
             t009b_notfound       = 3
             others               = 4
          if sy-subrc <> 0.
            message i368(00) with 'Unable to get period on date'.
          endif.
        endform.                    " get_period_on_date
    Thanks

    Hi,
    Try to use FMs :  (type quarter in fm name field and press f4.
    FMs like follows will be dispalyed :
    BKK_GET_QUARTER_DATE
    HR99S00_TIME             Generic time related functions                           
    HR_99S_GET_DATES_QUARTER   Get begin and end date of a qrtr                      
    HR_99S_GET_QUARTER             Get quarter                                                                               
    HRPAYBE_DMFA                   Function pool for DMFA                                   
    HR_BE_DAQ_CONDT_QUARTER        Condition for declaring the Local Unit ID for DMFA       
    HR_BE_DAQ_QUARTER              Get occupation line relevant data for DMFA                                                                               
    HRPAYBE_DMFA_WORKFLOW          Workflow DMFA                                            
    HR_BE_DMFA_GET_QUARTER         Retrieve quarter declared                                                                               
    KRGE                                                                               
    KR_GET_HEADQUARTER_BPLACE                                                                               
    SLIM_DATE_TOOLS                                                                         
    SLIM_GET_QUARTERLY_PERIODS                                                                               
    STS2                           Time stream: Generate for periods                        
    TSTR_PERIODS_QUARTERS          Generate Time Stream for Quarters

  • Logic to get  2 print copies separately

    Hi All,
    We have a req on check printing to add logic to take care of 2 print copies (check and office copy)separately and save them in a PDF file in a location thru pop-up.
    Pls. provide your valuable pointer.
    Thanks,
    Deepti.

    Hi,
    Refer to the following code. it will be helpful for u.
    REPORT  ZPRACSCRIPT.
    TABLES: likp, lips,itcpo.
    Data:  struct type itcpo,
          pdftab type standard TABLE OF tline,
          datab TYPE standard TABLE OF itcoo.
    DATA: BINFILe type I,
          filename type string,
          filepath type string,
          fullpath type string.
    struct-tddest = 'LP-01'.
    struct-tdnoprev = 'X'.
    itcpo-tdgetotf = 'X'.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
       DEVICE                            = 'PRINTER'
       DIALOG                            = 'X'
       FORM                              = 'Z_PRAC'
       LANGUAGE                          = SY-LANGU
      OPTIONS                           = itcpo
    EXCEPTIONS
       CANCELED                          = 1
       DEVICE                            = 2
       FORM                              = 3
       OPTIONS                           = 4
       UNCLOSED                          = 5
       MAIL_OPTIONS                      = 6
       ARCHIVE_ERROR                     = 7
       INVALID_FAX_NUMBER                = 8
       MORE_PARAMS_NEEDED_IN_BATCH       = 9
       SPOOL_ERROR                       = 10
       CODEPAGE                          = 11
       OTHERS                            = 12
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'CLOSE_FORM'
    TABLES
      OTFDATA                        = datab
    EXCEPTIONS
       UNOPENED                       = 1
       BAD_PAGEFORMAT_FOR_PRINT       = 2
       SEND_ERROR                     = 3
       SPOOL_ERROR                    = 4
       CODEPAGE                       = 5
       OTHERS                         = 6
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
         FORMAT                      = 'PDF'
      IMPORTING
         BIN_FILESIZE                = BINFILE
        TABLES
          otf                         = datab
          lines                       = pdftab
       EXCEPTIONS
         ERR_MAX_LINEWIDTH           = 1
         ERR_FORMAT                  = 2
         ERR_CONV_NOT_POSSIBLE       = 3
         ERR_BAD_OTF                 = 4
         OTHERS                      = 5
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        CHANGING
          filename             = filename
          path                 = filepath
          fullpath             = fullpath
        EXCEPTIONS
          CNTL_ERROR           = 1
          ERROR_NO_GUI         = 2
          NOT_SUPPORTED_BY_GUI = 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.
      ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
         BIN_FILESIZE                    = binfile
          filename                        = 'D:\MYFILE.PDF'
         FILETYPE                        = 'BIN'
        tables
          data_tab                        = pdftab
       EXCEPTIONS
         FILE_WRITE_ERROR                = 1
         NO_BATCH                        = 2
         GUI_REFUSE_FILETRANSFER         = 3
         INVALID_TYPE                    = 4
         NO_AUTHORITY                    = 5
         UNKNOWN_ERROR                   = 6
         HEADER_NOT_ALLOWED              = 7
         SEPARATOR_NOT_ALLOWED           = 8
         FILESIZE_NOT_ALLOWED            = 9
         HEADER_TOO_LONG                 = 10
         DP_ERROR_CREATE                 = 11
         DP_ERROR_SEND                   = 12
         DP_ERROR_WRITE                  = 13
         UNKNOWN_DP_ERROR                = 14
         ACCESS_DENIED                   = 15
         DP_OUT_OF_MEMORY                = 16
         DISK_FULL                       = 17
         DP_TIMEOUT                      = 18
         FILE_NOT_FOUND                  = 19
         DATAPROVIDER_EXCEPTION          = 20
         CONTROL_FLUSH_ERROR             = 21
         OTHERS                          = 22
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Rajesh Kumar
    Edited by: Rajesh Kumar on May 4, 2009 8:43 AM

  • Conversion logic for the following!!

    Hi,
    Experts
    can you help me to build a conversion logic for the following
    1.BKPF-BLART .setting it to 'ZF'.
    2.BKPF-MONAT derived from  posting date
    3.BKPF-WAERS set to GBP
    4.Dr/.Cr indicator BSEG-SHKZG.
    If Posting Key (BSEG-BSCHL) is u201840u2019 then this indicator (BSEG- SHKZG)is u2018Su2019 (Debit)
    If Posting Key (BSEG-BSCHL) is u201850u2019 then this indicator (BSEG- SHKZG)is u2018Hu2019 (Credit)
    5.a)If Cost Object Type is u2018Cu2019 (= Cost Centre), then Cost Collection Object Id shall be mapped to BSEG- KOSTL.
           BSEG- PRCTR should be derived from the Cost Centre Master data CSKS- PRCTR.
           Effective date should fall between the validity dates CSKS-DATAB and CSKS-DATBI
    b)If Cost Object Type is u2018Iu2019 (= Internal Order), then Cost Collection Object Id shall be mapped to BSEG- AUFNR.
           BSEG - PRCTR should be derived from the Internal Order Master data AUFK-PRCTR
    c)If Cost Object Type is u2018Wu2019 (= Work Breakdown Structure element), then Cost Collection Object Id shall be mapped to BSEG-PROJK.
           BSEG - PRCTR should be derived from the WBS Master data PRPS-PRCTR
    d)If Cost Object Type is u2018Pu2019 (= Profit Centre), then Cost Collection Object Id shall be mapped to BSEG - PRCTR.
    6.Ledger Group BKPF-LDGRP. Set it to u2018Blanku2019 so that the document is posted to all ledgers.
    7.Set BSEG-KOKRS (Controlling Area) to 1000.

    Please do not dump your specs here expecting others to do you work.
    matt

  • Logical GR in Third Party Process

    Hi Friends
    There is logical GR involved in third party process. What if we do not want to trigger it?

    very useful thraed for your Qn-
    [stock not updating after doing MIGO (gr) for third party sales |stock not updating after doing MIGO (gr) for third party sales;
    BR
    Raj

  • Logical databse in repeat

    Hi
    I call in loop logical database by FM LDB_PROCESS in different parameters but only first step is return ok
    next return error subrc = 1 LDB_NOT_REENTRANT
    How to init this calling in second step?

    Hi
    Firstly why you are calling the LDB using FM instead mentioned that in Program attributes and call that using GET statement ?
    Regards,
    Sreeram

  • Logical command in ABAP.....Urgent

    Hi,
      i am pretty new using ABAP program so i neeed help urgently. i am trying to move a file on the application server from one directory to the other and i was using the open dataset function to do that. but the file i am trying to move is pretty big and because i am using internal table to store, it is causing problems with the space.
      i have consulted the basis guys and they have managed to create a logical file for copying from one directory to the other on the application server. to help you furthter. i am enclosing the mail sent to me.
    I have created a logical command which should copy the file from one location to the other but you need to pass it the source dir and file name and the destination dir and file name.
    The logical command is ZCOPY and uses cmd /c copy
    Copies one or more files to another location.
    COPY [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
         [+ source [/A | /B] [+ ...]] [destination [/A | /B]]
      source       Specifies the file or files to be copied.
      /A           Indicates an ASCII text file.
      /B           Indicates a binary file.
      destination  Specifies the directory and/or filename for the new file(s).
      /V           Verifies that new files are written correctly.
      /N           Uses short filename, if available, when copying a file with a
                   non-8dot3 name.
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file.
      /-Y          Causes prompting to confirm you want to overwrite an
                   existing destination file.
      /Z           Copies networked files in restartable mode.
    The switch /Y may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.  Default is
    to prompt on overwrites unless COPY command is being executed from
    within a batch script.
    the problem now is i have no idea about how to use the logical command. can any one help me.
    Thank you,
    Ravi.

    If memory is not an issue, then there should be no reason why this should not work.
    report zrich_0001.
    parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.
    data: itab type table of string with header line.
    start-of-selection.
    * Read old file
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into itab.
          if sy-subrc <> 0.
            exit.
          endif.
          append itab.
        enddo.
      endif.
      close dataset d1.
    * Write to new file
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
    * Delete the old file
      delete dataset d1.
    Regards,
    Rich Heilman

  • Logical Level in Content Tab

    Hi,
    What is the use of Logical Level under Content Tab in Logical Table Source?
    Need more information, docs related to this
    Thanks,
    Satheesh

    Hi
    This logical level is useful for level bases metrics.It shows the levels in your hierarchy.We can give the level in this and in the report it shows the data for that level only.
    See this lnk, http://gerardnico.com/wiki/dat/obiee/measure_level_based
    Thanks
    Don

  • Logical Systems in Business Services

    Hi
    In Business Service creation, for Adapter Specific Identifiers, the parameter for the Logical System. It is only possible to assign one logical system to one Business Service ?.
    i.e. to do
    MyBusServ1, Z_LS_1 
    MyBusServ2, Z_LS_1
    is not possible ?
    When trying to assign Z_LS_1 to MyBusServ2 I get the error that Z_LS_1 is already assigned. Is there a way to circumvent ?, I do not want to create two logical systems in R/3 as the IDOCS types submitted by the Business Services are the same.
    Thanks
    Damien

    Thanks for the replies
    Sarvesh - The Business service is the sender of the information \ IDOC. If I remove the Adapter specific config then how will XI know what Logical system to apply to the IDOC ?.
    Jaishankar - I am creating two IDOC's in SAP. MATMAS and PORDCR. The input file are coming from two different source systems. lets say sys1 and sys2. Both of thse for clarity are created in my scenario as Business Services. sys 1 creates MATMAS and PORDCR IDOC's int he syatem, sys2 creates PORDCR IDOC's in the system. As sys1 and sys2 are related in that they created the IDOC's as part od the same project then I would like to collect in the same partner profile in SAP e.g. Partner Profile ZPP_IDOC with IDOC types MATMAS PORDCR that serve as input for both systems. Logically I would assume that I can assing the logical system ZPP_IDOC to both the adapter specific parameter in both sys1 and sys2.
    Thanks
    Damien

  • Logical Database in Abap Objects

    Hi to All
    I want do it a program report using a Logical Database.
    Is this possible ??? But when I make a GET <node>, occurs the following error:
             "" Statement "ENDMETHOD" missing.  ""
    I'm doing the following:
    CLASS MONFIN IMPLEMENTATION.
           METHOD TRAER_DATOS.
                   GET VBRK.
           ENDMETHOD.
    ENDCLASS.
    Please, somebody tell me how I use the logical database in Abap Objects.
    Thank you very much
    Regards
    Dario R.

    Hi there
    Logical databases whilst of "some use" are not really part of OO.
    If you want to use a logical database in an abap OO program I would create a special class which just does the get data from your DB and pass this either at record or table level.
    Techniques such as GET XXXX LATE aren't really part of any OO type of application since at Object Instantiation time you should be able to access ALL the attributes of that object.
    As far as OO is concerned Logical databases are a throwback to "Dinosaur Technology".
    Since however modules such as SD and FI are still heavily reliant on relational structures (i.e linked tables etc)  then there is still some limited life in this stuff but for OO try and solve it by another method.
    If you really must use this stuff in OO then do it via a FMOD call and save the data in a table which your method will pass back to your application program.
    You can't issue a GET command directly in a method.
    Cheers
    Jimbo

Maybe you are looking for

  • New router and can not connect wirelessly

    Installed a new router that changed my security from a WEP to a WPA2. I have connected to the printer(7410) through ethernet cable and changed the security settings but the printer will not connect to my router. I am currently printing by ethernet ca

  • How to get the text of an onclick/'open browser window' behavior to look like a link

    If I set this behavior to a specific word (on an <a> tag without the 'href') the link is not underlined and the mouse does not turn into a pointer. If I set this behavior to a full <a> tag with the 'href="..."' then the browser opens a new window (as

  • HDMI to HDMI cable

    can I connect a Mac Mini to a computer monitor using a HDMI to HDMI cable directly without using any adapter???   In terms of achieve the best HD resolution quality this is the best connection or not??

  • Diference between Service tax and GTA service tax

    Hi, Kindly tell me what is the difference between service tax and GTA service tax and their accounting entries in SAP ? With Regards, Samrat

  • No-interval-Urgent

    Hi when the user select lt in s_self although the database have suitable records .Have you any opinion about below code. SELECT-OPTIONS s_self FOR gv_self NO INTERVALS no-EXTENSION.       gr_vfdat-sign   = s_self-sign .       gr_vfdat-option = s_self