How to append records filtered be vbrp-pstyv & konv-kschl

Hi,
I am working on requirement for pricing report .
I have to fetch records from vbrp & pass it in konv to get the konv-kbetr.
My condition would be :
if vbrp-pstyv = 'TAN' or 'zts1' or 'ren'      ----->  then pick konv-kbetr which has kschl = 'vprs'
        "            "  'ZTAC' or 'ztab'                                  "                                         "          'EK02'
       "                'TAX' or 'ztad' or 'ztax'                        "                                        "           'Z004'
I am trying to fetch records based on conditions but the problem is my records from konv table are overwritten & only last record is displayed.
Below is query :
Is there any other way to do this report as I have no idea how SD PRICING works ?? Please advice.

Hi,
     In Second Loop U have used into Corresponding fields,So After a loop completion Ur IT_konv will have only Single Record,Every Time It Gets Refreshed , U may Use Appending Table instead of Corresponding.
     Also U are using Same Loop Two times + Fetching Records from Konv Multiple Times, It Will be time consuming.
  Inplace of loop FOR SELECTION RECORDS FROM KONV
      Simply Use Select Statement as
     SElect knumv kposn kschl kbetr into table it_konv from konv for all enteries in It_join where
          knumv eq It_join-knumv and
          Kposn eq it_join-posnr and
          Kschl in ('VPRS', 'EK02'.........).
In last Loop
          use case statement for pstyv and individual read statement FOR EACH PSTYV
          CASE WA_JOIN-PSTYV.
          WHEN  'ZTAC'.
               READ TABLE IT_KONV INTO WA_KONV WITH KEY KNUMV = WA_JOIN-KNUMV
                                                                                        KPOSN  = WA_JOIN-POSNR
                                                                                         KSCHL = <UR CONDITION TYPE>
               IF SY-SUBRC EQ 0.
                    <ADD KPOSN,KNUMV , KBETR>
               ENDIF.
          WHEN 'ZTAN'.
  READ TABLE IT_KONV INTO WA_KONV WITH KEY KNUMV = WA_JOIN-KNUMV
                                                                                        KPOSN  = WA_JOIN-POSNR
                                                                                         KSCHL = <UR CONDITION TYPE>
               IF SY-SUBRC EQ 0.
                    <ADD KPOSN,KNUMV , KBETR>
               ENDIF.
Regards:

Similar Messages

  • How to append records in a file, through file adapter.

    Hi All,
    How to append records in a file, through file adapter.
    I have to read data from database and need to append all records in a file.
    Thanks in Advance.

    Hi,
    I think you have a while loop to hit the DB in your Process (As you said you have to fetch data from DB 10 times if 1000 rec are there)
    First sopy your DB O/P to one var
    and from second time append to previous data.(Otherwise you can directly use append from starting instead of copy and append)
    When loop completes you can transform to File adapter Var.
    Otherwise you can configure yourFileadapter such that it will aapend current records to previous records.
    You can use 'Append= true' in your file adapter wsdl.
    It will append previous records to current records in the same file.
    Regards
    PavanKumar.M

  • Ref Cursor - How to append records into ref cursor?

    Hi,
    Is it possible to append ref cursor?
    Iam having a procedure which accepts 1 string as input
    parameter. That string will have list of ID delimited by comma.
    I want to extract & match every ID with some tables.
    My problem is for first ID i would get 10 records
    and for 2nd ID i 'l get other 20 records. But while returning
    i need to send the same(10 + 20 records) as ref cursor(OUT parameter).
    But in below given code i could send only last 20 records. first
    10 records are not append/updated into ref cursor.
    How to append 2nd 20 records with 1st 10 records? so that i can
    send all the 30 records.
    Here goes my code...
    CREATE OR REPLACE PROCEDURE getCRMGroupsAndRollups_PRC
    in_groupId IN VARCHAR2,
    out_getCRMGroups OUT TYPES.DATASET
    IS
    v_temp VARCHAR2(500) := in_groupId ||',';
    v_temp_split VARCHAR2(500);
    v_pos1 NUMBER := 0;
    v_pos2 NUMBER := 1;
    v_pos3 NUMBER := 0;
    v_extract_char VARCHAR(1) := NULL;
    v_comma_cnt NUMBER := 0;
    BEGIN
    -- check in for null input parameters
    IF ( in_groupId IS NOT NULL ) THEN
    -- loop to count no of in_groupId
    FOR j IN 1..LENGTH(v_temp)
    LOOP
         v_extract_char := SUBSTR(v_temp,j,1);
         IF (v_extract_char = ',') THEN
              v_comma_cnt := v_comma_cnt + 1;
         END IF;     
    END LOOP;
    -- loop to extract in_group Id
    FOR i IN 1..v_comma_cnt
    LOOP
         v_pos1 := instr(v_temp,',',(v_pos1 + 1));
         v_pos3 := ((v_pos1-1) - v_pos2 )+ 1;
         v_temp_split := SUBSTR(v_temp,v_pos2,v_pos3);
         v_pos2 := v_pos1 + 1;
    -- query to return dataset filled BY list of all the current
    -- CRM groups and the associated rollup groups
    OPEN out_getCRMGroups FOR
    SELECT
    DISTINCT
    gcs.crm_st_id_cd,
    gcs.lgcy_roll_up_grp_num,
    gcs.lgcy_roll_up_grp_name,
    gcs.grp_xwalk_complt_dt,
    gcs.crm_grp_num,
    gcs.facets_gnat_id,
    gcs.crm_grp_name
    FROM
    grp_convsn_stat gcs
    --lgcy_xref_elem lxe
    WHERE
    ( gcs.mbrshp_convsn_aprvl_dt = NULL )
    OR ( gcs.mbrshp_convsn_aprvl_dt < (SYSDATE - 7 ) )
    AND ( gcs.facets_grp_stat_actv_ind = 'Y' )
    AND ( gcs.lgcy_roll_up_grp_num = v_temp_split );
    END LOOP;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('INTERNAL ERROR');
    END getCRMGroupsAndRollups_PRC;
    in this v_temp_split will have extracted id & iam opening
    ref cursor for each & every ID extracted from list.
    2) How to handle no_data_found exception for this ref cursor?
    Please help me....
    -thiyagarajan.

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425
    Message was edited by:
    Kamal Kishore

  • How to append records to a field symbols?

    Hi all,
    is there a way to append records from an internal table fto a field symbol of type table.

    Hi Daphne,
    Changing internal table to which field symbol is pointing will automatically change data accessed by field-symbol as it is only pointer to internal table..
    Regards,
    Mohaiyuddin..

  • How to append records in MSAccess through Java using JDBC:ODBC

    Hello,
    I was able to retrieve records from MSAccess database through JAVA over the JDBC-ODBC bridge.
    If I want to append records to a table (for eg. photo1 table containing photono., length, breadth, area as
    columns) I could not able to do so through JAVA.
    I am using JTable with the above fields. The user is displayed with the JTable and he has to enter
    data inside the JTable and press a button titled "Append". Then the JAVA program should append
    whatever the user has entered in the JTable as a single record inside the MSAccess database.
    Can anyone help me please?

    hi i too am having similar problem. i am able to create a table in ms access through java but when i insert values i get a msg that it has inserted the values but when i check the table by opening ms-access there are no values in the table.
    the insert statement i am using is
    " insert into tk1 values(3,'tarun')"
    further i tried using the methods commit, setAutoCommit etc with the connection object. -NO GO.
    can you help me ?

  • How to append records to final table with conditions

    Hi
    I am working on a report using tables vbrp vbrk glpca & konv to fetch the amount of billing document based on condition type (kschl)
    Below is my query & records are fetching fine. But now I need to append my final display table.
    Question 1.... which table I should loop into  & which tables should be read ?
    Question 2.... I want 4 coulumn in my alv to display amount from konv based on condition type (VPRS, ZK03,Z004, EK02)
    EX:   vbeln          refdocnr         fkdat    ............     VPRS-KBETR    ZK03-KBETR    Z004-KBETR    EK02-KBETR
             000001      000001        1.1.14    ............        14.00               -12.00                 5.00                 0.02
             000002      000002        2.02.14  .........          18.00              -10.00                  0.00                0.00
    It may be possible that for particular record there would be on ZK03 & VPRS VALUES BUT NO Z004 & EK02 so it will display 0 in that cell.
    WITH ABOVE mentioned output how should I put my condition to read it_konv  table based on condition types but append it in different colums for display  ???
    Is there a solution available or not please guide me through this.

       *declare output itab
    DATA: BEGIN OF it_output,
      vbeln type....
      refdocnr...
      fkdat...
      vprs_kbetr...
      zk03_kbetr..
      z004_kbetr...
      ek02_kbetr...
    end of it_output.
    LOOP AT it_join INTO wa_join.
      MOVE vbeln fkdat from wa_join into wa_output.
      LOOP AT it_konv INTO wa_konv
        with key.....
        CASE wa_konv-kschl.
          WHEN 'VPRS'.
            MOVE wa_konv-kbetr TO wa_output-vprs_kbetr.
            etc....
        ENDCASE.
        READ TABLE it_glpca WITH KEY.... into wa_glpca.
        IF sy-subrc = 0.
          MOVE wa_glpca-refdocnr TO wa_output-refdocnr.
        ENDIF.
        APPEND wa_output TO it_output.
      ENDLOOP.
    ENDLOOP.

  • How to append recorded files.

    Two questions.
    I am using adobe dvrcast to record my live streams. the problem I am having is when I stop the encode during a live stream, a new file is not created, the existing stream is written over. How can I preventive this from occuring.
    Is there a way to have all vod files that are in one folder to roll over to the next file during play back.

    Thanks for the quick response. I am using FMLE 3 and FMS 3.5. I have changed the code per your suggestion. However, the file still does not append when i press the stop button in FMLE. After pressing stop, when I press start button in FMLE again, the file size starts at zero.
    here is my code: ExDVRStream.asc
    /*----------------------------------------------------------------------------+
    |       ___     _       _                                                    |
    |      /   |   | |     | |                                                   |
    |     / /| | __| | ___ | |__   ___                                           |
    |    / /_| |/ _  |/ _ \|  _ \ / _ \                                          |
    |   / ___  | (_| | (_) | |_) |  __/                                          |
    |  /_/   |_|\__,_|\___/|____/ \___|                                          |
    |                                                                            |
    |                                                                            |
    |  ADOBE CONFIDENTIAL                                                        |
    |  __________________                                                        |
    |                                                                            |
    |  Copyright (c) 2008, Adobe Systems Incorporated. All rights reserved.      |
    |                                                                            |
    |  NOTICE:  All information contained herein is, and remains the property    |
    |  of Adobe Systems Incorporated and its suppliers, if any. The intellectual |
    |  and technical concepts contained herein are proprietary to Adobe Systems  |
    |  Incorporated and its suppliers and may be covered by U.S. and Foreign     |
    |  Patents, patents in process, and are protected by trade secret or         |
    |  copyright law. Dissemination of this information or reproduction of this  |
    |  material is strictly forbidden unless prior written permission is         |
    |  obtained from Adobe Systems Incorporated.                                 |
    |                                                                            |
    |          Adobe Systems Incorporated       415.832.2000                     |
    |          601 Townsend Street              415.832.2020 fax                 |
    |          San Francisco, CA 94103                                           |
    |                                                                            |
    +----------------------------------------------------------------------------*/
    load("ExUtil.asc");
    * An example dvr stream class that handlings requests initiated from the
    * publisher and subscribers.
    * @param name    live streams name as visible to the client subscribers
    * @param numsubscriber  number of subscribers
    * @param subscribers  a map of subscribing client based on the client id
    * @param publisher   publishing client
    * @param streamInfo  holds default DVR stream info or stream info provided
    *       by the publisher
    * @param startRecTimer  Id returned by the scheduler to start recording
    * @param stopRecTimer  Id returned by the scheduler to stop recording
    * @param broadcastTimer Id returned by the scheduler to broadcast stream info
    *       to down stream servers
    * @param broadcastInterval how often to broadcast stream info
    function ExDVRStream( name ) {
    this.name = name;     // clients subscribe to this stream name
    this.numsubscriber = null;   // number of subscribers
    this.subscribers = new Object(); // map of current subscribers
    this.publisher = null;    // client publisher, this is only set in the origin
    this.streamInfo = null;    // streamInfo provided by the publisher
    this.startRecTimer = null;   // scheduler id to start recording
    this.stopRecTimer = null;   // scheduler id to stop recording
    this.broadcastTimer = null;   // scheduler id for broadcasting
    this.broadcastInterval = 5000;  // set the interval to 5 sec by default
    this.isRecording = false;   // flag to indicate if the stream is recording
    // Public interface
    * This function gets call when a client is added as a subcriber of the stream.
    * If the client is already a subscriber, it will be a no-op.
    ExDVRStream.prototype.addSubscriber = function( client )
    if (this.subscribers[client.id] == null)
      this.subscribers[client.id] = client;
      this.numsubscriber++;
    * Removes a client from the subscriber list. 
    ExDVRStream.prototype.removeSubscriber = function( client )
    if (this.subscribers[client.id])
      this.subscribers[client.id] = null;
      delete this.subscribers[client.id];
      this.numsubscriber--;
    * This function broadcast streamInfo to all the subscriber which
    * is acting as a server
    ExDVRStream.prototype.broadcastStreamInfo = function()
    debug("Inside ExDVRStream.broadcastStreamInfo - stream name: " +
      this.name);
    for (i in this.subscribers)
      subscriber = this.subscribers[i];
      if (subscriber.isProxyServer)
       subscriber.call("DVRSetStreamInfo", null, this.getStreamInfo());
    * Set the publishing client
    ExDVRStream.prototype.publish = function( client )
    this.publisher = client;
    * Clear the publishing client
    ExDVRStream.prototype.unpublish = function()
    this.publisher = null;
    * This function returns a boolean to indicate whether the stream is in use
    ExDVRStream.prototype.isInUse = function()
    if (this.numsubscriber > 0 || this.publisher)
      return true;
    return false;
    * This function cleans up all the resources used by this stream
    ExDVRStream.prototype.shutdown = function()
    debug("Inside ExDVRStream.shutdown");
    clearInterval(this.startRecTimer);
    clearInterval(this.stopRecTimer);
    clearInterval(this.broadcastTimer);
    this.startRecTimer = null;
    this.stopRecTimer = null;
    this.broadcastTimer = null;
    * Returns the default streamInfo if no streamInfo has been
    * set by the publisher
    ExDVRStream.prototype.getDefaultStreamInfo = function( DVRStreamInfo )
    //If server restarts and no publisher is coming in, we check
    //the length of the recorded stream and see if we should make
    //the dvr content available.  However, user can customize this
    //function and make an external call.
    streamLen = Stream.length(this.name);
    if (streamLen || this.publisher)
      //found a dvr stream, so return it
      DVRStreamInfo.code = "NetStream.DVRStreamInfo.Success";
      this.streamInfo = new Object();
      //setup default value
      this.streamInfo.streamName = this.name;
      this.streamInfo.callTime = new Date();
      this.streamInfo.startRec = new Date();
      this.streamInfo.stopRec = new Date();
      this.streamInfo.maxLen = Stream.length(this.name);
      this.streamInfo.begOffset = 0;
      this.streamInfo.endOffset = 0;
      this.streamInfo.append = false;
      this.streamInfo.offline = false;
      this.streamInfo.currLen = Stream.length(this.name);
      this.streamInfo.isRec = false;
      DVRStreamInfo.data = this.streamInfo;
    else
      DVRStreamInfo.code = "NetStream.DVRStreamInfo.Failed";
      DVRStreamInfo.data = null;
    * Get streamInfo and create a default one if no streamInfo
    * has been set.
    ExDVRStream.prototype.getStreamInfo = function()
    debug("Inside ExDVRStream.getStreamInfo");
    DVRStreamInfo = new Object();
    if (this.streamInfo == null)
      this.getDefaultStreamInfo(DVRStreamInfo);
    else if (this.streamInfo.offline)
      DVRStreamInfo.code = "NetStream.DVRStreamInfo.Failed";
      DVRStreamInfo.data = null;
    else
      DVRStreamInfo.code = "NetStream.DVRStreamInfo.Success";
      DVRStreamInfo.data = this.streamInfo;
      DVRStreamInfo.data.isRec = this.isRecording;
      DVRStreamInfo.data.currLen = Stream.length(this.name);
    return DVRStreamInfo;
    * Set streamInfo, also handleStreamInfo to start/stop a recording
    ExDVRStream.prototype.setStreamInfo = function( streamInfo )
    debug("Inside ExDVRStream.setStreamInfo");
    //Right now, this only get called from the FMLE when
    //the publisher start/stop a recording
    currDate = new Date();
    currTime = currDate.getTime();
    this.streamInfo = streamInfo;
    this.streamInfo.lastUpdate = currDate;
    startRecTime = 0;
    stopRecTime = 0;
    if (streamInfo.startRec == -1 || streamInfo.startRec == undefined)
      startRecTime = -1000;
    else if (streamInfo.startRec instanceof Date)
      startRecTime = streamInfo.startRec.getTime();
    else
      //invalid startRec format
      return;
    if (streamInfo.stopRec == -1 || streamInfo.stopRec == undefined)
      stopRecTime = -1000;
    else if (streamInfo.stopRec instanceof Date)
      stopRecTime = streamInfo.stopRec.getTime();
    else
      //invalid stopRec format
      return;
    if ( startRecTime == -1000 && stopRecTime == -1000 )
      //broadcast the change to all the downstream server
      this.broadcastStreamInfo(streamInfo);
      return;
    if (stopRecTime != -1000)
      //We are about to stop a recording, so clear the timer
      clearInterval(this.stopRecTimer);
      this.stopRecTimer = null;
      if (currTime < stopRecTime)
       timeDiff = stopRecTime - currTime;
       //we will broadcast the streamInfo to all the downstream server
       //when we actually stop the recording inside onStopRecord
       this.stopRecTimer = setInterval(this, "onStopRecord", timeDiff);
      else
       //stop recording immediately
       this.onStopRecord();
    if (startRecTime != -1000)
      //We are about to start a recording, so clear the timer
      clearInterval(this.startRecTimer);
      this.startRecTimer = null;
      if (currTime < startRecTime)
       timeDiff = startRecTime - currTime;
       //we will broadcast the streamInfo to all the downstream server
       //when we actually start the recording inside onStartRecord
       this.startRecTimer = setInterval(this, "onStartRecord", timeDiff);
      else
       //start recording immediately
       this.onStartRecord();
    * This is called when we are about to stop a recording
    ExDVRStream.prototype.onStopRecord = function()
    this.isRecording = false;
    clearInterval(this.stopRecTimer);
    this.stopRecTimer = null;
    s = Stream.get(this.name);
    s.record(false);
    //notify the downstream server immediately
    this.broadcastStreamInfo(this.streamInfo);
    //also stop the periodic broadcast because the stream is not growing
    this.stopStreamInfoBroadcast();
    * This is called when we are about to start a recording
    ExDVRStream.prototype.onStartRecord = function()
    debug("Inside ExDVRStream.onStartRecord");
    this.isRecording = true;
    clearInterval(this.startRecTimer);
    this.startRecTimer = null;
    s = Stream.get(this.name);
    if (this.streamInfo.append)
      s.record("append");
    else
      s.record("append");
    //notify the downstream server immediately
    this.broadcastStreamInfo(this.streamInfo);
    //also start the periodic broadcast because the stream is growing
    this.startStreamInfoBroadcast();
    * Stop the timer to broadcast streamInfo to downstream servers
    ExDVRStream.prototype.stopStreamInfoBroadcast = function()
    clearInterval(this.broadcastTimer);
    this.broadcastTimer = null;
    * Start the timer to broadcast streamInfo to downstream servers
    ExDVRStream.prototype.startStreamInfoBroadcast = function()
    debug("ExDVRStream.Inside startStreamInfoBroadcast");
    this.stopStreamInfoBroadcast();
    this.broadcastTimer = setInterval( this, "onStreamInfoBroadcast",
      this.broadcastInterval)
    * This is called by scheduler to broadcast streamInfo to the
    * downstream servers
    ExDVRStream.prototype.onStreamInfoBroadcast = function()
    debug("Inside ExDVRStream.onStreamInfoBroadcast");
    this.broadcastStreamInfo();

  • How to append records?

    Is there any sql command that can append some or all records from one table to another table?
    Or it has to use cursor to select data then insert into the distination table?

    Can you explain why you are looking for another way? What's wrong with using an INSERT INTO ... SELECT ... FROM? This is certainly the most straightforward method.

  • How to append records between two internal tables

    hi all,
    im trying to append from an internal table to another internal table with same structure. i tried the following but it overwrites previous contents of i_dest:
    move i_src to i_dest
    thanks,
    sid

    hey u try to move it record by record
    <b>itab2 = itab.
    append itab2.</b>
    This should work I guess
    just check the code below, if u want to move the whole itab into itab2 then use <b>itab2[] = itab.</b>
    <b>loop at it_pgm.
      read table itab with key obj_name = it_pgm-pgm_name.
      if sy-subrc = 0.
        itab_final-obj_name = itab-obj_name.
        itab_final-func_spec = itab-func_spec.
        itab_final-func_area = itab-func_area.
        itab_final-dev_class = itab-dev_class.
        append itab_final.
    else.
       itab_alt-pgm_name = it_pgm-pgm_name.
       append itab_alt.
      endif.</b>
    please reward points if found helpful

  • How to append DB records using OdiSqlUnload tool

    Hi
    Can any one please help me on how to append DB records using OdiSqlUnload tool.
    Work Scenario: I created a loop in a package and want to stored error records into xls file. I tried, but it is storing only recent record got failed
    Any sugession or help on OdiSqlunload tool
    Thanks
    Phani

    Hi Guru,
    I tried It is storing last record but I want to store all failure records (which are in a loop) into excel file
    Please help me
    Thanks
    Phani
    Edited by: Phanikanth on Jul 15, 2010 8:25 PM

  • How to delete records from dynamic internal table.

    Hi Experts,
    Need urgent help!!!
    Issue is with Dynamic internal tables.
    Below is code written by me :
    FORM select_query USING Lw_tabnam
                      TYPE  t682i-kotabnr.
      DATA :  lw_line  TYPE REF TO data,
              lw_line1 TYPE REF TO data.
        CREATE DATA Lw_line    TYPE (lw_TABNAM).
        ASSIGN      Lw_line->* TO   <WA_tbl>.
        CREATE DATA LW_LINE    TYPE STANDARD TABLE OF (Lw_tabnam)
                               WITH NON-UNIQUE DEFAULT KEY.
        ASSIGN      Lw_line->* TO <TBL>.
        SELECT * FROM  (Lw_tabnam)
                 INTO CORRESPONDING FIELDS OF TABLE <TBL>
                 WHERE (t_keys).
    Endform.
    code is working fine.
    here even the table name and where condition are dynamic,everything is fine upto this point.
    Now i have to delete some record from <TBL> based on some conditons.
         for ex : ( here lc_fieldname is KUNNR)
          loop at t_kunnr.
              lw_tabix = sy-tabix.
            Read table <tbl>
                    with key (lc_fieldname) = t_kunnr-kunnr ASSIGNING <wa_tbl>.
            If sy-subrc = 0.
            *Delete
            delete <tbl> from <wa_tbl>
    delete <tbl> index  lw_tabix.
            Endif.
         Endloop.
    The above delete statement doesn't work ,even we can't use index as it gives a syntax error " something related to "index is not allowed in standard table or hash table.
    Can you help me ab't how to delete records in Dynamic internal table?
    Other option that i am thinking of is to create a static table of type dynamic table.
    means, data itab type standard table of <tbl> .I know the syntax is wrong ,however is there any way to do this?
    Thanks in advance ,
    If you have any suggestion ab't this then do let me know.
    bye,
    Gaurav.

    Hi
    I wrote this code and it works fine:
    DATA LW_TABNAM(10) VALUE 'LFA1'.
    DATA : LW_LINES TYPE REF TO DATA,
           LW_LINE  TYPE REF TO DATA.
    FIELD-SYMBOLS: <TABLE> TYPE TABLE,
                   <WA>    TYPE ANY.
    CREATE DATA LW_LINES TYPE TABLE OF (LW_TABNAM)
    WITH NON-UNIQUE DEFAULT KEY.
    ASSIGN LW_LINES->* TO <TABLE>.
    CREATE DATA LW_LINE TYPE (LW_TABNAM).
    ASSIGN LW_LINE->* TO <WA>.
    DO 10 TIMES.
      APPEND INITIAL LINE TO <TABLE>.
    ENDDO.
    SY-TABIX = 4.
    DELETE <TABLE> INDEX SY-TABIX.
    WRITE SY-SUBRC.
    I hope it help you
    Max

  • How to search records in a standard table with * ?

    Hi everyone,
    Can anyone tell me how to search records in a standard table with * ?
    That is, in screen if user type * abc * for searching the records in which the field MC_STEXT contains 'abc'. What the code should be? How to complete the code below?
      SELECT SINGLE objid FROM p1000  INTO p1000-objid,
      WHERE MC_STEXT = ? .
    Thanks!

    Hi
    There are several way to do that, probably just as some guys wrote the easier way is to use LIKE in WHERE condition and the sign % instead of *:
    V_STRING = '%ABC%'.
    SELECT SINGLE objid FROM p1000 INTO p1000-objid,
    WHERE MC_STEXT LIKE V_STRING.
    U can also use a range (just like select-options):
    RANGES: R_MC FOR P1000-MC_STEXT.
    R_MC-LOW = 'ABC'.
    R_MC(3) = 'ICP'.
    APPEND R_MC.
    SELECT SINGLE objid FROM p1000 INTO p1000-objid,
    WHERE MC_STEXT IN R_MC.
    Max

  • How to keep the filtered output in a page after user navigates back?

    How to keep the filtered output in a page after user navigates back to all records from another page.
    Currently it clears the search

    Hi,
    user13091824 wrote:
    How to keep the filtered output in a page after user navigates back to all records from another page.
    Currently it clears the search---While returing from page AM Return status should be True in pageContext.setForwardURL.:::
    pageContext.setForwardURL("OA.jsp?page=/XXX/oracle/apps/po/msg/webui/SearchPG",
    "SUPP_SEARCH",
    OAWebBeanConstants.GUESS_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    ---After setting AM Status to true u can able to c the values.
    Regards
    Meher Irk

  • How to make records  to the table TRFCQIN

    hi all,
    anyone can tell me
    how to make records  to the table TRFCQIN
    regards

    Hi Wanna,
                    Write a module pool program to enter record into table TRFCQIN.
    Take fields to which u want to make entries in module pool.
    Use insert command to append data in table TRFCQIN.
    Refer this code :
    CASE OK_CODE_101.
    WHEN 'SAV1'.
    TRFCQIN-QNAME = 'XYZ'.
    TRFCQIN-QCOUNT = "Screen field name at which user will enter value
    INSERT TRFCQIN.
    if sy-subrc <> 0.
    message e007.
    else.
    clear TRFCQIN.
    clear ok_code_101.
    endif.
    endcase.
    Reward points if helpful.
    Regards,
    Heamnt

  • How to append the data list bod (JList)

    how to append the data list box (JList)
    Message was edited by:
    raju_2reddy

    For this you will need a nested internal table. such that each column of the internal table should be declared as another internal table.
    Try something like this :
    " Lets say that the type of table that will be returned by the function BOM is ty_ret_tab, then declare as follows
    types begin of ty_tab,
    c1 type table of ty_ret_tab,
    c2 type table of ty_ret_tab,
    end of ty_tab.
    data gt_tab type standard table of ty_tab,
            gwa_tab like ty_tab.
    Now the question is how many columns should you declare ? Because you said that in a loop you intend to call a function which will return a internal table and this internal table you need to store in a column of another internal table. And if this is not fixed, you would need to do some dynamic programming to achieve this.
    But if we assume that there are fixed number of columns and fixed number of loops, then within the loop, you wiill have to simply move the data from the returned table to each of the columns. Then append the work area outside the loop.
    data field(30) type c.
    data c_tabix(10) type c.
    field-symbols <fs> type ret_tab.  " this should be
    Loop at itab.
    call function BOM...
    exporting...
    importing.....
    tables  ret_itab.
    c_tabix = sy-tabix.
    concatenate 'C' c_tabix into field.
    condense field.
    assign component  (field) of structure gwa_tab to <fs>.
    <fs> = ret_tab.   " Pass data to each column
    endloop.
    append gwa_tab to gt_tab.  " Now a single record with all columns containing an internal table is built.
    Hope this pseudo code helps.
    BR,
    Advait

Maybe you are looking for

  • Ipod nano frozen with screen on

    just had my ipod over 2 days. worked really fine and I was so pleased with it. but now...when i turned it on, it did not play the music. It is in pauze mode,and frozen. My pc does not recognize when i connect it. I tried several usb 2.0 ports but no

  • Xsl:template in insert-request

    Hi all I try to use <xsl:call-template > in the transform page that is being call from <xsql:insert-request> but I get an error <xsql-error action="xsql:insert-request"><message>XSL-1049: Template '' invoked but not defined.</message></xsql-error> i

  • Difference between user_tab_columns and all_tab_columns

    Hi, Can anybody please let me know what are the differeneces between user_tab_columns and all_tab_columns. Thank you.

  • Service Agreement and Service Level Agreement

    Hi Can anyone provide me a copy of Service agreement and Service level agreement which can used between sap partner and a customer. I am doing my first implementation in SAP B1 and i want to make this agreement with my customer before i start impleme

  • Transform XML

    Hi to you all. I have a XML(with a some elements) and that i want to transform to a XML that as the design of a XMLForms. I´ve already created a XMLForm and so I have the schema and xsl (but the names of the elements that I´m using are diferent from