Preloading Queries via ABAP

Hello Experts,
Using standard below function modules I want to preload queries with variants.
RRI_REPDIR_READ
RRI_REPORT_GENERATE
RRX_REPORT_OPEN
RRX_VARIABLES_FLUSH
RRX_GRID_CMD_PROCESS
RRX_REPORT_CLOSE
All abap staffs are ready, but somewhere deep inside the sap someone hide an functionality to start sap function modules one after another automatically.
All is ok when i'm starting it by hand one after another, but when i'm trying to start it via function module (also via RFC), another report (submits with different background jobs) or a process chain, even when I set a huge delay between respective queries only the last query has working entry in cache. Sap for unknown reason not used the rest of good entires. I suppose that one of user temporary table should be cleaned before report runs. 
Did you have similiar situation with starting report or fm automatically one after another?

HI Karl,
  Some good news for you ! I know for sure that Blackberry is supported by SAP, because I saw their demo of Travel Expenses and Time Sheets applications on the Blackberry devices !!!
  I also heard, that there are some limitations on what you can do with BW reports on Bleckberry device, e.g. you can see pre-configured report, but can not drill it down.
  Here is another quote from SAP: "Every mobile application based on WebDynpro is rendered appropriately for a BlackBerry device.
  For user convenience, SAP has integrated single sign on to SAP systems via the BlackBerry device. The user only has to enter the password to unlock his BlackBerry, and is able to access SAP applications online without any further logon screens".
  To get more detailed info on your query, you may contact one of the following guys in UK, who can have first-hand info:
  - Alberto Zamora (Solution Principal, SAP Mobile Business): [email protected]
  - Nicola Grant (Business Manager, O2 Solutions): [email protected]
  - Nicole Van Gheluwe (Alliances Marketing Manager, EMEA, Research in Motion): [email protected]
  Hope it helps.
Best regards,
Laziz

Similar Messages

  • Tracing queries from abap to a custom database via dblink

    I' m connecting to a database by dblink (name magiap).
    I would like to know if somewhere I can trace all the queries from abap to oracle in this specific session , to dbs ='MAGIAP'.
    For istance, i would like that the query "SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" = '305142941' will be stored some where (in a file??).
    I would like that parameters - w_CODPARTY- will be substituted and stored in the trace file with the value (305142941), as shown in the previous
    Here is the piece of code ..(a very short example of course)..
    DATA : dbs LIKE dbcon-con_name,
    v_CODPARTY(15),
    v_DESPARTY1(60).
    data : w_CODPARTY(15) value '305142941'.
    dbs = 'MAGIAP'.
    TRY.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    IF sy-subrc <> 0.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    ENDIF.
    IF sy-subrc <> 0.
    * RAISE err_conn_aea.
    ENDIF.
    EXEC SQL.
    set connection :dbs
    ENDEXEC.
    EXEC SQL .
    SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" = :w_CODPARTY
    ENDEXEC.
    IF sy-subrc NE 0.
    * rc = 4.
    ENDIF.
    EXEC SQL.
    DISCONNECT :dbs
    ENDEXEC.
    ENDTRY.

    Hi Silvana,
    The SQL statements have been stored in the SQL Cursor Cache, on the database and they will be available until they have been invalidated. You can access the statements at the 'MAGIAP' side and see the last executed queries in the cache.
    You can access bind variables by query on the V$SQL_BIND_CAPTURE table, also.
    On the other hand, you can activate the trace by the statement, below;
    ALTER SYSTEM SET sql_trace = true SCOPE=MEMORY;
    Then, the sql statements will be available in the usertrace file. Please note that you should execute and investigate all the statements that I noted above, at the remote side. Plus, as far as I know that it is not able to distinguish the records by the "dblink name". You should check all the statements and try to figure out what queries have been executed remotely.
    Best regards,
    Orkun Gedik

  • Trace queries from abap to a custom oracle database via dblink

    I' m
    connecting to a database by dblink (name magiap).
    I
    would like to know if somewhere I can trace all the queries from abap to oracle
    in this specific session , to dbs ='MAGIAP'.
    For istance, i would like that the query
    "SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" = '305142941' will
    be stored some where (in a file??).
    I would like that parameters - w_CODPARTY- will be substituted and stored in the trace
    file with the value (305142941), as shown in the previous
    Here
    is the piece of code ..(a very short example of course)..
    DATA : dbs LIKE dbcon-con_name,
    v_CODPARTY(15),
    v_DESPARTY1(60).
    data : w_CODPARTY(15) value '305142941'.
    dbs = 'MAGIAP'.
    TRY.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    IF sy-subrc <> 0.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    ENDIF.
    IF sy-subrc <> 0.
    * RAISE err_conn_aea.
    ENDIF.
    EXEC SQL.
    set connection :dbs
    ENDEXEC.
    EXEC SQL .
    SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" =
    :w_CODPARTY
    ENDEXEC.
    IF sy-subrc NE 0.
    * rc = 4.
    ENDIF.
    EXEC SQL.
    DISCONNECT :dbs
    ENDEXEC.
    ENDTRY.

    Hi Silvana,
    The SQL statements have been stored in the SQL Cursor Cache, on the database and they will be available until they have been invalidated. You can access the statements at the 'MAGIAP' side and see the last executed queries in the cache.
    You can access bind variables by query on the V$SQL_BIND_CAPTURE table, also.
    On the other hand, you can activate the trace by the statement, below;
    ALTER SYSTEM SET sql_trace = true SCOPE=MEMORY;
    Then, the sql statements will be available in the usertrace file. Please note that you should execute and investigate all the statements that I noted above, at the remote side. Plus, as far as I know that it is not able to distinguish the records by the "dblink name". You should check all the statements and try to figure out what queries have been executed remotely.
    Best regards,
    Orkun Gedik

  • How to extract data from BPC InfoCube via ABAP program?

    Hi experts!!
    I tried to extract data from a BPC InfoCube via ABAP program, but I did'n have succeed.
    I used the function 'RSDRI_INFOPROV_READ' to extract data from standard InfoCubes such as '0COPC_C07' and it run OK! However, when I change the InfoCube name to '/CPMB/WAIX8NE' (BPC InfoCube), everything goes wrong...
    Is there any difference between extracting data from BPC and standard InfoCubes?
    Thank you all!

    Moderator message - Welcome to SCN.
    But please do not cross and duplicate post.
    Thread locked.
    Rob

  • Push data from BW 3.5 to XI 3.0 via ABAP proxy

    Hi,
      I have the following scenario: I´m in BW 3.5 trying to send data to XI 3.0 via ABAP proxy. I´ve already found a "How-to" to do build this scenario, but something does not work. I think that problem is when a try do the logon from BW to XI because I got the message "logon data not provided" on http service in XI. I´ve already configure an RFC Destination(SM59) as R/3 connection(type 3) and another as HTTP connection to R/3(type H) and both are correct. Someone knows where I configure the user/pass to logon from BW Intergration Server to XI Integration Server?
    Regards,
    Rafael Soares

    Hello fellows!
       I discovered that my problem was configuration on SXMB_ADM transaction.
       Thank you very much for your help!
    Best regards.
    Rafael

  • Delete Overlapping Requests - by Filename via ABAP Routine

    Hi SDN Community
    Do you know if it is possible to set the delete overlapping request parameters to recoginse the file name, and remove it via the derivation of the file name via an ABAP Routine.
    I am using an ABAP routine to derive the flat flat file upon loading, but do not know the syntax, or if it is possible to set this equivalent code into the delete overlapping request Routine area
    (The code basically derives the first day of the calendar week, for previous weeks in the Do n times Loop
    Thank you.
    Simon
    DATA: ld_CWEEK         TYPE scal-week,
          ld_DATE          TYPE SY-DATUM,
          ld_DATE1         TYPE SY-DATUM,
          lc_DIRECTORY(30) TYPE c,
          ln_YYYY(4)       TYPE n,
          ln_WW(2)         TYPE n.
    *Derive week from sy-datum
    ld_date = SY-DATUM.
    Determine the calendar week from the entered calendar date
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          date           = ld_date
        IMPORTING
          week          = ld_cweek
        EXCEPTIONS
          date_invalid = 1
          OTHERS        = 2.
    Get the First day of the week
            CALL FUNCTION 'WEEK_GET_FIRST_DAY'
              EXPORTING
                week         = ld_CWEEK
              IMPORTING
                date         = ld_DATE1
              EXCEPTIONS
                week_invalid = 1
                OTHERS       = 2.
      Need to find the previous calendar week and reconvert to the first
      day in order to accomodate weeks less than 7 days
      Get the last day of the current calendar week - 2
        DO 2 TIMES.
            ld_DATE1 = ld_DATE1 - 1.
    Determine the calendar week from the last day of the previous week
            CALL FUNCTION 'DATE_GET_WEEK'
              EXPORTING
                date         = ld_DATE1
              IMPORTING
                week         = ld_CWEEK
              EXCEPTIONS
                date_invalid = 1
                OTHERS       = 2.
    Get the First day of the week
              CALL FUNCTION 'WEEK_GET_FIRST_DAY'
                EXPORTING
                  week         = ld_CWEEK
                IMPORTING
                  date         = ld_DATE1
                EXCEPTIONS
                  week_invalid = 1
                  OTHERS       = 2.
        ENDDO.
    *ln_YYYY = ld_CWEEK(4).
    ln_YYYY = ld_DATE1(4).
    ln_WW = ld_CWEEK+4(2).
    *DIRECTORY represnts path where file is stored .
    lc_DIRECTORY = '/interfaces/EDW/data/CSM/'.
    CONCATENATE lc_DIRECTORY
    ld_date '_WEEK' ln_WW '_c1_pri_' ln_YYYY '.csv' into p_filename.
      'MIC_NT_' ld_date1 '_' ln_YYYY '.csv' into p_filename.

    Thank you for your response Debanshu
    However, i could not find this process type in the process chain area.
    Is this where you meant, can you please give me more detailed steps including long syntax of names of process types
    We are on BW 3.50
    i assumed the filename had to be constructed via abap according to some of the sdn replies i've searched through.
    Thank you.
    Simon

  • How to assign an output type to a document via ABAP

    Hello Guru's
    I have an interface with a 3rd party system to send information from deliveries. When a delivery is created, we trigger output with 'Post goods issue' and output triggers the interface.
    We need to also trigger output with 'reverse goods issue' and here is the problem. When GI is cancelled I don't know how to trigger the interface having the control from Sales not from MM.
    I'm thinking to use the same approach assigning an output to the delivery in a user-exit of GI cancellation process. But I don't know how to assign this output to a delivery document using ABAP. I have looked for BAPI's or Functions but no successful.
    - Do you know how to assign outputs to documents via ABAP?
    - Do you have any other idea to trigger the interface when GI is cancelled?
    Thank you in advance,
    Manuel

    Hi,
    Guess u need to maintain it in SPAD transaction.
    Cheers
    VJ

  • Send a mail via ABAP program

    Hello Experts,
    I want to send mail via ABAP program with the following requirements :
    1. Recipient is OUTLOOK email -id
    2. Sender address has to be an external email-id
    3. Send mail as CC and BCC also to other email-id.
    Is there any function module which can satisfy all the above requirements.
    Regards,
    Mansi.

    hi,
    this code will definately help you just go through it:
    firstly  exported the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    regards
    Rahul sharma

  • How to get the file on the content server via ABAP

    Hi
    We are working on an abap that should download certain files stored on the content server and store them on a different file location using  GUI_DOWNLOAD. How can we retrieve the files (PDF's) via ABAP from the contentserver?
    Hope someone can help
    Cheers

    Hi,
    I think the DMS BAPIs could be useful here. For example you can use BAPI Document_CheckOutViewX or Document.CheckOutView2. You will find the documentation for these BAPIs in transaction BAPI under subtopic 'Cross-Application-Components'.
    Further maybe the information in the SAP note 504692 and 796709 could be useful too.
    Best regards,
    Christoph

  • Problem sending xls file in an attachment via ABAP proxy

    Hello,
    I have in tmp directory a xls file, I tranfer such file to a table, and afterwards I send in an attachment via ABAP proxy, here is the code:
         l_attachment        TYPE REF TO if_ai_attachment,
            lt_attach           TYPE prx_attach,
            l_name              TYPE string,
            lx_string           TYPE xstring,
            l_string            TYPE string,
            l_type              TYPE string,
            des                 TYPE string.
      CLASS cl_ai_factory DEFINITION LOAD.
      DATA:    BEGIN OF itab OCCURS 0,
               raw(255) TYPE x,
             END OF itab.
      DATA: l_controller TYPE REF TO if_ai_posting_controller.
      DATA: it TYPE zhcm_mt_segur_out.
      CREATE OBJECT prxy.
      OPEN DATASET orig FOR INPUT IN binary MODE.
      READ DATASET orig INTO itab-raw.
      WHILE sy-subrc = 0.
        APPEND itab.
        READ DATASET orig INTO itab-raw.
      ENDWHILE.
      CLOSE DATASET orig.
      LOOP AT itab.
        CONCATENATE lx_string itab-raw INTO lx_string in byte mode.
      ENDLOOP.
      L_NAME = 'Segur.xls'.
      L_TYPE = CL_AI_ATTACHMENT=>IF_AI_ATTACHMENT~C_MIMETYPE_EXCEL.
      TRY.
          L_ATTACHMENT =
            CL_AI_FACTORY=>CREATE_ATTACHMENT_FROM_binary(
                      P_DATA = LX_STRING
                      P_TYPE = L_TYPE
                      P_NAME = L_NAME ).
          APPEND L_ATTACHMENT TO LT_ATTACH.
          L_CONTROLLER = CL_AI_FACTORY=>CREATE_CONTROLLER( ).
          L_CONTROLLER->SET_ATTACHMENTS( LT_ATTACH ).
          CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS
            EXPORTING
              CONTROLLER = L_CONTROLLER
              OUTPUT     = IT.
          COMMIT WORK.
        CATCH CX_AI_SYSTEM_FAULT .
          DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
          CREATE OBJECT FAULT.
          WRITE :/ FAULT->ERRORTEXT.
      ENDTRY.
    I am using a Mail receiver channel, I receive a mail, with to attachments, one .xml and the other one .bin, I save it to my computer and I change the extension to .xls and when I try to open it, the file is not valid and can be opened after being repaired. What Im doing wrong? I would like to receive a valid xls file, what i should change?
    Thanks a lot,
    Luis

    Hi,
    yes I know, I have used the MessageTransformBean module, and the PayloadSwapBean module. But which parameter I should use for leaving only one attachement in the e-mail. I did this configuration:
    1
    localejbs/AF_Modules/MessageTransformBean
    Local Enterprise Bean
    <b>trans</b>
    2
    localejbs/AF_Modules/PayloadSwapBean
    Local Enterprise Bean
    <b>swap</b>
    3
    localejbs/AF_Modules/MessageTransformBean
    Local Enterprise Bean
    <b>trans1</b>
    4
    localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    Local Enterprise Bean
    mail
    <i><b>Module configuration</b></i>
    trans
    Transform.ContentDisposition
    inline
    swap
    swap.keyName
    payload-name
    swap
    swap.keyValue
    Segur
    trans1
    Transform.ContentDescription
    Segur
    trans1
    Transform.ContentDisposition
    attachment;filename="Segur.xls"
    trans1
    Transform.ContentType
    application/vnd.ms-excel;name="Segur.xls"
    In the e-mail I get one attachement without name .xml and another one Segur.xsl, and I want only one attachment, the last one. What I should change in my configuration??
    Best regards,
    Luis

  • Regarding parallel queries in ABAP same as in oracle 10g

    Hi,
       Is there any way we can write parallel queries in ABAP, in the same way we do in oracle 10g.Kindly see below;
    alter table emp parallel (degree 4);
    select degree from user_tables where table_name = 'EMP';
    select count(*) from emp;
    alter table emp noparallel;
    SELECT /*+ PARALLEL(emp,4) / COUNT()
    FROM emp;
    The idea here is to distribute the load of select query in multiple CPUs for load balancing & performance improvement.
    Kindly advise.
    Thanks:
    Gaurav

    Hi,
    >    Is there any way we can write parallel queries in ABAP, in the same way we do in oracle 10g.
    sure. Since it is just a hint...
    SELECT *
      FROM t100 INTO TABLE it100
      %_HINTS ORACLE 'PARALLEL(T100,4)'.
    will give you such an execution plan for example:
    SELECT STATEMENT ( Estimated Costs = 651 , Estimated #Rows = 924.308 )
           4 PX COORDINATOR
               3 PX SEND QC (RANDOM) :TQ10000
                 ( Estim. Costs = 651 , Estim. #Rows = 924.308 )
                 Estim. CPU-Costs = 33.377.789 Estim. IO-Costs = 646
                   2 PX BLOCK ITERATOR
                     ( Estim. Costs = 651 , Estim. #Rows = 924.308 )
                     Estim. CPU-Costs = 33.377.789 Estim. IO-Costs = 646
                       1 TABLE ACCESS FULL T100
                         ( Estim. Costs = 651 , Estim. #Rows = 924.308 )
                         Estim. CPU-Costs = 33.377.789 Estim. IO-Costs = 646
    PX = Parallel eXecution...
    But be sure that you know what you do with the parallel execution option... it is not scalable.... .
    Kind regards,
    Hermann

  • SELECT  QUERIES IN ABAP.....

    Can you give some idea about writing efficient select queries in ABAP?

    Hi kishan,
      i can give you some hint from one document, please reward point.
    The hit list is the set of rows determined by the WHERE clause. In other words, it is the set of table rows that the database system must take into account to respond to the query. Don’t confuse the hit list with the solution set, which is the set of rows (not necessarily from the table the query deals with) the database system returns to the program. Notice that in many cases the query’s hit list and the solution set are different.
    What is the reason behind this rule? A smaller hit list saves disk I/Os by the database system and often reduces network load. Both of these factors have a strong influence on your program’s runtime performance.
    How can you use ABAP to limit a hit list? First, use a WHERE clause whenever possible. Second, always try to describe the full search condition (not just part of it) within a single WHERE clause. ABAP provides a variety of arithmetical and logical operators to do this. Compared with your application program, the database server is usually the better place to evaluate search conditions.
    Let me give you an example: Run a query against the flight table to produce a list of all flight dates for Lufthansa flight 0300 in 1998. Air carrier and air connection are known and can easily be used within the WHERE clause of the SELECT statement. The relevant year is also given, but at first glance it is difficult to build an appropriate search condition. Faced with this situation, you could be tempted to use the ABAP CHECK statement.
    CHECK evaluates the subsequent logical expression. If it is true, the processing continues with the next statement. CHECK with a negative outcome terminates the current SELECT-ENDSELECT loop to start with the next row of the solution set, if there is one. Considering that fldateis a type D(YYYYMMDD) column of the sflighttable, a correct fragment of an ABAP program could look like this:
    SELECT fldate
      FROM sflight INTO xdate
      WHERE carrid = 'LH'
        AND connid = '0300'.
      CHECK xdate = '1998'.
        WRITE: / xdate.
    ENDSELECT.
    With ABAP in general, CHECK does the job of pattern matching in character variables. But in the WHERE clause of a SELECT statement, pattern matching also can be done easily by applying the LIKE operator. Within the search pattern, two characters have a particular meaning: “_” stands for any one character and “%” stands for any character string. With this in mind, a better solution would be:
    SELECT fldate
      FROM sflight INTO xdate
      WHERE carrid ='LH'
        AND connid ='0300'
        AND fldate LIKE '1998%'.
      WRITE: / xdate.
    ENDSELECT.

  • How to create a dynamic file via ABAP

    Hi all,
    We have a requirement of storing all internal table data into a temporary file in application server and later the same file will be passed as an input to shell script to meet our business requirement. Here I'm not sure how can we create a temporary file at run time through abap . I'm sure this is certainly possible via Java, Can any one suggest me how temporary file will be create via abap. Also please note that developer shouldn't give this file name any where from selection screen and system itself should create a file with certain name.
    Please advise.
    Thanks

    Hope this helps: [Working with files |http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles#Workingwithfiles-Workingwithfilesontheapplicationserver] you need to use open dataset stmt to create files in app server..
    if you check the open dataset stmt in any examples in net, you will find the file name which is of type string... to generate a dynamic file name all you need to do is to build the file name dynamically say by using concatenate statements..
    concatenate 'PROGNAME' sy-datum sy-uzeit into <filename>.
    open dataset <filename> for input .

  • Create Directory via ABAP on Application Server

    Hej folks,
    does anybody know how to create a directory on the ApplServer via ABAP?
    Thanks in advance!
    boris

    You can create an external command via SM69 which you can then invoke through function module SXPG_COMMAND_EXECUTE
    For NT you'd need something like the following:
    Operating system command                             
    cmd                                                                               
    Parameters for operating system command              
    /c mkdir
    $/SAPGLOBALHOST/\?   
    Have fun,
    Mark
    Kudos to Pete Devereux and Pete White

  • Link to Messaging tool data via ABAP stack

    Is there a way to get access to adapter data or the audit log linked to a message id via ABAP class or a FM.
    I'm using objects from CL_XMS_PERSIST and CL_XMS_PERSIST_ADM and either of them does not provide the adapter specific status.
    I really appreciate any leads in this area.
    Thank you.

    Hi Parimala
    I doubt there is any standard ABAP code available to access the adapter framework, since it runs in the J2EE stack. You might be able to access the information you want via http at http://host:port/mdt/monitorservlet, but this would likely require considerable reverse-engineering on your part.
    Regards,
    Thorsten

Maybe you are looking for

  • Windows 2008 Server Enterprise R2 x64 and Perc 4/dc SCSI driver issue

    Hello all, this is the first time posting so please forgive me if this has been posted here before.  I did try to search this issue but zero returns. OK, I have a Dell PowerEdge 2900.  I have just put a fresh install of MS Windows 2008 ENT. Server x6

  • How do you see if apple TV can add a show they don't already sell?

    I want to purchase Avonlea, the 90's show from apple on digital and they don't sell it. Also, the new Outlander series is coming out and apple also does not sell that. Who would I get a hold of to make these suggestions and would they even listen to

  • Trouble connecting my lumia 920 to my nokia suite ...

    my new lumia will not connect to my nokia suite? does anyone know why this happens and how to resolve it. thank you Solved! Go to Solution.

  • Scanned Signature as a Custom Stamp

    I have scanned three different signatures in .pdf format that I would like to use in Acrobat 5 so that I may place my signature on .pdf files. I understand that there is a way to create a "custom stamp" for each of these signatures, but I am ignorant

  • Service code  Long Text

    Hi, Is there any standard report or LIS available which gives the service code(AC03) : long text in report form.. Regards Vikrant Edited by: VIKRANT HANDE on Dec 17, 2010 10:10 AM